:root {
    --ink: #17211c;
    --muted: #647067;
    --oak: #315b43;
    --oak-dark: #234331;
    --moss: #dce8de;
    --cream: #f6f3eb;
    --paper: #fffefa;
    --line: #dfe3dc;
    --danger: #9b332f;
    --shadow: 0 18px 55px rgba(28, 46, 35, .12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
}

* { box-sizing: border-box; }
html {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
}
a { color: var(--oak); text-underline-offset: 3px; }
button, input, select { font: inherit; }

.guest-shell {
    display: grid;
    place-items: center;
    padding: 40px 20px 70px;
    background:
        radial-gradient(circle at 15% 10%, rgba(83, 121, 91, .19), transparent 32rem),
        linear-gradient(145deg, #f8f5ed, #edf2ea);
}

.guest-card {
    width: min(100%, 500px);
    padding: 42px;
    border: 1px solid rgba(49, 91, 67, .18);
    border-radius: 22px;
    background: rgba(255, 254, 250, .94);
    box-shadow: var(--shadow);
}

.password-confirm-content {
    width: min(100%, 520px);
    margin: clamp(32px, 7vh, 72px) auto;
}

.password-confirm-content .stack {
    margin-top: 28px;
}

.guide-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 14px;
}
.guide-nav a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-weight: 700;
    text-decoration: none;
}
.workflow-guide {
    margin: 0;
    padding: 0;
    list-style: none;
}
.workflow-guide > li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}
.workflow-guide > li:first-child { border-top: 0; }
.workflow-number {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--oak);
    color: #fff;
    font-weight: 800;
}
.workflow-main { min-width: 0; }
.workflow-heading,
.action-heading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
}
.workflow-heading strong { display: block; font-size: 1rem; }
.workflow-heading small { display: block; margin-top: 4px; color: var(--muted); }
.guide-details {
    margin-top: 11px;
    padding: 10px 13px;
    border-radius: 8px;
    background: #f1f4ef;
}
.guide-details summary {
    cursor: pointer;
    color: var(--oak-dark);
    font-weight: 800;
}
.guide-details ol { margin: 12px 0 4px; padding-left: 22px; }
.guide-details li + li { margin-top: 7px; }
.guide-details > a { display: inline-block; margin-top: 10px; }
.action-list { display: grid; gap: 14px; }
.action-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid #a7b5aa;
    border-radius: 12px;
    background: #fff;
}
.action-item.waiting { border-left-color: #5d8066; background: #fbfdfb; }
.action-item.caution { border-left-color: #bd7924; background: #fffbf2; }
.action-item.overdue { border-left-color: #b5453c; background: #fff7f6; }
.action-date {
    display: grid;
    justify-items: center;
    padding: 8px;
    border-radius: 10px;
    background: #edf2eb;
    line-height: 1;
}
.action-date small:first-child { margin-bottom: 7px; font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.action-date span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.action-date strong { margin: 5px 0; font: 700 1.85rem/1 Georgia, serif; }
.action-date small { color: var(--muted); }
.action-content { min-width: 0; }
.action-heading h3 { margin: 2px 0 0; font: 700 1.18rem/1.25 Georgia, serif; }
.action-content > p { margin: 8px 0 0; color: var(--muted); }
.action-content .action-due { color: var(--ink); }
.action-content .action-amount { color: var(--ink); font-weight: 800; }
.due-pill {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: #e6ece4;
    color: var(--oak-dark);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}
.due-pill.waiting { background: #e3ede2; color: #28583d; }
.due-pill.caution { background: #f7dfb8; color: #714006; }
.due-pill.overdue { background: #f5d4d0; color: #812a24; }
.action-panel-heading { align-items: flex-start; gap: 20px; }
.action-view-toggle { display: inline-flex; flex: 0 0 auto; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #f0f3ed; }
.action-view-toggle a { padding: 8px 12px; border-radius: 999px; color: var(--oak-dark); text-decoration: none; font-size: .82rem; font-weight: 800; }
.action-view-toggle a.active { color: #fff; background: var(--oak); }
.action-view-toggle span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.25); font-size: .7rem; }
.action-key { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.action-key span { padding: 6px 9px; border-left: 4px solid; border-radius: 6px; font-size: .74rem; font-weight: 800; }
.action-key .waiting { border-color: #5d8066; background: #edf4eb; color: #28583d; }
.action-key .caution { border-color: #bd7924; background: #f9e8ca; color: #714006; }
.action-key .overdue { border-color: #b5453c; background: #f7d9d5; color: #812a24; }
.action-completion-form { display: grid; grid-template-columns: minmax(160px, .45fr) minmax(240px, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; padding: 12px; border: 1px solid #d7dfd4; border-radius: 9px; background: #f7f9f5; }
.action-completion-form label { margin: 0; font-size: .75rem; font-weight: 800; }
.action-completion-form label span { color: var(--muted); font-weight: 500; }
.action-completion-form input { width: 100%; margin-top: 5px; }
.automatic-completion-note { padding-left: 22px; font-size: .8rem; position: relative; }
.automatic-completion-note::before { content: "✓"; position: absolute; left: 2px; color: var(--oak); font-weight: 900; }
.completed-action-list { display: grid; gap: 12px; }
.completed-action-item { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(360px, .9fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.completed-action-item h3 { margin: 2px 0 5px; font: 700 1.08rem/1.25 Georgia, serif; }
.completed-action-item p { margin: 0; color: var(--muted); }
.completed-action-item dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; }
.completed-action-item dt { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.completed-action-item dd { margin: 3px 0 0; font-weight: 700; }
.completion-result { padding: 7px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.completion-result.on-time { color: #28583d; background: #e3ede2; }
.completion-result.late { color: #812a24; background: #f5d4d0; }
.completed-action-item .completion-notes { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); }

.guest-brand { margin-bottom: 30px; text-align: center; }
.guest-brand h1 { margin: 5px 0 4px; font-family: Georgia, serif; font-size: 2.1rem; font-weight: 500; }
.brand-mark {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    color: white; background: var(--oak); font-family: Georgia, serif; letter-spacing: -3px; padding-right: 3px;
}
.brand-mark.large { width: 58px; height: 58px; margin: 0 auto 18px; font-size: 1.2rem; }
.eyebrow { margin: 0; color: var(--oak); font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }

.stack { display: grid; gap: 18px; }
.stack.compact { margin-top: 15px; }
label { display: grid; gap: 7px; font-size: .9rem; font-weight: 700; }
label small, .field-grid small { color: var(--muted); font-weight: 400; line-height: 1.45; }
input, select, textarea {
    width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c9d0c9; border-radius: 9px;
    color: var(--ink); background: white; outline: none;
}
textarea { min-height: 86px; resize: vertical; font: inherit; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--oak); box-shadow: 0 0 0 3px rgba(49, 91, 67, .14); }
.check-row { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.check-row input { width: 17px; min-height: 17px; }

.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px;
    border: 1px solid #bdc6bd; border-radius: 9px; color: var(--ink); background: white; cursor: pointer; text-decoration: none;
}
.button:hover { border-color: var(--oak); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button:disabled:hover { background: inherit; border-color: inherit; }
.button-primary { border-color: var(--oak); color: white; background: var(--oak); font-weight: 750; }
.button-primary:hover { background: var(--oak-dark); }
.button-danger { border-color: #e4c2bf; color: var(--danger); }
.button-quiet { min-height: 36px; padding: 7px 12px; background: transparent; }

.notice { margin-bottom: 22px; padding: 13px 15px; border-radius: 9px; font-size: .9rem; line-height: 1.5; }
.notice ul { margin-bottom: 0; }
.notice-success { border: 1px solid #bad5c0; background: #edf7ee; }
.notice-error { border: 1px solid #e7bdb9; background: #fff0ee; }
.configuration-note { padding: 12px 14px; border-left: 3px solid #9cad9e; color: #526158; background: #f1f4ef; font-size: .86rem; }
.recovery-option { margin-top: 22px; color: var(--muted); }

.app-shell { background: #f4f5f1; }
.topbar {
    display: flex; align-items: center; gap: 32px; min-height: 72px; padding: 0 max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--line); background: var(--paper);
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 1.05rem; }
.brand small { color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar nav a { color: #4f5b53; font-size: .9rem; font-weight: 650; text-decoration: none; }
.topbar nav a:hover { color: var(--oak); }
.topbar nav .nav-top-link.active,
.nav-dropdown.active > .nav-parent > .nav-dropdown-label { color: var(--oak-dark); font-weight: 850; }
.nav-dropdown { position: relative; }
.nav-parent { display: flex; align-items: center; gap: 3px; }
.nav-dropdown-toggle {
    display: inline-grid; width: 24px; height: 28px; padding: 0; place-items: center;
    border: 0; border-radius: 6px; color: #657168; background: transparent; cursor: pointer;
}
.nav-dropdown-toggle:hover, .nav-dropdown-toggle:focus-visible { color: var(--oak-dark); background: #edf2ec; outline: none; }
.nav-dropdown-toggle span { transition: transform .16s ease; }
.nav-dropdown.is-open .nav-dropdown-toggle span { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; z-index: 30; top: calc(100% + 12px); left: 50%; display: none;
    width: 290px; max-height: min(70vh, 620px); padding: 9px; overflow-y: auto;
    border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
    box-shadow: 0 16px 40px rgba(31, 43, 35, .18); transform: translateX(-50%);
}
.nav-dropdown-menu-compact { width: 190px; }
.nav-dropdown::before { position: absolute; top: 100%; left: -12px; width: calc(100% + 24px); height: 14px; content: ""; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu, .nav-dropdown.is-open .nav-dropdown-menu { display: grid; }
.topbar nav .nav-dropdown-menu a { padding: 9px 10px; border-radius: 7px; font-size: .82rem; }
.topbar nav .nav-dropdown-menu a:hover { background: #edf2ec; }
.topbar nav .nav-dropdown-menu a.active { color: #fff; background: var(--oak); }

.page { width: min(1180px, calc(100% - 40px)); margin: 38px auto 80px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading h1 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.status-pill { padding: 6px 10px; border-radius: 999px; color: var(--oak-dark); background: var(--moss); font-size: .75rem; font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.metric, .panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 5px 20px rgba(31, 43, 35, .04); }
.metric { display: grid; gap: 8px; padding: 20px; }
.account-balance-card { width: min(100%, 380px); margin-bottom: 22px; }
.metric span, .metric small { color: var(--muted); }
.metric strong { font-family: Georgia, serif; font-size: 1.9rem; font-weight: 500; }
.panel { padding: 24px; }
.panel + .panel { margin-top: 18px; }
.panel h2, .panel h3 { margin-top: 0; }
.panel h2 { font-family: Georgia, serif; font-weight: 500; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2 { margin-bottom: 4px; }
.panel-heading p { margin: 0; color: var(--muted); }
.checklist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist li > span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #bac4bb; border-radius: 50%; }
.checklist li.done > span { border-color: var(--oak); color: white; background: var(--oak); }
.checklist strong, .checklist small { display: block; }
.checklist small { margin-top: 3px; color: var(--muted); }

.two-column { display: grid; grid-template-columns: 1.45fr .75fr; gap: 20px; align-items: start; }
.details { margin: 0; }
.details div { padding: 12px 0; border-top: 1px solid var(--line); }
.details div:first-child { border-top: 0; }
.details dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.details dd { margin: 4px 0 0; }

/* Owner distribution planner */
.planner-selector { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.planner-selector h2 { margin-bottom: 5px; }
.planner-selector p { max-width: 690px; margin: 0; color: var(--muted); }
.planner-month-form label { min-width: 150px; }
.planner-month-form label span, .planner-request-form label > span { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 750; }
.planner-month-form input { width: 108px; }
.planner-primary-metrics .metric-featured { border-color: #8aae94; background: #f0f7f1; }
.planner-status-text { font-size: 1.55rem !important; }
.planner-notice-warning { border: 1px solid #e4c37f; background: #fff7e6; }
.planner-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-bottom: 18px; }
.planner-grid .panel { margin: 0; }
.money-input { display: flex; align-items: center; overflow: hidden; border: 1px solid #bdc6bd; border-radius: 9px; background: white; }
.money-input:focus-within { border-color: var(--oak); box-shadow: 0 0 0 3px rgba(49, 91, 67, .14); }
.money-input > span { margin: 0 !important; padding-left: 13px; color: var(--muted); font-size: 1rem !important; }
.money-input input { border: 0; box-shadow: none !important; }
.planner-assessment { margin-top: 16px; padding: 14px 16px; border-left: 4px solid var(--oak); border-radius: 8px; background: #edf7ee; }
.planner-assessment p { margin: 5px 0; }
.planner-assessment small { color: var(--muted); }
.planner-assessment-caution { border-color: #b47a16; background: #fff7e6; }
.planner-assessment-blocked { border-color: var(--danger); background: #fff0ee; }
.planner-readiness { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.planner-readiness li { display: grid; grid-template-columns: 28px 1fr; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line); }
.planner-readiness li:first-child { border-top: 0; }
.planner-readiness li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: white; background: var(--oak); font-weight: 800; }
.planner-readiness li.not-ready > span { background: var(--danger); }
.planner-readiness strong, .planner-readiness small { display: block; }
.planner-readiness small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.planner-breakdown-panel tfoot th { border-top: 1px solid var(--line); background: #f1f4ef; }
.planner-breakdown-panel tfoot tr:last-child th { color: var(--oak-dark); font-size: .86rem; }
.planner-trend-metrics { margin-bottom: 18px; }
.planner-details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.planner-details div { border-top: 0; border-left: 1px solid var(--line); padding: 4px 0 4px 18px; }
.planner-details div:first-child { border-left: 0; padding-left: 0; }
.planner-details dd { font-family: Georgia, serif; font-size: 1.45rem; }
.qr-box { display: inline-block; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.qr-box svg { display: block; width: 210px; height: 210px; }
.inline-form { display: flex; align-items: end; gap: 12px; }
.inline-form .grow { flex: 1; }
.table-panel { padding-left: 0; padding-right: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 0 24px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 13px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f7f8f4; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
td small { display: block; max-width: 360px; margin-top: 3px; color: var(--muted); }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.positive { color: var(--oak-dark); }
.negative { color: #8f3e36; }
.row-action { display: flex; align-items: center; gap: 7px; min-width: 310px; }
.row-action select { min-width: 220px; }
.secondary-action { display: inline-flex; min-width: 0; margin-top: 5px; }
.button-small { min-height: 36px; padding: 7px 11px; }
.link-button { padding: 0; border: 0; color: var(--muted); background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.empty-state { padding: 36px; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px 0; border-top: 1px solid var(--line); }
.pagination-summary { color: var(--muted); font-size: .8rem; }
.pagination-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pagination-button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 7px 11px; border: 1px solid #cdd4cd; border-radius: 8px; color: var(--oak-dark); background: white; font-size: .82rem; font-weight: 700; text-decoration: none; }
.pagination-button:hover { border-color: var(--oak); }
.pagination-button.active { border-color: var(--oak); color: white; background: var(--oak); }
.pagination-button.disabled { color: #939b94; background: #f4f5f1; cursor: default; }
.pagination-ellipsis { padding: 0 3px; color: var(--muted); }

.eftps-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.eftps-breakdown article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf9; }
.eftps-breakdown article > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .86rem; }
.eftps-breakdown article > strong { display: block; font-family: Georgia, serif; font-size: clamp(1.45rem, 2vw, 2rem); font-weight: 500; color: var(--ink); }
.eftps-breakdown article > small { display: block; margin-top: 7px; color: var(--muted); }
.eftps-breakdown .eftps-total { border-color: #9db6a7; background: #edf4ee; }
.calculation-source { margin: 0 0 16px; color: var(--muted); }
.eftps-entry-fields { margin-top: 4px; padding: 18px; border: 1px solid #b7cbbc; border-radius: 12px; background: #f4f8f3; }
.eftps-sum-check { margin: -4px 0 20px; padding: 11px 15px; border-left: 3px solid var(--oak); background: #edf4ee; color: var(--ink); }
.report-nav { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 24px; }
.report-nav a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--oak-dark); background: var(--paper); font-size: .85rem; text-decoration: none; }
.report-nav a.active { border-color: var(--oak); color: white; background: var(--oak); }
.date-filter { display: flex; align-items: end; gap: 14px; margin-bottom: 34px; padding: 0 0 24px; border-bottom: 1px solid var(--line); }
.date-filter label { flex: 0 0 190px; width: 190px; }
.date-filter input[type="date"] { width: 100%; min-width: 0; }
.date-filter .button { flex: 0 0 auto; margin-bottom: 1px; }
.report-sheet { width: min(760px, 100%); margin: 0 auto; padding: 6px 0 18px; }
.report-sheet > h2, .report-sheet > p { text-align: center; }
.report-sheet > p { margin-top: -5px; color: var(--muted); }
.report-sheet h3 { margin: 30px 0 8px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-family: Georgia, serif; }
.report-row { display: flex; justify-content: space-between; gap: 20px; padding: 7px 4px; font-variant-numeric: tabular-nums; }
.report-row.subtotal { margin-top: 5px; border-top: 1px solid var(--line); font-weight: 700; }
.report-row.grand-total, .total-row { border-top: 2px solid var(--ink); border-bottom: 2px double var(--ink); font-weight: 800; }
.payroll-workpaper-sheet { padding: 26px clamp(24px, 3vw, 48px) 32px; }
.payroll-workpaper-sheet .report-row { padding-right: 0; padding-left: 0; }
.payroll-workpaper-checks .panel-heading {
    padding-right: clamp(24px, 3vw, 48px);
    padding-left: clamp(24px, 3vw, 48px);
}
.payroll-workpaper-checks th:first-child,
.payroll-workpaper-checks td:first-child { padding-left: clamp(24px, 3vw, 48px); }
.payroll-workpaper-checks th:last-child,
.payroll-workpaper-checks td:last-child { padding-right: clamp(24px, 3vw, 48px); }
.reconciliation-account-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.reconciliation-intro { margin-bottom: 20px; }
.reconciliation-opening-summary,
.reconciliation-activity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}
.reconciliation-opening-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reconciliation-opening-summary > div,
.reconciliation-activity-grid > div {
    display: grid;
    gap: 5px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8f9f6;
}
.reconciliation-opening-summary span,
.reconciliation-activity-grid span { color: var(--muted); font-size: .8rem; }
.reconciliation-opening-summary strong,
.reconciliation-activity-grid strong { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.reconciliation-caution { margin-top: 0; }
.reconciliation-form { max-width: none; }
.reconciliation-results .reconciliation-metrics { margin-bottom: 16px; }
.reconciliation-match { border-color: #a9cab0; background: #f2f8f3; }
.reconciliation-variance { border-color: #e4b7b2; background: #fff7f5; }
.reconciliation-ready-pill { background: #d8eadc; }
.reconciliation-blocked-pill { color: #72481e; background: #f8e5c8; }
.reconciliation-unresolved-heading { margin-top: 24px; }
.reconciliation-complete-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f4f6f2;
}
.reconciliation-complete-bar > div { display: grid; gap: 5px; }
.reconciliation-complete-bar small { color: var(--muted); }
.reconciliation-history { margin-top: 18px; }
.reconciliation-reopen-form { min-width: 360px; }
.reconciliation-reopen-form input { min-width: 210px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 15px 0; }
.recovery-codes code { padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #f5f6f2; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-divider { align-self: stretch; width: 1px; background: var(--border); }
.settings-form { display: grid; gap: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 18px; }
.field-grid.two { grid-template-columns: repeat(2, 1fr); }
.field-grid.one { grid-template-columns: minmax(280px, 560px); }
.field-grid > label { align-content: start; grid-template-rows: auto 46px auto; }
.field-grid > label > input, .field-grid > label > select { height: 46px; min-height: 46px; }
.field-grid > label > small { min-height: 21px; }
.save-bar { position: sticky; bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid #cfd7cf; border-radius: 12px; background: rgba(255, 254, 250, .96); box-shadow: var(--shadow); }
.save-bar span { color: var(--muted); font-size: .85rem; }
.footer { padding: 25px; color: #768078; font-size: .75rem; text-align: center; }
.stripe-metrics { margin-bottom: 34px; }
.metric .metric-compact { font-size: 1.25rem; }
.compact-heading { align-items: end; margin-top: 6px; }
.compact-heading h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 1.6rem; font-weight: 500; }
.type-badge { display: inline-block; padding: 4px 7px; border-radius: 6px; color: var(--oak-dark); background: #edf2ec; font-size: .72rem; font-weight: 800; }
.stripe-action-cell { min-width: 220px; }
.stripe-review-form { display: grid; gap: 7px; min-width: 260px; }
.stripe-review-form select { min-height: 38px; padding: 7px 9px; font-size: .8rem; }
.review-note { display: block; max-width: 250px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.sync-history { padding-left: 0; padding-right: 0; }
.sync-history .panel-heading { padding: 0 24px; }
.sync-status { font-size: .78rem; font-weight: 800; }
.sync-status.succeeded { color: var(--oak); }
.sync-status.failed { color: var(--danger); }
.sync-status.running { color: #8a642b; }
.report-controls { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.report-controls .form-help { max-width: 560px; margin: 0; }
.month-tabs { display: flex; gap: 7px; margin: 0 0 18px; overflow-x: auto; padding-bottom: 3px; }
.month-tabs a { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--oak-dark); background: var(--paper); font-size: .8rem; font-weight: 700; text-decoration: none; }
.month-tabs a.active { border-color: var(--oak); color: white; background: var(--oak); }
.annual-report-panel { margin-top: 0; }
.tracking-matrix { min-width: 1520px; }
.tracking-matrix th:first-child, .tracking-matrix td:first-child { position: sticky; left: 0; z-index: 1; min-width: 290px; background: var(--paper); }
.tracking-matrix th:first-child { z-index: 2; background: #f7f8f4; }
.tracking-matrix .total-column { font-weight: 800; background: #f4f5f1; }
.report-total-row td { border-top: 2px solid #9aa49b; border-bottom: 2px double #6e786f; background: #f0f1ee; font-weight: 800; }
.tracking-matrix .report-total-row td:first-child { background: #f0f1ee; }
.section-row td { color: #155568; background: #e1eef0; font-size: .75rem; font-weight: 800; letter-spacing: .04em; }
.tracking-matrix .section-row td:first-child { background: #e1eef0; }
.monthly-report-grid { display: grid; gap: 18px; }
.monthly-summary { width: min(100%, 680px); padding-left: 0; padding-right: 0; }
.monthly-summary .panel-heading { padding: 0 24px; }
.monthly-detail { margin-top: 0 !important; }
.monthly-detail table { min-width: 1120px; }
.classification-note { margin: 18px 0; }
.classification-result { display: grid; gap: 4px; max-width: 340px; margin: 0 0 9px; padding: 9px 10px; border-left: 3px solid #aeb9af; background: #f4f6f2; }
.classification-result.has-suggestion { border-left-color: var(--oak); background: #edf4ed; }
.classification-result.needs-review { border-left-color: #b77a32; background: #fff7e9; }
.classification-result strong { font-size: .82rem; }
.classification-result small { max-width: none; margin: 0; font-size: .75rem; line-height: 1.4; }
.classification-result .classification-source { color: #768078; font-size: .69rem; }
.confidence-badge { width: fit-content; padding: 3px 7px; border-radius: 999px; color: var(--oak-dark); background: #dce9dc; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.needs-review .confidence-badge { color: #765021; background: #f4dfbd; }
.suggested-action { margin: 0 0 8px; }
.correction-box { max-width: 340px; margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.correction-box summary { color: var(--oak); font-size: .78rem; font-weight: 750; cursor: pointer; }
.correction-form { display: grid; gap: 10px; margin-top: 10px; padding: 11px; border-radius: 9px; background: #f7f5ef; }
.correction-form label { font-size: .76rem; }
.correction-form input, .correction-form select { min-height: 39px; padding: 7px 9px; font-size: .8rem; }
.payroll-warning { border-left: 3px solid #b77a32; background: #fff7e9; }
.metric-grid .metric small { line-height: 1.4; }
.panel .configuration-note { margin-top: 20px; }
.panel form h3 { margin: 8px 0 0; font-family: Georgia, serif; font-weight: 500; }
.table-panel form.inline-form input { min-width: 130px; min-height: 36px; padding: 7px 9px; }
.details + .configuration-note { margin-top: 18px; }
.payroll-setup .save-bar { position: static; }
.payroll-setup .field-grid > label.textarea-field { grid-template-rows: auto auto auto; }

@media (min-width: 851px) {
    .topbar { padding-right: 24px; padding-left: 24px; }
    .page { width: calc(100% - 48px); max-width: none; }
    .report-sheet, .monthly-summary { width: 100%; max-width: none; }
}

@media (max-width: 850px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .two-column, .field-grid, .field-grid.two { grid-template-columns: 1fr; }
    .topbar { flex-wrap: wrap; padding: 14px 20px; }
    .topbar nav { order: 3; width: 100%; flex-wrap: wrap; gap: 10px 18px; }
    .nav-dropdown-menu { left: 0; transform: none; }
    .nav-dropdown:nth-last-child(-n+2) .nav-dropdown-menu { right: 0; left: auto; }
    .report-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .owner-report-grid, .reconciliation-account-grid { grid-template-columns: 1fr; }
    .field-span-2 { grid-column: auto; }
}
@media (max-width: 540px) {
    .guest-card { padding: 28px 22px; }
    .metric-grid { grid-template-columns: 1fr; }
    .page { width: min(100% - 24px, 1180px); margin-top: 24px; }
    .page-heading, .save-bar { align-items: stretch; flex-direction: column; }
    .checklist li { grid-template-columns: 34px 1fr; }
    .checklist li a { grid-column: 2; }
    .inline-form { align-items: stretch; flex-direction: column; }
    .topbar nav { gap: 10px 15px; overflow: visible; }
    .report-card-grid, .metrics-grid, .basis-summary { grid-template-columns: 1fr; }
    .nav-dropdown-menu { width: min(290px, calc(100vw - 40px)); }
    .date-filter { align-items: stretch; flex-direction: column; }
    .date-filter label { flex-basis: auto; width: 100%; }
    .report-nav { margin-bottom: 16px; }
    .report-controls { align-items: stretch; flex-direction: column; }
    .pagination { align-items: flex-start; flex-direction: column; padding: 16px 14px 0; }
    .recovery-codes { grid-template-columns: 1fr; }
    .payroll-workpaper-sheet { padding: 22px 18px 26px; }
    .payroll-workpaper-checks .panel-heading { padding-right: 18px; padding-left: 18px; }
    .payroll-workpaper-checks th:first-child, .payroll-workpaper-checks td:first-child { padding-left: 18px; }
    .payroll-workpaper-checks th:last-child, .payroll-workpaper-checks td:last-child { padding-right: 18px; }
    .reconciliation-opening-summary, .reconciliation-activity-grid { grid-template-columns: 1fr; }
    .reconciliation-complete-bar { align-items: stretch; flex-direction: column; }
    .reconciliation-complete-bar form, .reconciliation-complete-bar .button { width: 100%; }
    .reconciliation-reopen-form { min-width: 280px; }
}

@media (max-width: 800px) {
    .eftps-breakdown { grid-template-columns: 1fr 1fr; }
    .workflow-guide > li { grid-template-columns: 38px minmax(0, 1fr); }
    .workflow-guide > li > .button { grid-column: 2; justify-self: start; }
    .workflow-heading,
    .action-heading { flex-direction: column; }
    .action-item { grid-template-columns: 64px minmax(0, 1fr); }
    .action-item > .button { grid-column: 2; justify-self: start; }
    .action-completion-form { grid-template-columns: 1fr; }
    .action-completion-form .button { justify-self: start; }
    .action-panel-heading { flex-direction: column; }
    .completed-action-item { grid-template-columns: 1fr; }
    .completed-action-item dl { grid-template-columns: 1fr; gap: 8px; }
    .completion-result { justify-self: start; }
}

@media (max-width: 520px) {
    .eftps-breakdown { grid-template-columns: 1fr; }
}
.report-explainer {
    margin-top: 1.25rem;
}

.report-explainer > p {
    max-width: 75rem;
}

.report-explainer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.report-explainer-grid h3 {
    margin-bottom: .45rem;
}

.report-explainer-grid ul {
    margin: 0;
    padding-left: 1.25rem;
}

.report-explainer-grid li + li {
    margin-top: .35rem;
}

@media (max-width: 800px) {
    .report-explainer-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .no-print {
        display: none !important;
    }
}
.report-card-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.report-card { display: flex; align-items: flex-start; flex-direction: column; padding: 22px; }
.report-card h2 { margin: 14px 0 8px; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.report-card p { flex: 1; margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stack-form { display: grid; gap: 18px; }
.field-span-2 { grid-column: span 2; }
.compact-totals { display: flex; flex-wrap: wrap; gap: 18px; }
.compact-totals span { color: var(--muted); }
.compact-totals strong { margin-left: 5px; color: var(--ink); }
.owner-report-grid, .reconciliation-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.owner-basis-card { min-width: 0; }
.basis-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.basis-summary > div { display: grid; gap: 5px; padding: 12px; border-radius: 9px; background: #f4f6f2; }
.basis-summary span { color: var(--muted); font-size: .78rem; }
.basis-summary strong { font-size: 1rem; }
.report-entry-form { margin-top: 18px; }
.report-entry-form summary { padding: 12px; border-radius: 9px; color: var(--oak-dark); background: #eef2ed; font-weight: 800; cursor: pointer; }
.report-entry-form form { margin-top: 16px; }
.candidate-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.candidate-list li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.candidate-list li:first-child { border-top: 0; }

@media (max-width: 850px) {
    .report-card-grid, .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .owner-report-grid, .reconciliation-account-grid { grid-template-columns: 1fr; }
    .field-span-2 { grid-column: auto; }
    .planner-selector, .planner-grid { display: grid; grid-template-columns: 1fr; }
    .planner-month-form { flex-wrap: wrap; }
    .planner-details { grid-template-columns: repeat(2, 1fr); }
    .planner-details div:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 540px) {
    .report-card-grid, .metrics-grid, .basis-summary { grid-template-columns: 1fr; }
    .planner-month-form, .planner-request-form { display: grid; grid-template-columns: 1fr; }
    .planner-month-form label, .planner-month-form input { width: 100%; }
    .planner-details { grid-template-columns: 1fr; }
    .planner-details div { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
    .planner-details div:first-child { border-top: 0; }
}
