/* ── Vilki & Co. Design System ───────────────────────────────────────────── */
:root {
  --brand:    #3D0A0A;
  --brand2:   #6B1010;
  --accent:   #A0785A;
  --border:   #E2E2E2;
  --gray:     #F8F8F8;
  --tint:     #FAF3F0;
  --body-bg:  #F0EDED;
  --text:     #1A1A1A;
  --sub:      #666;
  --shadow:   0 1px 6px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 13px;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.5;
}

/* ── Typography helpers ── */
.mono { font-family: 'DM Mono', 'Courier New', monospace; }

/* ── Header ── */
.site-header {
  background: var(--brand);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
}

.logo-link { text-decoration: none; }

.logo-wm { display: flex; flex-direction: column; line-height: 1; }

.logo-n {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .04em;
  line-height: 1;
}
.logo-n em { font-weight: 300; font-style: italic; }

.logo-s {
  font-family: 'DM Mono', monospace;
  font-size: 7px;
  letter-spacing: .22em;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  margin-top: 5px;
}

.header-right { text-align: right; }
.header-title { font-size: 12px; font-weight: bold; color: #fff; letter-spacing: .5px; }
.header-sub { font-size: 9px; color: rgba(255,255,255,.5); margin-top: 3px; font-family: 'DM Mono', monospace; letter-spacing: .1em; }

/* ── Engagement bar (on show page) ── */
.eng-bar {
  background: rgba(0,0,0,.25);
  padding: 10px 32px;
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}

.eng-field {
  padding: 0 20px;
  border-right: 1px solid rgba(255,255,255,.12);
  flex: 1;
  min-width: 120px;
}
.eng-field:first-child { padding-left: 0; }
.eng-field:last-child { border-right: none; }
.eng-field label {
  display: block;
  font-size: 8px;
  font-weight: bold;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  font-family: 'DM Mono', monospace;
}
.eng-val { color: #fff; font-size: 11px; font-family: 'DM Sans', Arial; }
.eng-field--actions { display: flex; align-items: center; }
.eng-edit-btn {
  font-size: 10px;
  font-weight: bold;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.3);
  padding: 4px 12px;
  border-radius: 3px;
  white-space: nowrap;
}
.eng-edit-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.eng-delete-btn {
  font-size: 10px;
  font-weight: bold;
  color: #FCA5A5;
  background: transparent;
  border: 1px solid rgba(252,165,165,.4);
  padding: 4px 12px;
  border-radius: 3px;
  white-space: nowrap;
  cursor: pointer;
}
.eng-delete-btn:hover { background: rgba(185,28,28,.3); color: #fff; border-color: #FCA5A5; }

/* ── Nav ── */
.main-nav { border-top: 1px solid rgba(255,255,255,.1); }

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
}

.nav-links { display: flex; gap: 0; }

.nav-link {
  display: inline-block;
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  letter-spacing: .3px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover { color: #fff; }
.nav-link.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-user-name { font-size: 11px; color: rgba(255,255,255,.8); font-weight: 500; }
.nav-user-role {
  font-size: 9px;
  color: rgba(255,255,255,.45);
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .2em;
}
.nav-logout {
  font-size: 10px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 3px;
}
.nav-logout:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }

/* ── Main / Footer ── */
.site-main { min-height: calc(100vh - 160px); }

.site-footer {
  background: var(--brand);
  color: rgba(255,255,255,.4);
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  letter-spacing: .1em;
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

/* ── Page heading ── */
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.1;
}
.page-sub { font-size: 11px; color: var(--sub); margin-top: 4px; }

.breadcrumb-link { color: var(--accent); text-decoration: none; }
.breadcrumb-link:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 4px;
  font-family: 'DM Sans', Arial;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand2); }
.btn-outline { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-outline:hover { background: var(--tint); }
.btn-ghost { background: transparent; color: var(--sub); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--gray); }
.btn-sm { padding: 4px 12px; font-size: 11px; }
.btn-full { width: 100%; }

/* ── Cards ── */
.section-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--brand);
}
.section-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--brand);
  letter-spacing: .2px;
  text-transform: uppercase;
}

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  border-left: 4px solid var(--brand);
}
.stat-card--warn { border-left-color: var(--accent); }
.stat-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card--warn .stat-value { color: var(--accent); }
.stat-label { font-size: 11px; color: var(--sub); font-weight: 500; margin-bottom: 8px; }
.stat-link { font-size: 10px; color: var(--accent); text-decoration: none; }
.stat-link:hover { text-decoration: underline; }

/* ── Quick actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.qa-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.qa-card:hover { border-color: var(--brand); box-shadow: 0 2px 12px rgba(61,10,10,.12); }
.qa-icon { font-size: 24px; color: var(--brand); margin-bottom: 8px; }
.qa-label { font-size: 11px; font-weight: 500; color: var(--sub); }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  padding: 9px 14px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-family: 'DM Mono', monospace;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--tint); }
.data-table tr:nth-child(even) td { background: var(--gray); }
.data-table tr:nth-child(even):hover td { background: var(--tint); }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions .btn + .btn { margin-left: 6px; }
.table-link { color: var(--brand); text-decoration: none; }
.table-link:hover { text-decoration: underline; }

/* ── Status badges ── */
.status-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: 'DM Mono', monospace;
  letter-spacing: .05em;
}
.status-planning    { background: #E3F2FD; color: #1565C0; }
.status-fieldwork   { background: #FFF3CD; color: #856404; }
.status-completion  { background: #FFF8E1; color: #F57F17; }
.status-reporting   { background: #E8F5E9; color: #2E7D32; }
.status-closed      { background: #ECEFF1; color: #546E7A; }
.sb-done    { background: #e2f5e2; color: #276221; }
.sb-progress { background: #FFF3CD; color: #856404; }
.sb-pending  { background: #f0f0f0; color: #888; }
.sb-na       { background: #f0f0f0; color: #bbb; }

/* ICFR tags */
.icfr-tag { font-size: 9px; font-weight: bold; padding: 2px 8px; border-radius: 10px; }
.icfr-on  { background: #e2f5e2; color: #276221; }
.icfr-off { background: #f0f0f0; color: #888; }

/* ── Detail grid ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
}
.detail-item {
  padding: 14px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.detail-item:nth-child(4n) { border-right: none; }
.detail-label {
  font-size: 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #999;
  font-family: 'DM Mono', monospace;
  margin-bottom: 4px;
}
.detail-value { font-size: 12px; color: var(--text); }

/* ── Forms ── */
.form-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 28px 32px;
}
.form-section-title {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--brand);
  font-family: 'DM Mono', monospace;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
}
.form-col-2 { grid-column: span 2; }
.form-group { display: flex; flex-direction: column; }
.form-label {
  font-size: 10px;
  font-weight: bold;
  color: var(--sub);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-family: 'DM Mono', monospace;
}
.req { color: var(--brand2); }
.form-control {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: 'DM Sans', Arial;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(61,10,10,.08); }
.form-control.mono { font-family: 'DM Mono', monospace; }
textarea.form-control { resize: vertical; }
select.form-control { cursor: pointer; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.toggle-label { font-size: 11px; color: var(--sub); }
.sw { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.sw input { opacity: 0; width: 0; height: 0; }
.sl {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: .25s;
}
.sl::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .25s;
}
.sw input:checked + .sl { background: var(--brand); }
.sw input:checked + .sl::before { transform: translateX(20px); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info   { background: var(--tint); color: var(--brand); border: 1px solid #E5C9B8; }

/* ── Empty state ── */
.empty-state { padding: 40px; text-align: center; color: var(--sub); font-size: 13px; }
.empty-state a { color: var(--accent); }

/* ── Overall progress rings ── */
.overall-progress {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.op-phase {
  padding: 0 20px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.op-phase:first-child { padding-left: 0; }
.op-phase:last-child  { border-right: none; }
.op-phase-name {
  font-size: 9px;
  font-weight: bold;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
  font-family: 'DM Mono', monospace;
}
.op-ring { position: relative; width: 64px; height: 64px; margin: 0 auto 8px; }
.op-ring svg { transform: rotate(-90deg); }
.op-ring-bg  { fill: none; stroke: #eee; stroke-width: 5; }
.op-ring-fill {
  fill: none;
  stroke: var(--brand);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset .5s;
}
.op-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: bold;
  color: var(--brand);
}
.op-counts { font-size: 10px; color: var(--sub); }

/* ── Phase blocks ── */
.phase-block { margin-bottom: 20px; }

.phase-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: #fff;
  border-radius: 6px 6px 0 0;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.phase-num  { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: bold; color: var(--accent); letter-spacing: .1em; white-space: nowrap; }
.phase-title { flex: 1; font-size: 12px; font-weight: bold; color: var(--brand); letter-spacing: .2px; }
.phase-ref  { font-family: 'DM Mono', monospace; font-size: 8.5px; color: var(--sub); letter-spacing: .08em; }
.phase-badge { font-size: 9px; font-weight: bold; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.badge-done     { background: #e2f5e2; color: #276221; }
.badge-progress { background: #FFF3CD; color: #856404; }
.badge-pending  { background: #f0f0f0; color: #888; }

/* ── Document cards ── */
.phase-docs { background: #fff; border-radius: 0 0 6px 6px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.docs-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }

.doc-card {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background .12s;
}
.doc-card:hover { background: var(--tint); }
.doc-card.done     { border-left: 3px solid #4CAF50; }
.doc-card.progress { border-left: 3px solid #D4A017; }
.doc-card.pending  { border-left: 3px solid #ddd; }
.doc-card.na       { border-left: 3px solid #ddd; opacity: .5; }
.doc-card.na-scope { opacity: .4; }
.doc-card:nth-child(3n) { border-right: none; }

.doc-num  { font-family: 'DM Mono', monospace; font-size: 8px; color: var(--accent); letter-spacing: .1em; margin-bottom: 5px; }
.doc-name { font-size: 11px; font-weight: bold; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.doc-ref  { font-size: 9px; color: var(--sub); margin-bottom: 10px; font-family: 'DM Mono', monospace; }
.doc-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.doc-progress-bar  { height: 3px; background: #eee; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.doc-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 2px; transition: width .4s; }

/* ── Next steps ── */
.next-steps {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.ns-title {
  font-size: 11px;
  font-weight: bold;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ns-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.ns-list { display: flex; flex-direction: column; gap: 8px; }
.ns-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--tint);
  border-radius: 4px;
  border-left: 3px solid var(--accent);
}
.ns-num  { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: bold; color: var(--accent); white-space: nowrap; margin-top: 1px; }
.ns-text { font-size: 11px; color: var(--text); line-height: 1.5; }
.ns-text strong { color: var(--brand); }

/* ── ICFR banner ── */
.icfr-banner {
  background: #FFF3CD;
  border: 1.5px solid #D4A017;
  border-radius: 6px;
  padding: 12px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.icfr-banner.off { background: #f5f5f5; border-color: #ddd; }
.icfr-banner-text { flex: 1; font-size: 11px; color: #856404; line-height: 1.5; }
.icfr-banner.off .icfr-banner-text { color: #999; }
.icfr-banner-title { font-weight: bold; font-size: 11px; margin-bottom: 2px; }

/* ── Master checklist ── */
.master-checklist {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.mc-header {
  padding: 14px 20px;
  background: #fff;
  border-left: 4px solid var(--brand);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: bold;
  color: var(--brand);
  letter-spacing: .2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mc-table { width: 100%; border-collapse: collapse; }
.mc-table th {
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  padding: 8px 14px;
  border: 1px solid var(--brand2);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-family: 'DM Mono', monospace;
}
.mc-table td { border: 1px solid var(--border); padding: 8px 14px; font-size: 10px; vertical-align: middle; }
.mc-table tr:nth-child(even) td { background: var(--gray); }
.mc-table tr:hover td { background: var(--tint); }
.mc-phase-row td {
  background: var(--tint) !important;
  font-weight: bold;
  font-size: 10px;
  color: var(--brand);
  border-left: 3px solid var(--brand);
}

/* ── File footer ── */
.file-footer {
  background: #fff;
  border-radius: 6px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  color: var(--sub);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

/* ── Login page ── */
.login-body { background: var(--brand); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px 36px 32px;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  border-top: 3px solid var(--accent);
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand .logo-n { font-size: 30px; display: block; color: var(--brand); }
.login-brand .logo-s { color: #999; display: block; margin-top: 6px; }
.login-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 4px;
}
.login-sub { font-size: 10px; color: var(--sub); margin-bottom: 20px; }
.login-form .form-group + .form-group { margin-top: 14px; }
.login-form .btn { margin-top: 20px; }
.login-footer { text-align: center; color: rgba(255,255,255,.35); font-size: 10px; margin-top: 16px; font-family: 'DM Mono', monospace; }

/* ── Error page ── */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 80px; font-weight: 600; color: var(--brand); line-height: 1; }
.error-msg  { font-size: 16px; color: var(--sub); margin: 16px 0 28px; }

/* ── Danger button ── */
.btn-danger {
  background: #B91C1C;
  color: #fff;
  border: none;
}
.btn-danger:hover { background: #991B1B; }

/* ── Confirmation modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  width: 100%;
  max-width: 460px;
  border-top: 4px solid #B91C1C;
  outline: none;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 0;
}

.modal-icon-wrap {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FEF2F2;
  color: #B91C1C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
  margin: 0;
}

.modal-body {
  padding: 16px 24px 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.modal-body strong { color: var(--brand); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ── Form hint ── */
.form-hint {
  font-size: 9px;
  color: #999;
  font-family: 'DM Mono', monospace;
  margin-top: 3px;
  letter-spacing: .05em;
}

/* ── Detail section sub-labels ── */
.detail-section-label {
  padding: 8px 20px 4px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  background: var(--tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.detail-section-label:first-child { border-top: none; }

/* ── Ticker / exchange tags ── */
.ticker-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: bold;
  color: var(--brand);
  background: rgba(61,10,10,.07);
  border: 1px solid rgba(61,10,10,.15);
  padding: 1px 7px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 6px;
}
.exchange-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: bold;
  color: var(--accent);
  background: rgba(160,120,90,.08);
  border: 1px solid rgba(160,120,90,.2);
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .overall-progress { grid-template-columns: repeat(3, 1fr); }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .header-top { padding: 12px 16px; }
  .nav-inner  { padding: 0 16px; }
  .container  { padding: 16px; }
  .stats-row  { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .overall-progress { grid-template-columns: repeat(2, 1fr); }
  .docs-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-col-2 { grid-column: span 1; }
  .eng-bar { display: none; }
  .page-heading { flex-direction: column; gap: 12px; }
}
