:root{font-family:system-ui,sans-serif;color:#172b29;background:#edf2ef;--green:#135a46;--line:#d5e0db;--muted:#4c625b}*{box-sizing:border-box}body{margin:0;display:grid;grid-template-columns:221px minmax(0,1fr);min-height:100vh}aside{background:#102e28;color:#fff;padding:30px 19px;display:flex;flex-direction:column;gap:37px}.brand{display:flex;align-items:center;gap:10px;font-size:.78rem;letter-spacing:.06em}.mark{background:#f4d574;color:#1e3027;border-radius:10px;padding:11px;font-size:1.05rem}nav{display:grid;gap:7px}nav a{color:#daeae1;padding:11px 14px;text-decoration:none;border-radius:8px}nav a[aria-current]{background:#255346;color:#fff;font-weight:700}aside small{margin-top:auto;color:#b8d3c6}main{padding:32px clamp(16px,3vw,48px);max-width:1500px;width:100%;margin:auto;align-self:start;margin-top:0}.page,.invoice-head,.bill-head,.totals div,.record{display:flex;justify-content:space-between;gap:16px}.page{align-items:center;margin-bottom:22px;flex-wrap:wrap}h1,h2,h3,p,dl{margin:0}h1{font-size:clamp(1.8rem,4vw,2.55rem);letter-spacing:-.05em}p,address{color:var(--muted);line-height:1.55}address{font-style:normal;margin-top:8px}.paper{background:white;border:1px solid var(--line);border-radius:16px;padding:clamp(14px,2.4vw,32px);box-shadow:0 6px 24px #183d2d08}.invoice-head{padding-bottom:22px;border-bottom:2px solid var(--green)}h2{font-size:1.23rem;color:var(--green)}.metadata{display:grid;justify-items:end;gap:5px;white-space:nowrap}.metadata strong{letter-spacing:.14em;color:var(--green)}.metadata span{font-weight:700}.metadata label{max-width:165px}.billing{margin:20px 0}.bill-head{align-items:center}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 16px}label{display:grid;gap:5px;font-size:.875rem;font-weight:650}input,select,textarea,button{font:inherit;color:inherit;border:1px solid var(--line);border-radius:7px;background:#fff;padding:8px;min-width:0}button{cursor:pointer;font-weight:650;padding:9px 13px}button:hover{background:#e4eee9}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#104634}.actions{display:flex;flex-wrap:wrap;gap:7px}select{max-width:100%}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:670px;font-size:.875rem}th{text-align:left;background:#e4eee8;padding:10px 5px;white-space:nowrap}td{border-bottom:1px solid var(--line);padding:4px}td input{width:100%;padding:5px}td:last-child,th:last-child{text-align:right;white-space:nowrap}td:first-child{width:12%}td:nth-child(2){width:9%}td:nth-child(4),td:nth-child(5){width:11%}td:nth-child(6){width:13%}.totals{margin:22px 0 0 auto;max-width:330px;font-variant-numeric:tabular-nums}.totals div{padding:8px}.totals dd{margin:0;font-weight:700}.final{background:#e4eee8;border-radius:7px;color:#124936;font-size:1.1rem}.records{margin-top:25px}.record{padding:12px 0;border-top:1px solid var(--line);align-items:center}.record div{overflow-wrap:anywhere}.record button{flex-shrink:0}#notice{position:fixed;bottom:18px;right:18px;background:#102e28;color:white;padding:12px 16px;border-radius:8px;z-index:2}section[hidden],tr[hidden],#notice[hidden]{display:none}.print-value{display:none}
@media(max-width:760px){body{display:block}aside{padding:12px 16px;gap:9px}nav{display:flex;flex-wrap:wrap}aside small{display:none}main{padding-top:16px}.invoice-head{flex-wrap:wrap}.metadata{justify-items:start}.bill-head{flex-wrap:wrap}}
@media print{@page{size:letter;margin:.5in}body{display:block;background:white;color:#000;font-size:10pt}aside,.page,.bill-head select,#notice,#inventory,#clients,#old-invoices,#admin,.paper input,.paper textarea{display:none!important}main,.paper{margin:0;padding:0;max-width:none;border:0;box-shadow:none}.invoice-head{flex-wrap:nowrap}.metadata{justify-items:end}.print-value{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font-weight:400}.table-scroll{overflow:visible}table{min-width:0;table-layout:fixed;font-size:9pt}th{white-space:normal}td,th{padding:4px}tr[data-empty=true]{display:none}.totals,.invoice-head,tr{break-inside:avoid}thead{display:table-header-group}}

.invoice-search{max-width:420px}

.invoice-brand{display:flex;align-items:center;gap:clamp(10px,2vw,20px);min-width:0}
.invoice-brand address{overflow-wrap:anywhere}
.invoice-logo{width:clamp(66px,10vw,112px);height:auto;flex-shrink:0;display:block}
@media print{.invoice-logo{width:.95in}}

.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:14px;margin-bottom:18px}
.dashboard-card{display:grid;gap:8px;text-decoration:none;color:var(--muted)}
.dashboard-card:hover{border-color:var(--green)}
.dashboard-card strong{font-size:1.9rem;color:var(--green)}
.dashboard-action{padding:9px 13px;background:var(--green);color:white;border-radius:7px;text-decoration:none;font-weight:650}
.dashboard-history .invoice-search{margin-top:12px}

.records-bulk{align-items:center;margin-top:20px}
.records-bulk[hidden]{display:none}
.records-select{display:flex;align-items:center;gap:6px}
.selectable-record-title{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-items:start}
.selectable-record-title p{grid-column:2}

.import-control{position:relative;display:inline-flex;align-items:center;padding:9px 13px;border:1px solid var(--line);border-radius:7px;background:#fff;font:inherit;font-weight:650;cursor:pointer}
.import-control:hover{background:#e4eee9}
.import-control:focus-within{outline:2px solid var(--green);outline-offset:2px}
.import-control input[type=file]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}

/* The public sign-in screen shares only the app’s base typography and controls. */
.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
  color: #16332b;
  background: radial-gradient(ellipse at top, #244d3e 0%, #102c25 60%, #0b211c 100%);
}
.auth-main {
  display: grid;
  place-items: center;
  max-width: none;
  align-self: stretch;
  margin: 0;
  padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 36px);
}
.auth-card {
  width: min(100%, 440px);
  border: 1px solid #e4eae6;
  border-top: 4px solid #d0a856;
  border-radius: 18px;
  padding: clamp(22px, 5vw, 38px);
  background: #fff;
  box-shadow: 0 20px 60px #07181355;
}
.auth-header { text-align: center; }
.auth-header img { display: block; margin: 0 auto 12px; object-fit: contain; }
.auth-brand { color: #456459; font-size: .875rem; font-weight: 700; }
.auth-card h1 { margin: 4px 0 0; font-size: clamp(1.55rem, 5vw, 2rem); }
.auth-card > p { margin-top: 16px; }
.auth-card form { display: grid; gap: 16px; margin-top: 24px; }
.auth-card label { gap: 7px; }
.auth-card input:not([type=hidden]), .auth-card button { min-height: 46px; padding-inline: 12px; }
.auth-card button { margin-top: 4px; }
.auth-card input:focus-visible, .auth-card button:focus-visible {
  outline: 2px solid #17644f;
  outline-offset: 2px;
}
.auth-card .auth-error {
  color: #8f252c;
  background: #fdf1f1;
  border: 1px solid #f3d5d6;
  border-radius: 8px;
  padding: 10px 12px;
}
.auth-footer { border-top: 1px solid #b6cdc333; padding: 14px 16px; }
.auth-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; }
.auth-footer a { color: #e1eee7; font-size: .875rem; padding: 8px 5px; }
.auth-footer a:hover, .auth-footer a:focus-visible { color: #ffdc8c; text-decoration: underline; }
.sign-out button{width:100%}

.sign-out button{color:#132e26;background:#ffd875;border-color:#ffd875;font-weight:700}
.sign-out button:hover{background:#ffe6a3;border-color:#ffe6a3}
.sign-out button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.users-panel{margin-top:18px}
.users-panel p[role=status]{margin-block:10px}
@media print{#myInvoices{display:none!important}}

@media print {
  #invoice .invoice-print-frame,
  #invoice .invoice-print-band,
  #invoice .invoice-print-band > .paper {
    border: 2pt solid;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #invoice .invoice-print-frame { border-color: #c52533; }
  #invoice .invoice-print-band { border-color: #d8a323; }
  #invoice .invoice-print-band > .paper {
    border-color: #08713b;
    border-radius: 0;
    padding: .22in;
  }
  #invoice th:nth-child(1) { width: 12%; }
  #invoice th:nth-child(2) { width: 7%; }
  #invoice th:nth-child(3) { width: 33%; }
  #invoice th:nth-child(4) { width: 11%; }
  #invoice th:nth-child(5) { width: 9%; }
  #invoice th:nth-child(6), #invoice th:nth-child(7) { width: 14%; }
  #invoice .totals { margin-bottom: 0; }
}

.annual-summary { margin-bottom: 18px; }
.annual-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin: 14px 0; }
.annual-totals div { background: #edf4ef; border-radius: 8px; padding: 12px; }
.annual-totals dd { margin: 4px 0 0; color: var(--green); font-size: 1.45rem; font-weight: 700; }

.account-controls summary { cursor: pointer; font-weight: 650; }
.account-controls form { display: grid; gap: 8px; margin-top: 10px; }
.account-delete { color: #98242f; border-color: #d9a2a8; }
.account-delete:hover { background: #fbeef0; }

/* Refreshed GCS visual identity */
@media screen {
:root{--green:#18543e;--line:#dbe3dd;background:#f4f6f3;color:#18332b}
aside{background:linear-gradient(165deg,#123e30,#0b241e);border-right:3px solid #c6a052;position:sticky;top:0;height:100vh;overflow:auto;gap:24px}
.brand-crest{width:52px;height:52px;object-fit:contain;background:white;padding:3px;border-radius:9px}
.paper{border-radius:12px;box-shadow:0 5px 18px #193b2510}
.dashboard-card{border-top:3px solid #c6a052;min-height:110px}
.annual-totals div{background:#f5f4eb;border:1px solid #e8e0c7}
.page h1{font-weight:760;letter-spacing:-.035em}
button,input,select,textarea{min-height:36px}
input:focus,select:focus,textarea:focus{outline:2px solid #a98b47;outline-offset:1px}
.auth-card{border-top:6px solid #c6a052}
@media(max-width:760px){aside{position:static;height:auto;overflow:visible;border-right:0;border-bottom:3px solid #c6a052}.fields{grid-template-columns:1fr}.record{flex-wrap:wrap}}
}
