:root{font-family:Inter,"Segoe UI",Tahoma,sans-serif;color:#243333;background:#f6f8f8;font-synthesis:none;--ink:#153c38;--green:#176e62;--muted:#728381;--line:#e4eae8;--soft:#eef4f1;--amber:#ad7530}*{box-sizing:border-box}body{margin:0;font-size:14px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button,a{touch-action:manipulation}button{cursor:pointer;background:white;border:1px solid #d8e1de;border-radius:8px;padding:10px 15px;color:var(--ink);font-weight:600}button:hover{background:#eef5f1;border-color:#b5cbc4}button:disabled{opacity:.5;cursor:wait}a{color:var(--green);text-decoration:none}.primary{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:#115a50;color:white}.danger{color:#a34436}.sidebar{width:238px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:30px 18px;z-index:10}.brand{display:flex;align-items:center;gap:12px;padding:0 12px 36px;color:#173e38;font-weight:750;font-size:23px;letter-spacing:1px}.brand small{display:block;font-size:8px;letter-spacing:1.5px;color:#7f918b;margin-top:5px}.brand-mark{display:grid;place-items:center;background:var(--ink);color:#d6eadc;border-radius:13px;width:41px;height:44px;font-size:26px}.nav-label{font-size:9px;font-weight:700;color:#97a39e;letter-spacing:1.7px;margin:0 15px 13px}.nav-button{border:0;background:transparent;text-align:left;width:100%;display:flex;gap:13px;align-items:center;font-weight:500;margin:3px 0;padding:12px 16px;color:#75847e}.nav-button.active{background:#eaf3ee;color:#176e62;font-weight:700}.nav-icon{font-size:19px;width:23px;text-align:center}.nav-count{margin-left:auto;font-size:10px;background:#fff;padding:3px 6px;border-radius:5px}.nav-divider{height:1px;background:var(--line);margin:18px 12px}.sidebar-foot{margin-top:auto;padding:22px 9px 0;display:flex;align-items:center;gap:10px;color:#536861;font-size:11px}.sidebar-foot small{display:block;font-size:9px;color:#98a69e;margin-top:5px}.status-dot{width:8px;height:8px;border-radius:50%;background:#79a981}.shell{margin-left:238px}.topbar{height:83px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;background:#ffffffb8}.breadcrumb{color:#8c9995;font-size:12px}.slash{margin:0 16px;color:#c1cbc7}.topbar strong{font-size:12px;font-weight:600}.top-actions{display:flex;align-items:center;gap:20px}.today{font-size:11px;color:#82938d}.avatar{background:#ebf1ea;border:3px solid #fff;border-radius:50%;padding:10px;font-size:11px;color:#698565}.icon-button{font-size:21px;padding:4px 10px;border:0;background:transparent;color:#758a82}main{max-width:1550px;margin:auto;padding:38px 42px 45px}footer{padding:20px 42px;color:#8f9e97;font-size:10px;border-top:1px solid var(--line)}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:var(--green);text-transform:uppercase}.page-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}h1{font-size:31px;letter-spacing:-1px;font-weight:600;margin:10px 0}h2{font-size:18px;font-weight:600;letter-spacing:-.3px;margin:0}h3{font-size:14px;margin:0}p{line-height:1.65}.page-header p{margin:0;color:#8a9691;font-size:12px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:25px}.metric{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;min-height:138px;box-shadow:0 3px 7px #29463b03}.metric .label{font-size:11px;color:#819087}.metric strong{display:block;font-weight:550;font-size:28px;letter-spacing:-1px;margin:17px 0 9px}.metric small{font-size:10px;color:#8b9c91}.metric.accent{background:var(--ink);color:#fff;border:0}.metric.accent .label,.metric.accent small{color:#a9c5b8}.split{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(270px,1fr);gap:23px;margin-bottom:26px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.panel-title{padding:22px 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f3f1}.panel-title small{color:#97a69e;font-size:10px}.activity{padding:4px 24px}.activity-row{padding:19px 0;display:flex;gap:13px;align-items:center;border-bottom:1px solid #f1f4f2}.activity-row:last-child{border-bottom:0}.activity-icon{width:34px;height:34px;border-radius:10px;background:#eef4ef;display:grid;place-items:center;color:#5b8471}.activity-row small{display:block;color:#91a098;margin-top:5px;font-size:10px}.activity-row strong{font-size:11px;font-weight:600}.activity-row .amount{margin-left:auto;font-size:12px;white-space:nowrap}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:25px 0}.quick{background:#fff;border:1px solid var(--line);border-radius:10px;text-align:left;padding:20px;display:flex;align-items:center;gap:15px}.quick span{font-size:23px;font-weight:400;color:#698878}.quick small{display:block;font-size:10px;margin-top:5px;color:#94a198;font-weight:400}.quick strong{font-size:12px}.toolbar{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px}.search{max-width:350px;flex:1;min-width:180px}.toolbar input,.toolbar select{border:1px solid var(--line);border-radius:8px;padding:11px 14px;background:#fff;color:#486257}.segments{display:flex;gap:4px;background:#eaf0ed;border-radius:8px;padding:4px}.segments button{border:0;background:transparent;padding:7px 13px;font-size:11px}.segments .selected{background:white;box-shadow:0 1px 4px #173e3812}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:9px;letter-spacing:.8px;text-transform:uppercase;color:#8b9b92;background:#fafcfb;font-weight:650;padding:15px 21px;border-bottom:1px solid var(--line)}td{font-size:12px;padding:16px 21px;border-bottom:1px solid #edf2ef;color:#63766b}tr:last-child td{border-bottom:0}td strong{font-weight:600;color:#344f42}td small{display:block;font-size:10px;color:#98a69c;margin-top:5px}.text-button{padding:0;background:none;border:0;color:var(--green);font-size:12px;text-align:left}.badge{display:inline-block;padding:5px 9px;font-size:9px;border-radius:5px;background:#eef3f0;color:#7a8e81;font-weight:600}.badge.green{background:#e9f5ed;color:#428061}.badge.amber{background:#fcf3e4;color:#b18945}.badge.red{background:#fbefea;color:#bd7862}.badge.blue{background:#edf1fa;color:#728cb4}.empty{text-align:center;padding:55px 22px;color:#879b90}.empty h3{font-size:16px;color:#456653}.empty p{font-size:12px}.table-footer{display:flex;justify-content:space-between;padding:14px 22px;font-size:10px;color:#9aa99f;align-items:center}.table-footer button{font-size:10px;padding:6px 11px}.notice{padding:13px 17px;background:#eef4f0;border:1px solid #dfeae3;color:#72917c;border-radius:8px;font-size:11px;line-height:1.6;margin:15px 0}.notice.amber{background:#fff8eb;color:#9c7b47;border-color:#f0e2c6}.amount{text-align:right}.muted{color:#91a197}.chart{padding:23px 25px}.chart-head{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#92a396}.bars{height:125px;display:flex;gap:12px;align-items:flex-end;margin:25px 0 15px}.bar-column{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px}.bar{background:#bed3c4;width:70%;min-height:3px;border-radius:4px 4px 0 0}.bar-column:last-child .bar{background:#457d65}.bar-column small{font-size:9px;color:#9eaca2}.loading{padding:60px;color:#7c9183}dialog{width:min(1000px,94vw);max-height:92vh;border:1px solid #dce7df;border-radius:17px;padding:0;color:#344f42;box-shadow:0 25px 100px #14362533}dialog::backdrop{background:#12281f55;backdrop-filter:blur(3px)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:23px 27px;border-bottom:1px solid var(--line)}.modal-head h2{font-size:20px}.modal-head small{display:block;color:#98a79d;font-size:10px;margin-top:7px}.modal-content{padding:25px 27px}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.form-grid label,.field{display:flex;flex-direction:column;gap:7px;font-size:10px;font-weight:600;color:#7e9183}.form-grid input,.form-grid select,.field input,.field select,.field textarea{width:100%;border:1px solid #dfe8e1;border-radius:7px;background:#fff;padding:10px 11px;color:#36523e;font-size:12px;min-width:0}.field{margin:16px 0}.field textarea{min-height:70px}.wide{grid-column:1/-1}.form-actions{display:flex;gap:10px;justify-content:flex-end;padding-top:22px;border-top:1px solid var(--line);margin-top:22px}.line-tools{display:flex;gap:10px;margin:22px 0 12px;align-items:center}.line-tools h3{margin-right:auto}.line-tools button{font-size:11px;padding:8px 10px}.edit-line{display:grid;grid-template-columns:minmax(140px,3fr) 65px 86px 62px 60px 42px 55px;gap:8px;padding:13px 0;border-bottom:1px solid var(--line);align-items:center}.edit-line input,.edit-line select,.edit-line textarea{width:100%;padding:8px 6px;border:1px solid #e0e8e2;border-radius:5px;min-width:0;background:#fff;font-size:11px;color:#45614a}.edit-line button{padding:2px 5px;font-size:11px}.line-note{grid-template-columns:1fr 55px}.line-note textarea{min-height:52px}.line-head{font-size:9px;color:#90a196}.line-controls{display:flex;gap:3px}.totals{margin:22px 0 5px auto;max-width:310px}.total-row{display:flex;justify-content:space-between;padding:7px 0;font-size:12px;color:#859b8c}.total-row.grand{font-size:21px;color:#1c5942;border-top:1px solid #dce9df;margin-top:8px;padding-top:17px}.form-error{color:#a84736;background:#fff1eb;padding:11px;font-size:12px;border-radius:7px}.form-error:empty{display:none}.doc-top{display:flex;justify-content:space-between;gap:30px;margin-bottom:23px}.doc-top h3{font-size:19px;color:#2c5540}.doc-top p{font-size:11px;color:#8c9d92;white-space:pre-line}.doc-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:23px}.doc-actions button{font-size:11px}.note-row{white-space:pre-wrap;max-width:600px;color:#829485}.rules{padding:26px;line-height:1.8}.rules p,.rules li{color:#809285;font-size:12px}.rules h3{margin-top:23px}#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);padding:14px 24px;border-radius:9px;color:#fff;background:#25563e;box-shadow:0 6px 25px #12322222;z-index:100;font-size:12px;max-width:80vw}#printArea{display:none}@media(max-width:1100px){main{padding:27px}.sidebar{width:205px}.shell{margin-left:205px}.topbar{padding:0 27px}.metrics{gap:10px}.metric{padding:17px}.metric strong{font-size:23px}.split{grid-template-columns:1fr}.quick-actions{gap:10px}.quick{padding:15px}}@media(max-width:740px){.sidebar{position:static;width:auto;padding:18px}.brand{padding:0 0 15px}.nav-label,.sidebar-foot{display:none}#nav{display:flex;overflow-x:auto}.nav-button{width:auto;white-space:nowrap;padding:10px}.nav-icon,.nav-count,.nav-divider{display:none}.shell{margin:0}.topbar{height:60px;padding:0 18px}.today{display:none}main{padding:22px 17px}.metrics{grid-template-columns:1fr 1fr}.page-header{align-items:flex-start}h1{font-size:26px}.page-header .primary{font-size:11px}.quick-actions{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}.edit-lines{overflow:auto}.edit-line{min-width:660px}.modal-content{padding:17px}.toolbar{gap:8px}footer{padding:18px}.top-actions{gap:8px}}@media print{body>*{display:none!important}#printArea{display:block!important;padding:25px;color:#111;font-size:12px;background:white}#printArea h1{font-size:25px}#printArea table{white-space:normal}#printArea th,#printArea td{padding:9px;border-bottom:1px solid #ddd}#printArea .note-row{white-space:pre-wrap}#printArea .totals{break-inside:avoid}#printArea .print-meta{display:flex;justify-content:space-between;margin:20px 0}#printArea .print-label{font-size:10px;color:#666}#printArea a{color:#333}}
/* Keep navigation accessible in short windows without scrolling the content pane. */
.sidebar{height:100dvh;overflow:hidden}
.sidebar .brand,.sidebar .nav-label,.sidebar-foot{flex-shrink:0}
.sidebar #nav{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b8cdc2 transparent}
.sidebar-foot{margin-top:0}
.customer-picker{min-width:240px;max-width:480px;width:100%;margin:0}
.customer-info{margin-bottom:28px}
.customer-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0;padding:24px}
.customer-details dt{font-size:11px;color:#8a9b90;margin-bottom:8px}
.customer-details dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.project-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 0 16px}
.project-heading p{color:#81978b;font-size:12px}
.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:20px}
.project-card h3{overflow-wrap:anywhere;line-height:1.5}
.project-body{padding:22px}
.project-description{white-space:pre-wrap;overflow-wrap:anywhere;color:#6d8477;margin-top:0}
.project-dates{display:flex;justify-content:space-between;gap:15px;background:#f4f8f5;border-radius:8px;padding:17px;margin:18px 0}
.project-dates small{display:block;font-size:9px;letter-spacing:1px;color:#8b9f91;margin-bottom:8px}
.project-dates strong{font-size:13px;font-weight:600}
.form-grid textarea{font:inherit;padding:10px;border:1px solid #dfe8e1;border-radius:7px;resize:vertical}
@media(max-width:1000px){.project-grid{grid-template-columns:1fr}}
@media(max-width:740px){.sidebar{height:auto;overflow:visible}.sidebar #nav{flex:none;overflow-x:auto;overflow-y:hidden}.nav-button{flex-shrink:0}.customer-details{grid-template-columns:1fr}.project-heading{align-items:flex-start}.project-heading button{white-space:nowrap}.project-dates{flex-wrap:wrap}}
.project-name{font-size:14px;line-height:1.5;text-decoration:underline;text-decoration-color:#b7cec0;text-underline-offset:4px}
.project-back{margin-bottom:18px}

.item-finder{margin:24px 0;padding:20px;background:#f3f8f6;border:1px solid #d7e5df;border-radius:12px}.item-finder h3{margin:0 0 16px}.item-filters{display:grid;grid-template-columns:2fr 1fr;gap:16px}.item-choice{display:flex;gap:14px;align-items:end;margin-top:14px}.item-choice label{flex:1;min-width:0}.item-choice select{width:100%;text-overflow:ellipsis}.item-choice button{flex-shrink:0}.item-finder p{font-size:12px;margin:10px 0 0}@media(max-width:650px){.item-filters{grid-template-columns:1fr}.item-choice{align-items:stretch;flex-direction:column}}

.customer-documents{margin:24px 0}.customer-documents .panel-title p{font-size:13px;color:var(--muted);margin:8px 0 0}.customer-doc-filter{display:flex;align-items:end;gap:20px;padding:16px 24px}.customer-doc-filter label{min-width:230px}.customer-doc-table{max-height:460px;overflow:auto}.customer-doc-table thead th{position:sticky;top:0;background:#f7faf9;z-index:1}@media(max-width:650px){.customer-documents .panel-title{align-items:stretch;flex-direction:column;gap:12px}.customer-doc-filter{flex-wrap:wrap}}

.pdf-preview{width:min(1100px,96vw);max-width:96vw;height:94dvh;max-height:94dvh;padding:0;background:#e8edeb}.pdf-preview-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:20px;padding:18px 24px;background:white;border-bottom:1px solid #d9e1dd}.pdf-preview-header div{flex:1}.pdf-preview-header h2{margin:0}.pdf-preview-header p{font-size:12px;margin:6px 0 0}.pdf-preview-pages{padding:20px}.pdf-preview-pages figure{margin:0 auto 24px;max-width:834px}.pdf-preview-pages img{display:block;width:100%;height:auto;box-shadow:0 2px 12px #0002}.pdf-preview-pages figcaption{text-align:center;margin:0 0 10px;font-size:12px}@media(max-width:650px){.pdf-preview-header{flex-wrap:wrap;padding:12px;gap:10px}.pdf-preview-header div{flex-basis:100%}.pdf-preview-pages{padding:10px}}


/* =========================================================
   DARK THEME
   Keeps the existing green branding while switching the UI
   to a dark, low-glare color palette.
   ========================================================= */

:root{
  color-scheme:dark;
  --ink:#dce9e4;
  --green:#35a892;
  --muted:#8fa59c;
  --line:#293934;
  --soft:#1b2925;
  --amber:#d29a4d;
  background:#111816;
  color:#dce9e4;
}

body{
  background:#111816;
  color:#dce9e4;
}

button{
  background:#1b2824;
  border-color:#344740;
  color:#dce9e4;
}

button:hover{
  background:#24352f;
  border-color:#426057;
}

button:disabled{
  opacity:.45;
}

a,
.text-button{
  color:#35a892;
}

.primary{
  background:#237f6d;
  border-color:#237f6d;
  color:#fff;
}

.primary:hover{
  background:#2d9984;
  color:#fff;
}

.sidebar{
  background:#151f1c;
  border-right-color:#293934;
}

.brand{
  color:#dce9e4;
}

.brand small{
  color:#81968e;
}

.brand-mark{
  background:#0d3b34;
  color:#9ed6c8;
}

.nav-label{
  color:#70847c;
}

.nav-button{
  color:#8fa39b;
}

.nav-button:hover{
  background:#1d2b27;
}

.nav-button.active{
  background:#173b34;
  color:#43b29c;
}

.nav-count{
  background:#202d29;
  color:#9aada6;
}

.nav-divider{
  background:#293934;
}

.sidebar-foot{
  color:#9aada6;
}

.sidebar-foot small{
  color:#70847c;
}

.status-dot{
  background:#63b77a;
}

.topbar{
  background:#151f1cdd;
  border-bottom-color:#293934;
  backdrop-filter:blur(10px);
}

.breadcrumb{
  color:#788c84;
}

.slash{
  color:#455852;
}

.topbar strong{
  color:#cbd9d4;
}

.today{
  color:#81958d;
}

.avatar{
  background:#20322c;
  border-color:#151f1c;
  color:#9bb5ab;
}

.icon-button{
  color:#8fa59c;
}

.icon-button:hover{
  background:#1d2b27;
  color:#dce9e4;
}

footer{
  color:#71857d;
  border-top-color:#293934;
}

.eyebrow{
  color:#42ad98;
}

.page-header p{
  color:#849890;
}

.metric,
.panel,
.quick{
  background:#18221f;
  border-color:#293934;
  box-shadow:0 5px 18px #00000022;
}

.metric .label{
  color:#81958d;
}

.metric strong{
  color:#e0ebe7;
}

.metric small{
  color:#81958d;
}

.metric.accent{
  background:#123d35;
  color:#fff;
  border-color:#1b5a4d;
}

.metric.accent .label,
.metric.accent small{
  color:#a7d2c6;
}

.panel-title{
  border-bottom-color:#293934;
}

.panel-title small{
  color:#81958d;
}

.activity{
  background:#18221f;
}

.activity-row{
  border-bottom-color:#273530;
}

.activity-icon{
  background:#20342e;
  color:#70b69f;
}

.activity-row small{
  color:#81958d;
}

.activity-row strong{
  color:#cbdad4;
}

.activity-row .amount{
  color:#cbdad4;
}

.quick{
  color:#dce9e4;
}

.quick:hover{
  background:#1d2b27;
}

.quick span{
  color:#6fb59f;
}

.quick small{
  color:#81958d;
}

.toolbar input,
.toolbar select{
  background:#151f1c;
  border-color:#33453f;
  color:#cbd9d4;
}

.toolbar input::placeholder{
  color:#667a72;
}

.segments{
  background:#202d29;
}

.segments button{
  color:#8fa39b;
}

.segments .selected{
  background:#293b35;
  color:#dce9e4;
  box-shadow:0 1px 5px #00000040;
}

th{
  background:#141e1b;
  color:#82968e;
  border-bottom-color:#293934;
}

td{
  color:#9aada5;
  border-bottom-color:#25332f;
}

td strong{
  color:#cbdad4;
}

td small{
  color:#71857d;
}

.badge{
  background:#24322e;
  color:#93a79f;
}

.badge.green{
  background:#173d32;
  color:#72c09f;
}

.badge.amber{
  background:#46351f;
  color:#d6a45e;
}

.badge.red{
  background:#422925;
  color:#d88772;
}

.badge.blue{
  background:#273449;
  color:#91a8d0;
}

.empty{
  color:#80958c;
}

.empty h3{
  color:#a9beb5;
}

.notice{
  background:#1b332b;
  border-color:#294d40;
  color:#8fbba8;
}

.notice.amber{
  background:#382d1d;
  color:#c8a064;
  border-color:#5b4528;
}

.muted{
  color:#7f938a;
}

.chart{
  background:#18221f;
}

.chart-head{
  color:#80958b;
}

.bar{
  background:#496d5e;
}

.bar-column:last-child .bar{
  background:#3b9a80;
}

.bar-column small{
  color:#7d9188;
}

.loading{
  color:#81968c;
}

dialog{
  background:#18221f;
  border-color:#344740;
  color:#cbdad4;
  box-shadow:0 25px 100px #00000088;
}

dialog::backdrop{
  background:#050b09aa;
  backdrop-filter:blur(4px);
}

.modal-head{
  border-bottom-color:#293934;
}

.modal-head small{
  color:#81958c;
}

.modal-content{
  background:#18221f;
}

.form-grid label,
.field{
  color:#8da198;
}

.form-grid input,
.form-grid select,
.field input,
.field select,
.field textarea,
.form-grid textarea{
  background:#121b19;
  border-color:#344740;
  color:#cbdad4;
}

.form-grid input::placeholder,
.field input::placeholder,
.field textarea::placeholder{
  color:#647871;
}

.form-grid input:focus,
.form-grid select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:#3c9e89;
  box-shadow:0 0 0 2px #2b8d7825;
}

.form-actions{
  border-top-color:#293934;
}

.line-tools{
  color:#cbdad4;
}

.edit-line{
  border-bottom-color:#293934;
}

.edit-line input,
.edit-line select,
.edit-line textarea{
  background:#121b19;
  border-color:#344740;
  color:#cbdad4;
}

.line-head{
  color:#80948b;
}

.total-row{
  color:#81968c;
}

.total-row.grand{
  color:#65b99f;
  border-top-color:#344740;
}

.form-error{
  color:#e39a84;
  background:#3c2521;
}

.doc-top h3{
  color:#9bc2b4;
}

.doc-top p{
  color:#81958c;
}

.note-row{
  color:#81958c;
}

.rules p,
.rules li{
  color:#81958c;
}

.item-finder{
  background:#172a25;
  border-color:#2c4b41;
}

.item-finder h3{
  color:#cbdad4;
}

.customer-details dt{
  color:#81958c;
}

.customer-details dd{
  color:#cbdad4;
}

.project-heading p{
  color:#81958c;
}

.project-description{
  color:#82978e;
}

.project-dates{
  background:#1e2c28;
}

.project-dates small{
  color:#81968c;
}

.project-dates strong{
  color:#cbdad4;
}

.project-name{
  text-decoration-color:#416b5d;
}

.customer-doc-filter label{
  color:#8da198;
}

.customer-doc-table thead th{
  background:#141e1b;
}

.pdf-preview{
  background:#101715;
}

.pdf-preview-header{
  background:#18221f;
  border-bottom-color:#293934;
}

.pdf-preview-header p{
  color:#81958c;
}

.pdf-preview-pages figcaption{
  color:#9aada5;
}

#toast{
  background:#237f6d;
  box-shadow:0 6px 25px #00000055;
}

/* Scrollbars */
*{
  scrollbar-width:thin;
  scrollbar-color:#3b5149 #141d1a;
}

*::-webkit-scrollbar{
  width:9px;
  height:9px;
}

*::-webkit-scrollbar-track{
  background:#141d1a;
}

*::-webkit-scrollbar-thumb{
  background:#3b5149;
  border-radius:8px;
  border:2px solid #141d1a;
}

*::-webkit-scrollbar-thumb:hover{
  background:#4b675d;
}

/* Keep native controls dark where supported */
input,
select,
textarea,
button{
  color-scheme:dark;
}

.login-panel{max-width:520px;margin:70px auto;padding:36px;}
.login-panel form{display:grid;gap:20px;}
#sessionControls{font-size:13px;}
#sessionControls[hidden]{display:none;}
#sessionControls button{padding:6px 10px;font-size:12px;}
#optionsForm textarea{width:100%;}
@media(max-width:800px){.login-panel{margin:20px auto;padding:24px;}.top-actions{flex-wrap:wrap;}#sessionUser{display:none;}}
/* Print must remain white */
@media print{
  body{
    background:white;
    color:#111;
  }

  #printArea{
    background:white;
    color:#111;
  }
}
.note-editor{min-width:0;}
.note-image-tools{display:flex;align-items:center;gap:12px;margin:10px 0;}
.note-image-tools small{color:var(--muted);font-size:11px;}
.note-image-board{position:relative;width:100%;max-width:600px;white-space:normal;overflow:hidden;}
.note-image-board.editable{border:1px dashed var(--line);border-radius:8px;background:rgba(127,127,127,.05);}
.note-image{position:absolute;}
.note-image img{display:block;width:100%;height:100%;object-fit:contain;}
.editable .note-image{cursor:move;touch-action:none;outline:1px solid var(--green);}
.note-image .image-remove{position:absolute;top:0;right:0;background:rgba(0,0,0,.75);color:white;z-index:1;width:22px;height:22px;border:0;border-radius:3px;font-weight:700;}
.image-resize{position:absolute;right:0;bottom:0;width:18px;height:18px;background:var(--green);border:2px solid white;cursor:nwse-resize;touch-action:none;}
.note-row .note-image-board{margin:10px 0;}
@media(max-width:740px){.line-note{min-width:0;}.note-image-tools{flex-wrap:wrap;}}
.rich-note,.rich-note-view{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;max-width:600px;width:100%;}
.rich-note{border:1px solid var(--line);border-radius:7px;padding:12px;min-height:110px;max-width:none;background:var(--bg);font-size:12px;outline:none;}
.rich-note:focus{border-color:var(--green);box-shadow:0 0 0 2px rgba(45,154,132,.15);}
.rich-note:empty:before{content:'Type text or paste an image here…';color:#8a9691;pointer-events:none;}
.inline-note-image{display:inline-block;position:relative;vertical-align:top;margin:4px;max-width:100%;white-space:normal;}
.inline-note-image img{display:block;width:100%;height:100%;object-fit:contain;}
.rich-note .inline-note-image{outline:1px solid var(--green);cursor:grab;}
.inline-image-remove{position:absolute;right:0;top:0;width:22px;height:22px;border:0;background:rgba(0,0,0,.75);color:white;border-radius:3px;z-index:1;}
.inline-image-resize{position:absolute;bottom:0;right:0;width:18px;height:18px;background:var(--green);border:2px solid white;cursor:nwse-resize;touch-action:none;}

.inline-note-image.wide-image{display:block;}

.note-format-tools{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0;align-items:center}.note-format-tools button{padding:5px 8px;font-size:11px}.note-format-tools label{display:flex;align-items:center;gap:5px;font-size:11px}.note-format-tools select{width:auto;padding:5px;min-height:28px}.note-format-tools input[type=color]{width:34px;height:28px;padding:2px}

/* Editor height is a workspace convenience, never part of a saved document. */
.rich-note{resize:vertical;overflow:auto;height:220px;position:relative;min-height:110px;}
.rich-note-view{position:relative;}
.inline-note-image.floating-image{position:absolute;z-index:2;margin:0;touch-action:none;display:block;cursor:move;}
.note-format-tools{position:sticky;top:0;z-index:5;background:var(--panel,var(--bg));border-bottom:1px solid var(--line);margin-bottom:10px;}

/* PDF note: A4 width minus 60pt page margins, 12pt frame inset and 8pt padding.
   Keep 515.276pt of text at 96 CSS pixels/inch, even on narrow screens. */
.note-editor{overflow-x:auto;padding:2px;}
.rich-note,.rich-note-view{box-sizing:content-box;width:515.276pt;max-width:none;padding:4pt;font-family:Tahoma,Arial,sans-serif;font-size:8pt;line-height:11pt;color:#000;background:#dfdfdf;white-space:pre-wrap;overflow-wrap:break-word;}
.rich-note{border-radius:0;height:220px;resize:vertical;overflow:auto;background:var(--bg);color:var(--ink);}
.rich-note:empty:before{color:var(--muted);}
.receipt-logo{display:block;width:175px;height:auto;margin-bottom:20px}
.receipt-amounts{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:24px 0;break-inside:avoid}
.receipt-amounts section{padding:16px;border:1px solid var(--line);border-radius:8px}
.receipt-amounts strong{display:block;font-size:24px;margin-top:12px;color:var(--green)}
.receipt-summary{margin:20px 0;break-inside:avoid}
.receipt-proof{margin:24px 0;break-inside:avoid}
.receipt-proof figcaption{font-size:12px;margin-bottom:12px}
.receipt-proof img{display:block;max-width:100%;max-height:440px;object-fit:contain}
.receipt-upload{margin:20px 0}
@media print{.receipt-amounts{grid-template-columns:1fr 1fr}.receipt-amounts strong,.receipt-summary{color:#111}.receipt-proof img{max-height:110mm}#printArea .notice{background:white;color:#111;border:1px solid #bbb}}
