:root {
  color-scheme: light;
  --ink: #192532; --muted: #66727e; --paper: #f2f5f8; --surface: #ffffff;
  --line: #dbe1e7; --accent: #ff9f1c; --income: #087f5b; --expense: #c2413a;
  --blue: #1e5bd8; --shadow: 0 18px 50px rgba(25,37,50,.09);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr-only, .file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.topbar { min-height: 68px; background: var(--ink); color: white; padding: 0 clamp(18px,4vw,48px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; font-weight: 780; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--ink); font-weight: 900; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.test-pill { font-size: .78rem; color: #ffd89a; border: 1px solid rgba(255,216,154,.35); border-radius: 999px; padding: 6px 10px; }
.language-switch { display: flex; padding: 3px; border-radius: 9px; background: rgba(255,255,255,.1); }
.language-switch button { min-width: 45px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: #cbd3da; font-size: .76rem; font-weight: 800; }
.language-switch button.active { background: white; color: var(--ink); }
.main-nav { height: 58px; padding: 0 clamp(18px,4vw,48px); display: flex; align-items: end; gap: 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.main-nav a { height: 58px; display: flex; align-items: center; color: var(--muted); text-decoration: none; font-weight: 720; font-size: .92rem; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); border-color: var(--accent); }
.page-shell { width: min(1180px,calc(100% - 32px)); margin: 32px auto 60px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: .76rem; line-height: 1.2; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.85rem,3vw,2.55rem); line-height: 1.05; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.025em; }
.selectors { display: flex; flex-wrap: wrap; gap: 10px; }
select, input { min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 11px 13px; outline: none; }
select:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,91,216,.14); }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.metric { min-height: 132px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid #bfc8d1; border-radius: 16px; padding: 17px 18px; box-shadow: 0 5px 22px rgba(25,37,50,.04); }
.metric-income { border-top-color: var(--income); }
.metric-expense { border-top-color: var(--expense); }
.metric-result { background: var(--ink); color: white; border-color: var(--ink); }
.metric-label { color: var(--muted); font-size: .87rem; font-weight: 680; }
.metric-result .metric-label, .metric-result .metric-note { color: #bbc4cc; }
.metric-value { margin-top: 13px; font-variant-numeric: tabular-nums; font-size: clamp(1.45rem,2.5vw,2rem); font-weight: 800; letter-spacing: -.04em; }
.metric-income .metric-value { color: var(--income); }
.metric-expense .metric-value { color: var(--expense); }
.metric-note { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.summary-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { min-height: 78px; padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 20px 21px; }
.text-link { color: var(--blue); text-decoration: none; font-size: .82rem; font-weight: 740; white-space: nowrap; }
.transactions { margin: 0; padding: 0; list-style: none; }
.transaction { display: grid; grid-template-columns: 42px minmax(0,1fr) auto 32px; align-items: center; gap: 12px; padding: 15px 21px; border-bottom: 1px solid var(--line); }
.transaction:last-child { border-bottom: 0; }
.tx-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; font-weight: 900; }
.tx-icon.income { color: var(--income); background: #ddf3ea; }
.tx-icon.expense { color: var(--expense); background: #fde7e4; }
.tx-title { font-size: .9rem; font-weight: 730; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-meta { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.tx-amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 770; font-size: .9rem; }
.positive { color: var(--income); } .negative { color: var(--expense); }
.delete { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #87929c; font-size: 1.08rem; }
.delete:hover { background: #f1f3f5; color: var(--expense); }
.empty { padding: 52px 22px; text-align: center; color: var(--muted); }
.breakdown-row { margin-bottom: 17px; }
.breakdown-row:last-child { margin-bottom: 0; }
.breakdown-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 7px; font-size: .82rem; }
.breakdown-head strong { font-variant-numeric: tabular-nums; }
.track { height: 8px; border-radius: 99px; background: #edf0f3; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: inherit; background: var(--expense); }
.form-page { width: min(720px,calc(100% - 32px)); margin: 32px auto 64px; }
.closing-page { width: min(900px,calc(100% - 32px)); min-width: 0; margin: 32px auto 64px; }
.form-intro { position: relative; display: flex; gap: 18px; align-items: center; padding: 24px 26px; color: white; border-radius: 18px 18px 0 0; overflow: hidden; }
.expense-intro { background: linear-gradient(135deg,#1f5ed8,#163f9e); }
.income-intro { background: linear-gradient(135deg,#087f5b,#075b43); }
.form-intro::after { content: ""; position: absolute; width: 180px; height: 180px; right: -65px; top: -85px; border-radius: 50%; background: rgba(255,255,255,.09); }
.form-intro .eyebrow { color: #dce8ff; }
.form-intro h1 { font-size: clamp(1.55rem,3vw,2rem); }
.form-intro p:last-child { margin: 7px 0 0; color: rgba(255,255,255,.76); font-size: .88rem; }
.form-symbol { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: rgba(255,255,255,.14); font-size: 1.55rem; font-weight: 900; }
.record-form { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px; padding: 28px 30px 31px; box-shadow: var(--shadow); }
.closing-form { display: grid; width: 100%; min-width: 0; gap: 16px; }
.closing-form .form-section:first-child { border-radius: 0 0 16px 16px; border-top: 0; }
.form-section { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; box-shadow: 0 7px 24px rgba(25,37,50,.05); }
.compact-section { padding-bottom: 5px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 5px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-kicker { width: 28px; height: 28px; margin: 0; display: grid; place-items: center; border-radius: 8px; background: #e7f4ef; color: var(--income); font-size: .7rem; font-weight: 850; }
.section-total { color: var(--income); font-size: 1.2rem; font-weight: 820; font-variant-numeric: tabular-nums; }
.section-help { margin: 7px 0 18px; color: var(--muted); font-size: .82rem; }
.denomination-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: end; gap: 10px; }
.denomination-grid label { display: grid; grid-template-rows: auto 42px; min-width: 0; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.denomination-grid input { width: 100%; min-width: 0; min-height: 42px; height: 42px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.money-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.money-grid .field { margin-bottom: 16px; }
.calculation-line { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 14px; margin-top: 3px; padding: 15px 16px; border-radius: 11px; background: #eef8f4; }
.calculation-line span { font-weight: 760; }
.calculation-line strong { color: var(--income); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.calculation-line small { grid-column: 1 / -1; color: var(--muted); }
.channel-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 17px; }
.channel-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.channel-card > strong { display: block; margin-bottom: 12px; }
.channel-card label { display: grid; gap: 5px; margin-top: 9px; color: var(--muted); font-size: .76rem; font-weight: 680; }
.channel-card input { width: 100%; min-height: 41px; padding: 8px 10px; }
.delivery-own-grid { grid-template-columns: minmax(0,1fr); margin-top: 16px; }
.delivery-own-grid .field { margin-bottom: 0; }
.inline-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.inline-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #f4f6f8; border-radius: 10px; }
.inline-totals span { color: var(--muted); font-size: .78rem; }
.inline-totals strong { font-size: .9rem; font-variant-numeric: tabular-nums; }
.closing-summary { position: sticky; bottom: 12px; z-index: 3; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: #31404e; border: 1px solid #31404e; border-radius: 14px; overflow: hidden; box-shadow: 0 14px 35px rgba(25,37,50,.19); }
.closing-summary > div { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px; background: var(--ink); color: white; }
.closing-summary span { color: #b9c3cb; font-size: .76rem; }
.closing-summary strong { font-size: 1.13rem; font-variant-numeric: tabular-nums; }
.closing-summary .difference-row strong { color: #ffd28a; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-size: .9rem; font-weight: 720; }
.field select, .field input { width: 100%; }
.field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field-row > .field { min-width: 0; }
.readonly { background: #f4f6f8; color: var(--muted); }
select.readonly:disabled { opacity: 1; color: var(--ink); cursor: default; }
.optional { color: var(--muted); font-size: .76rem; font-weight: 550; margin-left: 5px; }
.field-help { margin: -1px 0 0; color: var(--muted); font-size: .78rem; }
.amount-wrap { position: relative; }
.amount-wrap span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.amount-wrap input { padding-right: 38px; font-variant-numeric: tabular-nums; }
.upload-box { min-height: 86px; border: 1px dashed #b8c2cc; border-radius: 11px; background: #f8fafc; padding: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; cursor: pointer; }
.upload-box:hover { border-color: var(--blue); background: #f4f7ff; }
.upload-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: #e5ecfb; color: var(--blue); font-size: 1.2rem; }
.upload-box strong, .upload-box small { display: block; }
.upload-box small { color: var(--muted); margin-top: 3px; font-weight: 500; }
.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 5px; }
.primary, .secondary { min-height: 50px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; text-decoration: none; }
.primary { border: 0; color: white; }
.expense-button { background: var(--blue); } .expense-button:hover { background: #174db8; }
.income-button { background: var(--income); } .income-button:hover { background: #066b4d; }
.secondary { border: 1px solid var(--line); background: white; color: var(--muted); }
.status { position: fixed; z-index: 5; left: 50%; bottom: 22px; transform: translate(-50%,18px); background: var(--ink); color: white; border-radius: 11px; padding: 11px 15px; font-size: .84rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; }
.status.show { opacity: 1; transform: translate(-50%,0); }
.media-page { width: min(1000px,calc(100% - 32px)); margin: 32px auto 64px; }
.media-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.media-heading > div:first-child > p:last-child { max-width: 640px; margin: 9px 0 0; color: var(--muted); line-height: 1.55; }
.media-venue { min-width: 170px; display: grid; gap: 4px; padding: 12px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.media-venue span { color: var(--muted); font-size: .74rem; font-weight: 700; }
.media-venue strong { font-size: .94rem; }
.calendar-panel { margin-bottom: 20px; padding: 19px 22px 21px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 7px 24px rgba(25,37,50,.05); }
.calendar-top { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 12px; text-align: center; }
.calendar-top > div > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.calendar-top h2 { font-size: 1.05rem; text-transform: capitalize; }
.calendar-arrow { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fb; color: var(--ink); font-size: 1rem; }
.calendar-arrow:hover { border-color: var(--blue); color: var(--blue); }
.weekly-closure { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,1.3fr); align-items: center; gap: 16px; margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafc; }
.weekly-closure strong, .weekly-closure small { display: block; }
.weekly-closure strong { font-size: .82rem; }
.weekly-closure small { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.weekday-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.weekday-buttons button { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: .7rem; font-weight: 800; }
.weekday-buttons button:hover { border-color: #92a9de; color: var(--blue); }
.weekday-buttons button.active { border-color: var(--blue); background: var(--blue); color: white; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.calendar-weekdays { margin: 18px 0 7px; color: var(--muted); text-align: center; font-size: .7rem; font-weight: 800; }
.calendar-empty, .calendar-day { min-height: 44px; }
.calendar-day { position: relative; display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: #f4f6f8; color: var(--ink); font-weight: 750; }
.calendar-day:hover { border-color: #aebfe7; background: #f2f6ff; }
.calendar-day.today { border-color: #a9b5c1; }
.calendar-day.selected { border-color: var(--blue); background: var(--blue); color: white; box-shadow: 0 5px 14px rgba(30,91,216,.22); }
.calendar-day.complete { border-color: #087f5b; background: #087f5b; color: white; }
.calendar-day.complete.selected { border-color: #045a3f; background: #087f5b; box-shadow: 0 0 0 3px rgba(8,127,91,.2), 0 5px 14px rgba(8,127,91,.24); }
.calendar-day small { position: absolute; right: 5px; bottom: 3px; color: var(--income); font-size: .56rem; font-weight: 850; }
.calendar-day.selected small, .calendar-day.complete small { color: #dcf4e9; }
.upload-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.upload-slot { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.slot-head { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 12px; }
.slot-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: #fff0cf; color: #a46100; font-size: 1.25rem; }
.slot-icon.dinner { background: #e7edfb; color: #294f9c; }
.slot-kicker { margin: 0 0 3px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.slot-head h2 { font-size: 1.15rem; }
.upload-state { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.upload-state.pending { background: #eef1f4; color: var(--muted); }
.upload-state.ontime { background: #dcf4e9; color: #087653; }
.upload-state.late { background: #fff0d9; color: #a45d00; }
.upload-state.closed { background: #dcf4e9; color: #087653; }
.state-mark { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: currentColor; color: white; font-size: .7rem; }
.upload-state.pending .state-mark { background: #9aa5af; }
.slot-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 14px; }
.slot-deadline { margin: 0; color: var(--muted); font-size: .78rem; }
.slot-deadline strong { color: var(--ink); }
.service-closed-toggle { flex: 0 0 auto; min-height: 34px; padding: 7px 10px; border: 1px solid #d5dbe1; border-radius: 9px; background: white; color: var(--muted); font-size: .69rem; font-weight: 800; }
.service-closed-toggle:hover { border-color: #93a1ad; color: var(--ink); }
.service-closed-toggle.active { border-color: #82c8ae; background: #e7f7f0; color: #087653; }
.service-closed-toggle:disabled { cursor: default; opacity: 1; }
.upload-slot.is-closed .media-drop, .upload-slot.is-closed .file-list { display: none; }
.upload-slot.is-closed { border-color: #b8ddce; }
.media-drop { min-height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; border: 1.5px dashed #aeb9c5; border-radius: 14px; background: #f8fafc; text-align: center; cursor: pointer; }
.media-drop:hover { border-color: var(--blue); background: #f2f6ff; }
.media-drop-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 3px; border-radius: 11px; background: #e5ecfb; color: var(--blue); font-size: 1.35rem; }
.media-drop strong { font-size: .88rem; }
.media-drop small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.file-summary { min-height: 92px; display: grid; grid-template-columns: 74px minmax(0,1fr) 32px; align-items: center; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafc; }
.file-preview { width: 74px; height: 58px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: #e5ecfb; color: var(--blue); }
.file-preview img, .file-preview video { width: 100%; height: 100%; display: block; object-fit: cover; background: #192532; }
.file-summary strong, .file-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-summary strong { font-size: .82rem; }
.file-summary small { margin-top: 5px; color: var(--muted); font-size: .7rem; }
.file-summary button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #87929c; font-size: 1.08rem; }
.file-summary button:hover { background: #fde7e4; color: var(--expense); }
.file-list { display: grid; gap: 9px; margin-top: 10px; }
.media-demo-note { margin: 14px 3px 0; color: var(--muted); font-size: .76rem; }
@media (max-width: 850px) { .metrics { grid-template-columns: 1fr 1fr; } .summary-grid { grid-template-columns: 1fr; } .page-heading { align-items: stretch; flex-direction: column; } .selectors > * { flex: 1; } }
@media (max-width: 560px) {
  .topbar { min-height: 60px; padding: 0 15px; } .test-pill { display: none; } .main-nav { height: 54px; padding: 0 15px; gap: 18px; overflow-x: auto; } .main-nav a { height: 54px; flex: 0 0 auto; }
  .page-shell, .form-page, .closing-page { width: min(100% - 22px,1180px); margin-top: 22px; } .metrics { gap: 9px; } .metric { min-height: 115px; padding: 14px; } .metric-value { font-size: 1.28rem; }
  .transaction { grid-template-columns: 40px minmax(0,1fr) auto; padding: 14px 16px; gap: 10px; } .delete { display: none; }
  .form-intro { padding: 21px 18px; } .form-symbol { width: 44px; height: 44px; } .record-form { padding: 23px 18px 25px; } .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-section { padding: 21px 17px; } .compact-section { padding-bottom: 2px; } .denomination-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .money-grid, .channel-grid { grid-template-columns: 1fr; } .channel-grid { gap: 9px; } .inline-totals { grid-template-columns: 1fr; } .closing-summary { grid-template-columns: 1fr; position: static; } .closing-summary > div { flex-direction: row; justify-content: space-between; align-items: center; padding: 13px 16px; }
  .media-page { width: calc(100% - 22px); margin-top: 22px; } .media-heading { align-items: stretch; flex-direction: column; } .media-venue { min-width: 0; } .calendar-panel { padding: 17px 12px 15px; } .weekly-closure { grid-template-columns: 1fr; } .weekday-buttons { justify-content: flex-start; } .calendar-weekdays, .calendar-grid { gap: 4px; } .calendar-empty, .calendar-day { min-height: 40px; } .upload-slots { grid-template-columns: 1fr; } .upload-slot { padding: 18px 16px; } .slot-head { grid-template-columns: 42px minmax(0,1fr); } .slot-icon { width: 42px; height: 42px; } .upload-state { grid-column: 1 / -1; justify-self: start; } .slot-controls { align-items: flex-start; flex-direction: column; }
}
