@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 15px/1.55 'DM Sans', 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; transition: background-color .16s ease, color .16s ease; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1180px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.brand-logo { display: block; width: auto; height: 45px; max-width: 230px; object-fit: contain; object-position: left center; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; position: relative; border-radius: 14px; background: var(--navy); color: white; font: 800 23px/1 Manrope, sans-serif; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .13); }
.brand-mark span { color: var(--lime); }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { color: var(--navy); font: 800 14px/1.2 Manrope, sans-serif; letter-spacing: .085em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.header-tools { display: flex; align-items: center; gap: 17px; }
.role-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--surface-soft); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #87aa18; box-shadow: 0 0 0 3px var(--lime-soft); }
.header-user { color: var(--ink); font-size: 13px; font-weight: 600; }
.logout-form { margin: 0; }
.logout-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--navy); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.logout-button svg { width: 17px; height: 17px; }
.logout-button:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.logout-button:focus-visible, .button:focus-visible, a:focus-visible { outline: 0; box-shadow: var(--focus); }
.page-shell { width: min(1120px, calc(100% - 56px)); min-height: calc(100vh - 142px); margin: 0 auto; padding: 45px 0 74px; }
.site-footer { width: min(1120px, calc(100% - 56px)); min-height: 66px; display: flex; justify-content: space-between; align-items: center; margin: 0 auto; border-top: 1px solid var(--line); color: var(--muted-light); font-size: 11px; }
.site-footer span:first-child { color: var(--navy); font-weight: 800; letter-spacing: .11em; }

h1, h2, p { margin-top: 0; }
h1, h2 { color: var(--navy); font-family: Manrope, 'Segoe UI', sans-serif; letter-spacing: -.045em; }
h1 { margin-bottom: 9px; font-size: clamp(30px, 4vw, 43px); line-height: 1.13; font-weight: 750; }
h2 { margin-bottom: 0; font-size: clamp(20px, 2.3vw, 24px); line-height: 1.25; font-weight: 750; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.eyebrow-line { display: inline-block; width: 22px; height: 2px; border-radius: 2px; background: var(--lime); }
.muted, .section-heading p, .form-page-heading p, .page-heading-row p { color: var(--muted); }
.alert { display: flex; align-items: center; gap: 11px; max-width: 680px; margin: 0 auto 18px; padding: 13px 16px; border: 1px solid var(--danger-border); border-radius: 13px; background: var(--danger-bg); color: var(--danger-text); font-size: 13px; }
.alert-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 50%; background: var(--danger-icon-bg); color: var(--danger-text); font-weight: 800; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 750; cursor: pointer; transition: transform .16s, background .16s, border-color .16s, box-shadow .16s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; }
.button-primary { background: var(--action-bg); color: var(--action-text); box-shadow: 0 5px 12px rgba(23, 43, 77, .13); }
.button-primary:hover { filter: brightness(.94); box-shadow: 0 8px 18px rgba(23, 43, 77, .18); }
.button-quiet { border-color: var(--line); background: var(--surface); color: var(--text-secondary); }
.button-quiet:hover { border-color: var(--border-strong); color: var(--navy); }

/* Login */
.login-page { background: var(--auth-page-bg); }
.login-page .page-shell { width: min(1060px, calc(100% - 56px)); display: grid; align-items: center; min-height: calc(100vh - 142px); padding-top: 44px; padding-bottom: 54px; }
.login-layout { display: grid; grid-template-columns: 1fr minmax(360px, 440px); align-items: center; gap: clamp(45px, 8vw, 104px); }
.login-intro { position: relative; padding: 32px 0; }
.login-intro h1 { margin: 21px 0 17px; color: var(--navy); font-size: clamp(39px, 5.4vw, 61px); letter-spacing: -.065em; line-height: 1.08; }
.login-intro h1 span { color: var(--blue); }
.login-intro p { max-width: 405px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.login-accent { display: flex; align-items: center; gap: 8px; margin-top: 38px; }
.login-accent span { height: 5px; border-radius: 5px; background: var(--lime); }
.login-accent span:first-child { width: 47px; }
.login-accent span:nth-child(2) { width: 18px; background: #9ab8df; }
.login-accent span:last-child { width: 8px; background: var(--navy); }
.login-panel { padding: clamp(27px, 4vw, 39px); border: 1px solid var(--line); border-radius: 23px; background: var(--surface); box-shadow: var(--shadow-md); }
.login-panel-heading { display: flex; align-items: center; gap: 14px; }
.login-icon { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 15px; background: var(--lime-soft); color: var(--navy); }
.login-icon svg { width: 22px; height: 22px; }
.login-panel-heading h2 { margin-top: 4px; font-size: 22px; }
.login-subtitle { margin: 17px 0 23px; color: var(--muted); font-size: 13px; }
.form-stack { display: flex; flex-direction: column; gap: 17px; }
.form-stack label { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.form-stack input, .form-stack textarea, .filter-bar input, .filter-bar select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--input-bg); color: var(--ink); font-size: 14px; transition: border-color .16s, box-shadow .16s, background .16s; }
.form-stack input::placeholder, .form-stack textarea::placeholder, .filter-bar input::placeholder { color: var(--muted-light); opacity: 1; }
.form-stack input:hover, .form-stack textarea:hover, .filter-bar input:hover, .filter-bar select:hover { border-color: var(--border-strong); }
.form-stack input:focus, .form-stack textarea:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue); box-shadow: var(--focus); }
.password-field-control { position: relative; display: block; width: 100%; }
.password-field-control input { width: 100%; min-width: 0; padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 3px; width: 44px; height: 44px; display: grid; place-items: center; transform: translateY(-50%); padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle:hover { background: var(--blue-soft); color: var(--navy); }
.password-toggle:focus-visible { outline: 0; box-shadow: var(--focus); }
.login-form { gap: 17px; }
.login-submit { min-height: 51px; width: 100%; justify-content: space-between; margin-top: 5px; padding: 0 17px; font-size: 14px; }
.login-submit svg { color: var(--lime); }
.login-help { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

/* Supervisor dashboard */
.welcome-panel { min-height: 224px; position: relative; display: flex; align-items: center; overflow: hidden; padding: 38px 45px; border-radius: var(--radius-lg); background: linear-gradient(112deg, #152746 0%, #1d3a66 67%, #315e9f 100%); box-shadow: 0 16px 36px rgba(23, 43, 77, .15); }
.welcome-copy { position: relative; z-index: 1; }
.welcome-panel .eyebrow { color: #e8f0fa; }
.welcome-panel .eyebrow-line { background: var(--lime); }
.welcome-panel h1 { margin: 15px 0 8px; color: white; font-size: clamp(30px, 4vw, 42px); }
.welcome-panel p { margin: 0; color: #d7e0ed; font-size: 15px; }
.welcome-art { position: absolute; top: -58px; right: 6%; width: 330px; height: 330px; }
.art-circle { position: absolute; display: block; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; }
.art-circle-one { inset: 15px; background: radial-gradient(circle at 52% 50%, rgba(201, 230, 75, .16), rgba(201, 230, 75, 0) 65%); }
.art-circle-two { inset: 52px; border-width: 28px; border-color: rgba(255, 255, 255, .035); }
.art-spark { position: absolute; top: 104px; right: 107px; color: var(--lime); font-size: 82px; font-weight: 400; }
.dashboard-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.action-card { min-height: 142px; display: flex; align-items: center; gap: 17px; padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .18s, border-color .18s, box-shadow .18s; }
.action-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.action-card-primary { border-color: var(--accent-border); background: linear-gradient(115deg, var(--primary-card-start) 55%, var(--primary-card-end) 100%); }
.action-card-primary:hover { border-color: #b6cd4c; }
.action-illustration { width: 55px; height: 55px; display: grid; place-items: center; flex: 0 0 55px; border-radius: 17px; background: var(--navy); color: white; }
.action-illustration svg { width: 24px; height: 24px; }
.action-card-secondary .action-illustration { background: var(--blue-soft); color: var(--blue); }
.action-content { min-width: 0; display: flex; flex-direction: column; }
.action-kicker { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.action-content strong { margin-top: 3px; color: var(--navy); font: 750 18px/1.35 Manrope, sans-serif; letter-spacing: -.025em; }
.action-content small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.action-arrow { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 35px; margin-left: auto; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); transition: background .18s, color .18s, border-color .18s; }
.action-arrow svg { width: 17px; height: 17px; }
.action-card:hover .action-arrow { border-color: var(--navy); background: var(--navy); color: white; }
.section-block, .history-section { margin-top: 42px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin-top: 5px; }
.text-link { color: var(--blue); text-decoration: none; font-size: 12px; font-weight: 750; }
.text-link:hover, .photo-link:hover, .edit-link:hover { color: var(--navy-deep); text-decoration: underline; text-underline-offset: 3px; }
.expense-list { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); }
.expense-row { display: flex; align-items: center; gap: 15px; min-height: 83px; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.expense-row:last-child { border-bottom: 0; }
.row-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.row-icon svg { width: 20px; height: 20px; }
.row-main { min-width: 0; display: block; flex: 1; }
.row-main strong { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.row-main .date-text { margin-top: 6px; color: var(--muted-light); font-size: 11px; }
.row-amount { color: var(--navy); font-size: 14px; font-weight: 800; white-space: nowrap; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 43px 24px; border: 1px dashed var(--border-strong); border-radius: 17px; background: var(--surface); text-align: center; }
.empty-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 16px; background: var(--lime-soft); color: var(--navy); }
.empty-icon svg { width: 22px; height: 22px; }
.empty-state > strong { margin-top: 14px; color: var(--navy); font: 750 16px Manrope, sans-serif; }
.empty-state p { max-width: 400px; margin: 6px 0 14px; color: var(--muted); font-size: 13px; }

/* Expense form */
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; margin-bottom: 23px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.back-link:hover { color: var(--navy); }
.back-link svg { width: 17px; height: 17px; }
.form-page-heading { margin-bottom: 24px; }
.form-page-heading h1 { margin-top: 11px; }
.form-page-heading p, .page-heading-row p { margin: 0; font-size: 14px; }
.expense-form { width: min(760px, 100%); display: flex; flex-direction: column; gap: 20px; padding: 27px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow-sm); }
.expense-form .form-stack { gap: 18px; }
.expense-form label { gap: 8px; font-size: 13px; }
.expense-form input, .expense-form textarea { min-height: 51px; }
.expense-form textarea { min-height: 95px; resize: vertical; }
.amount-input { position: relative; }
.amount-input > span { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: var(--muted); font-size: 15px; }
.amount-input input { padding-left: 37px; }
.photo-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.photo-field legend { width: 100%; margin-bottom: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.field-optional { margin-left: 5px; color: var(--muted-light); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.photo-picker { min-height: 78px; display: flex !important; align-items: center; gap: 13px !important; position: relative; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-soft); cursor: pointer; transition: background .16s, border-color .16s, box-shadow .16s; }
.photo-picker:hover { border-color: var(--blue); background: var(--blue-soft); }
.photo-picker:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.photo-picker input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.photo-picker-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 43px; border-radius: 14px; background: var(--lime-soft); color: var(--navy); }
.photo-picker-icon svg { width: 21px; height: 21px; }
.photo-picker-copy { min-width: 0; display: block; flex: 1; }
.photo-picker-copy strong { display: block; overflow: hidden; color: var(--navy); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.photo-picker-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.photo-picker-browse { z-index: 0; display: inline-flex; min-height: 36px; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--navy); font-size: 11px; font-weight: 750; }
.current-photo { display: inline-flex; align-items: center; gap: 8px; margin: -1px 0 11px; color: var(--blue); text-decoration: none; font-size: 12px; font-weight: 700; }
.current-photo svg { width: 17px; height: 17px; }
.current-photo span { margin-left: 3px; }
.form-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 2px; padding-top: 19px; border-top: 1px solid var(--line); }
.form-submit-row p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11px; }
.form-submit-row p svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--blue); }
.save-button { min-height: 51px; min-width: 178px; }
.save-button svg { color: var(--lime); }

/* History and admin */
.page-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 26px; }
.page-heading-row h1 { margin: 10px 0 7px; }
.heading-action { min-height: 47px; flex: 0 0 auto; }
.heading-action svg { width: 19px; height: 19px; color: var(--lime); }
.admin-toolbar { display: flex; align-items: start; gap: 24px; margin-bottom: 29px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.toolbar-heading { width: 145px; display: flex; align-items: center; gap: 11px; flex: 0 0 145px; padding-top: 4px; }
.toolbar-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 39px; border-radius: 12px; background: var(--lime-soft); color: var(--navy); }
.toolbar-icon svg { width: 19px; height: 19px; }
.toolbar-heading strong, .toolbar-heading small { display: block; }
.toolbar-heading strong { color: var(--navy); font-size: 12px; font-weight: 800; }
.toolbar-heading small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.filter-bar { display: flex; align-items: end; gap: 10px; flex: 1; }
.filter-bar label { min-width: 112px; display: flex; flex: 1; flex-direction: column; gap: 6px; color: var(--ink); font-size: 10px; font-weight: 750; }
.filter-bar input, .filter-bar select { min-height: 43px; padding: 8px 10px; font-size: 12px; }
.button-filter { min-height: 43px; padding: 0 14px; background: var(--action-bg); color: var(--action-text); font-size: 11px; }
.button-filter:hover { filter: brightness(.94); }
.filter-bar .button-quiet { min-height: 43px; padding: 0 13px; font-size: 11px; }
.history-section { margin-top: 0; }
.history-heading { align-items: end; margin-bottom: 14px; }
.history-heading h2 { margin-top: 5px; }
.history-heading-right { display: flex; align-items: center; gap: 12px; }
.record-count { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.button-export { min-height: 41px; padding: 0 13px; border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-text); font-size: 11px; }
.button-export:hover { border-color: #bad044; background: var(--lime-soft); }
.button-export svg { width: 16px; height: 16px; color: var(--accent-text); }
.history-section .empty-state .button { margin-top: 3px; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.edit-link, .photo-link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); text-decoration: none; font-size: 11px; font-weight: 750; white-space: nowrap; }
.supervisor-tag { display: inline-flex; margin-left: 7px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-alt); color: var(--text-secondary); font-size: 9px; font-weight: 700; }

@media (max-width: 850px) {
  .page-shell { width: min(100% - 40px, 760px); }
  .admin-toolbar { display: block; }
  .toolbar-heading { width: auto; margin-bottom: 16px; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar label { min-width: calc(33.333% - 10px); }
  .filter-bar button, .filter-bar > a { flex: 1; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .site-header { min-height: 66px; padding: 0 17px; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; font-size: 21px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 8px; }
  .brand-logo { height: 38px; max-width: min(185px, 50vw); }
  .header-tools { gap: 8px; }
  .role-chip { padding: 6px 8px; font-size: 9px; }
  .header-user { display: none; }
  .logout-button { width: 42px; min-height: 42px; gap: 0; padding: 0; }
  .logout-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .page-shell { width: calc(100% - 34px); min-height: calc(100vh - 128px); padding: 29px 0 51px; }
  .site-footer { width: calc(100% - 34px); min-height: 58px; gap: 10px; font-size: 9px; }
  .site-footer span:last-child { text-align: right; }
  h1 { font-size: clamp(29px, 8vw, 36px); }
  h2 { font-size: 20px; }
  .login-page .page-shell { width: calc(100% - 34px); min-height: calc(100vh - 124px); padding: 21px 0 32px; }
  .login-layout { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .login-intro { padding: 8px 2px 0; }
  .login-intro h1 { margin: 12px 0 9px; font-size: clamp(33px, 9vw, 43px); }
  .login-intro p { max-width: 470px; font-size: 13px; line-height: 1.6; }
  .login-accent { margin-top: 14px; }
  .login-panel { padding: 22px 19px; border-radius: 19px; }
  .login-subtitle { margin: 13px 0 19px; }
  .form-stack { gap: 15px; }
  .welcome-panel { min-height: 190px; padding: 26px 23px; border-radius: 19px; }
  .welcome-panel h1 { max-width: 85%; margin: 12px 0 8px; font-size: clamp(29px, 7.8vw, 36px); }
  .welcome-panel p { max-width: 78%; font-size: 13px; }
  .welcome-art { top: 1px; right: -138px; width: 280px; height: 280px; opacity: .78; }
  .art-spark { top: 97px; right: 94px; font-size: 64px; }
  .dashboard-actions { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .action-card { min-height: 119px; gap: 13px; padding: 17px; border-radius: 16px; }
  .action-illustration { width: 47px; height: 47px; flex-basis: 47px; border-radius: 14px; }
  .action-content strong { font-size: 16px; }
  .action-content small { font-size: 11px; }
  .action-arrow { width: 31px; height: 31px; flex-basis: 31px; }
  .section-block { margin-top: 32px; }
  .section-heading { align-items: end; gap: 8px; margin-bottom: 12px; }
  .text-link { font-size: 11px; }
  .expense-row { min-height: 76px; gap: 11px; padding: 13px 12px; }
  .row-icon { width: 37px; height: 37px; flex-basis: 37px; border-radius: 12px; }
  .row-main strong { font-size: 12px; }
  .row-main small { font-size: 11px; }
  .row-main .date-text { font-size: 10px; }
  .row-amount { font-size: 12px; }
  .empty-state { padding: 35px 18px; }
  .back-link { margin-bottom: 17px; }
  .form-page-heading { margin-bottom: 19px; }
  .form-page-heading p, .page-heading-row p { font-size: 12px; }
  .expense-form { gap: 17px; padding: 19px 16px; border-radius: 17px; }
  .form-stack label { font-size: 12px; }
  .expense-form input, .expense-form textarea { min-height: 49px; }
  .expense-form textarea { min-height: 88px; }
  .photo-picker { min-height: 77px; gap: 9px !important; padding: 10px; }
  .photo-picker-icon { width: 39px; height: 39px; flex-basis: 39px; border-radius: 12px; }
  .photo-picker-copy strong { font-size: 11px; }
  .photo-picker-copy small { font-size: 10px; }
  .photo-picker-browse { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .form-submit-row { align-items: stretch; flex-direction: column; gap: 13px; padding-top: 15px; }
  .form-submit-row p { font-size: 10px; }
  .save-button { width: 100%; min-height: 51px; }
  .page-heading-row { align-items: flex-start; margin-bottom: 21px; }
  .page-heading-row h1 { font-size: 30px; }
  .heading-action { min-height: 44px; padding: 0 12px; }
  .heading-action span { font-size: 11px; }
  .admin-toolbar { margin-bottom: 23px; padding: 15px; border-radius: 16px; }
  .toolbar-heading { margin-bottom: 14px; }
  .filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .filter-bar label { min-width: 0; font-size: 10px; }
  .filter-bar label:nth-of-type(3) { grid-column: 1 / -1; }
  .filter-bar input, .filter-bar select { min-height: 43px; padding: 7px 8px; font-size: 11px; }
  .filter-bar button, .filter-bar > a { min-height: 42px; padding: 0 9px; font-size: 10px; }
  .history-heading { align-items: flex-start; flex-direction: column; }
  .history-heading-right { width: 100%; justify-content: space-between; }
  .button-export { min-height: 39px; padding: 0 10px; }
  .record-count { font-size: 10px; }
  .supervisor-tag { display: table; margin: 5px 0 0; }
  .row-end { gap: 6px; }
  .edit-link { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Expense entry, multi-photo review and the admin register */
.expense-form { max-width: 780px; margin: 0 auto; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.expense-form > label small, .helper { color: var(--muted); font-size: 12px; font-weight: 500; }
.expense-form .amount-input { position: relative; }
.amount-input > span { position: absolute; z-index: 1; left: 14px; top: 13px; color: var(--navy); font-weight: 700; }
.amount-input input { padding-left: 35px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; border: 0 !important; }
.category-cards, .photo-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.category-cards legend, .photo-field legend { margin-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 750; }
.category-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.category-option { position: relative; }
.category-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.category-option span { display: flex; min-height: 54px; align-items: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .16s,background .16s,box-shadow .16s; }
.category-option input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); color: var(--navy); }
.category-option input:focus-visible + span { outline: 0; box-shadow: var(--focus); }
.add-site-toggle { justify-self: start; }
.site-request-panel, .submission-summary { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.site-request-panel h2, .submission-summary h2 { margin-bottom: 6px; font-size: 17px; }
.site-request-panel p { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.site-request-panel label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; font-size: 12px; font-weight: 700; }
.site-request-panel input { min-height: 46px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); color: var(--ink); }
.submission-summary { background: linear-gradient(135deg,var(--surface-soft),var(--accent-soft)); }
.submission-summary dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; margin: 15px 0 0; }
.submission-summary dl div { min-width: 0; }
.submission-summary dt { color: var(--muted); font-size: 11px; }
.submission-summary dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 700; }
.field-optional { margin-left: 6px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-action { min-height: 48px; cursor: pointer; }
.photo-action:focus-within { outline: 0; box-shadow: var(--focus); }
.photo-preview-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 10px; margin-top: 14px; }
.photo-preview-card { display: flex; min-width: 0; flex-direction: column; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.photo-preview-card img { width: 100%; height: 110px; border-radius: 8px; background: #eef1f5; object-fit: cover; }
.photo-preview-card span { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.photo-preview-card .button { min-height: 37px; }
.existing-photo-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.current-photo, .photo-link { color: var(--blue); font-size: 12px; font-weight: 700; }
.check-label { display: inline-flex !important; align-items: center; gap: 7px !important; font-size: 11px !important; }
.check-label input { width: 18px; min-height: 18px; }
.form-message { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.form-message:not(:empty) { color: var(--blue); }
#upload-progress { width: 100%; height: 10px; accent-color: var(--blue); }
.admin-expense-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
.admin-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.admin-table { width: 100%; min-width: 980px; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); font-size: 12px; }
.admin-table th { position: sticky; top: 0; background: var(--surface-soft); color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.admin-table td small, .admin-table td a { display: block; margin-top: 4px; }
.admin-table td a { color: var(--blue); font-weight: 700; }
.admin-table tr:last-child td { border-bottom: 0; }
.filtered-total { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0 0 18px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.pagination .button { min-height: 40px; }
.site-row { position: relative; }
.site-request-badge { padding: 7px 10px; border-radius: 999px; background: var(--warning-bg); color: var(--warning-text); font-size: 11px; }
.admin-summary-grid article strong { font-size: clamp(18px,2.3vw,25px); }
.expense-detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 0; }
.expense-detail-grid div { min-width: 0; padding: 15px; border-radius: 12px; background: var(--surface-soft); }
.expense-detail-grid dt { color: var(--muted); font-size: 11px; }
.expense-detail-grid dd { margin: 4px 0 0; color: var(--ink); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.expense-detail-grid .detail-wide { grid-column: 1/-1; }
.admin-photo-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); }
.admin-photo-grid a { text-decoration: none; }
.admin-photo-grid img { height: 180px; object-fit: contain; }
.detail-review-form textarea { width: 100%; min-height: 90px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); resize: vertical; }
.detail-review-form small { color: var(--muted); font-size: 11px; font-weight: 500; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; background: var(--warning-bg); color: var(--warning-text); font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-cleared { background: var(--success-bg); color: var(--success-text); }
.status-rejected { background: var(--danger-bg); color: var(--danger-text); }
.status-pending { background: var(--warning-bg); color: var(--warning-text); }
@media (max-width: 700px) {
  .category-options, .submission-summary dl { grid-template-columns: 1fr; }
  .admin-expense-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .expense-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .expense-detail-grid div { padding: 11px; }
  .admin-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filtered-total { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .photo-actions .button { flex: 1 1 140px; }
  .photo-preview-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-request-panel, .submission-summary { padding: 14px; }
}

/* Shared product UI refresh */
.site-header { min-height: 68px; padding-inline: max(20px, calc((100vw - 1180px) / 2)); gap: 14px; background: var(--surface); border-color: var(--line); }
.brand { min-width: 0; }
.brand-logo { height: 39px; }
.primary-nav { gap: 2px; margin-right: 8px; }
.primary-nav a { min-height: 38px; padding-inline: 9px; border-radius: 8px; }
.header-tools { gap: 10px; }
.theme-toggle { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--navy); cursor: pointer; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle:hover { background: var(--blue-soft); }
.theme-toggle:focus-visible, .mobile-menu summary:focus-visible { outline: 0; box-shadow: var(--focus); }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--navy); cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary svg { width: 20px; height: 20px; }
.mobile-menu nav { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(260px, calc(100vw - 28px)); display: grid; gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-md); }
.mobile-menu nav a, .mobile-menu nav button { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 650; text-align: left; text-decoration: none; cursor: pointer; }
.mobile-menu nav a:hover, .mobile-menu nav button:hover { background: var(--blue-soft); }
.mobile-menu nav form { margin: 0; border-top: 1px solid var(--line); }
.page-shell { width: min(1160px, calc(100% - 48px)); padding-block: 34px 56px; }
.site-footer { width: min(1160px, calc(100% - 48px)); min-height: 54px; }
.site-footer span:first-child { font-size: 10px; }
.eyebrow { display: none; }
.page-heading-row p, .form-page-heading > p { display: none; }
h1 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.035em; }
h2 { letter-spacing: -.025em; }
.button { min-height: 44px; border-radius: 9px; }
.button-primary { background: var(--action-bg); color: var(--action-text); box-shadow: none; }
.button-primary:hover { background: var(--action-bg); filter: brightness(.94); box-shadow: var(--shadow-sm); }
.button-quiet { background: var(--surface); color: var(--ink); }
.welcome-panel { min-height: 114px; padding: 22px 26px; border-radius: var(--radius-md); background: #20384d; box-shadow: none; }
.welcome-panel h1 { margin: 0; font-size: 30px; }
.welcome-panel p, .welcome-art { display: none; }
.dashboard-greeting { display: block; margin-top: 2px; color: #d9e2e9; font-size: 13px; }
.dashboard-actions { gap: 12px; margin-top: 18px; }
.action-card { min-height: 108px; gap: 13px; padding: 17px; border-radius: 12px; box-shadow: none; }
.action-card:hover { transform: translateY(-1px); }
.action-illustration { width: 44px; height: 44px; flex-basis: 44px; border-radius: 11px; }
.action-content strong { font-size: 16px; }
.action-content small { font-size: 11px; }
.section-block, .history-section { margin-top: 30px; }
.section-heading { margin-bottom: 12px; }
.login-page .page-shell { min-height: calc(100vh - 122px); }
.login-layout { gap: clamp(36px, 7vw, 84px); }
.login-intro h1 { font-size: clamp(36px, 4.8vw, 54px); }
.login-intro p { line-height: 1.6; }
.login-panel { border-color: var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); }
.login-panel-heading h2 { font-size: 21px; }
.login-icon { background: var(--lime-soft); }
.form-stack input, .form-stack textarea, .filter-bar input, .filter-bar select { background: var(--input-bg); color: var(--ink); border-color: var(--line); }
.expense-form { border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.photo-picker { background: var(--surface-alt); }
.empty-state { background: var(--surface); }
.alert { background: var(--danger-bg); }
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.alert-error { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); }
@media (max-width: 760px) {
  .site-header { min-height: 60px; padding-inline: 14px; }
  .brand-logo { height: 34px; max-width: 155px; }
  .primary-nav { display: none; }
  .mobile-menu { display: block; }
  .role-chip, .header-user, .logout-form { display: none; }
  .header-tools { gap: 7px; }
  .page-shell { width: min(calc(100% - 28px), 680px); padding-block: 23px 42px; }
  .site-footer { width: calc(100% - 28px); min-height: 48px; }
  .login-page .page-shell { width: calc(100% - 28px); min-height: calc(100vh - 108px); padding-block: 26px 35px; }
  .login-layout { grid-template-columns: 1fr; gap: 14px; }
  .login-intro { padding: 0 2px; }
  .login-intro h1 { margin: 0; font-size: 32px; line-height: 1.08; }
  .login-intro h1 br { display: none; }
  .login-intro p, .login-accent { display: none; }
  .login-panel { padding: 20px; }
  .welcome-panel { min-height: 96px; padding: 17px 18px; }
  .welcome-panel h1 { font-size: 25px; }
  .dashboard-actions { grid-template-columns: 1fr; gap: 9px; margin-top: 13px; }
  .action-card { min-height: 84px; }
}
@media (prefers-reduced-motion: reduce) { body { transition: none; } }
.theme-toggle svg[hidden] { display: none; }

@media (max-width: 760px) {
  .admin-expense-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .import-filters { display: grid; grid-template-columns: 1fr; }
  .import-filters label { min-width: 0; }
}

@media (max-width: 850px) { .primary-nav { display: none; } .mobile-menu { display: block; } .header-user, .logout-form { display: none; } }
