:root {
  color-scheme: light;
  --ink: #15212b;
  --muted: #6d7b86;
  --line: #e7edf0;
  --surface: #fff;
  --bg: #f5f8fa;
  --brand: #117c72;
  --brand-dark: #0b5f58;
  --warning: #b56b12;
  --blue: #2d6cdf;
  --success: #14804a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
.login-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: #edf4f4; }
.login-overlay.hidden { display: none; }
.login-box { width: min(100%, 380px); padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(20, 44, 54, .12); }
.login-box .logo-mark { width: 52px; height: 52px; margin-bottom: 22px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 25px; font-weight: 700; }
.login-box h1 { margin: 4px 0 26px; }
.login-box label { display: grid; gap: 6px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.login-box input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.login-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17, 124, 114, .12); }
.login-box .button { width: 100%; margin-top: 24px; }
.form-message { min-height: 20px; margin-top: 12px; color: #b3261e; font-size: 13px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 24px 14px; background: #17262d; color: #c5d2d6; display: flex; flex-direction: column; }
.brand { padding: 0 14px 30px; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.brand span { display: block; margin-top: 4px; color: #80b7b0; font-size: 12px; font-weight: 500; letter-spacing: 0; }
nav { display: grid; gap: 4px; }
.nav-item { padding: 11px 14px; border-radius: 8px; color: inherit; text-decoration: none; }
.nav-item:hover, .nav-item.active { color: #fff; background: var(--brand); }
.sidebar-foot { margin-top: auto; padding: 14px; color: #6f858b; font-size: 12px; }
.main { margin-left: 232px; min-height: 100vh; }
.topbar { min-height: 88px; padding: 18px 38px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
.top-actions, .toolbar { display: flex; gap: 10px; align-items: center; }
select, input[type="date"] { min-height: 38px; padding: 0 11px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.avatar { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #e7f2f0; color: var(--brand-dark); font-weight: 700; }
.content { padding: 32px 38px; max-width: 1500px; margin: 0 auto; }
.page-heading, .panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.page-heading { margin-bottom: 22px; }
.page-heading p, .panel-heading p, .split-panel p { margin-top: 4px; color: var(--muted); }
.date-control { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 20px rgba(20, 44, 54, .04); }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 5px 0 1px; font-size: 30px; }
.stat-card.warning strong { color: var(--warning); }
.stat-card.blue strong { color: var(--blue); }
.stat-card.success strong { color: var(--success); }
.panel { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 20px rgba(20, 44, 54, .04); }
.panel-heading { margin-bottom: 18px; }
.button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 8px; font-weight: 600; }
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { background: #eaf3f2; color: var(--brand-dark); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
.inline-phone { display: flex; align-items: center; gap: 8px; min-width: 235px; }
.inline-phone-input { width: 140px; min-height: 36px; box-sizing: border-box; padding: 0 10px; border: 1px solid #d6e4e2; border-radius: 9px; background: #fff; color: #1f343b; font: inherit; font-size: 14px; }
.inline-phone-input:focus { outline: 2px solid rgba(20, 125, 114, .22); border-color: #147d72; }
.inline-save { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: #e6f4f1; color: #147d72; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.inline-save:hover { background: #d5eee9; }
.inline-save:disabled { cursor: wait; opacity: .55; }
.phone-bound { color: #6b7e80; white-space: nowrap; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; background: #fbfcfc; }
td { font-size: 13px; }
.tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.pending { color: #8b5a12; background: #fff5df; }
.tag.running { color: #225dbd; background: #eaf1ff; }
.tag.done { color: #137342; background: #e6f6ee; }
.tag.exception { color: #a12a22; background: #fdecea; }
.task-action { padding: 0; border: 0; background: none; color: var(--brand-dark); font-weight: 600; }
.split-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; }
.drop-card { padding: 22px; border: 1px dashed #b8d1ce; border-radius: 12px; background: #f6fbfa; display: grid; gap: 7px; }
.drop-card span { color: var(--muted); font-size: 13px; }
.import-mode { display: flex; gap: 18px; margin-top: 14px; color: var(--muted); }
.import-mode input { accent-color: var(--brand); }
.task-dialog { width: min(720px, calc(100% - 36px)); max-height: calc(100vh - 36px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 80px rgba(20,44,54,.22); overflow: auto; }
.task-dialog::backdrop { background: rgba(15, 30, 36, .38); }
.dialog-card { position: relative; padding: 28px; }
.dialog-close { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: var(--muted); font-size: 26px; }
.dialog-card h2 { padding-right: 32px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.detail-item { padding: 12px; border-radius: 10px; background: #f6f9fa; }
.detail-item small, .detail-event small { display: block; color: var(--muted); }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.detail-event { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.evidence-photo { width: 100%; min-height: 180px; display: grid; place-items: center; margin-top: 12px; padding: 0; overflow: hidden; border: 1px solid #dce7e7; border-radius: 12px; background: #edf3f3; color: var(--muted); }
button.evidence-photo:hover { border-color: #8fc8c1; }
button.evidence-photo:focus-visible { outline: 3px solid rgba(39, 160, 149, .25); outline-offset: 2px; }
.evidence-photo span { padding: 24px; }
.evidence-photo img { width: 100%; max-height: 480px; display: block; object-fit: contain; background: #122426; }
.empty-photo { font-size: 13px; }
.correction-row { display: grid; gap: 4px; padding: 12px; margin-top: 8px; border-radius: 10px; background: #f6f9fa; }
.correction-row small { color: var(--muted); overflow-wrap: anywhere; }
.photo-link { display: inline-block; margin: 8px 12px 0 0; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-weight: 600; text-decoration: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.form-field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-field.full { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.form-field input[readonly] { background: #f3f6f6; color: var(--muted); }
.form-field textarea { min-height: 80px; resize: vertical; }
.multi-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.multi-field legend { margin-bottom: 8px; padding: 0; }
.multi-select { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; }
.multi-option { position: relative; min-width: 0; cursor: pointer; }
.multi-option input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.multi-option span { min-height: 42px; display: flex; align-items: center; padding: 8px 12px; border: 1px solid #dce6e8; border-radius: 9px; background: #fff; color: var(--ink); transition: border-color .14s ease, background .14s ease, color .14s ease; }
.multi-option:hover span { border-color: #8fc8c1; }
.multi-option input:checked + span { border-color: var(--brand); background: #e5f5f2; color: var(--brand-dark); font-weight: 700; }
.multi-option input:focus-visible + span { outline: 3px solid rgba(39, 160, 149, .25); outline-offset: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.row-action { margin-right: 10px; padding: 0; border: 0; background: none; color: var(--brand-dark); font-weight: 600; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.management-grid > *, .split-panel > * { min-width: 0; }
.management-panel h3 { margin: 0 0 10px; font-size: 15px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.settings-field { display: grid; gap: 7px; max-width: 900px; margin-top: 14px; color: var(--muted); }
.settings-grid .settings-field { margin-top: 0; }
.settings-field input, .settings-field select, .settings-field textarea { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.settings-field textarea { min-height: 100px; resize: vertical; }
.wechat-config { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.wechat-config h3 { margin: 0 0 4px; }
.wechat-config .button { margin-top: 14px; }
.muted { color: var(--muted); }
@media (max-width: 880px) { .sidebar { position: static; width: auto; min-height: auto; padding: 16px; } .sidebar nav { display: flex; gap: 6px; overflow-x: auto; } .sidebar .nav-item { flex: 0 0 auto; white-space: nowrap; } .sidebar-foot { display: none; } .main { margin-left: 0; } .topbar, .content { padding-left: 18px; padding-right: 18px; } .topbar, .top-actions { flex-wrap: wrap; } .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split-panel { grid-template-columns: 1fr; } .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .page-heading, .panel-heading { display: grid; } .toolbar { flex-wrap: wrap; } .date-control { justify-content: space-between; } .management-grid, .form-grid { grid-template-columns: 1fr; } .form-field.full { grid-column: auto; } .login-box { padding: 28px; } }

/* Page-level navigation: each work area owns its own screen. */
body { min-width: 320px; overflow-x: hidden; background: #f3f7f8; }
.sidebar { width: 248px; padding: 28px 16px 18px; background: linear-gradient(180deg, #142a31 0%, #1b343b 100%); box-shadow: 8px 0 30px rgba(12, 38, 45, .08); }
.brand { padding: 0 14px 34px; font-size: 19px; }
.nav-item { min-height: 42px; display: flex; align-items: center; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; transition: background .16s ease, color .16s ease, transform .16s ease; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; transform: translateX(2px); }
.nav-item.active { background: #1a9a8c; box-shadow: 0 8px 18px rgba(8, 107, 96, .22); }
.main { margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 5; min-height: 82px; padding: 16px 44px; box-shadow: 0 1px 0 rgba(20, 44, 54, .03); }
.topbar h1 { font-size: 22px; letter-spacing: -.02em; }
.top-actions { gap: 14px; }
.project-context { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.project-context select { min-width: 140px; }
.project-context > span { white-space: nowrap; }
.content { width: min(100%, 1440px); padding: 34px 44px 64px; }
.view { display: none; }
.view.is-active { display: block; animation: view-in .18s ease-out; }
.view.panel { margin-top: 0; }
@keyframes view-in { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-heading { margin-bottom: 26px; }
.page-heading h2 { font-size: 24px; letter-spacing: -.03em; }
.page-heading p { margin-top: 6px; color: var(--muted); }
.stat-grid { gap: 14px; margin-bottom: 24px; }
.stat-card { min-height: 124px; padding: 19px 20px; border-radius: 16px; box-shadow: 0 8px 26px rgba(20, 44, 54, .05); }
.stat-card strong { font-size: 32px; letter-spacing: -.04em; }
.dashboard-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shortcut-card { min-height: 96px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: 0 7px 24px rgba(20, 44, 54, .04); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.shortcut-card:hover { border-color: #acd4cf; box-shadow: 0 10px 28px rgba(20, 44, 54, .08); transform: translateY(-2px); }
.shortcut-card > span:nth-child(2) { display: grid; gap: 4px; }
.shortcut-card strong { font-size: 14px; }
.shortcut-card small { color: var(--muted); font-size: 12px; }
.shortcut-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #e5f5f2; color: var(--brand-dark); font-weight: 700; }
.shortcut-arrow { color: var(--brand); font-size: 20px; }
.panel { padding: 26px; border-radius: 17px; box-shadow: 0 8px 28px rgba(20, 44, 54, .05); }
.panel-heading { margin-bottom: 22px; align-items: center; }
.panel-heading h2 { font-size: 22px; letter-spacing: -.03em; }
.panel-heading p { max-width: 680px; margin-top: 5px; color: var(--muted); }
.panel-heading .toolbar { justify-content: flex-end; }
.toolbar { flex-wrap: wrap; }
.button { min-height: 40px; padding: 0 16px; border-radius: 9px; transition: filter .16s ease, transform .16s ease; }
.button:hover { filter: brightness(.97); transform: translateY(-1px); }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; }
.list-tools { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.search-control { display: flex; gap: 8px; align-items: center; min-width: min(100%, 420px); }
.search-control input { width: min(360px, 100%); min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.search-control input:focus { outline: none; border-color: #78bdb5; box-shadow: 0 0 0 3px rgba(17, 124, 114, .11); }
.pager { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pager button { min-height: 36px; padding: 0 12px; }
.pager button:disabled { cursor: not-allowed; opacity: .5; }
.pager-label { min-width: 130px; color: var(--muted); text-align: center; font-size: 13px; }
table { min-width: 720px; }
th, td { padding: 14px 14px; }
th { background: #f8fafb; }
tbody tr:hover { background: #fbfdfd; }
.empty { padding: 30px 14px; text-align: center; color: var(--muted); }
.section-kicker { display: block; margin-bottom: 5px; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.management-panel h3 { font-size: 16px; }
.settings-grid { max-width: none; gap: 16px; }
.settings-field { max-width: 760px; margin-top: 18px; }
.settings-grid .settings-field { margin-top: 0; }
.settings-field input, .settings-field select, .settings-field textarea { min-height: 42px; border-color: #dce6e8; }
.settings-field textarea { min-height: 120px; }
.settings-field input:focus, .settings-field select:focus, .settings-field textarea:focus { outline: none; border-color: #78bdb5; box-shadow: 0 0 0 3px rgba(17, 124, 114, .11); }
.import-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.import-card { min-height: 168px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid #dce8e8; border-radius: 14px; background: #fbfdfd; }
.import-card h3 { margin: 0; font-size: 16px; }
.import-card .toolbar { margin-top: auto; }
.export-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.export-range .date-control { display: grid; gap: 6px; align-items: stretch; }
.file-name { display: block; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.import-mode { display: grid; gap: 10px; margin-top: 4px; }
.import-mode label { color: var(--ink); }
.export-card { background: #f6fbfa; border-color: #c9e4df; }
.security-note { display: flex; gap: 12px; align-items: flex-start; max-width: 760px; margin-top: 28px; padding: 14px 16px; border: 1px solid #d5e8e4; border-radius: 12px; background: #f4fbf9; color: #3d655f; }
.security-note strong { white-space: nowrap; color: var(--brand-dark); }
.wechat-fields { max-width: 980px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wechat-fields .settings-field { padding: 14px; border: 1px solid #e2ebed; border-radius: 12px; background: #fbfdfd; }
.wechat-fields .settings-field strong { min-height: 42px; display: flex; align-items: center; color: var(--success); }
.global-view .project-context { display: none; }
@media (max-width: 1080px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; }
  .topbar, .content { padding-left: 28px; padding-right: 28px; }
  .dashboard-shortcuts, .import-layout { grid-template-columns: 1fr; }
  .import-card { min-height: 0; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 16px 14px 10px; }
  .brand { padding: 0 10px 14px; }
  .sidebar nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .nav-item { flex: 0 0 auto; min-height: 38px; padding: 8px 12px; white-space: nowrap; }
  .sidebar-foot { display: none; }
  .main { margin-left: 0; }
  .topbar { position: static; display: grid; gap: 14px; padding: 18px; }
  .top-actions { justify-content: space-between; }
  .project-context { flex-wrap: wrap; }
  .content { padding: 22px 18px 44px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 20px 16px; }
  .panel-heading { display: grid; gap: 14px; align-items: start; }
  .panel-heading .toolbar { justify-content: flex-start; }
  .wechat-fields { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-heading { display: grid; gap: 14px; }
  .date-control { justify-content: space-between; }
  .top-actions, .project-context { width: 100%; }
  .project-context select { flex: 1; min-width: 0; }
  .button { padding: 0 13px; }
  .security-note { display: grid; gap: 5px; }
  .list-tools { align-items: stretch; flex-direction: column; }
  .search-control { min-width: 0; }
  .search-control input { flex: 1; width: auto; min-width: 0; }
  .pager { justify-content: space-between; }
  .pager-label { min-width: 0; }
}

/* Navigation and page hierarchy refresh. */
[hidden] { display: none !important; }
.login-overlay { z-index: 60; background: radial-gradient(circle at 50% 0, #f8fcfb 0, #e8f1f0 72%); }
.sidebar { width: 260px; padding: 22px 14px 18px; overflow-y: auto; background: #102c2d; box-shadow: 10px 0 32px rgba(13, 46, 47, .1); }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 24px; letter-spacing: 0; }
.brand .brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; margin: 0; border: 1px solid rgba(255, 255, 255, .14); border-radius: 13px; background: #1a8d82; color: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 8px 20px rgba(0, 0, 0, .16); }
.brand .brand-copy { display: grid; gap: 1px; margin: 0; color: #fff; font-size: 16px; line-height: 1.35; }
.brand-copy strong { font-weight: 700; }
.brand-copy small { color: #87aaa8; font-size: 11px; font-weight: 500; }
.sidebar nav { display: grid; gap: 17px; padding: 0 2px 14px; }
.nav-group { display: grid; gap: 4px; }
.nav-heading { padding: 0 12px 5px; color: #688d8c; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.nav-item { position: relative; min-height: 43px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: center; padding: 6px 11px; border: 0; border-radius: 10px; color: #b8cdcb; font-weight: 600; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .07); transform: none; }
.nav-item.active { color: #fff; background: #167b73; box-shadow: 0 8px 20px rgba(3, 41, 39, .22); }
.nav-item.active::before { content: ""; position: absolute; left: -2px; width: 3px; height: 20px; border-radius: 99px; background: #9be1d8; }
.nav-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .07); color: #8eb5b1; font-size: 11px; font-weight: 800; }
.nav-item.active .nav-icon { background: rgba(255, 255, 255, .15); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255, 255, 255, .07); color: #688d8c; font-size: 11px; }
.main { margin-left: 260px; }
.topbar { min-height: 78px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 14px 38px; border-bottom-color: #e7eded; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); }
.topbar-title { min-width: 0; }
.topbar-title .eyebrow { margin-bottom: 1px; color: #7a8c8c; }
.topbar-title h1 { overflow: hidden; font-size: 23px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { justify-content: flex-end; }
.project-context { min-height: 42px; padding: 4px 5px 4px 12px; border: 1px solid #e1e9e8; border-radius: 11px; background: #f8faf9; }
.project-context select { min-width: 132px; border: 0; background: transparent; font-weight: 600; }
.project-context .button { min-height: 34px; }
.logout-button { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 5px; border: 1px solid #e1e9e8; border-radius: 11px; background: #fff; color: var(--muted); font: inherit; font-weight: 600; }
.logout-button span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #e6f3f1; color: var(--brand-dark); }
.logout-button:hover { border-color: #c9dcda; color: var(--brand-dark); }
.menu-toggle, .menu-backdrop { display: none; }
.content { width: min(100%, 1420px); padding: 30px 38px 58px; }
.panel { border-color: #e2e9e9; border-radius: 16px; box-shadow: 0 8px 24px rgba(20, 55, 56, .045); }
.panel-heading { padding-bottom: 18px; border-bottom: 1px solid #edf1f1; }
.stat-card { border-color: #e2e9e9; box-shadow: 0 8px 24px rgba(20, 55, 56, .045); }
button.stat-card { width: 100%; color: inherit; text-align: left; cursor: pointer; appearance: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
button.stat-card:hover { border-color: #acd4cf; box-shadow: 0 11px 28px rgba(20, 55, 56, .09); transform: translateY(-2px); }
button.stat-card:focus-visible { outline: 3px solid rgba(39, 160, 149, .25); outline-offset: 2px; }
.button { letter-spacing: .01em; }
.button:focus-visible, .nav-item:focus-visible, .menu-toggle:focus-visible, .logout-button:focus-visible { outline: 3px solid rgba(39, 160, 149, .25); outline-offset: 2px; }
.list-tools { border-color: #e4ebeb; background: #f8faf9; }
.task-list-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.task-query-tools { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-query-tools .search-control { flex: 1 1 300px; min-width: 220px; }
.search-control .button { flex: 0 0 auto; white-space: nowrap; }
#tasks table { min-width: 940px; table-layout: fixed; }
#tasks th:nth-child(1), #tasks th:nth-child(2) { width: 82px; }
#tasks th:nth-child(4) { width: 76px; }
#tasks th:nth-child(5), #tasks th:nth-child(6) { width: 86px; }
#tasks th:nth-child(7), #tasks th:nth-child(8) { width: 76px; }
#tasks th:nth-child(9) { width: 142px; }
#tasks td:nth-child(1), #tasks td:nth-child(2), #tasks td:nth-child(4), #tasks td:nth-child(5), #tasks td:nth-child(6), #tasks td:nth-child(7), #tasks td:nth-child(8), #tasks .task-action, #tasks .tag { white-space: nowrap; word-break: keep-all; }
.task-number { color: var(--muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.task-thumb { width: 58px; aspect-ratio: 9 / 16; display: grid; place-items: center; padding: 0; overflow: hidden; border: 1px solid #dce7e7; border-radius: 10px; background: #edf3f3; color: var(--muted); font-size: 10px; }
button.task-thumb:hover { border-color: #69b7ae; box-shadow: 0 4px 12px rgba(20, 55, 56, .12); }
button.task-thumb:focus-visible { outline: 3px solid rgba(39, 160, 149, .25); outline-offset: 2px; }
.task-thumb img { width: 100%; height: 100%; display: block; object-fit: contain; }
.task-thumb.placeholder { cursor: default; }
.photo-placeholder-icon { width: 24px; height: 24px; fill: none; stroke: #9aafad; stroke-width: 2; }
.task-thumb .photo-placeholder-icon { width: 21px; height: 21px; }
.task-thumb.placeholder span { margin-top: -8px; }
.media-dialog { width: fit-content; height: fit-content; max-width: 96vw; max-height: 96vh; padding: 0; border: 0; overflow: visible; background: transparent; }
.media-dialog::backdrop { background: rgba(6, 20, 22, .72); }
.media-preview-button { display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: zoom-out; }
.media-preview-button img { width: auto; height: auto; display: block; max-width: 92vw; max-height: 90vh; border-radius: 14px; object-fit: contain; box-shadow: 0 24px 80px rgba(5, 25, 27, .42); }

@media (min-width: 761px) and (max-width: 1360px) {
  .sidebar { width: 200px; padding: 18px 10px; }
  .brand { padding: 2px 8px 20px; }
  .main { margin-left: 200px; }
  .topbar { padding-left: 20px; padding-right: 20px; }
  .content { padding: 24px 20px 48px; }
  .task-list-tools { grid-template-columns: 1fr; }
  .task-list-tools .pager { justify-content: flex-end; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .sidebar { width: 180px; }
  .main { margin-left: 180px; }
  .content { padding: 20px 16px 40px; }
  .panel { padding: 20px 16px; }
  #tasks table { min-width: 760px; }
  #tasks th:nth-child(1), #tasks th:nth-child(2) { width: 72px; }
  #tasks th:nth-child(4) { width: 64px; }
  #tasks th:nth-child(5), #tasks th:nth-child(6) { width: 78px; }
  #tasks th:nth-child(7), #tasks th:nth-child(8) { width: 68px; }
  #tasks th:nth-child(9) { width: 110px; }
}

@media (max-width: 760px) {
  body.menu-open { overflow: hidden; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(86vw, 292px); height: 100dvh; padding: 18px 14px; transform: translateX(-104%); transition: transform .2s ease; box-shadow: 16px 0 44px rgba(5, 32, 33, .28); }
  body.menu-open .sidebar { transform: translateX(0); }
  .brand { padding-bottom: 20px; }
  .sidebar nav { display: grid; overflow: visible; padding-bottom: 20px; }
  .nav-item { min-height: 44px; white-space: normal; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 30; border: 0; background: rgba(12, 28, 31, .42); }
  body.menu-open .menu-backdrop { display: block; }
  .main { margin-left: 0; }
  .topbar { position: sticky; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px 12px; padding: 12px 16px; }
  .menu-toggle { width: 40px; height: 40px; display: grid; place-content: center; gap: 4px; padding: 0; border: 1px solid #e1e9e8; border-radius: 10px; background: #fff; }
  .menu-toggle span { width: 17px; height: 2px; border-radius: 99px; background: #315252; }
  .topbar-title h1 { font-size: 20px; }
  .top-actions { grid-column: 1 / -1; width: 100%; justify-content: space-between; }
  .project-context { min-width: 0; flex: 1; }
  .project-context > span { display: none; }
  .project-context select { flex: 1; min-width: 0; }
  .content { padding: 22px 16px 44px; }
  .panel { padding: 20px 16px; }
  .panel-heading { display: grid; gap: 14px; align-items: start; }
  .panel-heading .toolbar { justify-content: flex-start; }
  .task-list-tools { grid-template-columns: 1fr; }
  .task-list-tools .pager { justify-content: flex-end; }
}

@media (max-width: 480px) {
  .project-context #projectManageButton { padding: 0 10px; }
  .logout-button { padding-right: 8px; font-size: 12px; }
  .panel-heading .toolbar > * { max-width: 100%; }
}
