/* StayTax Studio staging UI. Single stylesheet, loaded by firestore.html. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: #193833;
  background: #f4f5f1;
  --ink: #193833;
  --muted: #49635d;
  --forest: #123f38;
  --teal: #086a58;
  --border: #cbdad2;
  --surface: #ffffff;
  --soft: #edf5ef;
  --focus: #d56b30;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: -100px; left: 14px; padding: 10px 14px; background: #fff; color: var(--forest); border: 2px solid var(--forest); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.shell{ min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; background: #123b35; color: #f2f8f3; padding: 26px 16px 20px; display: flex; flex-direction: column; gap: 30px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.mark { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #b9e2c4; color: #103e36; font-size: 1.3rem; font-weight: 850; }
.brand b { display: block; font-size: 1.15rem; letter-spacing: -.025em; line-height: 1.25; }
.brand small { display: block; color: #b9d7c9; font-size: .68rem; letter-spacing: .11em; margin-top: 3px; }
.nav { display: grid; gap: 4px; }
.nav-label { display: block; color: #a9cbbb; font-size: .72rem; font-weight: 750; letter-spacing: .07em; padding: 16px 13px 5px; }
.nav button { min-height: 44px; width: 100%; border: 0; border-radius: 10px; background: transparent; color: #e0efe6; text-align: left; padding: 10px 13px; font-weight: 680; }
.nav button:hover { background: #28554b; }
.nav button[aria-current="page"] { background: #deeee3; color: #164738; box-shadow: inset 4px 0 #39a37a; }
.sidebar-note { margin-top: auto; padding: 14px; border: 1px solid #5d8475; border-radius: 12px; color: #e0eee6; font-size: .78rem; line-height: 1.7; }
.sidebar-note strong { color: #fff4d8; }
.page { min-width: 0; max-width: 1600px; width: 100%; padding: 32px clamp(20px, 3.8vw, 58px) 76px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 7px; color: #086a58; font-size: .72rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.top h1 { margin: 0; font-size: clamp(1.75rem, 2.8vw, 2.55rem); line-height: 1.23; letter-spacing: -.04em; }
.top p { margin: 8px 0 0; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card { margin-bottom: 18px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 5px 20px #163d3010; }
.card h2 { margin: 0 0 12px; font-size: 1.18rem; line-height: 1.35; letter-spacing: -.025em; }
.card h3 { margin: 24px 0 10px; font-size: 1.02rem; }
.card p { line-height: 1.7; }
.card p:last-child { margin-bottom: 0; }
.hero { position: relative; overflow: hidden; background: #174c41; color: #fff; border: 0; padding: 29px 32px; }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -55px; top: -70px; border: 1px solid #bde8ce70; border-radius: 50%; box-shadow: 0 0 0 34px #bde8ce16, 0 0 0 68px #bde8ce0b; pointer-events: none; }
.hero .eyebrow { color: #bbebcc; }
.hero h2 { font-size: 1.45rem; }
.hero p { max-width: 720px; margin: 0; color: #e5f4e9; }
.scope-card { position: sticky; z-index: 8; top: 12px; border: 2px solid #88b89f; box-shadow: 0 12px 28px #17473525; }
.scope-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.scope-heading h2 { margin: 0; }
.scope-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.scope-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 100px; background: #e9f4ec; color: #145742; font-size: .76rem; font-weight: 800; }
.scope-pill.is-closed { background: #e7eaf0; color: #394b61; }
.scope-grid { grid-template-columns: minmax(150px, 1.3fr) minmax(150px, 1.3fr) minmax(150px, .7fr) !important; }
.scope-card .muted { margin: 12px 0 0; }
.scope-warning { margin: 5px 0 0; color: #664c27; font-size: .78rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 15px; }
.field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.field label, .field-title { color: #334f46; font-size: .85rem; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; border: 1px solid #8ea99b; border-radius: 9px; padding: 9px 11px; background: #fff; color: var(--ink); }
.field input[type="file"] { padding: 8px; max-width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:disabled, .field select:disabled { background: #f2f4f1; }
.choices { margin: 17px 0 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 11px; }
.choices legend { padding: 0 5px; color: #334f46; font-size: .85rem; font-weight: 800; }
.choices label { display: flex; align-items: flex-start; gap: 10px; min-height: 34px; margin: 6px 0; font-size: .88rem; }
.choices input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); flex: 0 0 auto; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.row.between { justify-content: space-between; }
.actions { margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; background: var(--teal); color: #fff; text-align: center; font-weight: 800; line-height: 1.35; }
.btn:hover:not(:disabled) { filter: brightness(.92); }
.btn.secondary { background: #dcefe2; color: #164d3d; }
.btn.ghost { background: #fff; border-color: #92afa0; color: #205246; }
.btn.danger { background: #a33d3d; }
.btn.danger-outline { background: #fff; border-color: #a84439; color: #8c332b; }
.btn.small { min-height: 40px; padding: 7px 11px; font-size: .78rem; }
.muted { color: var(--muted); font-size: .87rem; }
.notice { padding: 12px 15px; background: #fff5e5; border: 1px solid #e7bc72; border-radius: 10px; color: #684717; font-size: .85rem; line-height: 1.65; }
.alert { position: sticky; z-index: 10; top: 10px; margin: 0 0 17px; padding: 12px 15px; background: #fff0ed; border: 2px solid #c76e58; border-radius: 10px; color: #7d352a; font-weight: 700; }
.alert.good { background: #e7f5e9; border-color: #3e9b6a; color: #185e3a; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 100px; background: #e4f4e9; color: #14593e; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #27875a; }
.chip.warning { background: #fff0d4; color: #765014; }
.chip.warning::before { background: #c88522; }
.status { padding: 4px 8px; border-radius: 100px; background: #e2f3e9; color: #1c6443; font-size: .76rem; font-weight: 800; }
.status.void { background: #f4e9e8; color: #8e3b35; }
.state-label { display: inline-flex; align-items: center; margin: 0 0 11px; padding: 5px 10px; border-radius: 6px; font-size: .78rem; font-weight: 850; }
.state-confirm { background: #e3f2e7; color: #145d39; }
.state-preview { background: #eef0f2; color: #40556a; }
.state-draft { background: #fff0d5; color: #76500f; }
.state-option { background: #e9eef8; color: #324c77; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin: 17px 0; }
.metric { min-width: 0; padding: 17px; border: 1px solid #cfe2d5; border-radius: 12px; background: #eff7f0; }
.metric span { display: block; color: #3e6451; font-size: .78rem; font-weight: 800; }
.metric b { display: block; margin-top: 6px; color: #125b46; font-size: clamp(1.15rem, 2.2vw, 1.55rem); letter-spacing: -.03em; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: .83rem; }
th, td { padding: 11px 12px; border-bottom: 1px solid #dfe9e2; text-align: right; vertical-align: middle; }
th { background: #eef4ee; color: #34584a; font-size: .77rem; font-weight: 800; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f6faf6; }
td input { min-height: 40px; border: 1px solid #8ea99b; border-radius: 7px; padding: 6px 8px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.section-heading .muted { max-width: 400px; margin: 0; }
.workflow-list { display: grid; gap: 0; padding: 0; margin: 7px 0 0; list-style: none; }
.workflow-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 17px 0; border-top: 1px solid #dfe9e2; }
.step-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #dcefe3; color: #135d43; font-size: .82rem; font-weight: 900; }
.workflow-list h3 { margin: 0 0 3px; font-size: .96rem; }
.workflow-list p { margin: 0; color: var(--muted); font-size: .84rem; }
.aside-card { border-left: 5px solid #58ad7d; }
.steps { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 24px; }
.steps span { padding: 7px 11px; border-radius: 7px; background: #e3f1e6; color: #1a6148; font-size: .78rem; font-weight: 800; }
#mapping-form, #mapped-import-form, #mapped-result { border-top: 1px solid #dce8e0; margin-top: 22px; padding-top: 3px; }
#mapped-result .choices { margin-bottom: 16px; }
.login-wrap { width: min(500px, 100%); margin: 7vh auto; padding: 0 16px; }
.login-wrap .card { padding: 32px; }
.login-wrap .brand { padding: 0; margin-bottom: 28px; }
.login-wrap .brand small { color: #426c57; }
.login-wrap h1 { margin: 0 0 8px; font-size: 1.65rem; line-height: 1.3; }
.login-wrap form { display: grid; gap: 14px; margin-top: 20px; }
.login-wrap .actions .btn { flex: 1 1 180px; }
.login-wrap .notice { color: #684717; }
dialog { width: min(440px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 22px 70px #133c3655; }
dialog::backdrop { background: #102c2aab; }
dialog h2 { margin: 0 0 9px; }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: 0; padding: 15px 18px; gap: 10px; }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
  .nav-label { display: none; }
  .nav button { width: auto; white-space: nowrap; padding: 9px 12px; }
  .sidebar-note { display: none; }
  .page { padding-top: 22px; }
  .scope-card { top: 0; }
}
@media (max-width: 700px) {
  .top { display: block; }
  .top-actions { margin-top: 14px; }
  .scope-heading { align-items: start; }
  .scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .scope-grid .field:last-child { grid-column: 1 / -1; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { display: block; }
  .workflow-list li { grid-template-columns: 38px minmax(0, 1fr); }
  .workflow-list .btn { grid-column: 2; justify-self: start; }
  .table-wrap { overflow: visible; border: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; white-space: normal; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .table-wrap tr { margin-bottom: 12px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
  .table-wrap td { display: grid; grid-template-columns: minmax(94px, 40%) minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e8efe9; text-align: left; overflow-wrap: anywhere; }
  .table-wrap tr td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); color: #4b6657; font-size: .76rem; font-weight: 800; }
  .table-wrap td input { max-width: 100%; min-width: 0 !important; width: 100% !important; }
}
@media (max-width: 480px) {
  .page { padding: 18px 13px 54px; }
  .card { padding: 18px 16px; border-radius: 13px; }
  .hero { padding: 24px 20px; }
  .scope-card { padding: 13px 14px; }
  .scope-heading { display: block; margin-bottom: 10px; }
  .scope-badges { margin-top: 9px; }
  .scope-grid { grid-template-columns: 1fr !important; gap: 8px; }
  .scope-grid .field:last-child { grid-column: auto; }
  .scope-card .field input, .scope-card .field select { min-height: 42px; }
  .scope-warning { display: none; }
  .metrics { gap: 8px; }
  .metric { padding: 12px; }
  .metric b { font-size: 1.18rem; }
  .actions .btn { width: 100%; }
  .workflow-list .btn { width: auto; }
  .login-wrap { margin: 24px auto; }
  .login-wrap .card { padding: 23px 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.scope-permission { margin: 12px 0 0; padding: 10px 12px; background: #fff0e7; border-left: 4px solid #bf7041; border-radius: 6px; color: #733e1d; font-size: .83rem; font-weight: 750; }
.mobile-context { display: none; }
@media (max-width: 480px) {
  .mobile-context { position: sticky; z-index: 12; top: 0; display: block; margin: -18px -13px 14px; padding: 9px 14px; background: #174c41; color: #fff; font-size: .78rem; font-weight: 800; box-shadow: 0 5px 12px #102f2b30; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .scope-card { position: static; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-width: 0; }
}
/* Settings: quiet, single-column forms. The task screens keep their workflow styling. */
.settings-panel { max-width: 820px; }
.settings-intro { margin: 0 0 18px; }
.settings-intro h2 { margin: 0 0 5px; font-size: 1.22rem; }
.settings-intro p { max-width: 62ch; margin: 0; color: var(--muted); font-size: .87rem; }
.settings-panel .card { padding: 26px 30px; box-shadow: none; border-radius: 9px; }
.settings-index { display: block; margin: 0 0 7px; color: #47685a; font-size: .74rem; font-weight: 800; letter-spacing: .025em; }
.settings-panel .card h2 { margin: 0 0 7px; font-size: 1.08rem; }
.settings-panel .card > .muted { max-width: 66ch; margin: 0 0 20px; }
.settings-form { max-width: 610px; }
.settings-form .grid { display: block; }
.settings-form .field { display: flex; flex-direction: column; gap: 3px; margin: 0 0 17px; }
.settings-form .field label { font-size: .83rem; }
.settings-form .field small { display: block; margin-top: 2px; color: #597068; font-size: .76rem; }
.settings-form .field input:not([type="radio"]), .settings-form .field select {
  min-height: 42px; padding: 7px 3px; border: 0; border-bottom: 1px solid #a5b9ad;
  border-radius: 0; background: transparent; box-shadow: none; color: var(--ink);
}
.settings-form .field input:focus, .settings-form .field select:focus { border-bottom: 2px solid var(--teal); }
.settings-form .field input::placeholder { color: #657970; opacity: 1; }
.settings-form .choices { padding: 0; margin: 0 0 20px; border: 0; }
.settings-form .choices legend { margin-bottom: 8px; padding: 0; }
.settings-form .choices label { min-height: 30px; margin: 4px 0; }
.settings-form .actions { margin-top: 20px; }
.settings-disclosure { padding: 0 !important; }
.settings-disclosure summary { display: list-item; cursor: pointer; padding: 20px 30px; }
.settings-disclosure summary::marker { color: var(--teal); }
.settings-disclosure summary strong { display: block; font-size: 1.03rem; }
.settings-summary-note { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.settings-disclosure-body { padding: 0 30px 26px; border-top: 1px solid #e3ebe5; }
.settings-disclosure-body > .muted { margin: 17px 0; }
.settings-status .notice { max-width: 65ch; }
.settings-password { margin-top: 0; }
@media (max-width: 480px) {
  .settings-panel .card { padding: 20px 17px; }
  .settings-disclosure { padding: 0 !important; }
  .settings-disclosure summary { padding: 18px 17px; }
  .settings-disclosure-body { padding: 0 17px 20px; }
}
.settings-disclosure summary { position: relative; display: block; list-style: none; padding-left: 57px; }
.settings-disclosure summary::-webkit-details-marker { display: none; }
.settings-disclosure summary::before { content: "+"; position: absolute; left: 27px; top: 24px; width: 19px; height: 19px; border: 1px solid #7da28d; border-radius: 4px; color: #1a6c4f; text-align: center; line-height: 17px; font-weight: 800; }
.settings-disclosure[open] summary::before { content: "−"; }
@media (max-width: 480px) {
  .settings-disclosure summary { padding-left: 45px; }
  .settings-disclosure summary::before { left: 16px; top: 21px; }
}
/* Header workspace and account controls */
.top { position: relative; }
.top-actions { margin-left: auto; flex-wrap: nowrap; align-items: flex-start; }
.header-menu { position: relative; flex: 0 0 auto; }
.header-menu > summary { list-style: none; cursor: pointer; }
.header-menu > summary::-webkit-details-marker { display: none; }
.workspace-switcher > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 12px; width: min(310px, 36vw); min-height: 58px; padding: 8px 13px; border: 1px solid #9db9a8; border-radius: 11px; background: #fff; color: var(--forest); box-shadow: 0 2px 8px #163d3010; }
.switcher-label { grid-column: 1; color: #49635d; font-size: .7rem; font-weight: 800; }
.workspace-switcher strong { grid-column: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.switcher-month { grid-column: 2; grid-row: 2; align-self: center; color: #174c3c; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.switcher-state { grid-column: 1; color: #3d6653; font-size: .72rem; font-weight: 750; }
.chevron { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; font-size: 1.3rem; }
.header-popover { position: absolute; z-index: 30; top: calc(100% + 9px); right: 0; width: min(370px, calc(100vw - 26px)); margin: 0; padding: 18px; border: 1px solid #abc4b4; border-radius: 12px; background: #fff; box-shadow: 0 18px 42px #113b3050; }
.popover-title { margin: 0 0 10px; font-size: 1rem; font-weight: 850; }
.header-popover.scope-card { position: absolute; top: calc(100% + 9px); box-shadow: 0 18px 42px #113b3050; border: 1px solid #abc4b4; }
.scope-grid { display: grid; grid-template-columns: 1fr !important; gap: 12px; margin-top: 16px; }
.scope-card .muted { margin: 12px 0 0; }
.scope-warning { margin: 8px 0 0; }
.account-menu > summary { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #729b87; border-radius: 50%; background: #dceee2; color: #174c3c; font-weight: 850; }
.account-menu > summary:hover, .account-menu[open] > summary { background: #c6e4d2; }
.account-popover { width: 238px; padding: 8px; }
.account-email { margin: 0 0 5px; padding: 10px 11px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.account-popover button { display: block; width: 100%; min-height: 42px; padding: 8px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--forest); text-align: left; font-weight: 750; }
.account-popover button:hover, .account-popover button:focus-visible { background: #e8f3eb; }
#logout { border-top: 1px solid var(--border); border-radius: 0; margin-top: 5px; }
.user-facility-list { display: grid; gap: 8px; }
.user-facility { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e3ebe5; }
.user-facility span { overflow-wrap: anywhere; }
.profile-details { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 10px 16px; margin: 0; }
.profile-details dt { color: var(--muted); font-size: .82rem; }
.profile-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .top { display: flex; flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: flex-end; margin-top: 0; }
  .workspace-switcher > summary { width: min(310px, calc(100vw - 94px)); }
  .header-popover.scope-card { top: calc(100% + 9px); }
}
@media (max-width: 480px) {
  .top-actions { position: relative; }
  .workspace-switcher > summary { width: min(280px, calc(100vw - 90px)); }
  .header-popover { width: calc(100vw - 26px); max-width: 370px; }
  .account-popover { width: 238px; }
  .user-facility { align-items: flex-start; flex-direction: column; }
  .profile-details { grid-template-columns: 1fr; gap: 2px; }
  .profile-details dd { margin-bottom: 8px; }
}
.member-assignment { padding: 18px 0; border-top: 1px solid #dce8e0; }
.member-assignment h3 { margin: 0 0 3px !important; font-size: .96rem; }
.member-assignment p { margin: 0 0 9px; }
.member-facilities-form { max-width: 610px; }
.member-facilities-form .choices { padding: 8px 0 10px; border: 0; }
.member-facilities-form .btn { margin-top: 8px; }
@media (max-width: 480px) {
  .header-popover.scope-card { right: -55px; }
}

/* 2026-10-28 prototype integration: app chrome, settings index, import review. */
:root { --canvas: #f5f6f7; --brand-deep: #115638; --brand-dark: #0e4732; --line: #d8e0dc; --ink: #1e302b; --muted: #52655d; --surface: #fff; --soft: #edf5ef; --teal: #116747; --border: #d2ddd6; }
body { background: var(--canvas); color: var(--ink); }
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.app-header { position: relative; z-index: 30; background: #fff; box-shadow: 0 2px 9px #173c2a13; }
.app-header-main { min-height: 62px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.app-header .brand { padding: 0; min-width: 205px; gap: 9px; color: var(--brand-dark); }
.app-header .mark { width: 34px; height: 34px; border-radius: 8px; font-size: 1rem; background: #e3f2e8; color: var(--brand-dark); }
.app-header .brand b { font-size: .96rem; line-height: 1.16; }
.app-header .brand small { margin-top: 1px; font-size: .55rem; color: #537268; }
.app-header .nav { display: flex; align-items: stretch; gap: 1px; min-width: 0; height: 62px; overflow-x: auto; scrollbar-width: thin; }
.app-header .nav button { width: auto; min-width: max-content; height: 62px; padding: 0 11px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #475a52; font-size: .84rem; font-weight: 700; white-space: nowrap; box-shadow: none; }
.app-header .nav button:hover { background: #f2f6f3; color: var(--brand-dark); }
.app-header .nav button[aria-current="page"] { border-bottom-color: #187b50; background: #f6faf7; color: #115638; }
.app-header .top-actions { display: flex; align-items: center; gap: 8px; margin: 0; }
.app-header .workspace-switcher > summary { width: 205px; min-height: 44px; padding: 5px 10px; border-color: #c5d5cb; border-radius: 7px; box-shadow: none; }
.app-header .switcher-label { font-size: .61rem; }
.app-header .workspace-switcher strong { font-size: .78rem; }
.app-header .switcher-month { font-size: .72rem; }
.app-header .switcher-state { font-size: .66rem; }
.app-header .account-menu > summary { width: 38px; height: 38px; border-color: #b5d4c1; background: #e8f4eb; }
.app-context { min-height: 39px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 6px 20px; background: var(--brand-deep); color: #f5fbf7; font-size: .79rem; }
.context-product { font-weight: 850; letter-spacing: .025em; }
.context-env { padding: 2px 8px; border: 1px solid #86bba0; border-radius: 4px; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.context-target { color: #e1f1e7; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-warning { margin-left: auto; color: #d6eddf; font-size: .7rem; }
.page { max-width: 1700px; width: 100%; margin: 0 auto; padding: 25px clamp(17px, 2.4vw, 38px) 70px; }
.top { margin: 0 0 21px; display: block; }
.top h1 { font-size: clamp(1.35rem, 2.1vw, 1.9rem); letter-spacing: -.035em; }
.page .card { border-color: var(--line); box-shadow: 0 2px 10px #233e3010; border-radius: 10px; }
.page .card h2 { font-size: 1.07rem; }
.page .btn { min-height: 40px; border-radius: 6px; font-size: .84rem; }
.page .btn.small { min-height: 36px; }
.page .btn.secondary { background: #dfeee4; color: #174f36; }
.page .btn.ghost { border-color: #a8bdb0; }
.page .metric { background: #f1f6f2; border-color: var(--line); border-radius: 8px; }
.page .notice { background: #fff7ea; border-color: #ebc783; }
.page .state-label { border-radius: 4px; }
.header-popover.scope-card { top: calc(100% + 7px); }
/* Settings follow the prototype's index/content split; forms remain one column. */
section[data-panel="settings"].settings-panel { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 24px; max-width: none; align-items: start; }
.settings-menu { position: sticky; top: 16px; display: grid; gap: 3px; padding: 16px 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.settings-menu h2 { margin: 0 8px 10px; font-size: .86rem; color: #41564b; }
.settings-menu button { min-height: 41px; padding: 9px 11px; border: 0; border-left: 3px solid transparent; border-radius: 5px; background: transparent; color: #46594f; text-align: left; font-size: .8rem; font-weight: 700; }
.settings-menu button:hover, .settings-menu button[aria-current="page"] { border-left-color: #198055; background: #edf6ef; color: #115638; }
.settings-main { min-width: 0; max-width: 900px; }
.settings-main > .card, .settings-anchor > .card { margin-bottom: 16px; }
.settings-main .settings-card { padding: 23px 28px; }
.settings-main .settings-form { max-width: 610px; }
.settings-main .settings-index { margin-bottom: 5px; }
.settings-main .settings-form .field input:not([type="radio"]), .settings-main .settings-form .field select { border-bottom-color: #a5b8ac; }
.settings-anchor { scroll-margin-top: 20px; }
#settings-tax, #settings-issuer, #settings-contract { scroll-margin-top: 20px; }
/* CSV/XLSX is the primary path. Import and review use different visible states. */
.statement-panel { min-width: 0; }
.statement-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
.statement-toolbar h2 { margin: 1px 0 0; font-size: 1.2rem; }
.statement-toolbar .eyebrow { margin: 0; }
.statement-before { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; min-height: 430px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.statement-before .card { margin: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: clamp(20px, 3vw, 38px); }
.statement-upload-card h2 { margin-bottom: 16px; }
.mapped-drop-zone { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 23px; border: 2px dashed #7fb39a; border-radius: 10px; background: #f4faf6; text-align: center; }
.mapped-drop-zone.is-dragging { border-color: #125f40; background: #e2f4e8; }
.drop-symbol { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: #deefe4; color: #125d40; font-size: 1.6rem; font-weight: 850; }
.mapped-drop-zone > strong { color: #1c4e36; font-size: .91rem; }
.mapped-drop-zone > span:not(.drop-symbol) { color: var(--muted); font-size: .76rem; }
.mapped-drop-zone form { width: min(100%, 470px); text-align: left; }
.mapped-drop-zone .grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mapped-drop-zone .field input { min-height: 41px; }
.mapped-drop-zone .actions { justify-content: center; }
#mapped-import-form { width: min(100%, 470px); margin: 0; padding: 0; border: 0; }
#mapped-file-name { margin: 3px 0 0; overflow-wrap: anywhere; }
#mapped-status { margin: 13px 0 0; }
.statement-empty-preview { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 26px; background: #f0f2f2; text-align: center; }
.statement-empty-preview h2 { margin: 0; font-size: 1rem; }
.statement-empty-preview p { max-width: 35ch; margin: 0; color: #50625a; font-size: .8rem; }
.empty-symbol { color: #80958a; font-size: 3.2rem; line-height: 1; }
.mapping-disclosure { padding: 0 !important; }
.mapping-body { padding: 21px 27px 26px; }
#mapping-form { max-width: 620px; border: 0; margin: 0; padding: 0; }
#mapping-form .grid { grid-template-columns: 1fr; gap: 11px; }
#mapping-form .field { gap: 3px; }
#mapping-form .field input, #mapping-form .field select { min-height: 39px; padding: 7px 6px; border: 0; border-bottom: 1px solid #a7b8ad; border-radius: 0; background: transparent; }
#mapping-form .choices { margin-top: 18px; }
.statement-review-status { margin: 0 0 11px; color: #245a3d; font-size: .81rem; font-weight: 750; }
.statement-review { display: grid; grid-template-columns: minmax(260px, 38%) minmax(0, 1fr); min-height: 600px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
#mapped-result { margin-top: 0; padding-top: 0; }
.statement-list-pane { min-width: 0; border-right: 1px solid var(--line); background: #fff; }
.statement-detail-pane { min-width: 0; padding: 18px 22px; background: #f7f8f7; }
.pane-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.statement-detail-pane .pane-heading { margin: -18px -22px 18px; padding: 16px 21px; }
.pane-heading h2 { margin: 0; font-size: .98rem; }
.pane-heading .eyebrow { margin: 0 0 2px; }
.statement-list-pane .pane-heading { display: block; }
.statement-list-pane .pane-heading > div:first-child { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.statement-list-pane .field { gap: 3px; }
.statement-list-pane .field label { font-size: .73rem; }
.statement-list-pane .field input { min-height: 38px; }
.mapped-list-wrap { max-height: 630px; overflow-y: auto; border: 0; border-radius: 0; }
.mapped-list-wrap table, .mapped-list-wrap tbody, .mapped-list-wrap tr, .mapped-list-wrap td { display: block; width: 100%; white-space: normal; }
.mapped-list-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mapped-list-wrap tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; margin: 0; padding: 13px 18px; border: 0; border-bottom: 1px solid #e2e8e3; border-radius: 0; cursor: pointer; }
.mapped-list-wrap tr:hover { background: #f5faf6; }
.mapped-list-wrap tr[aria-selected="true"] { background: #eaf6ed; box-shadow: inset 4px 0 #16834f; }
.mapped-list-wrap tr:focus-visible { outline-offset: -3px !important; }
.mapped-list-wrap td { display: block; padding: 0; border: 0; text-align: left; font-size: .75rem; color: #52665c; }
.mapped-list-wrap td::before { content: none; }
.mapped-list-wrap td:nth-child(1) { display: none; }
.mapped-list-wrap td:nth-child(2) { grid-column: 1 / -1; }
.mapped-list-wrap td:nth-child(3) { grid-column: 1 / -1; }
.mapped-list-wrap td:nth-child(4) { grid-column: 1; }
.mapped-list-wrap td:nth-child(5) { grid-column: 2; font-weight: 700; color: #254734; text-align: right; }
.mapped-list-wrap td:nth-child(2) { color: #164b34; font-size: .88rem; font-weight: 850; }
#mapped-list-empty { padding: 14px 18px; }
.mapped-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0 0 19px; }
.mapped-facts > div { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.mapped-facts dt { color: #53675d; font-size: .72rem; }
.mapped-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .85rem; font-weight: 800; }
.mapped-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; max-width: 600px; }
.mapped-detail-empty { display: grid; place-items: center; min-height: 300px; color: var(--muted); }
.statement-detail-pane .choices { background: #fff; }
.statement-detail-pane .notice { font-size: .78rem; }
.statement-detail-pane .actions { justify-content: flex-end; }
@media (max-width: 1130px) {
  .app-header-main { grid-template-columns: auto 1fr auto; grid-template-rows: 52px 43px; gap: 0 10px; padding: 0 12px; }
  .app-header .brand { grid-column: 1 / 3; min-width: 0; }
  .app-header .top-actions { grid-column: 3; grid-row: 1; }
  .app-header .nav { grid-column: 1 / -1; grid-row: 2; height: 43px; }
  .app-header .nav button { height: 43px; padding: 0 13px; }
}
@media (max-width: 800px) {
  section[data-panel="settings"].settings-panel { grid-template-columns: 1fr; gap: 12px; }
  .settings-menu { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 8px; }
  .settings-menu h2 { display: none; }
  .settings-menu button { flex: 0 0 auto; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .settings-menu button[aria-current="page"] { border-left: 0; border-bottom-color: #198055; }
  .statement-review { grid-template-columns: minmax(0,1fr); }
  .statement-list-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .mapped-list-wrap { max-height: 320px; }
  .mapped-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .app-header-main { grid-template-rows: 52px 43px; }
  .app-header .brand { max-width: 135px; }
  .app-header .brand b { font-size: .78rem; }
  .app-header .brand small { display: none; }
  .app-header .mark { width: 30px; height: 30px; }
  .app-header .workspace-switcher > summary { width: min(165px,calc(100vw - 187px)); min-height: 39px; padding: 3px 7px; }
  .app-header .workspace-switcher strong { font-size: .7rem; }
  .app-header .switcher-month { font-size: .65rem; }
  .app-header .switcher-state { display: none; }
  .app-header .account-menu > summary { width: 36px; height: 36px; }
  .app-context { gap: 6px 9px; padding: 7px 12px; font-size: .7rem; }
  .context-target { order: 3; flex-basis: 100%; }
  .context-warning { margin-left: auto; font-size: .63rem; }
  .page { padding: 17px 12px 48px; }
  .top { margin-bottom: 14px; }
  .statement-before { grid-template-columns: 1fr; min-height: 0; }
  .statement-before .card { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 15px; }
  .statement-empty-preview { min-height: 150px; }
  .mapped-drop-zone { padding: 17px 11px; }
  .mapping-body { padding: 15px; }
  .statement-detail-pane { padding: 15px; }
  .statement-detail-pane .pane-heading { margin: -15px -15px 16px; padding: 13px 15px; flex-wrap: wrap; }
  .mapped-facts, .mapped-fields { grid-template-columns: 1fr; }
  .settings-main .settings-card { padding: 18px 16px; }
}

/* Prototype refinement: compact utility header and visible work scope. */
:root { --canvas: #f1f4f6; --brand-deep: #0f3b32; --brand-dark: #0a2923; --teal: #166534; --line: #d5dde1; --ink: #24313a; --muted: #52616b; --border: #d5dde1; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { display: inline-block; width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.app-header-main { min-height: 56px; }
.app-header .mark { background: #0f3b32; color: #fff; box-shadow: 0 2px 5px #0a292326; }
.app-header .brand b { color: #1f2937; }
.app-header .brand small { color: #64748b; }
.app-header .nav, .app-header .nav button { height: 56px; }
.app-header .nav button { display: inline-flex; align-items: center; gap: 6px; color: #475569; font-weight: 650; }
.app-header .nav button[aria-current="page"] { border-bottom-color: #0f3b32; background: #f0f8f2; color: #0f3b32; }
.app-header .account-menu > summary { background: #e2e8f0; border-color: #cbd5e1; color: #0f3b32; }
.app-context { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; min-height: 0; padding: 8px 18px 7px; background: #0f3b32; border-bottom: 1px solid #0a2923; box-shadow: inset 0 -1px #4c8a68; color: #fff; }
.context-controls { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.context-controls > * { flex-shrink: 0; }
.context-product { margin-right: 3px; color: #e6f4eb; white-space: nowrap; font-size: .77rem; }
.context-field { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 3px 9px; border: 1px solid #347260; border-radius: 5px; background: #0a2923; color: #bdebd4; }
.context-field label { white-space: nowrap; color: #bdebd4; font-size: .64rem; font-weight: 800; }
.context-field select, .context-field input { min-width: 0; padding: 3px 14px 3px 1px; border: 0; background: transparent; color: #fff; font-size: .77rem; font-weight: 750; }
.context-field select option { background: #0a2923; color: #fff; }
.context-field input[type="month"] { width: 118px; padding-right: 1px; color-scheme: dark; }
.context-organization select { width: 150px; }
.context-facility select { width: 194px; }
.context-status, .context-role, .context-env { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 7px; border: 1px solid #3b8060; border-radius: 5px; white-space: nowrap; font-size: .67rem; font-weight: 750; }
.context-status { color: #d5f2df; }
.context-status.is-closed { border-color: #9bb5cc; color: #e4f0f8; }
.context-role { color: #c8e5d5; }
.context-env { border-color: #b58c4d; background: #684a22; color: #fff1d8; }
.context-warning { grid-column: 1 / -1; margin: 0; color: #c7e3d2; font-size: .65rem; }
.context-permission { grid-column: 1 / -1; color: #ffe2b0; font-size: .72rem; }
.app-context + .page { flex: 1; }
section[data-panel="user-settings"].master-panel { display: grid; grid-template-columns: 235px minmax(0,1fr); gap: 24px; max-width: none; align-items: start; }
.master-panel .settings-main { max-width: 900px; }
.master-panel .settings-anchor { margin-bottom: 16px; }
.master-panel .settings-anchor > .card { margin-bottom: 0; }
.master-panel .settings-form { max-width: 610px; }
.mapped-list-tools { display: grid; grid-template-columns: minmax(0,1fr) minmax(135px,.8fr); gap: 8px; }
.mapped-list-tools .field select { min-height: 38px; }
@media (max-width: 1130px) {
  .app-header .nav, .app-header .nav button { height: 43px; }
}
@media (max-width: 800px) {
  section[data-panel="user-settings"].master-panel { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .app-context { gap: 7px; padding: 8px 12px; }
  .context-controls { gap: 6px; }
  .context-warning { font-size: .62rem; }
  .mapped-list-tools { grid-template-columns: 1fr; }
}

/* Post-license registration and profile. */
.onboarding-panel { max-width: 760px; margin: 0 auto; }
main:has(.onboarding-panel:not([hidden])) .top { max-width: 760px; margin-left: auto; margin-right: auto; }
.onboarding-heading { margin-bottom: 18px; }
.onboarding-heading h2 { margin: 10px 0 4px; color: var(--brand-deep); font-size: 1.35rem; }
.onboarding-heading p { margin: 0; color: var(--muted); font-size: .84rem; }
.onboarding-form { padding: 0; overflow: hidden; }
.onboarding-form fieldset { display: grid; gap: 16px; margin: 0; padding: 26px 30px; border: 0; border-bottom: 1px solid var(--line); }
.onboarding-form legend { float: left; width: 100%; margin: 0 0 4px; padding: 0; color: var(--brand-deep); font-size: 1rem; font-weight: 800; }
.onboarding-form .field { max-width: 540px; }
.onboarding-form .field label { font-weight: 700; }
.onboarding-form .field input { width: 100%; min-height: 42px; background: #fff; }
.onboarding-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 30px; }
.onboarding-foot p { margin: 0; color: var(--muted); font-size: .83rem; }
section[data-panel="profile"].settings-panel { max-width: 760px; }
section[data-panel="profile"] .profile-details { overflow-wrap: anywhere; }
section[data-panel="profile"] #profile-edit-button { margin-top: 18px; }
@media (max-width: 640px) {
  .onboarding-form fieldset { padding: 20px 16px; }
  .onboarding-foot { flex-direction: column; align-items: stretch; padding: 16px; }
  .onboarding-foot .btn { width: 100%; }
}

/* Unified settings and filing preparation. */
.settings-hub { display: grid; grid-template-columns: 235px minmax(0,1fr); gap: 24px; align-items: start; }
.settings-hub-nav { position: sticky; top: 16px; display: grid; gap: 4px; padding: 16px 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.settings-hub-nav h2 { margin: 0 8px 10px; font-size: .86rem; color: #41564b; }
.settings-hub-nav button { min-height: 42px; padding: 9px 11px; border: 0; border-left: 3px solid transparent; border-radius: 5px; background: transparent; color: #46594f; text-align: left; font-size: .83rem; font-weight: 750; }
.settings-hub-nav button:hover,.settings-hub-nav button[aria-current="page"] { border-left-color: #198055; background: #edf6ef; color: #115638; }
.settings-hub > section[data-panel="settings"],.settings-hub > section[data-panel="user-settings"] { display: block; min-width: 0; max-width: 900px; }
.settings-hub .settings-menu { position: static; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; padding: 7px; }
.settings-hub .settings-menu h2,.settings-hub .settings-menu [data-go-view="user-settings"] { display: none; }
.settings-hub .settings-menu button { min-height: 34px; border-left: 0; border-bottom: 2px solid transparent; font-size: .76rem; }
.settings-hub .settings-menu button[aria-current="page"] { border-left: 0; border-bottom-color: #198055; }
#facility-add-disclosure summary { display: flex; align-items: center; gap: 10px; padding: 15px 18px; }
#facility-add-disclosure summary::before { display: none; }
#facility-add-disclosure summary .settings-index { margin: 0; }
#facility-add-disclosure summary strong { margin-right: auto; font-size: .92rem; }
.settings-add-button { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 14px; border: 1px solid #177342; border-radius: 5px; background: #fff; color: #12583a; font-size: .78rem; font-weight: 800; }
#facility-add-disclosure summary:hover .settings-add-button { background: #edf6ef; }
.overview-period { margin: 4px 0 0; color: var(--muted); font-size: .83rem; font-weight: 700; }
.overview-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.overview-metrics .metric small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.filing-support { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(270px,.75fr); gap: 16px; align-items: start; }
.filing-support .card { margin: 0; }
.filing-intro,.filing-support-result { grid-column: 1; }
.filing-guidance { grid-column: 2; grid-row: 1 / span 2; }
.filing-guidance ol { padding-left: 1.2em; line-height: 1.8; }
.filing-guidance a { color: #0f6242; font-weight: 750; }
.filing-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0 0 20px; }
.filing-facts div { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.filing-facts dt { color: var(--muted); font-size: .75rem; }
.filing-facts dd { margin: 4px 0 0; color: var(--brand-deep); font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .overview-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 800px) {
  .settings-hub { grid-template-columns: 1fr; gap: 12px; }
  .settings-hub-nav { position: static; display: flex; align-items: center; overflow-x: auto; padding: 8px; }
  .settings-hub-nav h2 { display: none; }
  .settings-hub-nav button { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; }
  .settings-hub-nav button[aria-current="page"] { border-left: 0; border-bottom-color: #198055; }
  .filing-support { grid-template-columns: 1fr; }
  .filing-intro,.filing-support-result,.filing-guidance { grid-column: 1; grid-row: auto; }
}
@media (max-width: 640px) { .overview-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.filing-facts { grid-template-columns: 1fr; } }

/* October workflow: settings, month scope, controlled close, and receipt queue. */
.app-context { background: #e8f1ef; border-bottom-color: #b9d3cb; box-shadow: none; color: #163b35; }
.context-product { color: #194f46; }
.context-field { border-color: #a6c6ba; background: #fff; color: #27584e; }
.context-field label { color: #41655c; }
.context-field select,.context-field input { color: #193e37; }
.context-field select option { background: #fff; color: #193e37; }
.context-field input[type="month"] { color-scheme: light; }
.context-status,.context-role { border-color: #afcdbd; background: #dcece4; color: #174f38; }
.context-status.is-closed { border-color: #9bb8cb; background: #e0ebf4; color: #244860; }
.context-env { border-color: #b99a61; background: #fff1d5; color: #715016; }
.context-warning { color: #214a40; }
.context-permission { color: #8a3e1e; }
.settings-hub > section[data-panel="evidence"] { display: block; min-width: 0; max-width: 900px; }
.settings-hub > section[data-panel="members-settings"] { display: block; min-width: 0; max-width: 900px; }
.master-registration-card { width: min(100%, 560px); }
.master-registration-card form { display: grid; gap: 16px; }
.master-registration-card .actions { align-items: stretch; }
.master-registration-card .actions .btn { flex: 1 1 auto; }
.member-editor,.settings-hub #member-invite-form { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 680px; }
.member-editor .choices,.settings-hub #member-invite-form .choices { margin-top: 0; }
.member-editor .actions { margin-top: 0; }
.member-assignment + .member-assignment { border-top: 1px solid var(--line); }
.settings-panel:has(.member-list-card) { max-width: 1120px; }
.member-table-wrap { margin-top: 16px; }
.member-table { width: 100%; table-layout: fixed; }
.member-table th:nth-child(1) { width: 18%; }
.member-table th:nth-child(2) { width: 25%; }
.member-table th:nth-child(3) { width: 32%; }
.member-table th:nth-child(4) { width: 16%; }
.member-table th:nth-child(5) { width: 9%; }
.member-table td { overflow-wrap: anywhere; vertical-align: middle; }
.member-table td:last-child { white-space: nowrap; }
.member-edit-dialog { width: min(560px, calc(100vw - 24px)); max-height: min(90vh, 820px); overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 26px; box-shadow: 0 16px 60px #1a3b5a33; color: var(--ink); }
.member-edit-dialog::backdrop { background: #102840a8; }
.member-edit-dialog .member-editor { max-width: none; }
.member-edit-dialog h2 { margin: 0; }
@media (max-width: 600px) { .member-edit-dialog { padding: 20px 16px; } .member-table td:last-child { white-space: normal; } }
@media (max-width: 600px) { .master-registration-card .actions { flex-direction: column; } .member-editor .actions .btn { width: 100%; } }
.settings-hub #evidence-form .grid { grid-template-columns: 1fr; max-width: 620px; }
.display-preferences { padding: 0; overflow: hidden; }
.display-preferences > .settings-index,.display-preferences > h2 { margin-left: 22px; margin-right: 22px; }
.display-preferences > .settings-index { margin-top: 20px; }
.display-preferences form { border-top: 1px solid var(--line); }
.preference-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(170px,250px); align-items: center; gap: 16px; min-height: 92px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.preference-row > div { display: grid; gap: 3px; }
.preference-row strong { font-size: .9rem; color: #243c38; }
.preference-row span:not(.toggle span) { color: var(--muted); font-size: .78rem; }
.preference-row select { min-height: 42px; padding: 7px 11px; border: 1px solid #9bafa9; border-radius: 6px; background: #fff; color: var(--ink); }
.display-preferences .actions { margin: 0; padding: 16px 22px; }
.toggle { justify-self: end; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle span { position: relative; display: block; width: 50px; height: 28px; border-radius: 28px; background: #657b75; transition: background .15s; }
.toggle span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #1b302a55; transition: transform .15s; }
.toggle input:checked + span { background: #176c54; }
.toggle input:checked + span::before { transform: translateX(22px); }
.toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.line-list-header { gap: 10px 20px; margin-bottom: 14px; }
.line-list-header h2 { margin-bottom: 2px; }
.line-list-header > .row { margin-left: auto; }
.line-scope-label { font-size: .78rem; font-weight: 750; color: #40534d; }
#line-scope { min-height: 40px; padding: 6px 28px 6px 10px; border: 1px solid #9bafa9; border-radius: 6px; background: #fff; color: #23453a; }
.line-actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
#line-dialog { width: min(740px,calc(100% - 28px)); max-height: min(88vh,900px); overflow-y: auto; }
#line-dialog > .row { position: sticky; top: -24px; z-index: 1; margin: -24px -24px 10px; padding: 18px 24px 12px; border-bottom: 1px solid var(--line); background: #fff; }
#line-dialog #line-entry { margin: 0; padding: 0; border: 0; box-shadow: none; }
#line-dialog #line-entry h2 { display: none; }
#line-dialog #line-form .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
#close-dialog { width: min(570px,calc(100% - 28px)); }
.close-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.close-summary div { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f4f8f5; }
.close-summary dt { color: var(--muted); font-size: .78rem; }
.close-summary dd { margin: 2px 0 0; color: #174d3d; font-size: 1.2rem; font-weight: 800; }
.close-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 17px; font-size: .85rem; font-weight: 650; }
.close-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #176c54; flex: none; }
.receipt-register h2 { margin: 0; }
.receipt-booking-cell { color: #174e40; font-weight: 800; }
.receipt-inline-preview iframe { display: block; width: 100%; min-height: 460px; margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
@media (max-width: 640px) {
  .preference-row { grid-template-columns: minmax(0,1fr) auto; padding: 15px 16px; }
  .preference-row:has(select) { grid-template-columns: 1fr; }
  .preference-row select { width: 100%; }
  .display-preferences > .settings-index,.display-preferences > h2 { margin-left: 16px; margin-right: 16px; }
  .display-preferences .actions { padding: 14px 16px; }
  .line-list-header > .row { margin: 0; width: 100%; }
  #line-add-trigger { margin-left: auto; }
  .line-actions { justify-content: flex-start; flex-wrap: wrap; }
  #line-dialog #line-form .grid { grid-template-columns: 1fr; }
  .receipt-inline-preview iframe { min-height: 360px; }
}

.setup-state { display: inline-flex; align-items: center; margin-top: 5px; color: #6a5c37; font-size: .76rem; font-weight: 800; }
.setup-state.is-ready { color: #146844; }
.overview-estimate { margin-top: 30px; }
.overview-estimate > .card { margin-top: 14px; }
.mapping-suggestion { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.mapping-suggestion .field { max-width: 520px; }
.mapping-suggestion .actions { margin-top: 12px; }
.mapping-suggestion .muted { margin: 10px 0 0; }

/* Keep each setting task separate; reveal column inputs only for review or repair. */
.misc-settings-nav { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.misc-settings-nav button { min-height: 44px; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #496057; font: inherit; font-size: .85rem; font-weight: 750; cursor: pointer; }
.misc-settings-nav button:hover { background: #f2f7f3; color: #15583c; }
.misc-settings-nav button[aria-current="page"] { border-bottom-color: #198055; color: #115638; }
.misc-settings-nav button:focus-visible,.mapping-review > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.misc-settings-panel[hidden] { display: none !important; }
.misc-settings-panel > .card:first-child { margin-top: 0; }
.misc-settings-panel .mapping-disclosure { max-width: 900px; }
.mapping-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; margin: 0 0 18px; }
.mapping-preview[hidden] { display: none; }
.mapping-preview > div { display: flex; justify-content: space-between; gap: 12px; min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mapping-preview dt { color: #40594c; font-size: .78rem; font-weight: 700; }
.mapping-preview dd { margin: 0; color: #1c4230; font-size: .83rem; font-weight: 800; overflow-wrap: anywhere; text-align: right; }
.mapping-preview dd.is-missing { color: #9b4a24; }
.mapping-review { border-top: 1px solid var(--line); }
.mapping-review > summary { display: inline-flex; align-items: center; min-height: 42px; padding: 10px 0; color: #145f40; font-size: .84rem; font-weight: 800; cursor: pointer; }
.mapping-review > summary::marker { color: #145f40; }
.mapping-review #mapping-form { padding: 14px 0 0; }
@media (max-width: 640px) {
  .misc-settings-nav { overflow-x: auto; white-space: nowrap; }
  .misc-settings-nav button { flex: 0 0 auto; padding: 10px 12px; }
  .mapping-preview { grid-template-columns: 1fr; }
}

/* Blue and white application theme. Green is reserved for confirmed success. */
:root { background: #f5f8fc; color: #223447; --canvas: #f5f8fc; --brand-deep: #175b96; --brand-dark: #114f84; --forest: #114f84; --teal: #1769a6; --line: #d5e1ea; --border: #d5e1ea; --ink: #223447; --muted: #526579; --soft: #eaf4fb; --focus: #0b65b9; }
.app-header { box-shadow: 0 2px 9px #173b6016; }
.app-header .mark { background: #145b94; box-shadow: 0 2px 5px #123e6026; }
.app-header .brand small { color: #5f7184; }
.app-header .nav button { color: #40556a; }
.app-header .nav button:hover { background: #f2f7fc; color: #114f84; }
.app-header .nav button[aria-current="page"] { border-bottom-color: #1769a6; background: #eaf4fb; color: #114f84; }
.app-header .account-menu > summary { border-color: #c4d8e9; background: #eaf4fb; color: #114f84; }
.account-menu > summary:hover,.account-menu[open] > summary { background: #d6eafa; }
.account-popover button { color: #173e60; }
.account-popover button:hover,.account-popover button:focus-visible { background: #edf5fb; }
.app-context { background: #246ea8; border-bottom-color: #175b96; box-shadow: none; color: #fff; }
.context-controls > .context-organization { margin-left: auto; }
.context-product { margin-left: 0; margin-right: 0; color: #fff; font-weight: 850; text-align: right; }
.context-warning,.context-permission { justify-self: end; text-align: right; }
.context-field { border-color: #b7d0e2; background: #fff; color: #2b5a7d; }
.context-field label { color: #385c79; }
.context-field select,.context-field input { color: #193c5c; }
.context-field select option { background: #fff; color: #193c5c; }
.context-status,.context-role { border-color: #b8d6eb; background: #e7f2fb; color: #164f7b; }
.context-status.is-closed { border-color: #9bb8cc; background: #f1f5f8; color: #244860; }
.context-warning { color: #f3f8fd; }
.context-permission { color: #fff2d7; }
.context-env { border-color: #dfb875; background: #fff0d6; color: #73500d; }
.page .card { box-shadow: 0 2px 10px #173b6010; }
.page .btn:not(.danger):not(.danger-outline):not(.secondary):not(.ghost) { background: #1769a6; color: #fff; }
.page .btn.secondary { background: #e5f1fa; color: #114f84; }
.master-registration-card .btn { background: #1769a6; color: #fff; }
.master-registration-card .btn.secondary { background: #e5f1fa; color: #114f84; }
.master-registration-card .btn.ghost { background: #fff; border-color: #a8c2d5; color: #155786; }
.page .btn.ghost { border-color: #a8c2d5; color: #155786; }
.btn.ghost:hover:not(:disabled),.page .btn.secondary:hover:not(:disabled) { background: #d8eaf8; }
.eyebrow,.settings-index { color: #155f96; }
.field label,.field-title,.choices legend { color: #314e67; }
.field input,.field select,.field textarea,td input { border-color: #9ab5ca; }
.choices input,.close-check input { accent-color: #1769a6; }
.settings-form .field input:not([type="radio"]),.settings-form .field select,#mapping-form .field input,#mapping-form .field select { border-bottom-color: #9ab5ca; }
.settings-disclosure summary::before { border-color: #80aaca; color: #155f96; }
.settings-disclosure-body { border-top-color: #e2ebf2; }
.settings-menu button,.settings-hub-nav button { color: #435a70; }
.settings-menu button:hover,.settings-menu button[aria-current="page"],.settings-hub-nav button:hover,.settings-hub-nav button[aria-current="page"] { border-left-color: #1769a6; background: #eaf4fb; color: #114f84; }
.settings-hub .settings-menu button[aria-current="page"] { border-bottom-color: #1769a6; }
.settings-add-button { border-color: #1769a6; color: #114f84; }
#facility-add-disclosure summary:hover .settings-add-button { background: #eaf4fb; }
.misc-settings-nav button { color: #435a70; }
.misc-settings-nav button:hover { background: #f0f6fb; color: #114f84; }
.misc-settings-nav button[aria-current="page"] { border-bottom-color: #1769a6; color: #114f84; }
.mapping-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.mapping-heading > span:first-child { color: #155f96; font-size: .72rem; font-weight: 850; }
.mapping-heading > strong { font-size: .9rem; }
.mapping-heading #mapping-status { margin-left: auto; font-size: .75rem; }
.mapping-preview dt { color: #425d73; }
.mapping-preview dd { color: #214b6a; }
.mapping-preview dd.is-missing { color: #9b4a24; }
.mapping-review > summary,.mapping-review > summary::marker { color: #155f96; }
.overview-estimate { margin-top: 30px; }
.overview-estimate > .card { margin-top: 0; }
.step-number { background: #e3f0fa; color: #145d92; }
.workflow-list li { border-top-color: #e2ebf2; }
.aside-card { border-left-color: #4c91c6; }
.steps span { background: #e8f3fb; color: #145b90; }
.notice,.page .notice { background: #fff7ea; border-color: #e9c98d; color: #684717; }
.alert.good { background: #e7f5e9; border-color: #3e9b6a; color: #185e3a; }
.chip:not(.warning) { background: #e5f1fa; color: #145b90; }
.chip:not(.warning)::before { background: #287ab5; }
.status:not(.void) { background: #e5f1fa; color: #145b90; }
.state-preview { background: #eef2f6; color: #41566b; }
.state-option { background: #e7f0fa; color: #23547d; }
.page .metric { background: #f1f7fc; }
.metric span { color: #415f77; }
.metric b { color: #155b91; }
th { background: #edf4f9; color: #355772; }
th,td { border-bottom-color: #e2ebf2; }
tbody tr:hover { background: #f4f9fd; }
.mapped-drop-zone { border-color: #83b4d8; background: #f3f9fe; }
.statement-detail-pane { background: #f7fafd; }
.statement-empty-preview { background: #f1f6fb; }
.statement-empty-preview p { color: #526579; }
.empty-symbol { color: #7195b2; }
.mapped-list-wrap tr:hover { background: #f1f8fd; }
.mapped-list-wrap tr[aria-selected="true"] { background: #e8f3fb; box-shadow: inset 4px 0 #1769a6; }
.mapped-list-wrap td:nth-child(2),.mapped-list-wrap td:nth-child(5) { color: #174f7a; }
.statement-review-status { color: #235b85; }
.preference-row strong { color: #2f4559; }
.preference-row select,#line-scope { border-color: #9ab5ca; }
.toggle span { background: #708398; }
.toggle input:checked + span { background: #1769a6; }
.close-summary div { background: #f1f7fc; }
.close-summary dd,.receipt-booking-cell { color: #155b91; }
.setup-state.is-ready { color: #176844; }
.filing-guidance a { color: #155f96; }
.filing-guidance .notice { margin-top: 18px; }
.filing-support-result h3 { margin-top: 24px; }
.postal-search-row { display: flex; align-items: end; gap: 12px; }
.postal-search-row input { flex: 1; min-width: 0; }
.postal-search-row .btn { flex: none; min-height: 40px; }
.postal-candidates { display: grid; gap: 6px; margin-top: 9px; }
.postal-candidates[hidden] { display: none; }
.postal-candidates button { width: 100%; text-align: left; white-space: normal; }
@media (max-width: 540px) {
  .postal-search-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .postal-search-row .btn { width: 100%; }
}
.filing-days-wrap { max-height: 460px; overflow-y: auto; }
.filing-days-wrap th:first-child { position: sticky; left: 0; z-index: 1; }
.filing-days-wrap td:first-child { font-weight: 750; color: #174f7a; }
#filing-report-body .card,#payment-completion-card { width: 100%; max-width: none; }
#filing-card .grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 960px; }
@media (max-width: 640px) { #filing-card .grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .mapping-heading { padding: 14px; }
  .mapping-heading #mapping-status { flex-basis: 100%; margin-left: 0; }
  .context-product { margin-left: 0; }
}

/* Keep the work-target controls stable when a native dropdown receives focus. */
.context-field select:focus,
.context-field input[type="month"]:focus {
  outline: none !important;
  outline-offset: 0;
}
.context-field select:focus-visible,
.context-field input[type="month"]:focus-visible {
  background: #eaf4fb;
  box-shadow: inset 0 -2px #0b65b9;
}

.context-field.context-enhanced select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.context-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  padding: 2px 1px;
  border: 0;
  background: transparent;
  color: #193c5c;
  font-size: .77rem;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}
.context-select-trigger::after {
  content: '';
  width: 7px;
  height: 7px;
  flex: none;
  margin: -3px 3px 0 0;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
}
.context-organization .context-select-trigger { width: 150px; }
.context-facility .context-select-trigger { width: 194px; }
.context-select-trigger:focus { outline: none !important; }
.context-select-trigger:focus-visible { box-shadow: inset 0 -2px #0b65b9; }
.context-select-trigger:disabled { cursor: not-allowed; opacity: .55; }
.context-select-options {
  position: fixed;
  z-index: 300;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #a9c5d9;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px #173b6030;
}
.context-select-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: #193c5c;
  text-align: left;
  font-size: .79rem;
}
.context-select-option:hover,.context-select-option:focus-visible { background: #eaf4fb; }
.context-select-option[aria-selected="true"] { color: #114f84; font-weight: 800; }
