/* Shared across pages: section navigation, unit switcher, group view, admin. */
.desk-nav { display: none; }
.unit-switch { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: #64748b; font-weight: 600; }
.unit-switch select { max-width: 280px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #f8fafc; color: #0b192c; font: inherit; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.signed-in-as { font-size: .8rem; opacity: .8; }
.legal-note { background: #f4f8fa; border-left: 3px solid #2198b0; padding: 8px 10px; }
.group-page { padding: 24px 32px; max-width: 1200px; }
.group-page h1 { margin: 0 0 4px; }
.group-page h2 { margin: 28px 0 8px; }
.group-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.group-table th, .group-table td { padding: 8px 10px; border-bottom: 1px solid #dce7ec; text-align: right; white-space: nowrap; }
.group-table th:first-child, .group-table td:first-child { text-align: left; }
.group-table thead th { background: #0b3457; color: #fff; position: sticky; top: 0; }
.group-table tr.lvl-0 td:first-child { font-weight: 700; }
.group-table tr.lvl-1 td:first-child { padding-left: 26px; font-weight: 600; }
.group-table tr.lvl-2 td:first-child { padding-left: 46px; }
.group-table tr.lvl-3 td:first-child { padding-left: 66px; }
.group-table .muted { color: #6f6f6f; font-size: .8rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.admin-card { border: 1px solid #dce7ec; border-radius: 12px; padding: 16px 18px; background: #fff; }
.admin-card h3 { margin: 0 0 10px; }
.admin-card form { display: grid; gap: 8px; }
.admin-card label { display: grid; gap: 4px; font-size: .85rem; }
.admin-card input, .admin-card select { padding: 6px 8px; border: 1px solid #c9d6dc; border-radius: 6px; font: inherit; }
.admin-list { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.admin-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef3f5; align-items: center; }
.admin-list button { font-size: .78rem; }
.unit-logo { height: 28px; width: auto; vertical-align: middle; margin-right: 6px; }
.status-line { min-height: 1.4em; font-size: .88rem; }
.status-line.error { color: #a02020; }
.status-line.ok { color: #2e7d32; }
.fd-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid #0b3457; background: #0b3457; color: #fff; font-weight: 600; cursor: pointer; }
.fd-btn.quiet { background: #fff; color: #0b3457; }
.fd-btn.danger { background: #fff; color: #a02020; border-color: #a02020; }
.topbar, .fd-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px; padding: 0 20px; background: #fff; color: #0f172a;
  border-bottom: 1px solid #e2e8f0; border-top: 3px solid #189ab4;
  position: sticky; top: 0; z-index: 30;
}
body[data-scope="holding"] .topbar,
body[data-scope="holding"] .fd-topbar { border-top-color: #d4af37; }
.topbar .brand, .fd-topbar .brand { color: #0b192c; text-decoration: none; }
.topbar .brand img, .fd-topbar .brand img, #unit-icon { height: 32px; width: auto; background: transparent; }
.topbar .brand-name, .fd-topbar .brand-name {
  color: #0b192c; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem;
}
.topbar .brand-legal, .fd-topbar .brand-legal { color: #64748b; letter-spacing: .12em; text-transform: uppercase; font-size: .68rem; }
.signed-in-as { color: #64748b; opacity: 1; }
.fx-note { margin: 0; padding: 6px 20px; background: #f8fafc; color: #475569; font-size: .8rem; border-bottom: 1px solid #e2e8f0; }
.topbar .quiet, .fd-topbar .fd-btn.quiet, .fd-topbar .quiet {
  background: transparent; color: #133e58; border-color: #e2e8f0;
}
.update-bar { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 8px 16px; background: #27e0d8; color: #0b3457; font-weight: 600; font-size: .9rem; position: sticky; top: 0; z-index: 50; }
.update-bar .fd-btn.quiet { background: transparent; color: #0b3457; border-color: #0b3457; }

#fd-boot { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 32px; background: #f8fafc; color: #0b192c; text-align: center; }
#fd-boot img { height: 180px; width: auto; background: transparent; }
#fd-boot[hidden] { display: none; }
#fd-boot h1 { margin: 0; font-size: 1.8rem; letter-spacing: -0.03em; }
body { padding-bottom: 0; background: #f8fafc; }
#cfs-dock { display: none; }
#cfs-sections { display: flex; gap: 2px; padding: 0 12px; background: #fff; border-bottom: 1px solid #e2e8f0; overflow-x: auto; position: sticky; top: 56px; z-index: 29; }
#cfs-sections a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: #64748b; text-decoration: none; font-size: .875rem; font-weight: 650; white-space: nowrap; border-bottom: 2px solid transparent; }
#cfs-sections a:hover { color: #0b192c; }
#cfs-sections a.on { color: #0b192c; border-bottom-color: #189ab4; }
body[data-scope="holding"] #cfs-sections a.on { border-bottom-color: #d4af37; }
.insight-row { display: grid; grid-template-columns: 11rem 1fr 8rem; gap: 10px; align-items: center; margin: 6px 0; }
.insight-track { display: block; height: 10px; background: #e7eef2; border-radius: 99px; overflow: hidden; }
.insight-fill { display: block; height: 100%; }
.insight-fill.in { background: #2369b1; }
.insight-fill.got { background: #0b3457; }
.insight-fill.wait { background: #c4a574; }
.insight-fill.paid { background: #007a6e; }
#chart h2 { margin: 18px 0 8px; color: #0b3457; font-size: 1rem; }
#track-filters .dash-card { text-align: left; cursor: pointer; border: 0; font: inherit; }
.change-card { margin-bottom: 14px; }
.change-card h2 { margin: 0; color: #0b192c; }
.change-kind { display: inline-block; min-width: 4.5rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #133e58; }
.change-kind.added { color: #059669; }
.change-kind.fixed { color: #189ab4; }
.change-kind.changed { color: #8a6a12; }
#fd-boot ~ #cfs-dock, body:has(#fd-boot:not([hidden])) #cfs-dock { display: none; }
#fd-boot p { margin: 0; max-width: 36rem; min-height: 1.4em; color: #475569; }
#fd-boot .fd-boot-actions { display: flex; gap: 10px; min-height: 44px; }
#fd-boot .fd-btn { min-height: 44px; background: #189ab4; color: #fff; border-color: #189ab4; }
#fd-boot .fd-btn.quiet { background: #fff; color: #0b192c; border-color: #e2e8f0; }
@media (prefers-reduced-motion: no-preference) {
  #fd-boot img { animation: fd-boot-in .4s ease both; }
}
@keyframes fd-boot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.dash { min-height: 100vh; background: #f4f8fa; color: #172b3a; }
.dash-main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 64px; display: grid; gap: 22px; }
.dash-hello h1 { margin: 4px 0; font-size: 2rem; letter-spacing: -0.03em; color: #0b3457; }
.eyebrow { margin: 0; color: #007a6e; font-weight: 650; font-size: .85rem; }
.muted { color: #4b5560; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.dash-card { display: grid; gap: 6px; padding: 18px; background: #fff; border: 1px solid #dce7ec; border-radius: 14px; text-decoration: none; color: inherit; box-shadow: 0 1px 0 rgba(11, 52, 87, .04); transition: transform .2s ease, box-shadow .2s ease; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11, 52, 87, .08); }
.dash-card:focus-visible { outline: 2px solid #0b3457; outline-offset: 3px; }
.dash-card strong { font-size: 1.6rem; color: #0b3457; }
.dash-card-label { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #007a6e; }
.dash-panel, .dash-note { background: #fff; border: 1px solid #dce7ec; border-radius: 14px; padding: 18px 20px; }
.dash-panel h2, .dash-note h2 { margin: 0 0 10px; color: #0b3457; }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-list a { display: flex; min-height: 44px; align-items: center; padding: 8px 10px; border-radius: 8px; color: #0b3457; text-decoration: none; }
.dash-list a:hover { background: #f4f8fa; }
.dash-empty-row { color: #4b5560; padding: 8px 0; }
.dash-note { border-left: 4px solid var(--brand-accent, #27e0d8); }
.part-dialog { border: 0; border-radius: 16px; padding: 22px 24px; max-width: 520px; width: calc(100% - 32px); color: #172b3a; }
.part-dialog::backdrop { background: rgba(11, 52, 87, .45); }
.part-dialog h2 { margin: 0 0 6px; color: var(--brand-ink, #0b3457); }
.part-dialog h3 { margin: 16px 0 8px; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: #4b5560; }
.part-list { display: grid; gap: 8px; }
.part-choice { min-height: 44px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid #dce7ec; background: #fff; font: inherit; font-weight: 650; color: #0b3457; cursor: pointer; }
.part-choice[aria-pressed="true"] { border-color: var(--brand, #0b3457); background: #f4f8fa; box-shadow: inset 3px 0 0 var(--brand-accent, #2198b0); }
.part-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.vat-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 12px; }
.vat-form label { display: grid; gap: 4px; font-size: .85rem; }
.vat-form input { min-height: 44px; padding: 8px 10px; border: 1px solid #dce7ec; border-radius: 8px; }
.dash-grid .dash-card { animation: dash-in .35s ease both; }
.dash-grid .dash-card:nth-child(2) { animation-delay: .05s; }
.dash-grid .dash-card:nth-child(3) { animation-delay: .1s; }
.dash-grid .dash-card:nth-child(4) { animation-delay: .15s; }
@keyframes dash-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .dash-card, .dash-grid .dash-card { animation: none; transition: none; }
  .dash-card:hover { transform: none; }
}
