:root {
  --ink: #18231f;
  --muted: #65716d;
  --line: #dce2dd;
  --paper: #f7f8f5;
  --white: #ffffff;
  --forest: #1f5a46;
  --forest-dark: #164434;
  --mint: #dceee4;
  --sun: #f5d97a;
  --coral: #ffe2db;
  --coral-ink: #9a4331;
  --blue: #e1edf5;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
}
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 480px); background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: 0 18px 50px rgba(28, 46, 36, .08); }.auth-card .brand { color: var(--ink); padding: 0; margin-bottom: 46px; }.auth-card .brand-mark { color: #173d31; }.auth-card .subhead { line-height: 1.5; }.auth-form { display: grid; gap: 9px; margin-top: 26px; }.auth-form label { font-size: 13px; font-weight: 600; }.auth-form input { width: 100%; border: 1px solid #cdd8d1; border-radius: 7px; padding: 10px; color: var(--ink); background: white; }.auth-form .button { margin-top: 6px; justify-self: start; }.auth-message { min-height: 22px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }.auth-message.error { color: var(--coral-ink); }.auth-card #session-card { margin-top: 25px; }.auth-card #session-card .button { margin-top: 12px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { background: #163d31; color: #eaf3ed; padding: 28px 17px 20px; display: flex; flex-direction: column; }
.brand { color: white; text-decoration: none; font-family: "Fraunces", serif; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 9px; padding: 0 8px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #173d31; background: #dbeee2; font-family: "DM Mono", monospace; font-size: 17px; }
.exit-preview { display: none; width: 100%; margin-top: 14px; border: 1px solid #9fc1ae; background: transparent; color: #eaf3ed; border-radius: 7px; padding: 8px 10px; font-size: 12px; font-weight: 600; text-align: left; }
.season-label, .mini-label { color: #9fc1ae; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .12em; font-weight: 500; }
.season-label { margin: 44px 8px 10px; }
.nav-list { display: grid; gap: 3px; }
.nav-item { border: 0; background: transparent; color: #d9e9df; text-align: left; border-radius: 8px; padding: 10px 10px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.nav-item span { width: 15px; text-align: center; color: #a7c5b4; font-family: "DM Mono", monospace; }
.nav-item:hover, .nav-item.active { background: #285b49; color: #fff; }
.nav-item b { margin-left: auto; background: #e9c963; color: #284334; padding: 1px 6px; border-radius: 100px; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.divider { height: 1px; background: rgba(255,255,255,.15); margin: 20px 8px; }
.mini-label { margin: 0 8px 8px; }
.select-wrap select { width: 100%; border: 1px solid rgba(255,255,255,.22); background: #204d3e; color: white; padding: 9px 28px 9px 10px; border-radius: 7px; appearance: auto; font-size: 13px; }
.account-card { margin: 0 8px; border: 1px solid rgba(255,255,255,.2); background: #204d3e; border-radius: 7px; padding: 9px 10px; font-size: 13px; }.account-card strong, .account-card span { display: block; }.account-card span { color: #b8d4c4; font-size: 11px; margin-top: 3px; }.sidebar-signout { margin: 10px 8px 0; padding: 0; border: 0; background: transparent; color: #b8d4c4; font-size: 12px; text-align: left; text-decoration: underline; }
.sync-note { color: #a6c5b4; font-size: 11px; margin: 17px 8px 0; }
.sync-dot { width: 7px; height: 7px; background: #88d4a5; display: inline-block; border-radius: 100%; margin-right: 5px; }
.main-content { min-width: 0; }
.view { max-width: 1420px; margin: 0 auto; padding: 34px 42px 60px; }
.hidden { display: none !important; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { color: var(--forest); font: 500 11px "DM Mono", monospace; letter-spacing: .1em; margin: 0 0 9px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 700 35px/1.05 "Fraunces", serif; letter-spacing: -.025em; margin-bottom: 9px; }
h2 { font: 700 25px/1.1 "Fraunces", serif; letter-spacing: -.015em; margin-bottom: 7px; }
h3 { font-size: 15px; margin-bottom: 5px; }
.subhead { color: var(--muted); margin-bottom: 0; }
.header-actions, .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 7px; padding: 9px 13px; font-size: 13px; font-weight: 600; }
.button.compact-button { padding: 6px 10px; font-size: 12px; line-height: 1.2; }
.button:hover { border-color: #aab8b0; background: #fbfcfa; }
.button.primary { color: white; background: var(--forest); border-color: var(--forest); }
.button.primary:hover { background: var(--forest-dark); }
.button.ghost { background: transparent; }
.button.danger { color: var(--coral-ink); border-color: #efb5a8; }
.notice { background: var(--mint); border: 1px solid #bbdaca; border-radius: var(--radius); padding: 13px 15px; display: flex; gap: 12px; align-items: center; margin-bottom: 24px; color: #28503f; }
.collection-banner { background: #eef3fb; border: 1px solid #c9d7ed; border-radius: var(--radius); padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; color: #294967; }.collection-banner .eyebrow { color: #476c8a; margin-bottom: 5px; }.collection-banner strong { font-size: 14px; }.collection-banner p { font-size: 12px; margin: 4px 0 0; color: #4e6678; }.reporter-banner { display: block; }
.availability-tracker { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin: -8px 0 24px; overflow: hidden; }.tracker-head { padding: 15px 17px; display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; border-bottom: 1px solid var(--line); }.tracker-head h2 { font-size: 18px; margin-bottom: 4px; }.tracker-head .eyebrow { margin-bottom: 5px; }.tracker-head .small { margin: 0; }.availability-list { display: grid; }.availability-entry { display: grid; grid-template-columns: minmax(165px, .7fr) 1fr auto; gap: 14px; align-items: center; padding: 11px 17px; border-bottom: 1px solid #ebefec; }.availability-entry:last-child { border-bottom: 0; }.availability-entry strong { display: block; font-size: 12px; }.availability-entry span:not(.status) { color: var(--muted); display: block; font-size: 12px; margin-top: 2px; }.tracker-empty { padding: 20px 17px; color: var(--muted); font-size: 13px; }
.notice strong { font-size: 13px; }
.notice p { font-size: 13px; margin: 1px 0 0; }
.notice-icon { width: 25px; height: 25px; border-radius: 50%; background: var(--forest); color: white; display: grid; place-items: center; font-weight: bold; flex: 0 0 auto; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(120px,1fr)); gap: 11px; margin-bottom: 24px; }
.summary-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; }
.summary-card .number { display: block; font: 700 23px "Fraunces", serif; margin-bottom: 2px; }
.summary-card .label { font-size: 12px; color: var(--muted); }
.rota-shell { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.rota-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.rota-head h2 { font: 700 17px "Fraunces", serif; margin: 0; }
.rota-head .small { margin: 4px 0 0; }
.shared-rota { margin-top: 15px; }
.legend { display: flex; gap: 13px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.table-wrap { overflow-x: auto; }
.rota-table { width: 100%; min-width: 790px; border-collapse: collapse; }
.rota-table th { text-align: left; padding: 9px 17px; color: var(--muted); background: #fbfcfa; border-bottom: 1px solid var(--line); font: 500 10px "DM Mono", monospace; letter-spacing: .08em; }
.rota-table td { padding: 13px 17px; vertical-align: top; border-bottom: 1px solid #ebefec; }
.rota-table tr:last-child td { border: 0; }
.week-cell { white-space: nowrap; }
.week-cell strong { display: block; font-size: 13px; }
.week-cell span { color: var(--muted); font-size: 12px; }
.person { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--avatar, var(--blue)); color: #244b42; font-size: 10px; font-family: "DM Mono", monospace; font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 100px; padding: 4px 8px; font-size: 11px; font-weight: 600; background: #f0f4f1; color: #4c5d55; white-space: nowrap; }
.status.conflict { background: var(--coral); color: var(--coral-ink); }
.status.pending { background: #fff3cc; color: #765800; }
.status.published { background: var(--mint); color: #24513e; }
.day-split { display: flex; flex-wrap: wrap; gap: 5px; }
.duty-cell { display: grid; gap: 7px; }.duty-segment { display: flex; align-items: center; gap: 8px; }.duty-segment > span:last-child { color: var(--muted); font-size: 12px; }
.day-chip { padding: 4px 7px; background: var(--blue); color: #315b70; border-radius: 5px; font-size: 11px; font-weight: 600; }
.day-chip.warning { background: var(--coral); color: var(--coral-ink); }
.day-chip.holiday { background: #fff1c8; color: #765800; }
.holiday-reminder { display: flex; gap: 9px; align-items: flex-start; background: #fff6d9; color: #705600; border: 1px solid #eedb9a; border-radius: 7px; padding: 9px 10px; margin: 10px 0 1px; font-size: 12px; }
.holiday-reminder span { font-size: 14px; line-height: 1; }.holiday-reminder strong { display: block; font-size: 12px; }.holiday-reminder p { margin: 2px 0 0; font-size: 11px; }
.row-actions button { background: transparent; padding: 4px 0; border: 0; color: var(--forest); text-decoration: underline; font-size: 12px; font-weight: 600; }
.reporter-shell { max-width: 900px; }
.reporter-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 15px; }
.reporter-card h2 { font-size: 21px; }
.my-week { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--line); background: #fbfcfa; border-radius: 9px; }
.date-range { font: 500 11px "DM Mono", monospace; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.request-grid { display: grid; grid-template-columns: repeat(2, minmax(200px,1fr)); gap: 14px; }
.request-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 17px; }
.request-card .request-meta { color: var(--muted); font: 500 10px "DM Mono", monospace; letter-spacing: .06em; }
.request-card p { font-size: 13px; line-height: 1.45; margin: 10px 0 14px; }
.trade-terms { background: #f0f5f1; border-left: 3px solid var(--forest); padding: 8px 9px; margin: -3px 0 14px !important; color: #355147; font-size: 12px !important; }
.request-card.pending-card { border-top: 3px solid var(--sun); }
.filters { display: flex; gap: 7px; margin-bottom: 20px; }
.filter { border: 1px solid var(--line); color: var(--muted); background: white; border-radius: 20px; padding: 6px 11px; font-size: 12px; }
.filter.active { background: var(--forest); color: white; border-color: var(--forest); }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 11px; }
.team-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 15px; display: flex; gap: 11px; align-items: center; }
.outbox { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 16px; }.outbox-list { display: grid; }.outbox-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 17px; border-bottom: 1px solid #ebefec; }.outbox-item:last-child { border-bottom: 0; }.outbox-item strong,.outbox-item span:not(.status) { display: block; }.outbox-item strong { font-size: 12px; }.outbox-item span:not(.status) { font-size: 12px; color: var(--muted); margin-top: 3px; }
.policy-card { display: flex; gap: 22px; align-items: center; justify-content: space-between; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 19px; margin-bottom: 16px; }.policy-card h2 { font-size: 20px; margin-bottom: 5px; }.policy-card .eyebrow { margin-bottom: 6px; }.policy-card .small { margin: 0; max-width: 580px; }
.policy-toggle { border: 1px solid #cbd6cf; background: #f4f6f4; color: #405148; border-radius: 100px; padding: 7px 11px 7px 7px; display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; }.policy-toggle span { width: 27px; height: 16px; border-radius: 30px; background: #98a79f; position: relative; }.policy-toggle span::after { content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: white; top: 2px; left: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }.policy-toggle.on { background: var(--mint); color: #23513d; border-color: #b8d8c6; }.policy-toggle.on span { background: var(--forest); }.policy-toggle.on span::after { left: 13px; }
.team-card .person { flex: 1; }.team-card small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.link-button { padding: 5px 7px; border: 0; background: #f1f5f2; color: var(--forest); border-radius: 5px; font-size: 11px; font-weight: 600; }
.empty-state { padding: 35px; border: 1px dashed #cbd6cf; text-align: center; color: var(--muted); border-radius: 10px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,31,24,.42); display: grid; place-items: center; padding: 18px; z-index: 10; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: white; border-radius: 14px; padding: 24px; box-shadow: 0 16px 60px rgba(14, 37, 28, .25); }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.modal-header h2 { margin: 0; font-size: 23px; }
.rotation-preview { display: flex; gap: 10px; align-items: center; background: #f1f6f2; border: 1px solid #d1e1d6; border-radius: 8px; padding: 11px; margin-top: 16px; }.rotation-preview p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.period-context { background: #eef3fb; border: 1px solid #cad9ef; color: #294967; border-radius: 8px; padding: 10px 12px; margin-top: 16px; }.period-context .eyebrow { color: #476c8a; margin-bottom: 5px; }.period-context p:last-child { color: #4e6678; font-size: 12px; margin: 3px 0 0; }
.close { border: 0; background: transparent; font-size: 24px; color: var(--muted); line-height: 1; }
.field { display: grid; gap: 6px; margin: 15px 0; }.field label { font-size: 12px; font-weight: 600; }.field input, .field select, .field textarea { width: 100%; border: 1px solid #cdd8d1; border-radius: 7px; padding: 9px 10px; color: var(--ink); background: white; }.field textarea { min-height: 75px; resize: vertical; }
.trade-fields { margin-top: 15px; padding: 0 13px 1px; border: 1px solid #cbe0d2; background: #f3f8f4; border-radius: 8px; }.trade-fields .eyebrow { margin: 12px 0 3px; color: var(--forest); }.trade-fields .small { margin: 0; }
.return-date-picker { border: 0; padding: 0; margin: 15px 0; }.return-date-picker legend { font-size: 12px; font-weight: 600; padding: 0; }.return-date-picker .small { margin: 5px 0 9px; }.return-date-options { display: flex; flex-wrap: wrap; gap: 7px; }.return-date-options label { display: flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #cdd8d1; background: white; border-radius: 6px; font-size: 12px; cursor: pointer; }.return-date-options input { accent-color: var(--forest); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.modal-footer { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #173e31; color: white; padding: 11px 15px; border-radius: 8px; box-shadow: 0 5px 22px rgba(0,0,0,.18); font-size: 13px; z-index: 15; }
.toast.toast-error { background: #8f3728; }

body.phone-preview { background: #d8dcd8; padding: 18px 0; }
body.phone-preview .app-shell { width: min(390px, calc(100vw - 24px)); min-height: 844px; margin: 0 auto; grid-template-columns: 1fr; overflow: hidden; border: 7px solid #17231e; border-radius: 34px; box-shadow: 0 20px 55px rgba(26,36,30,.25); background: var(--paper); }
body.phone-preview .sidebar { min-height: auto; padding: 15px; } body.phone-preview .sidebar-bottom, body.phone-preview .season-label { display: none; } body.phone-preview .exit-preview { display: block; } body.phone-preview .nav-list { margin-top: 12px; display: flex; } body.phone-preview .nav-item { flex: 1; justify-content: center; } body.phone-preview .nav-item b { margin-left: 0; }
body.phone-preview .view { padding: 24px 16px 36px; } body.phone-preview .page-header { display: block; } body.phone-preview .header-actions { margin-top: 16px; } body.phone-preview .summary-grid { grid-template-columns: 1fr 1fr; } body.phone-preview .request-grid, body.phone-preview .team-grid, body.phone-preview .form-row, body.phone-preview .my-week { grid-template-columns: 1fr; } body.phone-preview .legend { display: none; } body.phone-preview .rota-head { align-items: flex-start; }

@media (max-width: 760px) { .app-shell { grid-template-columns: 1fr; }.sidebar { min-height: auto; padding: 15px; }.sidebar-bottom { display: none; }.season-label { display: none; }.nav-list { margin-top: 18px; display: flex; }.nav-item { flex: 1; justify-content: center; }.nav-item b { margin-left: 0; }.view { padding: 25px 18px 40px; }.page-header { display: block; }.header-actions { margin-top: 17px; }.summary-grid { grid-template-columns: 1fr 1fr; }.request-grid,.team-grid,.form-row,.my-week { grid-template-columns: 1fr; }.legend { display: none; }.policy-card { align-items: flex-start; flex-direction: column; gap: 14px; }.collection-banner { align-items: flex-start; flex-direction: column; }.availability-entry { grid-template-columns: 1fr; gap: 5px; }.tracker-head { flex-direction: column; } }
