:root {
  --ink: #171923;
  --muted: #5f6877;
  --line: #d9dee7;
  --surface: #ffffff;
  --soft: #f6f8fb;
  --accent: #2f7df6;
  --accent-dark: #1d5ec2;
  --teal: #35b9aa;
  --teal-soft: #e5f8f5;
  --warning: #f4b84a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #f2f4f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 40px;
  padding: 0 30px;
  background: var(--surface);
  color: var(--muted);
  border-bottom: 1px solid #eceff4;
}
.topbar .route { grid-column: 2; color: #a0a6b1; }
.brand-band {
  background: var(--surface);
  border-bottom: 2px solid #a855f7;
  padding: 28px clamp(24px, 6vw, 86px) 16px;
}
.brand-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto 24px;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 27px; }
h2 { font-size: 24px; }
h3 { font-size: 17px; }
.banner {
  display: block;
  width: min(100%, 1280px);
  height: auto;
  aspect-ratio: 1280 / 150;
  object-fit: contain;
  margin: 0 auto;
  background: #fff;
}
.main-nav {
  display: flex;
  gap: 8px;
  padding: 12px clamp(24px, 6vw, 86px);
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
.main-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
}
.main-nav a:hover { background: var(--teal-soft); text-decoration: none; }
.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 34px) 56px;
  background: var(--surface);
  min-height: calc(100vh - 260px);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.button:hover { background: var(--accent-dark); text-decoration: none; }
.button.secondary { background: #eef3ff; color: var(--accent-dark); }
.login-panel {
  max-width: 840px;
  margin: 70px auto 0;
}
.form-grid {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}
.form-grid input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
}
.form-grid .button { width: fit-content; margin-top: 8px; }
.form-error, .message {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #efb5b5;
  background: #fff5f5;
  color: #8a2525;
}
.page-heading, .detail-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 30px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 10px;
}
.stats-row div {
  min-width: 108px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.stats-row strong { display: block; font-size: 22px; }
.stats-row span { color: var(--muted); font-size: 12px; font-weight: 700; }
.table-section, .section-band, .split-section { margin-top: 28px; }
.split-section, .two-col, .document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  margin-top: 18px;
}
table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}
th, td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}
th { background: #ededee; font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.compact table { min-width: 640px; }
.pill, .status {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #186d65;
  font-size: 12px;
  font-weight: 800;
}
.status.ok { background: #e8f7ec; color: #1f7a37; }
.status.muted { background: #f1f2f5; color: #697080; }
.inline-link { display: inline-block; margin-right: 8px; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}
.breadcrumb a::after { content: "/"; margin-left: 8px; color: #abb2bf; }
.detail-head p { max-width: 760px; color: var(--muted); }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  min-width: min(100%, 420px);
  margin: 0;
}
.meta-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
dd { margin: 3px 0 0; font-weight: 700; }
.item-list { display: grid; gap: 10px; margin-top: 16px; }
.list-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.list-item:hover { border-color: var(--accent); text-decoration: none; }
.list-item span { color: var(--muted); }
.list-item.static:hover { border-color: var(--line); }
.empty { color: var(--muted); }
.document-layout { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
.file-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}
.file-tab {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.file-tab.active { border-color: var(--accent); background: #eef5ff; }
.viewer-panel {
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.viewer-toolbar strong { overflow-wrap: anywhere; }
.viewer-frame { width: 100%; height: 610px; border: 0; background: #f7f8fb; }
.download-panel {
  display: grid;
  place-content: center;
  min-height: 610px;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr; gap: 4px; padding: 10px 18px; }
  .topbar .route { grid-column: 1; }
  .brand-inner, .page-heading, .detail-head { flex-direction: column; }
  .stats-row, .split-section, .two-col, .document-layout, .meta-grid { grid-template-columns: 1fr; }
  .page-shell { padding-inline: 16px; }
  h1 { font-size: 23px; }
  h2 { font-size: 21px; }
}
