/* T-LES / nový vizuálny systém, 19. 10. 2026.
   Presentation only. Business values, routes and form names remain server-owned. */
:root {
  --ink:#1d322a; --muted:#60736a; --bg:#f4f6f1; --line:#dce5dc;
  --nav:#153c31; --green:#226147; --green-dark:#164b35; --green-light:#eaf2e5;
  --gold:#a9792b; --radius:16px; --shadow:0 4px 24px #203b2d06;
}
html { color-scheme:light; scroll-padding-top:100px; }
body { background:var(--bg); color:var(--ink); font-family:Inter,"Segoe UI",Arial,sans-serif; font-size:15px; line-height:1.55; }
*,*::before,*::after { box-sizing:border-box; }
a { color:var(--green); text-underline-offset:4px; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid #ba8a3c; outline-offset:4px; }
::selection { background:#d2e5bd; color:#17382b; }
[hidden] { display:none!important; }
.icon { flex-shrink:0; }
.skip-link:focus { z-index:4000; }

/* Persistent desktop navigation, with a real mobile drawer and no-JS fallback. */
.reference-shell .top { margin-left:280px; height:86px; padding:0 34px; gap:22px; background:var(--bg); border-bottom:1px solid var(--line); box-shadow:none; }
.reference-shell .top-brand .logo { display:none; }
.reference-shell .top-brand:has(.menu-toggle) { display:none; }
.reference-shell .top-context { flex:1; font-size:14px; color:var(--muted); font-weight:500; letter-spacing:0; text-transform:none; }
.reference-shell .topright { gap:16px; }
.reference-shell .user-summary { gap:11px; text-decoration:none; }
.reference-shell .user-summary b { font-size:13px; max-width:210px; color:var(--ink); }
.reference-shell .user-summary small { font-size:11px; color:var(--muted); }
.reference-shell .user-avatar { width:42px; height:42px; border:1px solid #d2dfd0; border-radius:50%; color:var(--green); background:#e5eddf; }
.reference-shell .logout-button { border:1px solid var(--line); border-radius:12px; width:42px; height:42px; background:#fff; color:var(--muted); }
.reference-shell .logout-button:hover { color:var(--green); background:#e9f0e3; }
.reference-shell .shell { grid-template-columns:280px minmax(0,1fr); min-height:calc(100dvh - 86px); }
.reference-shell .sidebar { position:fixed; inset:0 auto 0 0; width:280px; height:100dvh; padding:28px 18px 20px; background:var(--nav); color:#f6f8f0; z-index:60; overflow:auto; scrollbar-width:thin; scrollbar-color:#608171 #153c31; }
.sidebar-brand { height:auto; width:auto; margin:0 10px 30px; overflow:visible; }
.sidebar-brand .logo { color:#fff; gap:13px; }
.sidebar-brand .brand-mark { background:#d1dfb9; color:#153c31; box-shadow:none; border:0; border-radius:12px; width:42px; height:48px; }
.sidebar-brand .brand-copy b { font-size:30px; font-weight:750; letter-spacing:-1.5px; }
.sidebar-brand .brand-dot { color:#d1dfb9; }
.sidebar-brand .brand-copy small { color:#c1d1c5; letter-spacing:.08em; font-size:10px; margin-top:3px; }
.reference-shell .sidebar-heading { display:flex; align-items:center; justify-content:space-between; margin:0 12px 12px; color:#b3c8ba; font-size:10px; letter-spacing:.12em; }
.reference-shell .nav-close { display:none; }
.reference-shell .nav-search { display:block; margin:0 7px 25px; }
.reference-shell .nav-search input { width:100%; min-height:43px; border:1px solid #496d5e; border-radius:10px; background:#214b3e; color:#fff; padding:10px 13px; font-size:13px; }
.reference-shell .nav-search input::placeholder { color:#bdcfc3; opacity:1; }
.reference-shell .nav-search input:focus { border-color:#d1dfb9; }
.reference-shell .nav-group { margin:0 0 23px; }
.reference-shell .nav-group h2 { display:block; color:#a9c2b2; padding:0 13px; font-size:9px; font-weight:650; letter-spacing:.14em; margin:0 0 9px; }
.reference-shell .nav-group a { min-height:42px; display:flex; align-items:center; gap:12px; padding:10px 13px; border-radius:10px; font-size:13px; line-height:1.4; color:#d7e3d9; margin:2px 0; border:1px solid transparent; text-decoration:none; box-shadow:none; }
.reference-shell .nav-group a .icon { width:19px; height:19px; color:#b3cbb9; }
.reference-shell .nav-group a:hover { background:#ffffff0d; color:white; }
.reference-shell .nav-group a.selected { background:#d4e1bc; color:#173f2c; font-weight:700; box-shadow:none; }
.reference-shell .nav-group a.selected .icon { color:#245337; }
.reference-shell .nav-group a.selected::before { display:none; }
.reference-shell .sidebar-footer { display:flex; gap:12px; padding:20px 12px 0; margin-top:26px; border-top:1px solid #ffffff20; color:#d4e0d5; font-size:12px; }
.sidebar-footer small { display:block; font-size:10px; color:#b2c7b8; margin-top:2px; }
.reference-shell .nav-no-results { color:#d1ded3; font-size:13px; padding:0 12px; }
.reference-shell .content { grid-column:2; width:100%; min-width:0; max-width:1800px; margin:0 auto; padding:32px 34px 40px; }
.reference-shell .content.wide { max-width:none; }
.reference-shell .shell.no-navigation { display:block; }
.reference-shell .shell.no-navigation .content { max-width:1100px; }
.reference-shell:has(.no-navigation) .top { margin-left:0; }
.reference-shell:has(.no-navigation) .top-brand .logo { display:flex; }
.reference-shell .page-heading { display:flex; margin:0 0 28px; align-items:center; gap:20px; }
.reference-shell .page-heading h1 { font-size:clamp(27px,2.5vw,38px); letter-spacing:-1.3px; font-weight:650; line-height:1.18; color:var(--ink); }
.eyebrow { color:#61745f; font-size:10px; letter-spacing:.16em; font-weight:650; margin-bottom:8px; }
.reference-shell .today { display:flex; align-items:center; gap:8px; padding:9px 12px; color:var(--muted); font-size:12px; border:1px solid var(--line); border-radius:10px; white-space:nowrap; background:#fff; }
.reference-shell .today .icon { width:16px; height:16px; }
.reference-shell .content-footer { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; border-top:1px solid var(--line); padding-top:20px; margin-top:35px; }
.header-period { display:flex; align-items:center; gap:8px; margin:0; padding:5px; background:white; border:1px solid var(--line); border-radius:12px; }
.header-period .field { margin:0; }
.header-period .field>span { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
.header-period input { min-height:34px; max-width:160px; padding:6px 8px; font-size:13px; border:0; background:transparent; }
.header-period .btn { min-height:34px; padding:7px 12px; font-size:11px; background:#edf3e7; border:0; }

/* Shared surfaces and controls cover all administration and worker modules. */
.panel,.ref-panel,.report-builder,.report-config,.report-method,.report-save { border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow); }
.panel { padding:26px; margin:22px 0; }
.panel h2,.panel-title h2 { font-size:19px; letter-spacing:-.45px; color:var(--ink); }
.panel h3 { color:var(--ink); font-size:16px; }
.panel-title { gap:14px; align-items:center; margin-bottom:22px; }
.panel-title a,.panel-title small { font-size:12px; }
.panel p { line-height:1.65; }
.btn,button:not([class]) { min-height:43px; padding:11px 17px; border:1px solid #ccdacc; border-radius:10px; background:#f5f8f0; color:#28543c; font-size:13px; font-weight:650; line-height:1.3; box-shadow:none; cursor:pointer; }
.btn:hover,button:not([class]):hover { background:#e9f1e1; border-color:#a8bea8; text-decoration:none; }
.btn.primary { background:var(--green); color:#fff; border-color:var(--green); box-shadow:0 4px 10px #22614714; }
.btn.primary:hover { background:var(--green-dark); border-color:var(--green-dark); }
.btn.danger { color:#a03c32; background:#fff5f2; border-color:#e8c5ba; }
.btn.sm { min-height:36px; padding:8px 12px; font-size:12px; }
.btn:disabled,button:disabled { opacity:.5; cursor:not-allowed; box-shadow:none; }
.field { gap:8px; font-size:13px; font-weight:550; color:#415548; min-width:0; }
.field input,.field select,.field textarea { width:100%; min-height:46px; border:1px solid #cbd8cc; border-radius:9px; background:#fff; color:var(--ink); padding:11px 13px; font-size:14px; line-height:1.5; box-shadow:none; }
.field input::placeholder,.field textarea::placeholder { color:#7b897f; opacity:1; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:#5d8a68; box-shadow:0 0 0 3px #95b38422; }
.field textarea { min-height:105px; resize:vertical; }
.field input[readonly],.field input:disabled,.field select:disabled { background:#f0f3ed; color:#5c6c60; }
.field input[type=checkbox],.field input[type=radio],input[type=checkbox],input[type=radio] { width:19px; height:19px; min-height:0; padding:0; accent-color:var(--green); }
input[type=file] { max-width:100%; font-size:13px; }
input::file-selector-button { border:1px solid #c6d7c7; border-radius:7px; padding:7px 10px; margin-right:10px; background:#eaf2e4; color:#2b563e; cursor:pointer; }
.fields { gap:22px; }
.form-section { border-color:var(--line); margin-bottom:28px; }
.form-section-heading { gap:14px; margin-bottom:24px; }
.form-section-heading>span { border-radius:12px; background:#edf3e5; color:#42613b; border:1px solid #dde7d5; width:40px; height:40px; font-size:13px; }
.form-section-heading h2 { font-size:18px; }
.form-section-heading p { color:var(--muted); font-size:12px; line-height:1.6; }
.form-actions { gap:12px; border-top:1px solid var(--line); padding-top:22px; margin-top:24px; }
.notice { padding:16px 18px; border:1px solid #d7e4d0; border-left:3px solid #6c935d; border-radius:10px; background:#edf5e8; color:#385234; font-size:13px; line-height:1.65; }
.notice.error,.notice.danger { background:#fff2ed; border-color:#e6c4b9; border-left-color:#b95c41; color:#8a392e; }
.notice.warning,.notice.warn { background:#fff7e7; border-color:#e8d7b2; border-left-color:#b18532; color:#795520; }
.notice.ok { background:#edf5e8; color:#365a32; }
.badge,.chip,.ref-status { border-radius:7px; padding:5px 9px; font-size:11px; font-weight:600; line-height:1.3; background:#edf1e9; color:#456044; border:1px solid #dde6d6; }
.ref-status.done { background:#e8f3df; color:#37602c; border-color:#d5e4c8; }
.chips { gap:8px; }
.chips a,.chips button { font-size:12px; padding:8px 12px; }
.chips .active,.chips [aria-current] { background:#245d43; color:white; }
.action-bar { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin:20px 0; }
.action-bar p { color:var(--muted); font-size:13px; }
.status-overview a { font-size:12px; border-radius:10px; padding:11px 14px; }
summary { cursor:pointer; font-size:13px; line-height:1.6; }
.disclosure { border:1px solid var(--line); border-radius:14px; background:#fff; }
.disclosure summary { padding:18px 0; }
.disclosure-note { color:var(--muted); font-size:12px; }
.table-wrap { margin:18px 0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
.table-scroll { min-width:0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#b5c9af #f4f7f0; border-radius:0; }
table { width:100%; font-size:13px; border-collapse:collapse; }
th { background:#edf2e9; color:#586c52; padding:14px 15px; font-size:11px; line-height:1.4; letter-spacing:.03em; font-weight:650; border-bottom:1px solid #d9e3d3; }
td { padding:15px; border-bottom:1px solid #e9eee5; color:#354a3c; line-height:1.55; font-variant-numeric:tabular-nums; }
tbody tr:nth-child(even) { background:#fbfcf9; }
tbody tr:hover { background:#f0f5e9; }
tbody tr:last-child td { border-bottom:0; }
td a { color:#276043; font-weight:550; }
td .inline { gap:7px; }
.table-hint { background:#f5f8ee; padding:9px 13px; font-size:11px; color:#617456; text-align:left; border-bottom:1px solid var(--line); }
.empty { padding:34px 20px; color:var(--muted); font-size:13px; }
.pager { gap:7px; margin-top:22px; }
.pager a { border:1px solid #d7e1d1; border-radius:8px; width:36px; height:36px; display:grid; place-items:center; background:#fff; font-size:13px; }
.pager .active { background:var(--green); color:white; border-color:var(--green); }

/* Dashboard: real server-generated KPIs and graphs retain all data and units. */
.reference-dashboard .page-heading { background:#173f30; padding:26px 28px; border-radius:18px; position:relative; overflow:hidden; }
.reference-dashboard .page-heading h1 { color:#f7f9f0; font-size:32px; }
.reference-dashboard .page-heading .eyebrow { color:#c3d3ae; }
.reference-dashboard .page-heading .today { background:#ffffff0a; border-color:#ffffff27; color:#e0e9d8; }
.reference-overview { display:grid; gap:24px; }
.ref-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.ref-kpi { display:flex; flex-direction:column; align-items:stretch; gap:17px; min-width:0; min-height:166px; padding:20px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); }
.ref-icon { width:36px; height:36px; display:grid; place-items:center; color:#416943; background:#edf3e6; border-radius:10px; }
.ref-icon.blue { color:#3a6770; background:#e8f1ee; }
.ref-icon.gold { color:#967137; background:#f9f1e1; }
.ref-icon .icon { width:21px; height:21px; }
.ref-kpi>div { min-width:0; }
.ref-kpi span:not(.ref-icon) { font-size:12px; color:#60725e; }
.ref-kpi strong { display:block; font-size:clamp(20px,1.8vw,29px); font-weight:650; letter-spacing:-.9px; line-height:1.3; margin:5px 0; color:#244530; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ref-kpi small { display:block; font-size:10px; color:#63765e; }
.ref-kpi:first-child { background:#e7efd9; border-color:#d4dfc3; }
.ref-kpi:first-child .ref-icon { background:#d8e5c7; }
.ref-charts { display:grid; grid-template-columns:minmax(0,1.45fr) repeat(2,minmax(0,1fr)); gap:18px; align-items:stretch; }
.ref-panel { padding:22px; min-width:0; }
.ref-title { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.ref-title h2 { font-size:18px; line-height:1.3; font-weight:650; letter-spacing:-.4px; color:#284a34; margin:0; }
.ref-title a { font-size:12px; font-weight:600; }
.ref-title small { font-size:11px; color:var(--muted); }
.ref-legend { display:flex; align-items:center; flex-wrap:wrap; gap:5px; font-size:10px; color:#60745b; }
.ref-legend i { width:9px; height:9px; background:#c8d6bd; border-radius:3px; }
.ref-legend .green { background:#2c674b; margin-left:5px; }
.ref-chart { display:block; width:100%; height:235px; }
.ref-chart text { font-family:inherit; font-size:11px; fill:#52664d; }
.ref-chart .gridline { stroke:#e7ede1; stroke-width:1; fill:none; }
.ref-chart rect[fill="#c8cfd5"] { fill:#c8d6bd; }
.ref-chart [fill="#16844d"] { fill:#2c674b; }
.ref-chart [stroke="#16844d"] { stroke:#2c674b; }
.ref-chart [fill="#e1f1e7"] { fill:#edf3e2; }
.ref-chart .donut-total { font-size:23px; font-weight:650; fill:#24452f; }
.ref-donut { display:flex; flex-direction:column; align-items:center; gap:16px; min-height:235px; }
.ref-donut svg { width:160px; height:160px; max-width:100%; }
.ref-donut ul { width:100%; list-style:none; margin:0; padding:0; }
.ref-donut li { display:flex; align-items:flex-start; gap:8px; font-size:12px; margin:9px 0; }
.ref-donut li i { width:9px; height:9px; flex:0 0 9px; border-radius:3px; margin-top:4px; }
.ref-donut li span { min-width:0; flex:1; }
.ref-donut li small { display:block; color:var(--muted); font-size:10px; }
.ref-donut li b { font-size:11px; }
.ref-values { font-size:12px; color:#607358; margin-top:15px; border-top:1px solid #e7ede1; padding-top:12px; }
.ref-values summary { font-size:11px; }
.ref-values .table-wrap { margin-bottom:0; }
.ref-values table { font-size:12px; }
.ref-source { display:block; color:#63745c; font-size:11px; line-height:1.6; margin:10px 0 0; }
.ref-empty { display:grid; place-items:center; padding:24px; min-height:235px; color:#65785d; background:#f5f8ef; border-radius:10px; font-size:13px; text-align:center; }
.ref-tables { display:grid; grid-template-columns:1fr; gap:22px; }
.ref-tables .table-wrap { margin:0; }
.ref-tables table { font-size:13px; }
.ref-tables th { font-size:11px; white-space:nowrap; }
.ref-tables td { padding:14px; white-space:nowrap; }
.ref-tables td:first-child { white-space:normal; min-width:150px; }
.ref-tables td:first-child a { font-weight:650; }
.ref-bottom { display:grid; grid-template-columns:1fr 1.25fr; gap:20px; }
.ref-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ref-actions a { display:flex; align-items:center; gap:11px; padding:14px; font-size:12px; font-weight:600; min-height:67px; background:#f0f5e8; border:1px solid #e0e9d6; border-radius:10px; color:#416238; text-decoration:none; }
.ref-actions a:hover { background:#e4eed8; border-color:#bdcea8; }
.ref-actions .icon { width:22px; height:22px; }
.ref-monthly { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.ref-monthly>div { display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:10px; padding:15px; background:#fafcf6; min-width:0; }
.ref-monthly .icon { width:24px; height:24px; color:#62824d; }
.ref-monthly small { display:block; font-size:10px; color:#617358; }
.ref-monthly b { display:block; font-size:19px; letter-spacing:-.5px; font-weight:650; margin-top:5px; overflow-wrap:anywhere; }
.cards { gap:16px; }
.kpi { background:white; border:1px solid var(--line); border-radius:15px; padding:21px; box-shadow:none; }
.kpi span { font-size:12px; color:var(--muted); }
.kpi strong { font-size:28px; letter-spacing:-.8px; color:#244d35; margin-top:18px; }
.kpi .metric-icon { background:#edf3e6; color:#507146; border-radius:9px; }
.kpi.negative strong,.negative { color:#a34735; }
.finance-list dt { font-size:13px; color:var(--muted); }
.finance-list dd { font-size:14px; color:var(--ink); }
.dashboard-hero { background:#e6efda; border:1px solid #d4e1c4; color:#28462a; border-radius:17px; padding:27px; }
.dashboard-hero h2 { color:#294b30; font-size:26px; }
.dashboard-hero p { color:#536a48; font-size:13px; }
.quick-action { border:1px solid var(--line); border-radius:13px; padding:19px; background:#fff; box-shadow:none; }
.quick-action b { font-size:14px; color:#315238; }
.quick-action small { font-size:11px; color:var(--muted); }
.quick-action .action-icon { background:#edf3e5; color:#4c6b3c; border-radius:10px; }
.job-card { border:1px solid var(--line); border-radius:15px; background:#fff; padding:23px; box-shadow:none; }
.job-card h2,.job-card h3 { color:#2b4c32; }
.job-card p,.job-card small { color:var(--muted); }

/* Reports keep their chart geometry, dataset, tabs and export controls intact. */
.report-intro p,.report-source,.report-field-note,.report-status p,.report-print-help,.report-footnote { font-size:12px; color:var(--muted); }
.report-type-card { border-color:#d8e2d1; border-radius:15px; box-shadow:none; background:#fff; padding:24px; }
.report-type-card:hover { border-color:#8eab7d; background:#f6f9f0; }
.report-type-card b { font-size:17px; color:#315232; }
.report-type-card small { font-size:12px; color:#61735b; }
.report-type-icon { color:#4e7440; background:#eaf2df; border-radius:11px; }
.report-builder { padding:28px; }
.report-builder-title h2 { font-size:23px; color:#2d4b31; }
.report-builder-title p,.report-period-choice,.report-builder .field,.report-group-choice p { font-size:13px; color:#5c6e55; }
.report-fields { gap:22px; }
.metric-options label { padding:12px; border-color:#d8e2d0; border-radius:10px; background:#fafcf7; }
.metric-options b { font-size:12px; color:#425c37; }
.report-builder-actions { gap:12px; }
.report-period { font-size:16px; color:#2c4d31; }
.report-actions .btn { font-size:12px; min-height:41px; }
.report-kpis { gap:16px; }
.report-kpi { border:1px solid var(--line); border-radius:15px; padding:23px; background:#fff; }
.report-kpi>div>span { font-size:12px; color:#61745a; }
.report-kpi>strong { font-size:29px; color:#2b5033; }
.report-result { background:#e9f1dc; border-color:#d7e3c5; }
.metric-comparison { font-size:12px; color:#59744a; }
.metric-comparison>span { font-size:11px; color:#61755a; }
.report-tabs { margin-top:30px; gap:26px; }
.report-tabs button { padding:0 3px 14px; font-size:14px; color:#63755b; }
.report-tabs [aria-selected=true] { color:#2e6038; border-color:#2e6038; }
.report-chart-panel,.report-cost-panel,.report-data-table { padding:24px; }
.report-chart-panel .panel-title h2,.report-cost-panel h2,.report-data-table .panel-title h2,.report-facts-panel h2 { font-size:18px; }
.report-chart-panel .panel-title small,.report-data-table .panel-title small,.report-chart-legend,.chart-values,.chart-caption { font-size:11px; color:#607459; }
.report-chart { fill:#53674c; }
.report-donut { width:190px; height:190px; margin:14px auto 22px; }
.report-donut small { font-size:10px; color:#617458; }
.report-donut strong { font-size:20px; color:#2f5032; }
.cost-legend li,.cost-legend b { font-size:12px; }
.report-facts { gap:17px 24px; }
.report-facts dt { font-size:12px; color:#62745c; }
.report-facts dd { font-size:17px; color:#315133; }
.report-data-table th { background:#edf2e9; font-size:11px; }
.report-data-table td { font-size:13px; padding:14px; }
.report-pagination span,.report-method summary,.report-save summary,.report-method li,.report-save p,.save-report-form>.field { font-size:12px; color:#5b6c53; }
.report-config .disclosure-note { font-size:12px; }
.saved-panel,.report-empty { color:#506844; }
.saved-report-row b { font-size:14px; }
.saved-report-row small,.saved-date,.report-empty p { font-size:12px; color:#60715a; }

/* Daily reports, attached originals and mobile controls. */
.reference-shell .day-page { max-width:1260px; }
.reference-shell .day-section { padding:27px; border-radius:16px; }
.reference-shell .day-heading h2 { font-size:27px; color:#2e4c30; }
.reference-shell .day-heading p,.reference-shell .field-help { font-size:13px; color:#627259; }
.reference-shell .day-card { border:1px solid #d7e2ce; border-radius:13px; background:#fafcf6; padding:23px; }
.reference-shell .day-card-title h3 { font-size:19px; color:#325334; }
.reference-shell .day-photo-control { background:#edf4e4; border:1px solid #d5e2c6; border-radius:11px; padding:18px; }
.reference-shell .day-empty { background:#f5f8ef; border-color:#c4d4b5; color:#607352; }
.reference-shell .day-details summary { color:#46683b; }
.reference-shell .day-savebar { border:1px solid #cbdabf; border-radius:13px; padding:15px 20px; box-shadow:0 6px 25px #1f3c2515; background:#fffffff5; }
.reference-shell .day-save-note { color:#5c7051; }
.reference-shell .day-document-row { border-color:#dee7d5; padding:14px 0; }
.reference-shell .day-upload { font-size:13px; color:#406536; }
.reference-shell .day-logout-dialog { background:#fff; border-radius:17px; padding:25px; box-shadow:0 0 0 100vmax #153c31aa,0 15px 65px #0003; }
.attachment-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; }
.attachment-grid img { width:100%; max-width:100%; height:170px; object-fit:contain; border-radius:10px; background:#f1f5eb; }
.photo-fields { display:grid; gap:18px; }
.photo-fields input[type=checkbox] { width:19px; min-height:0; }
.upload-zone { background:#f4f8ed; border:1px dashed #a9c195; border-radius:12px; padding:23px; }

/* Login is a new split composition, with two independent existing forms. */
.reference-login { background:#f4f6f0; color:var(--ink); min-height:100dvh; margin:0; display:block; }
.auth-layout { display:grid; grid-template-columns:minmax(310px,37%) minmax(0,1fr); min-height:100dvh; }
.auth-story { position:relative; display:flex; flex-direction:column; justify-content:space-between; min-height:100dvh; padding:45px; color:white; background:linear-gradient(180deg,#102f2370 0%,#102f231a 30%,#102f23f0 100%),url('forest-login.png') 30% center/cover no-repeat; }
.auth-brand .logo { color:#fff; gap:14px; }
.auth-brand .brand-mark { background:#d1dfb9; color:#153c31; border:0; border-radius:12px; box-shadow:none; }
.auth-brand .brand-copy b { font-size:34px; letter-spacing:-1.6px; }
.auth-brand .brand-copy small { color:#e1e9d6; font-size:11px; letter-spacing:.08em; }
.auth-brand .brand-dot { color:#d1dfb9; }
.auth-story-copy { padding:100px 0 16px; }
.auth-kicker { color:#d0ddbe; font-size:10px; font-weight:650; letter-spacing:.18em; }
.auth-story h1 { font-size:clamp(36px,3.2vw,56px); font-weight:550; letter-spacing:-1.9px; line-height:1.14; margin:22px 0; color:#f4f7e9; }
.auth-story-copy p { color:#dfebd6; font-size:14px; line-height:1.8; }
.auth-story-line { display:flex; align-items:center; gap:14px; border-top:1px solid #dbe6cc50; margin-top:42px; padding-top:22px; color:#d6e3c8; font-size:9px; letter-spacing:.15em; }
.auth-story-line i { width:4px; height:4px; border-radius:50%; background:#b6cb8e; }
.reference-login .auth-main { width:100%; max-width:1050px; min-width:0; margin:0 auto; padding:clamp(30px,5vw,80px) clamp(24px,4vw,64px); display:flex; flex-direction:column; justify-content:center; }
.auth-welcome { margin:0 0 34px; }
.auth-welcome h2 { color:#213f2c; font-size:clamp(32px,3vw,46px); font-weight:550; letter-spacing:-1.7px; line-height:1.15; margin:14px 0 17px; }
.auth-welcome p { font-size:14px; color:#61705a; margin:0; }
.reference-login-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.reference-login-card { border:1px solid #d8e2ce; border-radius:17px; padding:26px; background:#fff; box-shadow:0 8px 35px #183b2105; margin:0; min-width:0; }
.reference-login-card.admin { background:#edf3e4; border-color:#d6e0c7; }
.auth-card-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.login-emblem { width:40px; height:40px; display:grid; place-items:center; background:#edf3e5; color:#486e39; border:1px solid #e0e8d6; border-radius:11px; }
.admin .login-emblem { background:#dce7cc; border-color:#cfdcba; color:#466233; }
.login-emblem .icon { width:21px; height:21px; }
.auth-role-label { font-size:9px; color:#627953; font-weight:650; letter-spacing:.1em; }
.reference-login-card h2 { font-size:23px; letter-spacing:-.5px; color:#2a4d32; margin:22px 0 8px; text-align:left; }
.auth-card-description { min-height:54px; font-size:12px; line-height:1.65; color:#617159; margin:0 0 22px; }
.login-fields { display:grid; gap:16px; }
.login-fields .field { font-size:12px; }
.login-fields input { background:#fff; height:47px; font-size:14px; border:1px solid #c9d7bd; box-shadow:none; }
.login-fields .field>span { position:static; width:auto; height:auto; clip-path:none; overflow:visible; }
.login-fields .password-field input { padding-right:72px; }
.login-fields .password-toggle { right:6px; bottom:7px; height:33px; border-radius:6px; color:#48643a; font-size:10px; }
.login-fields .password-toggle:hover { background:#edf3e5; }
.login-submit { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:47px; margin:9px 0 0; padding:12px 15px; color:white; background:#245d41; border:1px solid #245d41; border-radius:9px; font-size:13px; font-weight:650; cursor:pointer; box-shadow:none; }
.login-submit:hover { background:#17492f; }
.admin .login-submit { background:#3c5630; border-color:#3c5630; }
.admin .login-submit:hover { background:#2b4221; }
.login-submit .icon { width:19px; height:19px; }
.reference-login .notice { margin:0 0 24px; }
.auth-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:18px; margin-top:29px; padding-top:22px; border-top:1px solid #d9e3ce; }
.auth-bottom>span { color:#64765b; font-size:10px; }
.subcontractor-login-link { margin:0; }
.subcontractor-login-link a { color:#46653b; font-size:12px; display:flex; align-items:center; gap:9px; text-decoration:none; }
.subcontractor-login-link a:hover { text-decoration:underline; }
.subcontractor-login-link .icon { width:16px; height:16px; }

/* Installer, recovery, and ordinary unauthenticated notices use the same system. */
body.install { min-height:100dvh; padding:48px 20px; background:#eff3e8; }
.install .installer { max-width:820px; padding:42px; margin:0 auto; border:1px solid #d4dfc8; border-radius:20px; box-shadow:0 15px 60px #26432b09; background:#fff; }
.install .installer h1 { color:#2a4d31; font-size:35px; letter-spacing:-1.2px; }
.install .setup-kicker { color:#557747; font-size:10px; }
.install .setup-intro { color:#5f7156; font-size:14px; }
.install .setup-steps { gap:9px; border-color:#e0e8d7; }
.install .setup-steps li { padding:9px 13px; background:#f1f5e9; color:#5b6f4f; font-size:12px; border-radius:9px; }
.install .setup-steps .active { background:#dce9c9; color:#385d2d; }
.install .setup-progress { background:#f0f6e7; border-color:#d6e3c6; border-radius:13px; }
.install .installer pre { background:#edf4e4; border-color:#d2e2bd; font-size:17px; }
.install .requirements { gap:10px; font-size:12px; }

@media(min-width:1700px) {
  .ref-charts { grid-template-columns:1.5fr 1fr 1fr; }
  .ref-donut { flex-direction:row; }
  .ref-donut svg { width:50%; height:220px; }
  .ref-chart { height:260px; }
  .ref-kpi { min-height:180px; padding:24px; }
  .ref-kpi strong { font-size:32px; }
  .ref-tables { grid-template-columns:minmax(0,1.8fr) minmax(0,1fr); }
}
@media(max-width:1350px) {
  .reference-shell .content { padding:28px 25px 35px; }
  .reference-shell .top { padding:0 25px; gap:16px; }
  .ref-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .ref-kpi { min-height:150px; flex-direction:row; align-items:center; gap:15px; }
  .ref-icon { flex:0 0 36px; }
  .ref-kpi strong { font-size:26px; }
  .ref-charts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ref-charts>.ref-panel:first-child { grid-column:1/-1; }
  .ref-charts>.ref-panel:first-child .ref-chart { height:270px; }
  .ref-donut { flex-direction:row; }
  .ref-donut svg { width:50%; height:auto; }
  .ref-bottom { grid-template-columns:1fr; }
  .ref-actions { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .auth-layout { grid-template-columns:32% minmax(0,1fr); }
  .auth-story { padding:32px; }
  .reference-login .auth-main { padding:45px 32px; }
  .reference-login-card { padding:22px; }
}
@media(max-width:1000px) {
  .reference-shell .top { margin-left:0; min-height:76px; height:auto; padding:14px 21px; gap:14px; }
  .reference-shell .top-brand:has(.menu-toggle) { display:flex; }
  .reference-shell .top-brand .menu-toggle { display:inline-flex; width:42px; height:42px; border:1px solid #d4dfcc; border-radius:11px; color:#315935; background:#fff; }
  .reference-shell .top-context { display:block; font-size:14px; }
  .reference-shell .shell { display:block; min-height:calc(100dvh - 76px); }
  .reference-shell .content { padding:26px 22px 100px; grid-column:1; }
  .reference-shell .sidebar { position:static; width:100%; height:auto; padding:22px; }
  .reference-shell .sidebar nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
  .reference-shell .sidebar-brand { display:none; }
  .js .reference-shell .sidebar { position:fixed; inset:0 auto 0 0; width:min(320px,90vw); height:100dvh; z-index:90; transform:translateX(-105%); visibility:hidden; transition:transform .18s ease,visibility .18s; }
  .js .reference-shell .sidebar nav { display:block; }
  .js .reference-shell .sidebar-brand { display:block; }
  .js .reference-shell.nav-open .sidebar { transform:translateX(0); visibility:visible; }
  .reference-shell .nav-close { display:inline-flex; width:35px; height:35px; color:#e7f0dd; border:1px solid #4e7161; border-radius:9px; background:#214b3d; }
  .js .reference-shell.nav-open .nav-backdrop { display:block; position:fixed; inset:0; background:#102d24a6; z-index:80; border:0; padding:0; }
  .js .reference-shell .mobile-nav { display:grid; grid-template-columns:repeat(4,1fr); position:fixed; left:0; right:0; bottom:0; z-index:45; min-height:72px; padding:8px 10px max(10px,env(safe-area-inset-bottom)); border-top:1px solid #d5e0cd; background:#fffffff5; backdrop-filter:blur(12px); }
  .reference-shell .mobile-nav a,.reference-shell .mobile-nav button { display:flex; flex-direction:column; gap:5px; justify-content:center; align-items:center; border:0; border-radius:9px; background:transparent; color:#617558; font-size:10px; padding:6px; min-width:0; min-height:48px; text-decoration:none; }
  .reference-shell .mobile-nav [aria-current],.reference-shell .mobile-nav [aria-expanded=true] { background:#e5efd8; color:#365d2b; }
  .reference-shell .mobile-nav .icon { width:21px; height:21px; }
  .reference-shell .day-savebar { bottom:88px; }
  .auth-layout { grid-template-columns:1fr; }
  .auth-story { min-height:0; padding:29px 34px 35px; background-position:center 48%; }
  .auth-story-copy { padding:36px 0 0; }
  .auth-story h1 { font-size:35px; margin:12px 0 0; }
  .auth-story h1 br { display:none; }
  .auth-story-copy p,.auth-story-line { display:none; }
  .reference-login .auth-main { max-width:860px; padding:35px 34px; }
  .auth-welcome h2 { font-size:34px; }
  .auth-welcome h2 br { display:none; }
  .auth-card-description { min-height:40px; }
}
@media(max-width:700px) {
  body { font-size:14px; }
  .reference-shell .top { padding:12px 16px; flex-wrap:wrap; column-gap:11px; row-gap:12px; }
  .reference-shell .top-context { flex:1; font-size:14px; }
  .reference-shell .topright { margin-left:auto; gap:7px; }
  .reference-shell .user-summary>span:last-child { display:none; }
  .reference-shell .logout-button { display:inline-flex; width:38px; height:38px; }
  .reference-shell .user-avatar { width:38px; height:38px; }
  .header-period { order:5; flex:1 0 100%; justify-content:space-between; }
  .header-period .field { flex:1; }
  .header-period input { max-width:none; width:100%; min-height:38px; font-size:14px; }
  .header-period .btn { min-height:38px; font-size:12px; }
  .reference-shell .content { padding:24px 16px 108px; }
  .reference-shell .page-heading { gap:14px; margin-bottom:22px; align-items:flex-start; }
  .reference-shell .page-heading h1 { font-size:28px; letter-spacing:-.9px; }
  .reference-shell .today { display:none; }
  .reference-dashboard .page-heading { padding:23px; }
  .reference-dashboard .page-heading h1 { font-size:28px; }
  .reference-overview { gap:18px; }
  .ref-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
  .ref-kpi { flex-direction:column; align-items:stretch; min-height:160px; padding:17px; gap:14px; }
  .ref-kpi:last-child { grid-column:1/-1; flex-direction:row; align-items:center; min-height:110px; gap:17px; }
  .ref-kpi strong { font-size:25px; }
  .ref-kpi span:not(.ref-icon) { font-size:12px; }
  .ref-kpi small { font-size:10px; }
  .ref-icon { width:34px; height:34px; flex-basis:34px; }
  .ref-charts,.ref-tables,.ref-bottom { grid-template-columns:1fr; gap:18px; }
  .ref-charts>.ref-panel:first-child { grid-column:auto; }
  .ref-panel,.panel { padding:21px 17px; border-radius:14px; }
  .ref-title h2 { font-size:18px; }
  .ref-charts>.ref-panel:first-child .ref-chart,.ref-chart { height:220px; }
  .ref-donut { min-height:200px; gap:15px; }
  .ref-donut svg { width:46%; }
  .ref-tables td { padding:12px; font-size:12px; }
  .ref-tables th { font-size:11px; }
  .ref-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ref-actions a { min-height:78px; flex-direction:column; align-items:flex-start; padding:15px; font-size:12px; }
  .ref-monthly { gap:9px; }
  .ref-monthly>div { flex-direction:column; align-items:flex-start; padding:15px; gap:8px; }
  .ref-monthly b { font-size:21px; }
  .ref-monthly small { font-size:11px; }
  .cards { gap:12px; }
  .kpi { padding:17px; min-height:128px; }
  .kpi strong { font-size:25px; }
  .kpi span { font-size:11px; }
  .fields,.fields.two { grid-template-columns:1fr; gap:20px; }
  .field { font-size:13px; }
  .field input,.field select,.field textarea { min-height:48px; font-size:16px; }
  .field input[type=checkbox],.field input[type=radio] { min-height:0; }
  .btn { min-height:45px; font-size:13px; white-space:normal; }
  .form-actions .btn { min-height:47px; }
  .notice { font-size:13px; padding:15px; }
  .panel-title { align-items:flex-start; flex-wrap:wrap; gap:12px; }
  .panel-title h2 { font-size:18px; }
  th,td { padding:12px; }
  .quick-action { padding:17px; }
  .quick-action b { font-size:14px; }
  .quick-action small { font-size:12px; }
  .dashboard-hero { padding:24px 21px; }
  .dashboard-hero h2 { font-size:25px; }
  .dashboard-hero p { font-size:13px; }
  .reference-shell .day-section { padding:21px 15px; }
  .reference-shell .day-card { padding:19px 14px; }
  .reference-shell .day-card-title { align-items:flex-start; gap:12px; }
  .reference-shell .day-card-title h3 { font-size:18px; }
  .reference-shell .day-savebar { padding:13px; gap:10px; }
  .reference-shell .day-save-note { width:100%; font-size:12px; }
  .reference-shell .day-savebar .btn { flex:1; min-height:46px; }
  .reference-shell .day-photo-control { padding:15px; }
  .reference-shell .day-section .form-section-heading h2 { font-size:18px; }
  .reference-shell .day-section .form-section-heading p { font-size:12px; }
  .report-type-card { padding:20px 16px; border-radius:13px; }
  .report-type-card b { font-size:16px; }
  .report-type-card small { font-size:12px; }
  .report-builder { padding:23px 17px; }
  .report-builder-title h2 { font-size:22px; }
  .report-builder .field { font-size:13px; }
  .report-builder-actions .btn,.report-actions .btn { font-size:13px; min-height:44px; }
  .report-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
  .report-kpi { padding:18px 15px; }
  .report-kpi>div>span { font-size:11px; }
  .report-kpi>strong { font-size:25px; }
  .metric-comparison,.metric-comparison>span { font-size:11px; line-height:1.6; }
  .report-chart-grid { grid-template-columns:1fr; gap:0; }
  .report-chart-panel,.report-cost-panel,.report-data-table { padding:21px 16px; }
  .report-chart-panel .panel-title small { font-size:10px; max-width:none; text-align:left; }
  .report-data-table td { font-size:12px; padding:12px; }
  .report-facts dt { font-size:12px; }
  .report-facts dd { font-size:16px; }
  .report-steps { gap:13px; font-size:11px; }
  .metric-options label { font-size:12px; }
  .metric-options b { font-size:12px; }
  .save-report-form { align-items:stretch; }
  .auth-story { padding:27px 23px 31px; }
  .auth-story-copy { padding-top:38px; }
  .auth-story h1 { font-size:32px; letter-spacing:-1px; }
  .auth-story h1 br { display:block; }
  .auth-brand .brand-copy b { font-size:31px; }
  .reference-login .auth-main { padding:29px 19px 30px; }
  .auth-welcome { margin-bottom:26px; }
  .auth-welcome h2 { font-size:30px; letter-spacing:-1px; margin:12px 0; }
  .auth-welcome p { font-size:13px; }
  .reference-login-options { grid-template-columns:1fr; gap:18px; }
  .reference-login-card { padding:25px 23px; }
  .reference-login-card h2 { font-size:25px; margin-top:17px; }
  .auth-card-description { min-height:0; margin-bottom:22px; font-size:13px; }
  .login-fields { gap:17px; }
  .login-fields .field { font-size:13px; }
  .login-fields input { font-size:16px; }
  .login-submit { min-height:49px; font-size:14px; }
  .auth-bottom { margin-top:26px; gap:20px; }
  .auth-bottom>span { font-size:11px; }
  .subcontractor-login-link a { font-size:13px; }
  body.install { padding:22px 12px; }
  .install .installer { padding:27px 20px; border-radius:16px; }
  .install .installer h1 { font-size:29px; }
  .install .setup-steps { gap:6px; }
  .install .setup-steps li { font-size:11px; padding:8px 9px; }
  .install .requirements { grid-template-columns:1fr; }
}
@media(max-width:380px) {
  .reference-shell .content { padding-right:12px; padding-left:12px; }
  .ref-kpi { padding:14px; }
  .ref-kpi strong { font-size:22px; }
  .ref-monthly b { font-size:18px; }
  .ref-donut { flex-direction:column; }
  .ref-donut svg { width:170px; }
  .reference-shell .top-context { font-size:12px; }
  .reference-login-card { padding:23px 20px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}
@media print {
  .reference-shell .top,.reference-shell .sidebar,.reference-shell .mobile-nav,.reference-shell .nav-backdrop,.reference-shell .content-footer { display:none!important; }
  .reference-shell .shell { display:block; }
  .reference-shell .content { max-width:none; width:100%; padding:0; margin:0; }
  .reference-dashboard .page-heading { background:white; padding:0 0 15px; border-radius:0; }
  .reference-dashboard .page-heading h1,.reference-dashboard .page-heading .eyebrow { color:#172f20; }
  .panel,.ref-panel,.ref-kpi,.report-kpi { box-shadow:none; border-color:#cbd6c6; break-inside:avoid; }
  .ref-kpis { grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
  .ref-kpi { display:block; min-height:0; padding:10px; }
  .ref-kpi strong { font-size:19px; }
  .ref-icon { display:none; }
  .ref-charts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ref-chart { height:200px; }
  .ref-tables { grid-template-columns:1fr; }
  .ref-values { display:none; }
  .report-data-table th,.report-data-table td { font-size:7pt; padding:5px; }
  .report-data-table .table-scroll { overflow:visible; }
  body { background:white; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* Forest photography stays behind the navigation; work surfaces remain light. */
.reference-shell .sidebar{background:linear-gradient(180deg,rgba(10,42,31,.90),rgba(10,42,31,.74) 45%,rgba(10,42,31,.43)),url('forest-login.png') 9% center/auto 1100px no-repeat #123d32}
.reference-shell .sidebar .nav-group{background:rgba(9,34,27,.36);border:1px solid #ffffff0b;border-radius:13px;padding:10px 7px;margin-bottom:12px}
.reference-shell .sidebar .nav-group h2{color:#d7e6d7}.reference-shell .sidebar .nav-group a{color:#f2f7ec;text-shadow:0 1px 3px #0006}.reference-shell .sidebar .nav-group a.selected{text-shadow:none}
.reference-shell .sidebar-footer{min-height:100px;align-items:flex-end}

/* Forest / ivory refinement. CSS-only update; charts retain their server values.
   Kept in the existing versioned asset so shared-hosting uploads need no install. */
@media screen {
  :root {
    --ink:#193b32; --muted:#62736c; --bg:#f3f5f1; --line:#dce4dc;
    --green:#205e49; --green-dark:#134333; --gold:#ac8446; --radius:20px;
    --shadow:0 2px 5px #173e2d03,0 12px 32px -22px #173e2d35;
  }
  body { -webkit-font-smoothing:antialiased; }
  .reference-shell { background:radial-gradient(ellipse at 100% 0,#eaf0e4 0,transparent 46%),var(--bg); }
  .reference-shell .top { background:#fbfcf9; border-bottom-color:#e0e7de; }
  .reference-shell .top-context { color:#50675d; font-size:13px; }
  .reference-shell .user-avatar { background:#e7eee0; border:3px solid #fff; box-shadow:0 0 0 1px #dbe5d6; }
  .reference-shell .logout-button { border-radius:13px; }
  .reference-shell .sidebar {
    background:linear-gradient(180deg,#10392ff5 0%,#10392fe8 23%,#10392fb8 66%,#102e2352 100%),url('forest-login.png') 12% center/auto 1100px no-repeat #123d32;
    border-right:1px solid #284d3f; box-shadow:5px 0 30px #153a2810;
  }
  .sidebar-brand { margin-bottom:28px; }
  .sidebar-brand .brand-mark { background:#dfe7c5; border-radius:14px; box-shadow:0 5px 18px #0002; }
  .sidebar-brand .brand-copy small { color:#c9d8c8; }
  .reference-shell .nav-search input { background:#ffffff0b; border-color:#ffffff29; border-radius:12px; }
  .reference-shell .sidebar .nav-group { background:#102e2450; border-color:#ffffff0c; border-radius:15px; padding:11px 7px; }
  .reference-shell .sidebar .nav-group h2 { color:#bdcebf; font-weight:600; font-size:9px; letter-spacing:.12em; }
  .reference-shell .sidebar .nav-group a { min-height:43px; border-radius:10px; color:#edf3e9; font-size:13px; }
  .reference-shell .sidebar .nav-group a:hover { background:#ffffff14; border-color:#ffffff12; }
  .reference-shell .sidebar .nav-group a.selected { background:linear-gradient(110deg,#e2ebcc,#cdddb5); color:#183f2d; border-color:#e6edce; box-shadow:0 4px 12px #09201925; }
  .reference-shell .sidebar-footer { color:#f1f5ea; }
  .reference-shell .sidebar-footer small { color:#d3dfcc; }
  .reference-shell .page-heading { margin-bottom:24px; }
  .reference-shell .page-heading h1 { font-weight:650; letter-spacing:-1.2px; }
  .reference-shell .page-heading .eyebrow { color:#738166; letter-spacing:.18em; }
  .reference-shell .today { border-radius:12px; color:#637361; background:#ffffffb8; padding:10px 14px; }
  .reference-shell .content-footer { color:#718071; border-top-color:#dce5d6; }
  .ai-settings-shortcut { display:flex; justify-content:flex-end; margin:-8px 0 18px; }
  .ai-settings-shortcut .btn.primary { min-height:35px; padding:8px 13px; font-size:11px; background:#e9efdf; color:#31533b; border:1px solid #d5e0c7; border-radius:9px; box-shadow:none; }
  .ai-settings-shortcut .btn.primary:hover { background:#dde9d2; }

  .panel,.ref-panel,.report-builder,.report-config,.report-method,.report-save { border-color:#dde5db; box-shadow:var(--shadow); }
  .panel-title h2,.ref-title h2 { font-weight:650; letter-spacing:-.5px; }
  .panel-title { padding-bottom:16px; border-bottom:1px solid #edf1e9; }
  .btn,button:not([class]),input,select,textarea { transition:background-color .16s,border-color .16s,box-shadow .16s; }
  .btn { border-radius:11px; }
  .btn.primary { background:linear-gradient(135deg,#286b50,#194f3d); border-color:#205a45; box-shadow:0 4px 10px #1b513216,inset 0 1px #ffffff16; }
  .btn.primary:hover { background:#174c39; box-shadow:0 5px 14px #16492f24; }
  .field { color:#415a4b; font-weight:600; }
  .field input,.field select,.field textarea { border-color:#cfdccd; border-radius:11px; box-shadow:inset 0 1px 2px #23432504; }
  .field input:hover,.field select:hover,.field textarea:hover { border-color:#a7bda1; }
  .field input:focus,.field select:focus,.field textarea:focus { border-color:#558467; box-shadow:0 0 0 4px #7ea77520; }
  .notice { border-radius:13px; }
  .badge,.chip,.ref-status { border-radius:8px; }
  .table-wrap { border-radius:15px; border-color:#dfe6da; }
  th { background:#eff3e9; color:#526847; padding-top:15px; padding-bottom:15px; font-size:11px; letter-spacing:.04em; }
  td { border-bottom-color:#e9eee5; padding-top:16px; padding-bottom:16px; }
  tbody tr:nth-child(even) { background:#fcfdfb; }
  tbody tr:hover { background:#f1f6eb; }
  .table-hint { background:#f4f7ee; }
  .empty { padding:42px 24px; }

  .reference-dashboard .page-heading { padding:28px 30px; border:1px solid #285642; border-radius:22px; background:linear-gradient(110deg,#173f32,#295d44); box-shadow:0 8px 25px -14px #16432b50; }
  .reference-dashboard .page-heading .eyebrow { color:#c8d8ae; }
  .reference-dashboard .page-heading h1 { color:#f8faef; font-size:34px; }
  .reference-dashboard .page-heading .today { color:#e9efda; background:#ffffff0c; border-color:#ffffff28; }
  .ref-kpis { gap:16px; }
  .ref-kpi { position:relative; border-radius:19px; border-color:#dfe6d9; padding:23px; gap:19px; box-shadow:var(--shadow); overflow:hidden; }
  .ref-icon { width:40px; height:40px; border-radius:12px; background:#f0f4e7; color:#4f743d; }
  .ref-kpi strong { font-weight:650; color:#234532; letter-spacing:-1px; margin:7px 0; }
  .ref-kpi span:not(.ref-icon) { color:#5c7059; }
  .ref-kpi small { color:#6a7a62; line-height:1.6; }
  .ref-kpi:first-child { background:linear-gradient(135deg,#e8f0d7,#f3f7eb); border-color:#d3e0bc; }
  .ref-kpi:first-child::after { content:""; position:absolute; top:0; bottom:0; left:0; width:4px; background:#81a657; pointer-events:none; }
  .ref-kpi:first-child .ref-icon { background:#dce9c3; }
  .ref-panel { padding:25px; border-radius:20px; }
  .ref-title { padding-bottom:15px; margin-bottom:18px; border-bottom:1px solid #edf1e7; }
  .ref-title h2 { font-size:18px; }
  .ref-legend { gap:8px; line-height:1.7; }
  .ref-chart { border-radius:12px; }
  .ref-values { border-radius:10px; }
  .ref-actions a,.quick-action { border-radius:16px; box-shadow:var(--shadow); }
  .ref-monthly { border-radius:20px; }
  .report-kpi,.kpi { border-radius:18px; box-shadow:var(--shadow); }
  .report-type-card { border-radius:17px; }
  .report-type-card:hover { border-color:#93ac81; }
  .report-tabs { gap:6px; }
  .report-facts { border-radius:14px; }
  .job-card { border-radius:18px; box-shadow:var(--shadow); }
  .dashboard-hero { border-radius:22px; background:linear-gradient(110deg,#173f32,#2b5d44); }
  .reference-shell .dashboard-hero { color:#fff; border-color:#2b5d44; }
  .reference-shell .dashboard-hero h2 { color:#fff; font-size:clamp(25px,3vw,34px); line-height:1.25; }
  .reference-shell .dashboard-hero p { color:#edf5ed; font-size:16px; line-height:1.7; }
  .reference-shell .dashboard-hero .hero-label { color:#dbeecf; font-size:12px; font-weight:700; letter-spacing:.1em; }

  /* Daily reports: clear section hierarchy and comfortable photo controls. */
  .reference-shell .day-heading { margin-bottom:22px; }
  .reference-shell .day-section { border-radius:20px; border-color:#dce5d6; box-shadow:var(--shadow); }
  .reference-shell .day-section .form-section-heading { border-bottom-color:#e4ebdf; padding-bottom:20px; margin-bottom:22px; }
  .reference-shell .form-section-heading>span { border-radius:12px; background:#e7eedb; color:#4c6b3b; border-color:#d9e3cc; box-shadow:inset 0 1px #fff; }
  .reference-shell .day-card { border:1px solid #dce5d6; border-left:4px solid #8ba56b; border-radius:15px; background:#fbfcf8; }
  .reference-shell .day-photo-control { border:1px dashed #a9bf97; border-radius:14px; background:#f3f7ec; }
  .reference-shell .day-upload { padding:12px 14px; border:1px solid #cfddc4; border-radius:11px; background:#fff; color:#335b3d; line-height:1.6; min-width:0; }
  .reference-shell .day-upload input { width:100%; min-width:0; font-size:12px; color:inherit; }
  .reference-shell .day-summary-item { border-color:#dce5d6; border-radius:16px; box-shadow:var(--shadow); }
  .reference-shell .day-summary-item:first-child { background:linear-gradient(120deg,#e4efcf,#f2f7e9); border-color:#cfdcbb; }
  .reference-shell .day-summary-item strong { font-size:27px; letter-spacing:-.6px; }
  .reference-shell .day-steps { padding:9px; gap:5px; background:#e9eee2; border:1px solid #dce5d3; border-radius:14px; }
  .reference-shell .day-steps a { border-radius:9px; padding:10px 13px; }
  .reference-shell .day-photo-first { padding:28px; background:linear-gradient(120deg,#edf4e2,#fafcf7); border-color:#d2e0c3; }
  .reference-shell .day-photo-first>h2 { color:#234c34; font-size:29px; letter-spacing:-.8px; }
  .reference-shell .day-photo-start { padding:21px; border:1px solid #dce6d3; border-radius:16px; background:#ffffffd9; box-shadow:0 4px 15px #193a2204; }
  .reference-shell .day-photo-start h3 { color:#294d34; font-size:17px; }
  .reference-shell .day-photo-start .field-help { min-height:38px; }
  .reference-shell .day-mth-delta { background:#e2eed4; border:1px solid #ccdfba; border-radius:12px; }
  .reference-shell .day-savebar { border:1px solid #d3e0c8; border-radius:16px; background:#f8fbf2; padding:18px; box-shadow:0 8px 22px -15px #24502844; }
  .reference-shell .day-meter-photos>div { background:#f1f5eb; border:1px solid #e2e9db; border-radius:14px; }
  .reference-shell .ad-intro { border-radius:22px; background:linear-gradient(110deg,#173f32,#2e6145); box-shadow:0 8px 25px -14px #16432b50; }
  .reference-shell .ad-metric { border-radius:18px; border-color:#dfe6d9; box-shadow:var(--shadow); padding:24px; }
  .reference-shell .ad-metric.ad-attention { background:linear-gradient(130deg,#faf4e6,#fffaf0); border-color:#e8dcc2; }
  .reference-shell .ad-chart-card { border-radius:20px; border-color:#dfe6d9; box-shadow:var(--shadow); padding:27px; }
  .reference-shell .ad-chart-heading { padding-bottom:15px; border-bottom:1px solid #edf1e7; }
  .reference-shell .ad-chart-card h3 { font-size:19px; letter-spacing:-.5px; }
  .reference-shell .ad-unit { border-radius:9px; background:#f2f6eb; }
  .reference-shell .ad-track { height:10px; background:#edf2e6; }
  .reference-shell .ad-shortcuts a { border-radius:10px; box-shadow:0 2px 5px #183e2304; }

  /* Both real login forms remain independent and visible on desktop. */
  .reference-login { background:linear-gradient(110deg,#102c226e,#102c2229),url('forest-login.png') center/cover fixed no-repeat #173d30; }
  .auth-layout { grid-template-columns:minmax(300px,39%) minmax(0,1fr); gap:0; padding:24px; }
  .auth-story { min-height:calc(100dvh - 48px); background:linear-gradient(0deg,#0d2a20a1,transparent 65%); border-radius:24px 0 0 24px; padding:38px 40px; }
  .auth-story h1 { font-size:clamp(38px,3.6vw,58px); color:#fffdeb; text-shadow:0 2px 30px #0a241d40; }
  .auth-story-copy { max-width:460px; }
  .auth-story-copy p { color:#edf2df; }
  .auth-story-line { color:#e4edcf; border-top-color:#f1f5db40; }
  .auth-brand .brand-mark { background:#e2eac6; border-radius:13px; box-shadow:0 5px 20px #102d2225; }
  .reference-login .auth-main { background:#f6f8effa; padding:44px clamp(24px,3.2vw,52px); border-radius:25px; border:1px solid #ffffffe8; box-shadow:0 20px 60px #09231b30; }
  .auth-welcome h2 { font-size:clamp(30px,3vw,45px); font-weight:600; color:#214a34; }
  .auth-welcome .eyebrow { color:#6e7a57; }
  .reference-login-options { gap:19px; }
  .reference-login-card { border-radius:19px; padding:26px; border-color:#dee5d5; box-shadow:0 10px 24px -17px #163d2240; }
  .reference-login-card.admin { background:linear-gradient(145deg,#eaf1dd,#f3f6eb); border-color:#d3dfbf; }
  .reference-login-card h2 { font-size:24px; margin-top:23px; font-weight:650; letter-spacing:-.65px; }
  .login-emblem { width:43px; height:43px; border-radius:13px; background:#eff4e7; }
  .auth-role-label { color:#62744e; font-size:9px; letter-spacing:.12em; }
  .login-fields input { border-radius:11px; min-height:49px; }
  .login-submit { border-radius:11px; min-height:49px; background:linear-gradient(135deg,#2c684b,#1c4f39); border-color:#245b40; box-shadow:0 4px 9px #214a2515; transition:background-color .16s,box-shadow .16s; }
  .login-submit:hover { box-shadow:0 5px 16px #173e2528; }
  .admin .login-submit { background:#48643a; border-color:#48643a; }
  .auth-bottom { border-top-color:#dce5ce; }

  @media (max-width:1350px) and (min-width:1001px) {
    .auth-layout { grid-template-columns:minmax(270px,32%) minmax(0,1fr); padding:18px; }
    .auth-story { padding:30px; min-height:calc(100dvh - 36px); }
    .reference-login .auth-main { padding:35px 26px; }
    .reference-login-card { padding:23px; }
    .ref-kpi { padding:21px; }
  }
  @media (max-width:1000px) {
    .auth-layout { grid-template-columns:1fr; padding:18px; }
    .auth-story { min-height:270px; padding:25px 28px; border-radius:20px 20px 0 0; }
    .auth-story-copy { padding-top:35px; max-width:none; }
    .auth-story h1 { font-size:36px; margin:10px 0; }
    .reference-login .auth-main { padding:34px; }
    .reference-shell .mobile-nav { border-top-color:#d9e4d0; box-shadow:0 -6px 25px #234e2d08; }
    .reference-shell .mobile-nav [aria-current] { background:#e6efd7; border-radius:12px; }
    .reference-shell .day-photo-start { padding:19px; }
  }
  @media (max-width:700px) {
    .reference-shell .page-heading { margin-bottom:22px; }
    .reference-shell .page-heading h1 { font-size:28px; letter-spacing:-.85px; }
    .reference-dashboard .page-heading { padding:22px; border-radius:19px; }
    .reference-dashboard .page-heading h1 { font-size:27px; }
    .ref-kpis { gap:11px; }
    .ref-kpi { padding:18px 15px; border-radius:16px; gap:14px; }
    .ref-kpi strong { font-size:24px; }
    .ref-icon { width:36px; height:36px; }
    .ref-panel { padding:21px 17px; border-radius:18px; }
    .ai-settings-shortcut { justify-content:flex-start; margin:-5px 0 19px; }
    .ai-settings-shortcut .btn.primary { min-height:40px; }
    .panel-title { padding-bottom:13px; }
    .field input,.field select,.field textarea { font-size:16px; }
    .reference-shell .day-section { padding:21px 15px; border-radius:17px; }
    .reference-shell .day-photo-first { padding:23px 17px; }
    .reference-shell .day-photo-first>h2 { font-size:25px; }
    .reference-shell .day-photo-start { padding:19px 15px; }
    .reference-shell .day-photo-start .field-help { min-height:0; }
    .reference-shell .day-steps a { font-size:11px; padding:8px 10px; }
    .reference-shell .day-summary-item { padding:16px; }
    .reference-shell .day-summary-item strong { font-size:24px; }
    .reference-shell .day-card { padding:19px 14px; }
    .reference-shell .day-upload { padding:11px; }
    .reference-shell .day-savebar { padding:14px; }
    .reference-shell .ad-intro { padding:24px; border-radius:18px; }
    .reference-shell .ad-metric { padding:19px 15px; border-radius:16px; }
    .reference-shell .ad-metric strong { font-size:26px; }
    .reference-shell .ad-chart-card { padding:23px 18px; border-radius:18px; }
    .auth-layout { padding:12px; }
    .auth-story { min-height:285px; padding:22px; }
    .auth-story h1 { font-size:35px; }
    .reference-login .auth-main { padding:28px 18px; border-radius:20px; }
    .auth-welcome h2 { font-size:31px; }
    .reference-login-card { padding:25px 23px; }
    .reference-login-options { grid-template-columns:1fr; }
  }
}

/* Readable working interface: comfortable type and contrast on PC and phones. */
@media screen {
  body { font-size:16px; line-height:1.65; }
  .reference-shell .sidebar .nav-group a { font-size:14px; min-height:46px; }
  .reference-shell .sidebar .nav-group h2,.reference-shell .sidebar-heading { font-size:11px; letter-spacing:.08em; color:#dce7d7; }
  .reference-shell .nav-search input { font-size:14px; min-height:46px; }
  .reference-shell .top-context,.reference-shell .user-summary b { font-size:14px; }
  .reference-shell .user-summary small,.sidebar-footer small { font-size:12px; }
  .eyebrow,.reference-shell .page-heading .eyebrow { font-size:12px; letter-spacing:.12em; }
  .reference-shell .today { font-size:13px; }
  .reference-shell .ai-settings-shortcut .btn { font-size:13px; min-height:41px; }
  .reference-shell .content p { font-size:15px; line-height:1.7; }
  .field,.login-fields .field { font-size:14px; color:#314c3d; }
  .field input,.field select,.field textarea { font-size:16px; min-height:49px; }
  .field input[type=checkbox],.field input[type=radio] { min-height:0; }
  .reference-shell .field-help,.form-section-heading p,.disclosure-note { font-size:13px; color:#48604e; line-height:1.7; }
  .btn,button:not([class]) { font-size:14px; min-height:46px; }
  .btn.sm { font-size:13px; min-height:40px; }
  .notice { font-size:14px; line-height:1.7; }
  .badge,.chip,.ref-status { font-size:12px; padding:6px 10px; }
  table { font-size:14px; }
  th { font-size:12px; letter-spacing:.015em; color:#3d593f; }
  td { color:#2e4938; line-height:1.65; }
  .table-hint,.table-wrap .empty { font-size:13px; }
  .ref-kpi span:not(.ref-icon),.kpi>span,.report-kpi>div>span { font-size:14px; color:#435c42; }
  .ref-kpi small,.ref-title small,.ref-source,.ref-donut li small,.ref-values summary { font-size:12px; color:#48604b; line-height:1.7; }
  .ref-legend { font-size:12px; color:#405d43; }
  .ref-donut li,.ref-donut li b { font-size:13px; }
  .ref-chart text { font-size:12px; fill:#36533e; }
  .ref-chart .donut-total { font-size:23px; }
  .report-type-card small,.report-facts dt,.metric-comparison { font-size:13px; color:#465e49; }
  .reference-shell .ad-metric>div { font-size:14px; color:#45613e; }
  .reference-shell .ad-metric p,.reference-shell .ad-chart-help,.reference-shell .ad-scope { font-size:13px; color:#486042; }
  .reference-shell .ad-legend,.reference-shell .ad-bars li>div:first-child,.reference-shell .ad-bars li b,.reference-shell .ad-status li { font-size:13px; }
  .reference-shell .ad-bar-column>span,.reference-shell .ad-month>b,.reference-shell .ad-data summary { font-size:12px; color:#3f5c37; }
  .reference-shell .ad-review-note { font-size:14px; }
  .reference-shell .day-section { padding:28px; border:1px solid #d6e2cd; box-shadow:0 10px 26px -22px #183e304d; }
  .reference-shell .day-section .form-section-heading { padding-bottom:22px; }
  .reference-shell .day-section .form-section-heading h2 { font-size:22px; letter-spacing:-.5px; }
  .reference-shell .day-section .form-section-heading p { font-size:14px; color:#48604d; }
  .reference-shell .form-section-heading>span { width:45px; height:45px; font-size:15px; flex-shrink:0; }
  .reference-shell .day-card { margin:21px 0; padding:25px; border-left:4px solid #75965b; }
  .reference-shell .day-card-title h3 { font-size:20px; color:#21452f; }
  .reference-shell .day-fields { gap:21px; }
  .reference-shell .day-readonly { font-size:16px; }
  .reference-shell .day-steps { gap:7px; }
  .reference-shell .day-steps a { font-size:13px; padding:11px 14px; }
  .reference-shell .day-summary-item span { font-size:14px; color:#415940; }
  .reference-shell .day-summary-item strong { font-size:29px; }
  .reference-shell .day-photo-first { padding:30px; border-left:5px solid #76994f; background:linear-gradient(115deg,#eaf2dc,#fafcf6); }
  .reference-shell .day-photo-first>h2 { font-size:32px; line-height:1.2; margin:14px 0; }
  .reference-shell .day-photo-start { padding:23px; border-radius:18px; background:white; border-color:#d0dfc2; box-shadow:0 7px 22px -16px #173c2633; }
  .reference-shell .day-photo-start h3 { font-size:19px; line-height:1.4; letter-spacing:-.3px; }
  .reference-shell .day-photo-start .field-help { font-size:14px; color:#465e40; }
  .reference-shell .day-upload { font-size:14px; line-height:1.65; padding:15px; }
  .reference-shell .day-upload input { font-size:13px; }
  .reference-shell .day-photo-control .field-help,.reference-shell .day-ai-field .field-help { font-size:13px; color:#425d3d; }
  .reference-shell .day-mth-delta { padding:17px; font-size:18px; }
  .reference-shell .day-savebar { padding:22px; gap:14px; }
  .reference-shell .day-save-note { font-size:14px; color:#425b42; }
  .reference-shell .day-savebar .btn { min-height:52px; font-size:15px; }
  .reference-shell .day-details summary { font-size:14px; color:#315c3e; padding:8px 0; }
  .auth-welcome p,.auth-card-description { font-size:15px; color:#486041; line-height:1.7; }
  .auth-card-description { min-height:76px; }
  .auth-role-label { font-size:11px; letter-spacing:.05em; color:#4e6842; }
  .login-fields input { font-size:16px; min-height:50px; }
  .login-fields .password-toggle { font-size:12px; }
  .login-submit { font-size:15px; min-height:52px; }
  .auth-bottom>span,.subcontractor-login-link a { font-size:13px; color:#48603d; }
  @media(max-width:1000px) {
    .reference-shell .mobile-nav a,.reference-shell .mobile-nav button { font-size:12px; }
    .reference-shell .day-section { padding:25px 21px; }
  }
  @media(max-width:700px) {
    .reference-shell .content p { font-size:14px; }
    .reference-shell .day-section { padding:23px 17px; }
    .reference-shell .day-section .form-section-heading { gap:13px; }
    .reference-shell .day-section .form-section-heading h2 { font-size:21px; line-height:1.35; }
    .reference-shell .day-card { padding:21px 15px; }
    .reference-shell .day-fields { gap:14px; }
    .reference-shell .day-photo-first { padding:25px 19px; }
    .reference-shell .day-photo-first>h2 { font-size:28px; }
    .reference-shell .day-photo-start { padding:23px 17px; }
    .reference-shell .day-photo-start h3 { font-size:20px; }
    .reference-shell .day-steps a { font-size:12px; padding:10px; }
    .reference-shell .day-summary-item strong { font-size:26px; }
    .reference-shell .day-savebar { padding:17px; }
    .ref-kpi span:not(.ref-icon) { font-size:13px; }
    .ref-kpi strong { font-size:25px; }
    .ref-legend { font-size:12px; }
    .auth-card-description { min-height:0; font-size:15px; }
  }
}
