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

:root {
  --ink: #172028;
  --muted: #68747d;
  --line: #dfe5e5;
  --paper: #f7f8f6;
  --white: #ffffff;
  --teal: #08766d;
  --teal-dark: #075f58;
  --teal-pale: #e5f3f0;
  --amber: #a95b00;
  --amber-pale: #fff2de;
  --red: #b84040;
  --red-pale: #fceaea;
  --shadow: 0 18px 50px rgba(29, 43, 45, .09);
}

/* Final sage-green restore: keep the original light workspace as the active theme. */
:root {
  --ink: #465746;
  --muted: #718071;
  --line: #dfe5da;
  --paper: #f7f8f3;
  --white: #fffefa;
  --teal: #758b6d;
  --teal-dark: #5e7557;
  --teal-pale: #e7ede2;
  --amber: #9a7950;
  --amber-pale: #f9efd9;
  --red: #af6d66;
  --red-pale: #fae9e6;
  --shadow: 0 10px 28px rgba(85, 104, 81, .10);
}

html, body, .page, .entry, .auth-wrap { background: #f7f8f3; color: #465746; }
body::selection { color: #fff; background: #758b6d; }
.entry-panel { background: #eef1e9; color: #465746; }
.entry-panel .brand, .entry-panel h1 { color: #465746; }
.entry-panel .brand-mark { color: #f7f8f3; background: #71866a; }
.entry-copy p, .entry-note { color: #7c8a79; }
.auth-card { border-color: #e1e7dc; background: #fffefa; box-shadow: var(--shadow); }
.auth-card h2, .auth-card label { color: #465746; }
.role-button { border-color: #dfe5da; background: #f6f8f2; }
.role-button.active { border-color: #94aa8c; background: #edf2e8; }
.sidebar { background: #eff1e9; border-right-color: #dfe5da; color: #60705f; }
.sidebar .brand { color: #4d5e4b; }
.sidebar .brand-mark { color: #f7f8f3; background: #748a6d; }
.workspace { color: #8a9787; }
.nav-item { color: #60715f; }
.nav-item.active, .nav-item:hover { color: #52664f; background: #dce6d7; }
.nav-item.active i { color: #718a68; }
.profile-mini { border-color: #d5dfd0; }
.profile-mini strong { color: #50624d; }
.profile-mini span { color: #81907d; }
.avatar { color: #5d7457; background: #d8e8d6; }
.logout { color: #72846e; }
.logout:hover { color: #52664f; background: #dce6d7; }
.page-title { color: #4a5947; }
.page-lead, .muted, .section-helper { color: #718071; }
.date { color: #667865; border-color: #dbe3d7; background: #fffefa; }
.section-card, .stat, .admin-stat, .expense-people-section, .account-card, .report-person-group, .admin-report-directory, .admin-report-detail { border-color: #e0e6db; background: #fffefa; color: #465746; box-shadow: 0 5px 15px rgba(86, 106, 81, .035); }
.section-title, .section-band-head h2, .table-toolbar h3 { color: #50614d; }
.stat strong, .admin-stat strong { color: #566853; }
.stat-label, .admin-stat span { color: #718071; }
.table-toolbar { background: #f8faf5; }
th { color: #6e7d6c; background: #f1f4ed; }
td { color: #465746; border-top-color: #edf0ea; }
tbody tr:hover { background: #fafcf8; }
.status.pending { color: #92734e; background: #fbf0db; }
.status.done { color: #68805f; background: #e8f0e4; }
.status.rejected { color: #a86661; background: #faebe8; }
.primary { background: #758b6d; }
.primary:hover { background: #637b5c; }
.action-btn, .choose-file { border-color: #c8d7c2; color: #61785a; background: #fffefa; }
.action-btn:hover, .choose-file:hover { background: #edf2e8; }
.search input, .people-search input, .report-people-search input { color: #465746; border-color: #dbe3d7; background: #fffefa; }
.upload-option { background: #f8faf5; }
.upload-option.selected { border-color: #b7cbb0; background: #edf3e9; }
.dropzone { border-color: #c3d2bd; background: #fbfcf9; }
.dropzone .drop-icon, .report-attachment-icon { color: #687f61; background: #e6eee2; }
.expense-file, .report-field { background: #f8faf5; }
.report-type-switch { background: #eef2e9; }
.report-type-switch button.active { color: #5e7557; }
.calendar-card-head, .admin-report-detail-head { background: #f3f6ef; }
.report-calendar-day.submitted { color: #607858; background: #e3efe0; }
.report-calendar-day.selected { border-color: #758b6d; box-shadow: inset 0 0 0 1px #758b6d; }
.report-content-block { border-left-color: #b7cbb0; background: #f7faf4; }
.report-admin-summary { border-color: #d8e5d3; background: #edf3e9; }
.admin-report-person.active { border-left-color: #8da583; background: #ebf2e7; }
.team-card { color: #4d5f4a; background: #e6eee2; box-shadow: none; }
.team-card .eyebrow, .team-card .team-total span, .team-card .team-split p { color: #71816d; }
.team-card .mini-icon { color: #62795a; background: #f8fbf5; }
.modal-backdrop { background: rgba(77, 94, 73, .38); }
.modal { box-shadow: 0 22px 55px rgba(78, 96, 74, .20); }
.close { color: #60715d; background: #edf2e9; }
#toast { background: #607859; }
@media (max-width: 780px) {
  .sidebar { background: #eff1e9; }
  .page { background: #f7f8f3; }
  .nav-item.active, .nav-item:hover { background: #dce6d7; }
  .stat, .admin-stat { border-radius: 11px; }
}

/* Restore the previous sage-green workspace. */
:root { --ink:#465746; --muted:#52645f; --line:#dfe5da; --paper:#f7f8f3; --white:#fffefa; --teal:#758b6d; --teal-dark:#5e7557; --teal-pale:#e7ede2; --amber:#835008; --amber-pale:#fff1d3; --red:#b44e43; --red-pale:#fae9e6; --shadow:0 10px 28px rgba(85,104,81,.10); }
body,.page { background:#f7f8f3; color:#465746; }.entry,.auth-wrap { background:#f7f8f3; }.entry-panel { background:#eef1e9; color:#465746; }.entry-panel .brand,.entry-panel h1 { color:#4a5947; }.entry-panel .brand-mark { color:#f7f8f3; background:#71866a; }.entry-copy p,.entry-note { color:#7c8a79; }
.auth-card { border:1px solid #e1e7dc; border-radius:14px; background:#fffefa; box-shadow:var(--shadow); }.auth-card h2,.auth-card label { color:#4a5947; }.role-button { border-color:#dfe5da; border-radius:11px; background:#f6f8f2; }.role-button.active { border-color:#94aa8c; background:#edf2e8; }
.sidebar { background:#eff1e9; border-right:1px solid #dfe5da; color:#60705f; }.sidebar .brand { color:#4d5e4b; }.sidebar .brand-mark { color:#f7f8f3; background:#748a6d; }.workspace { color:#8a9787; }.nav-item { color:#60715f; border-radius:9px; }.nav-item.active,.nav-item:hover { color:#52664f; background:#dce6d7; }.nav-item.active i { color:#718a68; }.profile-mini { border-color:#d5dfd0; }.profile-mini strong { color:#50624d; }.profile-mini span { color:#81907d; }
.page-title { color:#4a5947; font-family:"Public Sans","Microsoft YaHei",sans-serif; font-weight:600; }.page-lead,.muted,.section-helper { color:#718071; }.date { color:#667865; border-color:#dbe3d7; border-radius:999px; background:#fffefa; }
.section-card,.stat,.admin-stat,.expense-people-section,.account-card,.report-person-group,.admin-report-directory,.admin-report-detail { border-color:#e0e6db; border-radius:12px; background:#fffefa; color:#465746; box-shadow:0 5px 15px rgba(86,106,81,.035); }.section-title,.section-band-head h2,.table-toolbar h3 { color:#50614d; }.stat,.admin-stat { border-color:#e0e6db; border-radius:12px; background:#fffefa; }.stat strong,.admin-stat strong { color:#566853; font-family:"Public Sans","Microsoft YaHei",sans-serif; }.stat-label,.admin-stat span { color:#718071; }
.table-toolbar { background:#f8faf5; } th { color:#6e7d6c; background:#f1f4ed; } td { color:#465746; border-top-color:#edf0ea; } tbody tr:hover { background:#fafcf8; }.status.pending { color:#92734e; background:#fbf0db; }.status.done { color:#68805f; background:#e8f0e4; }.status.rejected { color:#a86661; background:#faebe8; }
.primary { border-radius:999px; background:#758b6d; }.primary:hover { background:#637b5c; }.action-btn,.choose-file { border-color:#c8d7c2; border-radius:999px; color:#61785a; background:#fffefa; }.action-btn:hover,.choose-file:hover { background:#edf2e8; }.search input,.people-search input,.report-people-search input { color:#465746; border-color:#dfe5da; background:#fffefa; }
.upload-option { border-radius:12px; background:#f8faf5; }.upload-option.selected { border-color:#94aa8c; background:#edf3e9; }.dropzone { border-color:#c3d2bd; border-radius:12px; background:#fbfcf9; }.dropzone .drop-icon,.report-attachment-icon { color:#687f61; background:#e6eee2; }.expense-file,.report-field { border-radius:10px; background:#f8faf5; }.report-type-switch { border-radius:999px; background:#eef2e9; }.report-type-switch button { border-radius:999px; }.report-type-switch button.active { color:#5e7557; }.calendar-card-head,.admin-report-detail-head { background:#f3f6ef; }.report-calendar-day { border-radius:9px; }.report-calendar-day.submitted { color:#607858; background:#e3efe0; }.report-calendar-day.selected { border-color:#758b6d; box-shadow:inset 0 0 0 1px #758b6d; }.report-content-block { border-left-color:#b7cbb0; background:#f7faf4; }.report-admin-summary { border-color:#d8e5d3; border-radius:12px; background:#edf3e9; }.admin-report-person.active { border-left-color:#8da583; background:#ebf2e7; }
.team-card { color:#4d5f4a; background:#e6eee2; box-shadow:none; }.team-card .eyebrow,.team-card .team-total span,.team-card .team-split p { color:#71816d; }.team-card .mini-icon { color:#62795a; background:#f8fbf5; }.modal-backdrop { background:rgba(77,94,73,.38); }.modal { border-radius:14px; box-shadow:0 22px 55px rgba(78,96,74,.20); }.close { color:#60715d; background:#edf2e9; } #toast { background:#607859; }
@media (max-width:780px) { .sidebar { background:#eff1e9; }.page { background:#f7f8f3; }.stat,.admin-stat { border-radius:11px; } }

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.entry { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); background: #eef2f0; }
.entry-panel { display: none; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; letter-spacing: .4px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--teal); color: white; border-radius: 7px; }
.brand-mark i { width: 18px; }
.entry-copy { max-width: 570px; margin: 80px 0; }
.eyebrow { color: var(--teal); font: 12px "DM Mono", monospace; letter-spacing: 1.2px; text-transform: uppercase; }
h1 { margin: 15px 0 20px; max-width: 560px; font-size: 45px; line-height: 1.22; letter-spacing: 0; }
.entry-copy p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.9; }
.entry-note { color: #859097; font-size: 12px; }
.auth-wrap { display: grid; place-items: center; min-height: 100vh; padding: 36px clamp(22px, 4vw, 64px); background: #eef2f0; }
.auth-card { width: min(100%, 420px); }
.auth-card h2 { margin: 0 0 7px; font-size: 26px; }
.auth-sub { margin: 0 0 30px; color: var(--muted); }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 27px; }
.role-button { min-height: 132px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 17px; text-align: left; color: var(--ink); }
.role-button i { color: var(--teal); width: 24px; height: 24px; margin-bottom: 20px; }
.role-button strong { display: block; margin-bottom: 4px; font-size: 15px; }
.role-button span { color: var(--muted); font-size: 12px; }
.role-button.active { border: 2px solid var(--teal); padding: 16px; background: #f8fcfb; }
.form-group { display: grid; gap: 8px; margin: 15px 0; }
label { color: #4a555c; font-weight: 600; font-size: 13px; }
input, textarea, select { width: 100%; border: 1px solid #cfd8d8; border-radius: 5px; background: white; padding: 11px 12px; outline: none; color: var(--ink); transition: border .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 118, 109, .12); }
textarea { min-height: 90px; resize: vertical; }
.password-line { display: flex; justify-content: space-between; }
.text-action { color: var(--teal); border: 0; background: transparent; padding: 0; font-size: 13px; }
.primary { min-height: 44px; width: 100%; max-width: 100%; overflow: hidden; border: 0; border-radius: 5px; background: var(--teal); color: white; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; transition: background .2s, transform .2s; }
.primary:hover { background: var(--teal-dark); }
.primary:active { transform: translateY(1px); }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); font-size: 13px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 26px 15px; background: #172d2c; color: #d7e2e0; display: flex; flex-direction: column; }
.sidebar .brand { color: white; padding: 0 10px; }
.sidebar .brand-mark { background: #d7f0eb; color: #116d65; }
.workspace { margin-top: 48px; color: #91aaa7; font: 11px "DM Mono", monospace; letter-spacing: 1px; text-transform: uppercase; padding: 0 10px 12px; }
.nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; width: 100%; gap: 12px; padding: 11px 10px; color: #bdd0cd; border: 0; background: transparent; border-radius: 5px; text-align: left; }
.nav-item i { width: 18px; height: 18px; }
.nav-item.active, .nav-item:hover { background: #254442; color: white; }
.profile-mini { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #34514e; display: flex; gap: 10px; align-items: center; }
.avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #b9e2dc; color: #075f58; font-weight: 700; font-size: 12px; }
.profile-mini strong { display: block; color: white; font-size: 13px; }
.profile-mini span { display: block; color: #95aca9; font-size: 11px; margin-top: 2px; }
.logout { margin-left: auto; border: 0; padding: 5px; color: #a9c0bc; background: transparent; }
.logout i { width: 17px; }
.page { min-width: 0; padding: 31px clamp(22px, 4vw, 64px) 54px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 29px; }
.page-title { margin: 0; font-size: 26px; line-height: 1.25; }
.page-lead { color: var(--muted); margin: 7px 0 0; }
.date { color: #778389; font: 12px "DM Mono", monospace; padding-top: 7px; }
.content-width { max-width: 930px; }
.section-card { padding: 25px; background: white; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 2px 3px rgba(20, 33, 35, .02); }
.section-card + .section-card, .section-card + .history-head { margin-top: 20px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.section-title i { width: 19px; color: var(--teal); }
.section-helper { margin: 7px 0 22px; color: var(--muted); font-size: 13px; }
.upload-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-option { position: relative; border: 1px solid var(--line); border-radius: 6px; padding: 18px; min-height: 114px; cursor: pointer; background: #fff; }
.upload-option.selected { border: 2px solid var(--teal); padding: 17px; background: #f8fcfb; }
.upload-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-top { display: flex; justify-content: space-between; }
.option-icon { color: var(--teal); width: 23px; }
.radio { width: 17px; height: 17px; border: 1px solid #b9c5c5; border-radius: 50%; display: grid; place-items: center; }
.selected .radio { border-color: var(--teal); }
.selected .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.upload-option strong { display: block; margin-top: 15px; font-size: 14px; }
.upload-option span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.dropzone { display: flex; align-items: center; gap: 16px; margin-top: 18px; min-height: 92px; border: 1px dashed #9db9b5; border-radius: 6px; padding: 16px; background: #fbfdfc; }
.expense-dropzone { cursor: pointer; transition: border-color .2s, background .2s; }
.expense-dropzone.dragging { border-color: var(--teal); background: #eef8f6; }
.dropzone .drop-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--teal); background: var(--teal-pale); border-radius: 5px; flex: 0 0 auto; }
.dropzone strong { display: block; font-size: 13px; }
.dropzone span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.dropzone-copy { min-width: 0; flex: 1; }
.dropzone-copy strong, .dropzone-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone input { display: none; }
.choose-file { max-width: 100%; margin-left: auto; overflow: hidden; padding: 7px 10px; border: 1px solid #add1cc; border-radius: 4px; color: var(--teal); background: white; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.expense-file-list { display: grid; max-height: 300px; gap: 7px; margin-top: 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.expense-file-empty { padding: 6px 1px; color: var(--muted); font-size: 12px; }
.review-inline-error { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid #d9a59a; border-radius: 6px; color: #7b322b; background: #fff4f1; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.review-inline-error strong { flex: 0 0 auto; }
.review-inline-error span { min-width: 0; }
.expense-file { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 9px; border: 1px solid #dbe8e6; border-radius: 5px; background: #f8fbfa; }
.expense-file-name { display: flex; align-items: center; min-width: 0; flex: 1; gap: 6px; color: #415055; }
.expense-file-name > i { width: 15px; flex: 0 0 auto; color: var(--teal); }
.expense-file-name > span { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.expense-file-name small { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.expense-file-remove { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border: 0; border-radius: 4px; color: #7d8b8e; background: transparent; }
.expense-file-remove:hover { color: var(--red); background: var(--red-pale); }
.expense-file-remove i { width: 15px; }
.form-grid { display: grid; grid-template-columns: 210px 1fr; gap: 18px; margin-top: 21px; }
.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 22px; }
.form-foot .primary { width: 126px; }
.muted { color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 23px; }
.stat { padding: 17px 18px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 8px; font: 600 23px "DM Mono", monospace; letter-spacing: 0; }
.stat strong small { font: 12px "Noto Sans SC", sans-serif; color: var(--muted); margin-left: 2px; }
.history-head { display: flex; justify-content: space-between; align-items: center; }
.history-head h3 { margin: 0; font-size: 16px; }
.filter { border: 1px solid var(--line); color: #4c595f; background: white; border-radius: 4px; padding: 7px 10px; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 630px; }
th { padding: 12px 14px; background: #f7f9f8; color: #748087; font-weight: 500; font-size: 12px; text-align: left; white-space: nowrap; }
td { border-top: 1px solid #e9eeee; padding: 13px 14px; vertical-align: middle; }
.money { font-family: "DM Mono", monospace; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 11px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--amber); background: var(--amber-pale); }
.status.done { color: var(--teal); background: var(--teal-pale); }
.status.rejected { color: var(--red); background: var(--red-pale); }
.file-link { display: inline-flex; align-items: center; min-width: 0; max-width: 190px; gap: 5px; color: var(--teal); border: 0; padding: 0; background: transparent; font-size: 12px; }
.file-link i { width: 14px; }
.file-link > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-link small { flex: 0 0 auto; padding: 1px 4px; border-radius: 3px; color: var(--teal-dark); background: var(--teal-pale); font-size: 10px; }
.expense-attachment-links { display: grid; gap: 5px; }
.expense-type { display: inline-flex; align-items: center; min-width: 42px; justify-content: center; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.expense-type.invoice { color: #5d7756; background: #e8f0e4; }
.expense-type.image { color: #8a704b; background: #fbf0db; }
.expense-table-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.expense-type-filter { display: inline-flex; align-items: center; gap: 7px; color: #718071; font-size: 12px; white-space: nowrap; }
.expense-type-filter select { min-height: 36px; padding: 5px 26px 5px 9px; border: 1px solid #dfe5da; border-radius: 8px; color: #50614d; background: #fffefa; font: inherit; }
.expense-type-filter select:hover { border-color: #b8c9b2; }
.expense-type-filter select:focus { border-color: #879f7e; outline: 3px solid rgba(117, 139, 109, .18); }
.expense-user-filter { display: inline-flex; align-items: center; gap: 7px; color: #718071; font-size: 12px; white-space: nowrap; }
.expense-user-filter select { min-width: 132px; min-height: 36px; padding: 5px 26px 5px 9px; border: 1px solid #dfe5da; border-radius: 8px; color: #50614d; background: #fffefa; font: inherit; }
.expense-user-filter select:hover { border-color: #b8c9b2; }
.expense-user-filter select:focus { border-color: #879f7e; outline: 3px solid rgba(117, 139, 109, .18); }
.expense-pending-total { color: #8a704b; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.expense-delete { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 4px; color: #8b999c; background: transparent; }
.expense-delete:hover { color: var(--red); background: var(--red-pale); }
.expense-delete i { width: 15px; }
.expense-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.table-muted { color: #9aa5a6; font-size: 11px; }
.admin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 25px; }
.admin-stat { min-height: 113px; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.admin-stat .mini-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--teal); background: var(--teal-pale); }
.admin-stat:nth-child(2) .mini-icon { color: var(--amber); background: var(--amber-pale); }
.admin-stat:nth-child(3) .mini-icon { color: var(--red); background: var(--red-pale); }
.admin-stat i { width: 16px; }
.admin-stat strong { display: block; margin-top: 13px; font: 600 20px "DM Mono", monospace; }
.admin-stat span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 17px 19px; }
.table-toolbar h3 { margin: 0; font-size: 16px; }
.search { position: relative; display: flex; width: 208px; align-items: center; }
.search i, .search > svg { position: absolute; z-index: 1; left: 11px; top: 50%; width: 15px; height: 15px; color: #788489; pointer-events: none; transform: translateY(-50%); }
.search input { width: 100%; min-height: 36px; padding: 7px 10px 7px 34px; font-size: 12px; line-height: 1.2; }
.person { display: flex; gap: 9px; align-items: center; }
.person button { border: 0; padding: 0; background: transparent; color: var(--ink); font-weight: 600; }
.person button:hover { color: var(--teal); }
.avatar.tiny { width: 27px; height: 27px; font-size: 10px; }
.action-btn { max-width: 100%; overflow: hidden; border: 1px solid #9bc6c0; border-radius: 4px; padding: 6px 9px; background: white; color: var(--teal); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.action-btn:hover { background: var(--teal-pale); }
.action-btn.disabled { color: #6e8683; border-color: #d3e1df; background: #f5fbfa; cursor: default; }
.reject-action { color: var(--red); border-color: #e9b8b8; }
.reject-action:hover { background: var(--red-pale); }
.employee-list { display: grid; gap: 9px; }
.people-page { max-width: 1320px; }
.people-layout { display: grid; grid-template-columns: minmax(520px, 1.45fr) minmax(310px, .72fr); gap: 20px; align-items: start; }
.employee-panel { min-height: 485px; padding: 0; overflow: hidden; }
.directory-head { display: flex; justify-content: space-between; align-items: center; padding: 21px 22px 17px; border-bottom: 1px solid var(--line); }
.directory-head .section-helper { margin: 6px 0 0; }
.people-search { width: 200px; }
.employee-panel .employee-list { padding: 12px; }
.employee-row { display: flex; align-items: center; min-height: 78px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: white; transition: border-color .2s, box-shadow .2s, transform .2s; }
.employee-row:hover { border-color: #b9d9d4; box-shadow: 0 5px 12px rgba(21, 62, 60, .06); transform: translateY(-1px); }
.employee-row .person { flex: 1; }
.row-stat { width: 108px; color: var(--muted); font-size: 11px; }
.row-stat strong { display: block; margin-top: 4px; color: var(--ink); font-size: 13px; }
.employee-row .amount { min-width: 150px; color: var(--muted); font-size: 12px; }
.employee-row .amount strong { display: block; color: var(--ink); font: 600 14px "DM Mono", monospace; margin-top: 3px; }
.directory-aside { display: grid; gap: 15px; }
.team-card { padding: 22px; border-radius: 7px; color: white; background: #1b3836; box-shadow: 0 9px 21px rgba(16, 45, 43, .13); }
.team-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.team-card .eyebrow { color: #9ac4bd; font-size: 10px; }
.team-card h2 { margin: 8px 0 0; font-size: 19px; }
.team-card .mini-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; color: #c6eee7; background: rgba(210, 242, 236, .12); }
.team-card .mini-icon i { width: 18px; }
.team-total { padding: 22px 0 18px; margin-top: 18px; border-top: 1px solid rgba(214, 239, 233, .18); }
.team-total span { display: block; color: #b6cfca; font-size: 12px; }
.team-total strong { display: block; margin-top: 6px; font: 600 26px "DM Mono", monospace; }
.team-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 15px; border-top: 1px solid rgba(214, 239, 233, .18); }
.team-split > div { position: relative; padding-left: 11px; }
.team-split p { margin: 0; color: #b6cfca; font-size: 11px; }
.team-split strong { display: block; margin-top: 4px; font: 600 13px "DM Mono", monospace; }
.metric-dot { position: absolute; top: 4px; left: 0; width: 5px; height: 5px; border-radius: 50%; }
.metric-dot.amber { background: #f6bd6b; }.metric-dot.teal { background: #8fd8cc; }
.account-card { padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.account-card-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; border-bottom: 1px solid var(--line); }
.account-card-head h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; }.account-card-head h3 i { width: 16px; color: var(--teal); }
.account-card-head > span { color: var(--muted); font-size: 11px; }
.account-person { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 4px; border: 0; border-bottom: 1px solid #edf0ef; background: transparent; text-align: left; color: var(--ink); }
.account-person:last-child { border-bottom: 0; }.account-person:hover strong { color: var(--teal); }
.account-person strong, .account-person small { display: block; }.account-person strong { font-size: 12px; }.account-person small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.account-tail { display: grid; margin-left: auto; color: #9aa5a6; }.account-tail i { width: 15px; }
.empty { padding: 35px; color: var(--muted); text-align: center; }
.modal-backdrop { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(17, 31, 31, .48); }
.modal { width: min(100%, 600px); max-height: 90vh; overflow: auto; padding: 24px; background: white; border-radius: 7px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-head h3 { margin: 0; font-size: 19px; }
.close { display: grid; place-items: center; width: 28px; height: 28px; color: #6e797e; border: 0; border-radius: 4px; background: #f2f5f4; }
.close i { width: 17px; }
.attachment-preview { display: grid; grid-template-columns: 155px 1fr; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fafcfa; }
.attachment-image { width: 155px; max-height: 230px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: white; }
.receipt { aspect-ratio: .73; padding: 10px; border: 1px solid #d5d8cf; background: #fffef9; box-shadow: 2px 3px 6px rgba(0, 0, 0, .08); color: #4d5453; font-family: "DM Mono", monospace; font-size: 7px; transform: rotate(-2deg); }
.receipt-logo { text-align: center; font-size: 9px; font-weight: bold; margin: 9px 0 12px; }
.receipt-line { height: 3px; margin: 6px 0; background: #dce1db; }
.receipt-line.short { width: 60%; }
.receipt-total { margin-top: 13px; padding-top: 6px; border-top: 1px dashed #b8c0b7; font-size: 11px; font-weight: bold; text-align: right; }
.attachment-info strong { display: block; font-size: 14px; }
.attachment-info p { margin: 6px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.detail-list div { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.detail-list span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.detail-list strong { font-size: 13px; }
.bank-block { padding: 16px; border: 1px solid #cfe1df; border-radius: 6px; background: #f6fbfa; }
.bank-block .bank-icon { width: 31px; height: 31px; display: grid; place-items: center; float: right; color: var(--teal); background: var(--teal-pale); border-radius: 5px; }
.bank-block p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.bank-block strong { display: block; font: 600 16px "DM Mono", monospace; letter-spacing: 1px; }
.report-page { max-width: 1200px; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .6fr); gap: 20px; height: calc(100vh - 175px); align-items: stretch; }
.report-entry-layout { grid-template-columns: minmax(0, 1fr); }
.report-entry-layout .report-form-card { max-width: 1000px; }
.report-history-page { max-width: 1100px; }
.report-history-page .report-calendar-card { min-height: calc(100vh - 190px); display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); grid-template-rows: auto auto auto auto auto; align-content: start; }
.report-history-page .calendar-card-head { grid-column: 1; grid-row: 1; }
.report-history-page .report-calendar-nav { grid-column: 1; grid-row: 2; }
.report-history-page .report-calendar-weekdays { grid-column: 1; grid-row: 3; }
.report-history-page .report-calendar-grid { grid-column: 1; grid-row: 4; }
.report-history-page .report-calendar-actions { grid-column: 1; grid-row: 5; }
.report-history-page .report-calendar-results { grid-column: 2; grid-row: 1 / 6; height: 100%; border-left: 1px solid var(--line); }
.report-history-page .report-calendar-card { --calendar-width: 320px; display: block; position: relative; height: calc(100vh - 190px); max-height: calc(100vh - 190px); min-height: 0; }
.report-history-page .calendar-card-head, .report-history-page .report-calendar-nav, .report-history-page .report-calendar-weekdays, .report-history-page .report-calendar-grid, .report-history-page .report-calendar-actions { width: var(--calendar-width); }
.report-history-page .report-calendar-results { position: absolute; top: 0; right: 0; bottom: 0; left: var(--calendar-width); width: auto; height: auto; overflow-y: auto; }
.report-form-card { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.report-fields-grid { display: grid; gap: 12px; margin-top: 4px; }
.report-field { margin: 0; }
.report-field textarea { min-height: 86px; }
.report-attachment-field { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 12px 13px; border: 1px dashed #9db9b5; border-radius: 6px; color: var(--ink); background: #fbfdfc; cursor: pointer; }
.report-attachment-field:hover { border-color: var(--teal); background: #f5fbfa; }
.report-attachment-field input { display: none; }
.report-attachment-icon { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 5px; color: var(--teal); background: var(--teal-pale); }
.report-attachment-icon i { width: 16px; }
.report-attachment-field strong, .report-attachment-field small { display: block; }
.report-attachment-field strong { font-size: 12px; }
.report-attachment-field small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.report-attachment-field .choose-file { margin-left: auto; }
.report-form-head, .section-band-head, .report-person-group > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.report-form-head { margin-bottom: 3px; }
.report-form-head .section-helper { margin-bottom: 17px; }
.report-type-switch { display: inline-flex; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f6f8f7; }
.report-type-switch button { padding: 7px 13px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; }
.report-type-switch button.active { color: var(--teal-dark); background: white; box-shadow: 0 1px 3px rgba(20, 33, 35, .12); }
.report-date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.report-date-grid > :only-child { grid-column: 1 / -1; }
.report-date-grid .form-group { margin-top: 0; }
.report-history-card { position: sticky; top: 24px; display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
.report-history-card .table-toolbar { flex: 0 0 auto; }
.report-history-card .report-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.report-calendar-card { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.calendar-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 20px 14px; border-bottom: 1px solid var(--line); }
.calendar-card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.calendar-card-head h2 i { width: 18px; color: var(--teal); }
.calendar-card-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.report-calendar-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 19px 8px; }
.report-calendar-nav strong { font-size: 14px; }
.report-calendar-nav button, .report-calendar-actions button { display: grid; place-items: center; border: 0; background: transparent; color: var(--teal); }
.report-calendar-nav button { width: 28px; height: 28px; border-radius: 4px; }
.report-calendar-nav button:hover, .report-calendar-actions button:hover { background: var(--teal-pale); }
.report-calendar-nav button i { width: 17px; }
.report-calendar-weekdays, .report-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 0 15px; }
.report-calendar-weekdays { color: #7b878b; font-size: 11px; text-align: center; }
.report-calendar-weekdays span { padding: 4px 0; }
.report-calendar-grid { padding-top: 3px; padding-bottom: 8px; }
.report-calendar-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 28px; border: 1px solid transparent; border-radius: 5px; color: var(--ink); background: white; font-size: 12px; }
.report-calendar-day:hover { border-color: #9bc6c0; background: #f5fbfa; }
.report-calendar-day.outside { color: #b5bfc0; }
.report-calendar-day.submitted { color: var(--teal-dark); background: #e4f1ee; font-weight: 700; }
.report-calendar-day.submitted:hover { background: #d5ebe6; }
.report-calendar-day.selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.report-calendar-day i { position: absolute; right: 5px; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }
.report-calendar-actions { display: flex; justify-content: space-between; padding: 0 20px 10px; border-bottom: 1px solid var(--line); }
.report-calendar-actions button { padding: 5px 7px; border-radius: 4px; font-size: 11px; }
.report-calendar-results { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.calendar-results-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 19px 10px; }
.calendar-results-head strong { font-size: 13px; }
.calendar-results-head span { color: var(--muted); font-size: 11px; }
.report-calendar-results .report-list { border-top: 1px solid #edf1f0; }
.report-list { display: grid; }
.report-date-groups { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.report-date-group { border-top: 1px solid #e9eeee; background: white; }
.report-date-group:first-child { border-top: 0; }
.report-date-toggle { display: flex; align-items: center; width: 100%; min-height: 58px; gap: 9px; padding: 10px 14px 10px 19px; border: 0; border-left: 1px solid #b8d5c8; color: var(--ink); background: white; text-align: left; }
.report-date-group.weekly .report-date-toggle { border-left-color: #e3a557; }
.report-date-toggle:hover { background: #f8fbfa; }
.report-date-toggle strong { font-size: 13px; }
.report-group-meta { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.report-date-chevron { width: 16px; color: #829194; transition: transform .2s ease; }
.report-date-group.is-open .report-date-chevron { transform: rotate(180deg); }
.report-date-content { border-top: 1px solid #edf1f0; background: #fbfcfb; }
.report-date-content .report-list { overflow: visible; }
.report-date-content .report-item { border-top: 1px solid #edf1f0; }
.report-date-content .report-item:first-child { border-top: 0; }
.report-item { padding: 17px 19px; border-top: 1px solid #e9eeee; border-left: 1px solid #b8d5c8; background: white; }
.report-item.weekly { border-left-color: #e3a557; }
.report-item-head { display: flex; align-items: center; gap: 9px; }
.report-item-head strong { font-size: 13px; }
.report-item-head time { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.report-actions { display: inline-flex; align-items: center; gap: 3px; }
.report-edit, .report-delete { display: grid; place-items: center; width: 27px; height: 27px; margin-left: 3px; border: 0; border-radius: 4px; color: #8b999c; background: transparent; }
.report-edit:hover { color: var(--teal); background: var(--teal-pale); }
.report-edit i { width: 15px; }
.report-delete { display: grid; place-items: center; width: 27px; height: 27px; margin-left: 3px; border: 0; border-radius: 4px; color: #8b999c; background: transparent; }
.report-delete:hover { color: var(--red); background: var(--red-pale); }
.report-delete i { width: 15px; }
.report-item p { margin: 10px 0 0; color: #37454b; line-height: 1.75; white-space: normal; word-break: break-word; }
.report-content-blocks { display: grid; gap: 8px; margin-top: 11px; }
.report-content-block { padding: 8px 10px; border-left: 2px solid #b8dcd6; background: #f8fbfa; }
.report-item.weekly .report-content-block { border-left-color: #efc27f; }
.report-content-block strong { color: #607175; font-size: 11px; }
.report-content-block p { margin: 3px 0 0; color: #37454b; font-size: 12px; line-height: 1.65; }
.report-attachment-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-top: 2px; padding: 6px 8px; border: 1px solid #add1cc; border-radius: 4px; color: var(--teal); background: white; font-size: 11px; }
.report-attachment-link:hover { background: var(--teal-pale); }
.report-attachment-link i { width: 14px; }
.report-badge, .report-count { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; background: var(--teal-pale); color: var(--teal-dark); font-size: 11px; font-weight: 700; white-space: nowrap; }
.report-badge.weekly { color: var(--amber); background: var(--amber-pale); }
.report-updated { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
.expense-people-section { margin: 0 0 25px; padding: 21px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.section-band-head { margin-bottom: 16px; }
.section-band-head h2 { margin: 0; font-size: 16px; }
.section-band-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.section-band-head > span { padding: 4px 8px; border-radius: 4px; color: var(--teal-dark); background: var(--teal-pale); font-size: 12px; white-space: nowrap; }
.expense-people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.expense-person-card { padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.expense-person-card .person { margin-bottom: 15px; }
.expense-person-card .person strong, .expense-person-card .person span { display: block; }
.expense-person-total, .expense-person-pending { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; }
.expense-person-total { padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); }
.expense-person-pending { margin-top: 8px; color: var(--amber); }
.expense-person-total strong, .expense-person-pending strong { font: 600 14px "DM Mono", monospace; }
.report-admin-page { max-width: 1060px; }
.admin-reports-layout { display: grid; grid-template-columns: minmax(270px, .38fr) minmax(0, 1fr); gap: 20px; height: calc(100vh - 248px); min-height: 470px; }
.admin-report-directory, .admin-report-detail { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.admin-report-directory-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 11px; }
.admin-report-directory-head h2, .admin-report-detail-head h2 { margin: 0; font-size: 16px; }
.admin-report-directory-head p, .admin-report-detail-head .person span, .admin-report-detail-head > div > span { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.admin-report-directory-head > span { padding: 3px 7px; border-radius: 4px; color: var(--teal-dark); background: var(--teal-pale); font-size: 11px; white-space: nowrap; }
.report-people-search { position: relative; padding: 0 14px 13px; border-bottom: 1px solid var(--line); }
.report-people-search i { position: absolute; top: 8px; left: 23px; width: 15px; color: #788489; }
.report-people-search input { padding: 7px 8px 7px 30px; font-size: 12px; }
.admin-report-person-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.admin-report-person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 0; border-bottom: 1px solid #edf0ef; border-left: 3px solid transparent; background: white; color: var(--ink); text-align: left; }
.admin-report-person:hover { background: #f8fbfa; }
.admin-report-person.active { border-left-color: var(--teal); background: var(--teal-pale); }
.admin-report-person-name { min-width: 0; flex: 1; }
.admin-report-person-name strong, .admin-report-person-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-report-person-name strong { font-size: 13px; }
.admin-report-person-name small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-report-person-count { color: var(--muted); font: 10px/1.55 "DM Mono", monospace; text-align: right; white-space: nowrap; }
.admin-report-person > i { width: 15px; color: #9ca8aa; }
.admin-report-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.admin-report-detail-head .person h2, .admin-report-detail-head .person span { display: block; }
.report-filter { display: grid; gap: 4px; min-width: 118px; color: var(--muted); font-size: 11px; }
.report-filter select { padding: 6px 8px; font-size: 12px; }
.admin-report-detail-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a8c8c3 #f2f6f5; scrollbar-width: thin; }
.admin-report-detail-list .report-item { padding: 18px 20px; }
.report-admin-summary { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; padding: 16px 18px; border: 1px solid #cfe1df; border-radius: 7px; background: #f5fbfa; }
.report-admin-summary .mini-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: var(--teal-pale); }
.report-admin-summary .mini-icon i { width: 18px; }
.report-admin-summary div { min-width: 100px; padding-left: 18px; border-left: 1px solid #cfe1df; }
.report-admin-summary strong, .report-admin-summary span { display: block; }
.report-admin-summary strong { font: 600 18px "DM Mono", monospace; }
.report-admin-summary div span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.report-groups { display: grid; gap: 16px; }
.report-person-group { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.report-person-group > header { align-items: center; padding: 16px 19px; background: #f8faf9; }
.report-person-group .person strong, .report-person-group .person span { display: block; }
.report-person-group .report-list { border-top: 1px solid var(--line); }
#toast { position: fixed; z-index: 10; left: 50%; bottom: 26px; transform: translate(-50%, 20px); padding: 10px 14px; border-radius: 5px; color: white; background: #1c3030; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 780px) {
  .entry { grid-template-columns: 1fr; }.entry-panel { display: none; }.auth-wrap { min-height: 100vh; padding: 25px; }
  .shell { grid-template-columns: 1fr; }.sidebar { position: sticky; top: 0; height: auto; overflow: visible; padding: 13px 18px; min-height: auto; flex-direction: row; align-items: center; }.sidebar .workspace, .profile-mini { display: none; }.nav { margin-left: auto; display: flex; gap: 1px; }.nav-item { width: auto; padding: 8px; font-size: 0; }.nav-item i { width: 20px; }.page { padding: 24px 17px 42px; }.date { display: none; }
  .stats, .admin-summary { grid-template-columns: 1fr; }.form-grid, .report-date-grid, .report-layout, .admin-reports-layout { grid-template-columns: 1fr; gap: 0; }.attachment-preview { grid-template-columns: 100px 1fr; }.people-layout { grid-template-columns: 1fr; }.directory-head, .report-form-head, .section-band-head { align-items: flex-start; gap: 12px; flex-direction: column; }.people-search { width: 100%; }.row-stat { display: none; }.employee-row .amount { min-width: 94px; }.employee-row { gap: 8px; }.employee-row .action-btn { font-size: 0; width: 31px; height: 31px; padding: 0; }.employee-row .action-btn::after { content: "+"; font-size: 18px; }.upload-choice { gap: 8px; }.upload-option { padding: 13px; }.upload-option.selected { padding: 12px; }.choose-file { margin-left: 0; }.dropzone { align-items: flex-start; flex-wrap: wrap; }.detail-list { grid-template-columns: 1fr; gap: 12px; }.expense-people-grid { grid-template-columns: 1fr; }.report-admin-summary { gap: 10px; }.report-admin-summary div { min-width: 0; padding-left: 10px; }.report-person-group > header { align-items: flex-start; flex-direction: column; }.report-layout { height: auto; }.report-form-card { height: auto; overflow: visible; }.report-history-card, .report-calendar-card { position: static; height: auto; margin-top: 20px; overflow: visible; }.report-history-page .report-calendar-card { min-height: 0; max-height: none; display: flex; }.report-history-page .calendar-card-head, .report-history-page .report-calendar-nav, .report-history-page .report-calendar-weekdays, .report-history-page .report-calendar-grid, .report-history-page .report-calendar-actions { width: auto; }.report-history-page .report-calendar-results { position: static; border-left: 0; }.report-history-card .report-list, .report-calendar-results { overflow: visible; }.admin-reports-layout { height: auto; min-height: 0; gap: 15px; }.admin-report-directory { max-height: 280px; }.admin-report-detail { min-height: 360px; }.admin-report-detail-list { overflow: visible; }
}

/* Organic Ledger visual layer. Keeps the application markup and behavior intact. */
:root {
  --ink: #193530;
  --muted: #637a75;
  --line: #d4e6e0;
  --paper: #f4faff;
  --white: #ffffff;
  --teal: #2d7d6b;
  --teal-dark: #1d5d4f;
  --teal-pale: #e1f3ed;
  --amber: #a66a1b;
  --amber-pale: #fff3dd;
  --red: #b35050;
  --red-pale: #fbeaea;
  --shadow: 0 12px 32px rgba(34, 82, 70, .07);
}

body {
  background: var(--paper);
  font-family: "Public Sans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
}

.entry { grid-template-columns: minmax(360px, 1fr) minmax(420px, 1fr); background: var(--paper); }
.entry-panel {
  display: flex;
  min-height: 100vh;
  padding: 40px clamp(40px, 7vw, 110px);
  flex-direction: column;
  color: #effcf7;
  background: #205f52;
}
.entry-panel .brand { color: #fff; font-weight: 700; }
.entry-panel .brand-mark { color: #1d5d4f; background: #e4f5ee; }
.entry-copy { max-width: 520px; margin: auto 0; }
.entry-copy .eyebrow { color: #b6dfd4; font-family: "Public Sans", sans-serif; letter-spacing: .13em; }
.entry-copy h1, .page-title, .auth-card h2 { font-family: "Playfair Display", "Songti SC", "SimSun", serif; font-weight: 700; }
.entry-copy h1 { max-width: 490px; color: #fff; font-size: clamp(34px, 3.5vw, 52px); line-height: 1.2; }
.entry-copy p { max-width: 470px; color: #d0e6df; }
.entry-note { color: #b6d6ce; }
.auth-wrap { min-height: 100vh; background: #f8fcfa; }
.auth-card { width: min(100%, 430px); }
.auth-card h2 { color: var(--ink); font-size: 31px; }
.auth-sub { line-height: 1.65; }
.role-grid { gap: 8px; margin-bottom: 23px; }
.role-button { min-height: 104px; padding: 14px; border-radius: 8px; background: #fff; transition: border-color .2s, background .2s, box-shadow .2s; }
.role-button i { width: 21px; height: 21px; margin-bottom: 12px; }
.role-button.active { padding: 13px; border-color: var(--teal); background: #eff9f5; box-shadow: 0 4px 15px rgba(45, 125, 107, .10); }

input, textarea, select { border-color: #c9ddd7; border-radius: 8px; background: #fff; }
input:hover, textarea:hover, select:hover { border-color: #9fc7bb; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45, 125, 107, .12); }
.primary { border-radius: 8px; background: var(--teal); box-shadow: 0 5px 12px rgba(45, 125, 107, .16); }
.primary:hover { background: var(--teal-dark); }
.action-btn, .filter, .choose-file { border-radius: 7px; }
.text-action { font-weight: 600; }

.shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { padding: 25px 16px 18px; color: #cfe4dd; background: #205f52; box-shadow: 3px 0 16px rgba(18, 58, 48, .06); }
.sidebar .brand { padding: 0 11px; font-size: 18px; }
.sidebar .brand-mark { color: #1f6254; background: #e7f7f0; }
.workspace { margin-top: 43px; color: #a7cfc3; font-family: "Public Sans", sans-serif; letter-spacing: .12em; }
.nav { gap: 5px; }
.nav-item { min-height: 43px; border-radius: 8px; color: #c9dfd8; transition: background .18s, color .18s; }
.nav-item.active, .nav-item:hover { color: #fff; background: rgba(233, 255, 246, .16); }
.nav-item.active { box-shadow: inset 3px 0 0 #a7dfcc; }
.profile-mini { border-top-color: rgba(218, 244, 235, .2); }
.avatar { color: #1d5d4f; background: #d9f1e9; }
.profile-mini span { color: #b5d3ca; }
.logout { color: #d1e6df; border-radius: 6px; }
.logout:hover { color: #fff; background: rgba(255,255,255,.12); }
.page { padding: 38px clamp(26px, 4.5vw, 72px) 56px; }
.page > div { max-width: 1240px; }
.topbar { margin-bottom: 30px; }
.page-title { color: #173a32; font-size: 31px; }
.page-lead { max-width: 640px; line-height: 1.7; }
.date { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: #55766e; background: rgba(255,255,255,.78); font-family: "Public Sans", sans-serif; }
.content-width { max-width: 1040px; }

.section-card, .stat, .admin-stat, .expense-people-section, .report-admin-summary, .account-card, .employee-panel, .directory-aside > *, .admin-report-directory, .admin-report-detail {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(39, 99, 84, .035);
}
.section-card { padding: 27px; background: rgba(255,255,255,.96); }
.section-title { color: #1d4e42; font-size: 17px; }
.section-helper { line-height: 1.6; }
.upload-option { min-height: 124px; border-radius: 8px; background: #fcfffe; }
.upload-option.selected { border-color: var(--teal); background: #eff9f5; }
.dropzone { min-height: 104px; border-color: #9fcbbb; border-radius: 8px; background: #f8fdfb; }
.dropzone .drop-icon { border-radius: 8px; color: var(--teal); background: #e3f4ed; }
.expense-file { border-color: #d6e9e2; border-radius: 7px; background: #f8fcfa; }
.expense-file-remove, .expense-delete, .report-edit, .report-delete { border-radius: 7px; }
.form-grid { gap: 20px; }
.form-foot { padding-top: 2px; }

.stats, .admin-summary { gap: 16px; }
.stat, .admin-stat { position: relative; overflow: hidden; padding: 20px; background: #fff; }
.stat::before, .admin-stat::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: #b8d5c8; }
.stat:nth-child(2)::before, .admin-stat:nth-child(2)::before { background: #e6bb72; }
.stat:nth-child(3)::before, .admin-stat:nth-child(3)::before { background: #9cbdd7; }
.stat strong, .admin-stat strong, .team-total strong, .team-split strong, .report-admin-summary strong { font-family: "Playfair Display", "Songti SC", serif; letter-spacing: 0; }
.stat strong { font-size: 27px; color: #1d5043; }
.admin-stat { min-height: 122px; }
.admin-stat strong { font-size: 27px; color: #1d5043; }
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { padding: 20px 22px; background: #fbfefd; }
.table-toolbar h3 { font-family: "Playfair Display", "Songti SC", serif; color: #204d42; font-size: 19px; }
th { padding: 13px 15px; color: #5b746e; background: #edf8f4; font-weight: 600; }
td { padding: 15px; border-top-color: #e4efeb; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbfefd; }
.status { border-radius: 999px; padding: 5px 9px; font-weight: 600; }
.status.pending { color: #a06a22; background: #fff4df; }
.status.done { color: #217661; background: #e1f3eb; }
.status.rejected { color: #a94747; background: #fceaea; }
.file-link { color: #217661; }
.action-btn { border-color: #9dc9bc; color: #216c5b; font-weight: 600; }
.action-btn:hover { background: #e8f6f0; }
.reject-action { color: #a94747; border-color: #e2b1b1; }

.expense-people-section { padding: 22px; background: #f9fefd; }
.section-band-head { display: flex; align-items: start; justify-content: space-between; }
.section-band-head h2 { font-family: "Playfair Display", "Songti SC", serif; color: #204d42; font-size: 20px; }
.expense-person-card { border-color: #d6e9e2; border-radius: 8px; background: #fff; }
.expense-person-card:hover { border-color: #9dcabc; }
.expense-person-total { border-top-color: #e5efeb; }

.report-form-card { background: #fff; }
.report-type-switch { border-radius: 8px; background: #edf7f3; }
.report-type-switch button { border-radius: 6px; }
.report-type-switch button.active { color: #1b6555; box-shadow: 0 2px 6px rgba(29, 93, 79, .12); }
.report-field { padding: 13px; border: 1px solid #dbece6; border-radius: 8px; background: #fbfefd; }
.report-field textarea { min-height: 130px; border-color: transparent; background: transparent; }
.report-field textarea:focus { border-color: #a4d0c2; background: #fff; }
.report-attachment-field { border-radius: 8px; background: #f8fdfb; }
.report-calendar-card, .report-history-card { border-radius: 8px; }
.calendar-card-head, .admin-report-detail-head { background: #f5fbf8; }
.report-calendar-day { border-radius: 7px; }
.report-calendar-day.submitted { color: #1f6b5a; background: #dff1e9; }
.report-calendar-day.selected { border-color: #2d7d6b; box-shadow: inset 0 0 0 1px #2d7d6b; }
.report-date-toggle, .report-item { border-left-color: #7bb8a7; }
.report-date-group.weekly .report-date-toggle, .report-item.weekly { border-left-color: #dfad5b; }
.report-content-block { border-left-color: #a5d1c4; background: #f6fbf9; }
.report-badge { border-radius: 999px; }
.report-admin-summary { background: #edf9f4; border-color: #cae5da; }
.admin-report-person.active { border-left-color: #2d7d6b; background: #e5f5ee; }
.admin-report-person:hover { background: #f5fbf8; }

.modal-backdrop { background: rgba(18, 55, 46, .42); }
.modal { border-radius: 8px; box-shadow: 0 20px 60px rgba(15, 54, 45, .22); }
.close { border-radius: 7px; background: #eef7f3; }
#toast { border-radius: 8px; background: #1d574b; }

/* Submission history: reserve a real grid column for the calendar. */
.report-history-page .report-calendar-card {
  display: grid;
  grid-template-columns: minmax(350px, 370px) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto 1fr;
  align-content: stretch;
  height: calc(100vh - 190px);
  max-height: calc(100vh - 190px);
  min-height: 520px;
  position: static;
}
.report-history-page .calendar-card-head,
.report-history-page .report-calendar-nav,
.report-history-page .report-calendar-weekdays,
.report-history-page .report-calendar-grid,
.report-history-page .report-calendar-actions {
  width: auto;
  grid-column: 1;
}
.report-history-page .calendar-card-head { grid-row: 1; }
.report-history-page .report-calendar-nav { grid-row: 2; }
.report-history-page .report-calendar-weekdays { grid-row: 3; }
.report-history-page .report-calendar-grid { grid-row: 4; }
.report-history-page .report-calendar-actions { grid-row: 5; }
.report-history-page .report-calendar-results {
  position: static;
  grid-column: 2;
  grid-row: 1 / 6;
  width: auto;
  height: auto;
  min-width: 0;
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

@media (max-width: 780px) {
  .entry { grid-template-columns: 1fr; }
  .entry-panel { display: none; }
  .auth-wrap { padding: 28px 22px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { padding: 13px 17px; }
  .page { padding: 25px 17px 45px; }
  .page-title { font-size: 28px; }
  .section-card { padding: 20px; }
  .section-band-head { flex-direction: column; }
  .report-history-page .report-calendar-card { display: flex; height: auto; max-height: none; min-height: 0; }
  .report-history-page .report-calendar-results { border-left: 0; }
}

/* Ledger Studio: operational visual layer for the real application. */
:root {
  --ink: #17332e;
  --muted: #52645f;
  --line: #dce6e1;
  --paper: #f3f6f4;
  --white: #ffffff;
  --teal: #15836e;
  --teal-dark: #0f6656;
  --teal-pale: #e1f2eb;
  --amber: #835008;
  --amber-pale: #fff1d3;
  --red: #b44e43;
  --red-pale: #fde8e5;
  --shadow: 0 13px 30px rgba(27, 61, 53, .08);
}

body { background: var(--paper); }
.entry, .auth-wrap { background: #f3f6f4; }
.auth-card { width: min(100%, 440px); }
.auth-card h2 { color: var(--ink); font-size: 28px; }
.brand-mark { border-radius: 7px; background: var(--teal); }
.role-button, .section-card, .stat, .admin-stat, .panel, .team-card, .account-card, .expense-people-section, .report-person-group { border-radius: 8px; }
.role-button { border-color: var(--line); background: var(--white); }
.role-button.active { border-color: var(--teal); background: #f1faf6; }
input, textarea, select { border-color: #cbd9d3; border-radius: 6px; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21, 131, 110, .14); }
.primary { border-radius: 6px; background: var(--teal); }
.primary:hover { background: var(--teal-dark); }

.shell { grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { padding: 24px 15px 17px; background: #17332e; }
.sidebar .brand { padding: 3px 10px; }
.sidebar .brand-mark { color: #0d4d40; background: #b8e8d6; }
.workspace { margin-top: 32px; padding-bottom: 11px; color: #8eaaa1; }
.nav { gap: 3px; }
.nav-item { padding: 10px; border-radius: 6px; color: #b8cec6; font-weight: 600; }
.nav-item.active, .nav-item:hover { background: #295146; color: #fff; }
.nav-item.active i { color: #b8e8d6; }
.profile-mini { padding-top: 15px; border-color: rgba(204, 232, 221, .16); }
.avatar { color: #125b4c; background: #c6eddf; }
.page { padding-top: 29px; }
.page-title { font-size: 28px; letter-spacing: 0; }
.page-lead { color: var(--muted); }
.date { color: #667b74; }

.section-card, .stat, .admin-stat, .expense-people-section, .account-card, .report-person-group, .admin-report-directory, .admin-report-detail { border-color: var(--line); box-shadow: none; }
.section-card { padding: 24px; }
.stats, .admin-summary { gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.stat, .admin-stat { min-height: 114px; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.stat:first-child, .admin-stat:first-child { border-left: 0; }
.stat-label, .admin-stat span { color: var(--muted); }
.stat strong, .admin-stat strong { font-variant-numeric: tabular-nums; }
.table-card { border-radius: 8px; }
.table-toolbar { padding: 17px 19px; }
th { color: #62736d; background: #f7faf8; font-size: 11px; font-weight: 700; }
td { border-color: #edf1ef; }
tbody tr:hover { background: #f7fbf9; }
.status { border-radius: 999px; font-weight: 700; }
.file-link { color: var(--teal-dark); }
.action-btn { border-color: #a8cebf; border-radius: 6px; color: var(--teal-dark); }
.action-btn:hover { background: var(--teal-pale); }
.search input, .people-search input, .report-people-search input { border-color: var(--line); }

.upload-option, .dropzone, .expense-file { border-radius: 7px; }
.upload-option.selected { background: #f1faf6; }
.dropzone { background: #fbfdfc; border-color: #9fcbbd; }
.dropzone .drop-icon, .report-attachment-icon { background: var(--teal-pale); color: var(--teal-dark); }
.choose-file { border-color: #a8cebf; border-radius: 6px; color: var(--teal-dark); }
.form-foot { gap: 13px; }
.form-foot .primary { width: auto; min-width: 126px; padding: 0 16px; }

.expense-people-section { padding: 20px; }
.expense-person-card { border-color: var(--line); border-radius: 7px; background: #fbfdfc; }
.team-card { background: #17332e; box-shadow: var(--shadow); }
.team-card .eyebrow { color: #b8e8d6; }
.report-admin-summary { border-color: #c7e0d6; border-radius: 8px; background: var(--teal-pale); }
.report-admin-summary .mini-icon { color: var(--teal-dark); background: #ccebdd; }
.admin-report-person.active { border-left-color: var(--teal); background: #eef8f4; }
.admin-report-detail-head { background: #f8fbf9; }
.report-item { border-left-width: 2px; }
.report-content-block { border-left-color: #92cbbb; background: #f6faf8; }

.modal-backdrop { background: rgba(16, 49, 42, .52); }
.modal { border-radius: 8px; box-shadow: 0 22px 55px rgba(15, 54, 45, .22); }
.close { border-radius: 6px; background: #eff7f3; }
#toast { border-radius: 7px; background: #17332e; }

@media (max-width: 780px) {
  .sidebar { padding: 12px 16px; }
  .stats, .admin-summary { display: grid; border: 0; background: transparent; overflow: visible; }
  .stat, .admin-stat { min-height: 0; border: 1px solid var(--line); border-radius: 8px; }
  .page-title { font-size: 25px; }
  .section-card { padding: 20px; }
}

/* Sage Ledger visual world: reference-pinned calm surfaces for the live product. */
:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #f7f8f6;
  --white: #ffffff;
  --teal: #657f58;
  --teal-dark: #4f6845;
  --teal-pale: #edf3e9;
  --amber: #c26116;
  --amber-pale: #fff3e7;
  --red: #c2413b;
  --red-pale: #fdf0ef;
  --shadow: 0 1px 3px rgba(31, 41, 55, .04);
}

body { color: var(--ink); background: var(--paper); font-family: "Public Sans", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
body::selection { color: #fff; background: #758b6d; }
.entry, .auth-wrap { background: var(--paper); }
.entry-panel { display: block; padding: 46px clamp(34px, 6vw, 96px); color: #465746; background: #eef1e9; }
.entry-panel .brand { color: #465746; }
.entry-panel .brand-mark { color: #f7f8f3; background: #71866a; }
.entry-copy { margin: 105px 0; }
.entry-copy h1 { color: #4a5947; font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-size: 42px; font-weight: 600; }
.entry-note { color: #7c8a79; }
.auth-card { padding: 31px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.auth-card h2 { font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-weight: 600; }
.role-grid { gap: 10px; }
.role-button { min-height: 121px; border-radius: 8px; background: #f8faf7; }
.role-button.active { border-color: #94aa8c; background: #edf2e8; }

.shell { grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { padding: 22px 14px 16px; color: #596657; background: #f2f4ef; border-right: 1px solid var(--line); }
.sidebar .brand { color: #4d5e4b; }
.sidebar .brand-mark { color: #f7f8f3; background: #748a6d; }
.workspace { margin-top: 40px; color: #8a9787; font-family: "Public Sans", sans-serif; font-weight: 700; letter-spacing: 1px; }
.nav { gap: 5px; }
.nav-item { padding: 11px 10px; border-radius: 6px; color: #667164; font-weight: 500; }
.nav-item:hover { color: #52604f; background: rgba(31, 41, 55, .035); }
.nav-item.active { color: #4f6845; background: rgba(101, 127, 88, .14); font-weight: 600; }
.nav-item.active i { color: #5f7953; }
.profile-mini { border-color: #d5dfd0; }
.profile-mini strong { color: #596657; }
.profile-mini span { color: #8a9388; }
.avatar { color: #5d7457; background: #d8e8d6; }
.logout { color: #72846e; }
.logout:hover { color: #52664f; background: #dce6d7; border-radius: 7px; }

.page { padding: 32px clamp(24px, 4vw, 64px) 52px; }
.topbar { margin-bottom: 24px; }
.page-title { color: var(--ink); font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-size: 24px; font-weight: 600; }
.page-lead { margin-top: 6px; color: var(--muted); }
.date { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--white); }
.section-card, .stat, .admin-stat, .expense-people-section, .account-card, .report-person-group, .admin-report-directory, .admin-report-detail { border-color: var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.section-card { padding: 24px; }
.section-title, .section-band-head h2, .table-toolbar h3 { color: #344332; font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-weight: 600; }
.section-title, .section-band-head h2, .table-toolbar h3 { font-size: 18px; }
.section-helper, .muted { color: var(--muted); }
.stats, .admin-summary { gap: 12px; border: 0; background: transparent; overflow: visible; }
.stat, .admin-stat { min-height: 112px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; }
.stat::before, .admin-stat::before { display: none; }
.stat strong, .admin-stat strong { color: var(--ink); font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-stat:nth-child(3) { border-color: #fed7aa; background: #fffaf5; }
.admin-stat:nth-child(3) .mini-icon { color: var(--amber); background: var(--amber-pale); }
.table-card { border-radius: 8px; }
.table-toolbar { padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--white); }
th { padding: 12px 16px; color: var(--muted); background: #f9fafb; font-size: 12px; font-weight: 500; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-top-color: #f0f2f0; color: var(--ink); }
tbody tr:hover { background: #f9fafb; }
.table-card table th:nth-last-child(4), td.money { text-align: right; }
.money { color: #243024; font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.status { border-radius: 6px; padding: 3px 9px; font-weight: 600; }
.status.pending { color: #c0560b; background: #fff1e5; }
.status.done { color: #2f7a43; background: #eaf6ed; }
.status.rejected { color: #b8322c; background: #fdeceb; }
.primary { min-height: 40px; border-radius: 6px; background: var(--teal); font-weight: 600; box-shadow: none; }
.primary:hover { background: var(--teal-dark); }
.action-btn, .choose-file { border-color: #cdd5ca; border-radius: 6px; color: #536a49; background: var(--white); font-weight: 500; }
.action-btn:hover, .choose-file:hover { border-color: #aebda8; background: #f3f7f1; }
.search input, .people-search input, .report-people-search input { border-radius: 6px; background: var(--white); }

.upload-option { border-radius: 8px; background: #fbfcfa; }
.upload-option.selected { background: #f1f6ee; }
.dropzone { border-color: #cbd5c7; border-radius: 8px; background: #fbfcfb; }
.dropzone .drop-icon, .report-attachment-icon { border-radius: 6px; color: #5d7453; background: #edf3e9; }
.expense-file, .report-field { border-radius: 6px; background: #f9faf9; }
.report-type-switch { border-radius: 6px; background: #f1f3f0; }
.report-type-switch button { border-radius: 5px; }
.report-type-switch button.active { color: #5e7557; box-shadow: 0 2px 7px rgba(89, 112, 84, .14); }
.report-calendar-card, .report-history-card { border-radius: 8px; }
.calendar-card-head, .admin-report-detail-head { background: #f3f6ef; }
.report-calendar-day { border-radius: 9px; }
.report-calendar-day.submitted { color: #607858; background: #e3efe0; }
.report-calendar-day.selected { border-color: #758b6d; box-shadow: inset 0 0 0 1px #758b6d; }
.report-content-block { border-left-color: #b7cbb0; background: #f7faf4; }
.report-admin-summary { border-color: #d8e5d3; border-radius: 8px; background: #f3f7f1; }
.admin-report-person.active { border-left-color: #8da583; background: #ebf2e7; }
.team-card { color: #4d5f4a; background: #e6eee2; box-shadow: none; }
.team-card .eyebrow, .team-card .team-total span, .team-card .team-split p { color: #71816d; }
.team-card .mini-icon { color: #62795a; background: #f8fbf5; }
.modal-backdrop { background: rgba(77, 94, 73, .38); }
.modal { border-radius: 8px; box-shadow: 0 18px 42px rgba(31, 41, 55, .16); }
.close { border-radius: 6px; color: #60715d; background: #f0f3ef; }
#toast { border-radius: 6px; background: #44563f; }

.expense-people-section { padding: 20px 24px; }
.section-band-head { margin-bottom: 14px; }
.section-band-head > span { border-radius: 6px; color: var(--muted); background: #f1f3f1; }
.expense-person-card { border-color: var(--line); border-radius: 6px; background: var(--white); transition: background .15s, border-color .15s; }
.expense-person-card:hover { border-color: #d4ddd0; background: #f8faf7; }
.expense-person-total, .expense-person-pending { text-align: right; }
.expense-person-total strong, .expense-person-pending strong { font-family: "Public Sans", "Microsoft YaHei", sans-serif; font-variant-numeric: tabular-nums; }
.expense-person-pending { color: var(--amber); }

.file-link { color: var(--muted); font-family: "Public Sans", "Microsoft YaHei", sans-serif; }
.file-link:hover { color: var(--teal-dark); }
.file-link small { color: #5e6d5a; background: #eef2ec; }
.expense-type { border-radius: 6px; font-weight: 600; }
.expense-type.invoice { color: #45643d; background: #edf5e9; }
.expense-type.image { color: #8a5a25; background: #fff3e2; }
.expense-delete { color: #9aa1a8; }
.expense-delete:hover { color: var(--red); background: var(--red-pale); }
.table-muted { color: #8b949e; }
.expense-type-filter { color: var(--muted); }
.expense-type-filter select { border-color: var(--line); border-radius: 6px; color: var(--ink); background: var(--white); }
.expense-user-filter { color: var(--muted); }
.expense-user-filter select { border-color: var(--line); border-radius: 6px; color: var(--ink); background: var(--white); }
.expense-pending-total { color: var(--amber); }

@media (max-width: 780px) {
  .entry-panel { display: none; }
  .sidebar { padding: 13px 17px; background: #eff1e9; }
  .nav-item.active, .nav-item:hover { background: #dce6d7; }
  .page { padding: 26px 17px 45px; }
  .page-title { font-size: 26px; }
  .date { display: none; }
  .stat, .admin-stat { border-radius: 11px; }
}

/* Responsive system: content-driven widths, touch-safe controls, and no accidental horizontal overflow. */
html { min-width: 320px; }
img, svg, video { max-width: 100%; }
.page, .content-width, .people-page, .report-page, .report-history-page, .report-admin-page { min-width: 0; width: 100%; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 640px; }
.modal-backdrop { padding: 20px; overflow-y: auto; }
.modal { width: min(100%, 760px); max-height: min(90vh, 760px); overflow-y: auto; }

@media (min-width: 781px) and (max-width: 1120px) {
  .shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .nav-item { gap: 9px; font-size: 13px; }
  .page { padding-left: 28px; padding-right: 28px; }
  .content-width, .report-page, .report-history-page, .report-admin-page { max-width: 100%; }
  .people-layout, .report-layout, .admin-reports-layout { grid-template-columns: 1fr; height: auto; }
  .report-history-card, .report-calendar-card { position: static; height: auto; margin-top: 20px; }
  .report-form-card { height: auto; }
  .form-grid { grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr); }
  .report-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-report-directory { max-height: 360px; }
  .admin-report-detail { min-height: 430px; }
}

@media (max-width: 780px) {
  body { overflow-x: hidden; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .entry, .auth-wrap { min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .auth-wrap { padding: max(25px, env(safe-area-inset-top)) 22px max(35px, env(safe-area-inset-bottom)); }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; min-height: 62px; overflow-x: auto; overflow-y: hidden; padding: 10px 16px; flex-direction: row; align-items: center; gap: 12px; }
  .sidebar .workspace, .sidebar .profile-mini { display: none; }
  .sidebar .brand { flex: 0 0 auto; white-space: nowrap; }
  .nav { display: flex; flex: 1 0 auto; align-items: center; gap: 3px; margin: 0; }
  .nav-item { width: 44px; min-width: 44px; min-height: 44px; justify-content: center; padding: 10px; border-radius: 8px; font-size: 0; }
  .nav-item span { display: none; }
  .nav-item i { width: 20px; height: 20px; }
  .page { min-height: calc(100vh - 62px); padding: 28px 17px max(48px, env(safe-area-inset-bottom)); overflow-x: hidden; }
  .topbar { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 25px; }
  .page-title { max-width: 100%; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
  .page-lead { max-width: 100%; font-size: 13px; }
  .date { display: none; }
  .section-card { max-width: 100%; padding: 19px; border-radius: 8px; }
  .section-title { font-size: 16px; }
  .stats, .admin-summary { display: grid; grid-template-columns: 1fr; gap: 9px; margin-bottom: 20px; border: 0; background: transparent; overflow: visible; }
  .stat, .admin-stat { min-height: 82px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
  .stat strong, .admin-stat strong { margin-top: 7px; font-size: 21px; }
  .stat-label, .admin-stat span { font-size: 11px; }
  .form-grid, .report-date-grid, .report-layout, .admin-reports-layout, .people-layout { grid-template-columns: 1fr; gap: 0; }
  .form-grid { margin-top: 16px; }
  .upload-choice { grid-template-columns: 1fr; gap: 9px; }
  .upload-option { min-height: 96px; }
  .dropzone { min-height: 112px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .dropzone-copy { flex: 1 1 calc(100% - 54px); }
  .choose-file { min-height: 42px; margin-left: 0; }
  .form-foot { align-items: stretch; flex-direction: column; }
  .form-foot .primary { width: 100%; min-height: 44px; }
  .table-card { max-width: 100%; border-radius: 8px; }
  .table-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 16px; }
  .expense-table-controls { width: 100%; flex-wrap: wrap; margin-left: 0; }
  .expense-type-filter { flex: 1 1 132px; }
  .expense-type-filter select { min-height: 42px; flex: 1; }
  .expense-user-filter { flex: 1 1 132px; }
  .expense-user-filter select { min-height: 42px; flex: 1; min-width: 0; }
  .expense-pending-total { flex: 1 0 100%; }
  .table-toolbar .search { flex: 1 1 180px; width: auto; }
  .table-toolbar .search input { min-height: 42px; }
  .table-wrap table { min-width: 640px; }
  th, td { padding: 11px 10px; }
  .action-btn, .choose-file, .primary { min-height: 44px; }
  .employee-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 70px; padding: 12px; }
  .employee-row .row-stat { display: none; }
  .employee-row .amount { min-width: 0; text-align: right; }
  .employee-row .action-btn { grid-column: 2; width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 0; }
  .employee-row .action-btn::after { content: "+"; font-size: 19px; }
  .expense-people-section { padding: 16px; }
  .expense-people-grid { grid-template-columns: 1fr; }
  .report-form-head, .section-band-head, .directory-head, .admin-report-detail-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .report-type-switch { align-self: flex-start; }
  .report-fields-grid { grid-template-columns: 1fr; gap: 9px; }
  .report-field textarea { min-height: 115px; }
  .report-attachment-field { align-items: flex-start; flex-wrap: wrap; padding: 12px; }
  .report-attachment-field > span:nth-child(2) { min-width: 0; flex: 1 1 calc(100% - 50px); }
  .report-attachment-field .choose-file { width: auto; margin-left: 0; }
  .report-history-card, .report-calendar-card { position: static; height: auto; max-height: none; margin-top: 18px; overflow: visible; }
  .report-history-page .report-calendar-card { min-height: 0; display: flex; }
  .report-history-page .report-calendar-results { position: static; border-left: 0; }
  .report-calendar-grid { gap: 3px; }
  .report-calendar-day { min-height: 38px; }
  .report-calendar-nav button, .report-calendar-actions button { min-width: 44px; min-height: 44px; }
  .admin-reports-layout { gap: 15px; }
  .admin-report-directory { max-height: 310px; }
  .admin-report-detail { min-height: 340px; }
  .admin-report-detail-list { overflow: visible; }
  .modal-backdrop { align-items: flex-end; padding: 10px; }
  .modal { max-height: 88vh; border-radius: 8px; }
}

@media (max-width: 480px) {
  .auth-wrap { padding-left: 16px; padding-right: 16px; }
  .auth-card { width: 100%; padding: 24px; }
  .role-grid { grid-template-columns: 1fr; }
  .role-button { min-height: 92px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .sidebar .brand { font-size: 13px; }
  .nav { gap: 1px; }
  .page { padding-left: 13px; padding-right: 13px; }
  .section-card { padding: 16px; }
  .page-title { font-size: 30px; }
  .stat, .admin-stat { min-height: 76px; }
  .dropzone-copy strong, .dropzone-copy span { white-space: normal; overflow-wrap: anywhere; }
  .employee-row .person strong, .employee-row .person span { overflow-wrap: anywhere; }
  .report-item { padding: 14px; }
  .report-item-head { align-items: flex-start; flex-wrap: wrap; }
  .report-item-head time { width: 100%; margin-left: 0; }
}

@media (pointer: coarse) {
  button, a, input, select, textarea, label { touch-action: manipulation; }
  .nav-item, .report-delete, .report-edit, .expense-delete, .close { min-width: 44px; min-height: 44px; }
}

/* Wide-screen correction: use the available canvas instead of leaving a large dead column. */
@media (min-width: 1121px) {
  .content-width, .people-page, .report-page, .report-history-page, .report-admin-page { max-width: none; }
  .report-layout, .people-layout, .admin-reports-layout { width: 100%; }
  .report-entry-layout { height: auto; }
  .report-entry-layout .report-form-card { max-width: none; height: auto; overflow: visible; }
  .report-form-card { overscroll-behavior: auto; }
}

@media (min-width: 1600px) {
  .page { padding-left: clamp(34px, 4vw, 84px); padding-right: clamp(34px, 4vw, 84px); }
  .section-card { padding-left: clamp(25px, 2vw, 36px); padding-right: clamp(25px, 2vw, 36px); }
}

.report-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
  padding: 17px 20px;
  border: 1px solid #cbe5db;
  border-radius: 8px;
  background: #f6fcf9;
}
.report-export-copy { display: flex; min-width: 0; align-items: center; gap: 11px; }
.report-export-copy .mini-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--teal); background: var(--teal-pale); }
.report-export-copy .mini-icon i { width: 18px; height: 18px; }
.report-export-copy h2 { margin: 0; color: #204d42; font-size: 15px; }
.report-export-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.report-export-actions { display: flex; align-items: end; justify-content: flex-end; gap: 9px; }
.report-export-actions label { display: grid; min-width: 138px; gap: 5px; color: #55766e; font-size: 11px; font-weight: 600; }
.report-export-actions input { min-height: 38px; padding: 7px 9px; font-size: 12px; }
.report-export-actions .primary { display: inline-flex; width: auto; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; white-space: nowrap; }
.report-export-actions .primary i { width: 16px; height: 16px; }
.report-export-actions .primary:disabled { cursor: wait; opacity: .72; }
.square-export-actions { flex-wrap: wrap; }
.report-export-actions .primary.secondary { border: 1px solid #8ca187; color: #506b4c; background: #edf4e9; box-shadow: none; }
.report-export-actions .primary.secondary:hover { border-color: #70876b; color: #405b3d; background: #e2ecdc; }
.square-export-hint { margin-top: 0; margin-bottom: 14px; }

@media (max-width: 1120px) and (min-width: 781px) {
  .report-export-bar { align-items: flex-start; flex-direction: column; }
  .report-export-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 780px) {
  .report-export-bar { align-items: stretch; flex-direction: column; gap: 14px; padding: 15px; }
  .report-export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .report-export-actions label { min-width: 0; }
  .report-export-actions .primary { grid-column: 1 / -1; width: 100%; min-height: 44px; }
}

/* Team report square: a date-led reading surface for the whole team. */
.report-square-page { width: 100%; max-width: none; }
.square-date-rail { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px; border: 1px solid #d8e4d3; border-radius: 12px; background: #fffefa; }
.square-date-nav { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #d5e0d0; border-radius: 9px; color: #5e7557; background: #f5f8f2; }
.square-date-nav:hover { background: #e7eee2; }
.square-date-nav:focus-visible, .square-date:focus-visible { outline: 3px solid rgba(117, 139, 109, .3); outline-offset: 2px; }
.square-date-scroll { display: flex; gap: 8px; min-width: 0; padding: 2px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-color: #bdcdb7 transparent; scrollbar-width: thin; }
.square-date { position: relative; display: grid; width: 68px; min-width: 68px; min-height: 64px; place-items: center; align-content: center; gap: 1px; padding: 7px 5px; border: 1px solid transparent; border-radius: 9px; color: #667865; background: #f6f8f2; scroll-snap-align: center; }
.square-date:hover { border-color: #bdcdb7; background: #eef3ea; }
.square-date span, .square-date small { font-size: 10px; line-height: 1.2; }
.square-date strong { color: #4e604c; font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.square-date.has-reports::after { position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: #748a6d; content: ""; }
.square-date.selected { border-color: #758b6d; color: #fffefa; background: #758b6d; box-shadow: 0 5px 13px rgba(86, 107, 81, .18); }
.square-date.selected strong { color: #fffefa; }
.square-date.selected::after { background: #fffefa; }
.square-date-summary { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #6d7d6b; }
.square-date-summary > i { width: 17px; color: #718a68; }
.square-date-summary strong { color: #50614d; font-size: 14px; }
.square-date-summary small { color: #7a8978; font-size: 12px; }
.square-report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; min-height: calc(100vh - 280px); }
.square-report-panel { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #dfe6da; border-radius: 12px; background: #fffefa; }
.square-report-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #e5ebe1; background: #f7faf4; }
.square-report-panel > header > div { display: flex; align-items: center; gap: 9px; }
.square-panel-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; color: #637b5c; background: #e4ede0; }
.square-panel-icon i { width: 17px; height: 17px; }
.square-report-panel.weekly .square-panel-icon { color: #8b704a; background: #f7edda; }
.square-report-panel h2 { margin: 0; color: #50614d; font-size: 16px; font-weight: 600; }
.square-report-panel > header > span { color: #71816d; font-size: 12px; font-variant-numeric: tabular-nums; }
.square-report-list { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #bdcdb7 transparent; scrollbar-width: thin; }
.square-report-entry { padding: 16px 18px; border-top: 1px solid #edf1e9; }
.square-report-entry:first-child { border-top: 0; }
.square-report-entry > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.square-report-entry .person { display: flex; align-items: center; min-width: 0; gap: 8px; }
.square-report-entry .person strong, .square-report-entry .person span { display: block; }
.square-report-entry .person strong { color: #50614d; font-size: 13px; }
.square-report-entry .person span { margin-top: 2px; color: #81907d; font-size: 11px; }
.square-report-entry time { flex: 0 0 auto; color: #81907d; font-size: 11px; }
.square-report-entry .report-content-blocks { margin-top: 12px; }
.square-empty { display: grid; min-height: 230px; place-content: center; gap: 10px; color: #8a9787; text-align: center; }
.square-empty i { width: 25px; height: 25px; margin: auto; color: #a1b19b; }

@media (max-width: 780px) {
  .square-date-rail { grid-template-columns: 40px minmax(0, 1fr) 40px; margin-bottom: 12px; padding: 8px; }
  .square-date { width: 62px; min-width: 62px; min-height: 60px; }
  .square-report-grid { grid-template-columns: 1fr; min-height: 0; gap: 14px; }
  .square-report-panel { min-height: 360px; }
  .square-report-list { overflow: visible; }
  .square-date-summary { margin-bottom: 14px; }
}

/* Square date controls: selected date, today, quick calendar, and person filter. */
.square-date-rail { grid-template-columns: 42px minmax(0, 1fr) auto; }
.square-date-tools { display: flex; align-items: center; gap: 6px; }
.square-picker-anchor { position: relative; }
.square-picker-toggle { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #d5e0d0; border-radius: 9px; color: #697e63; background: #fffefa; }
.square-picker-toggle:hover { color: #51694a; background: #edf3e9; }
.square-picker-toggle i { width: 17px; height: 17px; }
.square-date.today { border-color: #d1a45e; color: #8b6b3d; background: #fbefd8; }
.square-date.today strong { color: #805f33; }
.square-date.today.has-reports::after { background: #a57a38; }
.square-date.selected.today { border: 2px solid #c7954b; color: #fffefa; background: #758b6d; }
.square-date.selected.today strong { color: #fffefa; }
.square-date.selected.today.has-reports::after { background: #fff4d9; }
.square-date-picker { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: 278px; padding: 14px; border: 1px solid #d6e2d1; border-radius: 12px; color: #465746; background: #fffefa; box-shadow: 0 14px 34px rgba(78, 96, 74, .18); }
.square-date-picker > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.square-date-picker > header strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.square-date-picker > header div { display: flex; gap: 3px; }
.square-date-picker > header button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 7px; color: #61785a; background: #f1f5ed; }
.square-date-picker > header button:hover { background: #e3ece0; }
.square-date-picker > header button i { width: 16px; height: 16px; }
.square-picker-weekdays, .square-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.square-picker-weekdays { margin-bottom: 4px; color: #82907f; font-size: 10px; text-align: center; }
.square-picker-weekdays span { padding: 4px 0; }
.square-picker-day { position: relative; display: grid; min-width: 0; min-height: 30px; place-items: center; border: 1px solid transparent; border-radius: 6px; color: #536451; background: transparent; font-size: 12px; font-variant-numeric: tabular-nums; }
.square-picker-day:hover { border-color: #bfceb9; background: #edf4e9; }
.square-picker-day.outside { color: #adb7aa; }
.square-picker-day.today { border-color: #d0a45e; color: #815f32; background: #fbefd8; }
.square-picker-day.selected { color: #fffefa; background: #758b6d; }
.square-picker-day.selected.today { border: 2px solid #c7954b; color: #fffefa; background: #758b6d; }
.square-picker-day.has-reports::after { position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; content: ""; }
.square-date-picker footer { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e7ece3; }
.square-date-picker footer button { border: 0; color: #5d7557; background: transparent; font-size: 12px; font-weight: 600; }
.square-date-picker footer button:hover { color: #435c3d; text-decoration: underline; text-underline-offset: 3px; }
.square-date-summary { min-width: 0; }
.square-user-filter { display: flex; align-items: center; gap: 7px; min-width: 0; margin-left: auto; color: #6c7d69; font-size: 12px; }
.square-user-filter select { min-width: 132px; min-height: 34px; padding: 6px 29px 6px 10px; border: 1px solid #d3dfce; border-radius: 8px; color: #50624d; background: #fffefa; font-size: 12px; }
.square-user-filter select:focus { border-color: #879f7e; outline: 3px solid rgba(117, 139, 109, .18); }

/* Compact date rail and a clear staff action in the page's top-right corner. */
.square-top-actions { display: grid; justify-items: end; gap: 8px; }
.square-top-actions .date { padding-top: 0; }
.square-submit-link { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 7px; font-size: 12px; }
.square-submit-link i { width: 15px; height: 15px; }
.square-date-rail { padding: 6px 8px; }
.square-date { min-height: 52px; padding: 5px 5px; }
.square-date strong { font-size: 15px; }
.square-date span, .square-date small { font-size: 9px; }
.square-date.has-reports::after, .square-picker-day.has-reports::after { display: none; }
.report-page-heading { display: flex; align-items: flex-start; gap: 13px; }
.report-back-link { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; margin-top: 2px; padding: 6px 8px; border: 1px solid #d5e1d0; border-radius: 7px; color: #5d7557; background: #f7faf5; font-size: 12px; }
.report-back-link:hover { color: #46623f; border-color: #a9bda3; background: #edf4e9; }
.report-back-link i { width: 16px; height: 16px; }
.square-content-grid { display: grid; grid-template-columns: minmax(196px, 230px) minmax(0, 1fr); gap: 18px; height: calc(100vh - 280px); min-height: 520px; }
.square-people-panel { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #dfe6da; border-radius: 12px; background: #fffefa; }
.square-people-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid #e5ebe1; background: #f7faf4; }
.square-people-panel > header h2 { margin: 0; color: #50614d; font-size: 15px; }
.square-people-panel > header p { margin: 3px 0 0; color: #82907f; font-size: 11px; }
.square-people-panel > header > span { color: #71816d; font-size: 11px; }
.square-people-list { min-height: 0; overflow-y: auto; padding: 7px; scrollbar-color: #bdcdb7 transparent; scrollbar-width: thin; }
.square-person { display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; padding: 9px 8px; border: 1px solid transparent; border-radius: 8px; color: #5b6d57; background: transparent; text-align: left; }
.square-person:hover { background: #f0f5ed; }
.square-person.selected { border-color: #c9dbc4; color: #42603e; background: #eaf2e7; }
.square-person .avatar { flex: 0 0 auto; }
.square-person > span:nth-child(2) { min-width: 0; flex: 1; }
.square-person strong, .square-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.square-person strong { font-size: 12px; }
.square-person small { margin-top: 3px; color: #84917f; font-size: 10px; }
.square-person > i { width: 15px; color: #7a9273; }
.square-report-stack { display: grid; grid-template-rows: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; min-height: 0; height: 100%; overflow: hidden; }
.square-report-stack .square-report-panel { min-height: 0; }
.square-weekly-file-entry { padding: 13px 18px; border-top: 1px solid #edf1e9; }
.square-weekly-file-entry:first-child { border-top: 0; }
.square-weekly-file-entry > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.square-weekly-file-entry .person { display: flex; min-width: 0; align-items: center; gap: 8px; }
.square-weekly-file-entry .person strong, .square-weekly-file-entry .person span { display: block; }
.square-weekly-file-entry .person strong { color: #50614d; font-size: 12px; }
.square-weekly-file-entry .person span { margin-top: 2px; color: #81907d; font-size: 10px; }
.square-weekly-file-entry time { color: #81907d; font-size: 10px; }
.square-file-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 39px; }
.square-file-links .report-attachment-link { margin: 0; }
.square-review-summary { margin: 12px 0 0 39px; padding: 11px 12px 12px; border-top: 1px solid #e1e9dc; color: #64735f; background: #f8fbf6; }
.square-review-summary header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.square-review-summary header span { display: inline-flex; min-width: 0; align-items: center; gap: 5px; color: #5d7657; font-size: 11px; font-weight: 700; }
.square-review-summary header span i { width: 14px; height: 14px; }
.square-review-summary header > strong { flex: 0 0 auto; color: #486d43; font-size: 17px; font-variant-numeric: tabular-nums; }
.square-review-summary header > strong small { font-size: 10px; font-weight: 600; }
.square-review-summary.pending { color: #7b8977; background: #fafcf9; }
.square-review-summary.pending .square-review-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; }
.square-review-summary.pending .square-review-status i { width: 14px; height: 14px; }
.square-review-summary p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; }
.square-review-summary.pending p { color: #89958a; }
.square-review-dimensions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.square-review-dimensions span { max-width: 100%; padding: 3px 6px; border: 1px solid #dce7d7; border-radius: 4px; color: #61785a; background: #fffefa; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.square-review-analysis { color: #5b6d57; }
.square-review-suggestions { margin-top: 8px; padding-top: 7px; border-top: 1px solid #e3ebdf; font-size: 11px; }
.square-review-suggestions strong { color: #6e805f; font-size: 10px; }
.square-review-suggestions ul { display: grid; gap: 3px; margin: 4px 0 0; padding-left: 16px; line-height: 1.5; }
.square-review-actions { display: grid; gap: 4px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #e3ebdf; }
.square-review-actions div { display: flex; gap: 6px; font-size: 10px; line-height: 1.45; }
.square-review-actions strong { flex: 0 0 auto; color: #6e805f; }
.square-review-actions span { color: #71806d; overflow-wrap: anywhere; }
.square-weekly-report-review { padding: 14px 18px 0; background: #fffefa; }
.square-weekly-report-review .square-review-summary { margin: 0; border: 1px solid #dfe8db; border-radius: 8px; }

/* Weekly reports are document-first: the review modal keeps the decision and evidence together. */
.weekly-document-intro { display: flex; align-items: flex-start; gap: 13px; margin: 20px 0 12px; padding: 15px 0; border-top: 1px solid #e5ece1; border-bottom: 1px solid #e5ece1; }
.weekly-document-intro .report-attachment-icon { flex: 0 0 auto; }
.weekly-document-intro strong { color: #4e6249; font-size: 15px; }
.weekly-document-intro p { max-width: 68ch; margin: 5px 0 0; color: #748170; font-size: 12px; line-height: 1.65; }
.weekly-document-field { margin-top: 14px; }
.weekly-review-modal { width: min(100%, 880px); height: min(78vh, 650px); max-height: min(78vh, 650px); display: flex; flex-direction: column; overflow: hidden; padding: 22px 26px; background: #fffefa; }
.weekly-review-modal .modal-head { flex: 0 0 auto; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid #e1e8dd; background: #fffefa; }
.review-kicker { margin: 0 0 4px; color: #788e71; font-size: 12px; font-weight: 600; }
.review-score-row { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; margin: 8px 0 12px; padding: 10px 0 12px; border-bottom: 1px solid #e4ebe0; }
.review-score { display: flex; width: 100px; min-height: 86px; align-items: baseline; justify-content: center; gap: 4px; border: 1px solid #cfdfca; border-radius: 8px; color: #5e7757; background: #eff6eb; font-variant-numeric: tabular-nums; }
.review-score strong { color: #45663e; font-size: 40px; line-height: 1; }
.review-score span { font-size: 14px; font-weight: 600; }
.review-decision { display: inline-flex; min-height: 27px; align-items: center; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.review-decision.ready { color: #41673a; background: #e5f1df; }
.review-decision.revision { color: #8d6432; background: #fbefd9; }
.review-grade { display: inline-flex; margin-left: 8px; color: #5c7557; font-size: 12px; font-weight: 700; }
.review-score-row p { max-width: 65ch; margin: 7px 0 0; color: #596855; font-size: 13px; line-height: 1.7; }
.review-findings { min-height: 0; flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 13px; overflow-y: auto; overscroll-behavior: contain; padding: 1px 8px 8px 0; scrollbar-color: #b7cbb0 #f3f6ef; scrollbar-width: thin; }
.review-dimension-section, .review-action-section { grid-column: 1 / -1; }
.review-dimension-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.review-dimension-card { min-width: 0; padding: 10px 11px; border: 1px solid #e0e8dc; border-radius: 7px; background: #fbfdf9; }
.review-dimension-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.review-dimension-card strong { min-width: 0; color: #52644d; font-size: 12px; }
.review-dimension-card header span { flex: 0 0 auto; color: #5e7757; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.review-dimension-card p { margin: 6px 0 0; color: #6b7867; font-size: 11px; line-height: 1.5; }
.review-dimension-card small { display: block; margin-top: 6px; color: #92734e; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.review-action-group { margin-top: 8px; padding: 9px 10px; border: 1px solid #e0e8dc; border-radius: 7px; background: #fbfdf9; }
.review-action-group h5 { margin: 0 0 6px; color: #5e7557; font-size: 12px; }
.review-action-group ul { margin: 0; }
.review-findings section { min-width: 0; padding: 14px 15px; border: 1px solid #e0e8dc; border-radius: 8px; background: #fbfdf9; }
.review-findings h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 9px; color: #52644d; font-size: 13px; }
.review-findings h4 i { width: 15px; color: #718969; }
.review-findings ul { display: grid; gap: 7px; margin: 0; padding-left: 17px; color: #6b7867; font-size: 12px; line-height: 1.55; }
.review-findings .muted { margin: 0; font-size: 12px; }
.review-note { flex: 0 0 auto; margin-top: 8px; padding-top: 8px; border-top: 1px solid #edf1e9; color: #71806d; font-size: 12px; line-height: 1.5; background: #fffefa; }
.review-actions { flex: 0 0 auto; justify-content: flex-end; margin-top: 10px; padding-top: 2px; background: #fffefa; }
.report-review-summary { margin-top: 14px; padding: 13px 14px; border-top: 1px solid #dbe7d5; background: #f6faf3; }
.report-review-summary header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #62775c; font-size: 12px; font-weight: 600; }
.report-review-summary header span { display: inline-flex; align-items: center; gap: 5px; }
.report-review-summary header i { width: 15px; }
.report-review-summary header strong { color: #4f7148; font-size: 16px; font-variant-numeric: tabular-nums; }
.report-review-dimensions { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.report-review-dimensions span { max-width: 100%; padding: 4px 7px; border: 1px solid #dce7d7; border-radius: 5px; color: #61785a; background: #f7faf4; font-size: 11px; overflow-wrap: anywhere; }
.report-review-summary > p { margin: 8px 0; color: #5f6e5b; font-size: 12px; line-height: 1.6; }
.report-review-summary > div { color: #6d7c68; font-size: 12px; }
.report-review-summary ul { display: grid; gap: 4px; margin: 5px 0 0; padding-left: 17px; line-height: 1.5; }

@media (max-width: 780px) {
  .square-date-rail { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .square-date-tools { gap: 4px; }
  .square-picker-toggle, .square-date-tools .square-date-nav { width: 36px; height: 36px; }
  .square-date-picker { position: fixed; top: 76px; right: 13px; width: min(278px, calc(100vw - 26px)); }
  .square-date-summary { align-items: flex-start; flex-wrap: wrap; }
  .square-user-filter { width: 100%; margin-left: 0; padding-top: 4px; }
  .square-user-filter select { flex: 1; min-width: 0; }
  .square-top-actions { width: 100%; justify-items: start; }
  .square-date-rail { padding: 5px 6px; }
  .square-date { min-height: 50px; }
  .report-page-heading { gap: 8px; }
  .report-back-link span { display: none; }
  .square-content-grid { grid-template-columns: 1fr; height: auto; min-height: 0; gap: 14px; }
  .square-people-panel { max-height: 222px; }
  .square-people-list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 7px; }
  .square-person { width: 174px; min-width: 174px; }
  .square-report-stack { grid-template-rows: minmax(320px, auto) minmax(180px, auto); height: auto; overflow: visible; gap: 14px; }
  .weekly-review-modal { height: min(84vh, 640px); max-height: min(84vh, 640px); padding: 18px 18px; }
  .review-score-row { grid-template-columns: 1fr; gap: 12px; }
  .review-score { width: 100%; min-height: 72px; }
  .review-dimension-grid { grid-template-columns: 1fr; }
  .review-findings { grid-template-columns: 1fr; gap: 9px; }
  .review-actions { align-items: stretch; flex-direction: column-reverse; }
  .review-actions .action-btn, .review-actions .primary { width: 100%; min-height: 44px; }
}

/* Full weekly-log reading surface opened from the team square. */
.square-weekly-preview-link { cursor: pointer; font-family: inherit; text-align: left; }
.square-weekly-preview-link:focus-visible { outline: 3px solid rgba(117, 139, 109, .32); outline-offset: 2px; }
.weekly-report-backdrop { z-index: 60; }
.square-weekly-report-modal { width: min(100%, 980px); height: min(88dvh, 900px); max-height: min(88dvh, 900px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.square-weekly-report-modal .modal-head { position: sticky; z-index: 1; top: 0; align-items: flex-start; margin: 0; padding: 22px 26px 18px; border-bottom: 1px solid #dfe8db; background: #fbfdf9; }
.weekly-report-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.weekly-report-title .avatar { width: 42px; height: 42px; flex: 0 0 auto; font-size: 13px; }
.weekly-report-title p { margin: 0 0 3px; color: #7b8d76; font-size: 11px; font-weight: 600; }
.weekly-report-title h3 { color: #4b5e47; font-size: 20px; }
.weekly-report-title > div > span { display: block; margin-top: 4px; color: #7c8a78; font-size: 12px; line-height: 1.5; }
.square-weekly-report-modal .close { width: 36px; height: 36px; flex: 0 0 auto; }
.weekly-report-content { max-height: calc(min(88vh, 900px) - 105px); overflow-y: auto; padding: 22px 26px 30px; overscroll-behavior: contain; scrollbar-color: #bdcdb7 transparent; scrollbar-width: thin; }
.weekly-report-content > .report-content-blocks { margin: 0; }
.weekly-report-content .report-content-block { padding: 13px 15px; }
.weekly-document-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.weekly-document-links .report-attachment-link { margin: 0; }
.weekly-document-hint { margin: 10px 0 0; color: #748170; font-size: 12px; line-height: 1.6; }
.weekly-document-previews { display: grid; gap: 18px; margin-top: 20px; }
.weekly-document-preview { overflow: hidden; border: 1px solid #d8e4d4; border-radius: 8px; background: #f7faf4; }
.weekly-document-preview > header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid #dfe8db; color: #52664d; font-size: 12px; font-weight: 600; }
.weekly-document-preview > header > span { display: inline-flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekly-document-preview > header i { width: 15px; flex: 0 0 auto; }
.weekly-document-preview > header a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: #617b59; font-size: 11px; font-weight: 600; }
.weekly-document-preview iframe { display: block; width: 100%; height: min(62vh, 620px); border: 0; background: white; }
.weekly-document-status { margin: 0; padding: 28px 16px; color: #748170; font-size: 13px; text-align: center; }
.weekly-document-status.error { color: #9a625c; }
.weekly-docx-content { min-height: 180px; padding: 22px clamp(16px, 4vw, 40px) 32px; color: #40503f; background: #fffefa; font-size: 14px; line-height: 1.85; }
.weekly-docx-content > :first-child { margin-top: 0; }
.weekly-docx-content > :last-child { margin-bottom: 0; }
.weekly-docx-content h1, .weekly-docx-content h2, .weekly-docx-content h3, .weekly-docx-content h4, .weekly-docx-content h5, .weekly-docx-content h6 { margin: 1.5em 0 .55em; color: #40553d; line-height: 1.35; }
.weekly-docx-content h1 { font-size: 22px; }
.weekly-docx-content h2 { font-size: 19px; }
.weekly-docx-content h3 { font-size: 17px; }
.weekly-docx-content p { margin: .75em 0; }
.weekly-docx-content ul, .weekly-docx-content ol { margin: .75em 0; padding-left: 1.5em; }
.weekly-docx-content li + li { margin-top: .25em; }
.weekly-docx-content a { color: #55774e; text-decoration: underline; text-underline-offset: 3px; }
.weekly-docx-content img { display: block; max-width: 100%; height: auto; margin: 16px auto; }
.weekly-docx-content blockquote { margin: 1em 0; padding: 8px 13px; border-left: 3px solid #b8cbb2; color: #62705d; background: #f5f8f2; }
.weekly-docx-content table { width: 100%; margin: 1em 0; border-collapse: collapse; font-size: 13px; }
.weekly-docx-content th, .weekly-docx-content td { padding: 8px 10px; border: 1px solid #dce6d8; text-align: left; vertical-align: top; }
.weekly-docx-content th { color: #52634e; background: #f1f6ee; }
.weekly-report-empty { margin: 22px 0 0; }
.document-reader-modal { position: relative; }
.document-reader-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #d8e4d4; border-radius: 8px; color: #60705d; background: #f1f4f1; box-shadow: none; }
.document-reader-close:hover { border-color: #c6d4c4; background: #e7ede7; }
.document-reader-content { min-height: 0; max-height: none; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0; }
.document-reader-content .weekly-document-previews { margin: 0; }
.document-reader-content .weekly-document-preview { overflow: visible; border: 0; border-radius: 0; }
.document-reader-content .weekly-document-preview > header { position: sticky; z-index: 100; top: 0; justify-content: flex-start; gap: 10px; padding: 10px 14px; isolation: isolate; opacity: 1; background: #f8f9fa !important; border-bottom: 1px solid #e3e7e4; box-shadow: none; }
.document-reader-content .weekly-document-preview > header > span:first-child { min-width: 0; margin-right: auto; color: #536452; font-weight: 700; }
.document-reader-content .weekly-document-preview > header > span:first-child i { width: 16px; color: #6b8067; }
.document-reader-content .weekly-document-preview > header > a { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 10px; border: 1px solid #dbe3da; border-radius: 8px; color: #60705d; background: #f1f4f1; font-size: 12px; font-weight: 500; text-decoration: none; }
.document-reader-content .weekly-document-preview > header > a:hover { border-color: #c6d4c4; color: #536b50; background: #e7ede7; }
.document-reader-content .weekly-document-preview > header > a i { width: 16px; }
.document-reader-content .weekly-docx-content { position: relative; z-index: 0; }

@media (max-width: 780px) {
  .weekly-report-backdrop { align-items: flex-end; padding: 0; }
  .square-weekly-report-modal { width: 100%; height: 92dvh; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  .square-weekly-report-modal .modal-head { padding: 17px 16px 14px; }
  .weekly-report-title { gap: 10px; }
  .weekly-report-title h3 { font-size: 17px; }
  .weekly-report-title > div > span { font-size: 11px; }
  .weekly-report-content { max-height: calc(92vh - 96px); padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .weekly-document-preview > header { align-items: flex-start; padding: 10px; }
  .weekly-document-preview > header a span { display: none; }
  .weekly-document-preview iframe { height: 58vh; }
  .document-reader-content { max-height: none; padding: 0; }
  .document-reader-close { width: 34px; height: 34px; }
}
