/* Regal Site Desk. Dark first, light on toggle. Navy and gold follow the firm's own colours; Manrope and Barlow Condensed are the faces on its website. */
:root {
  --bg: #060A13; --bg2: #0B1220; --panel: rgba(255,255,255,.045); --panel2: rgba(255,255,255,.075); --solid: #0F1828;
  --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16); --ink: #EAF0FA; --muted: #8C9AB4; --faint: #5C6A84;
  --gold: #E9A93A; --gold2: #C98A12; --on-gold: #1A1204; --blue: #5BA4F2; --ok: #3ED6A0; --warn: #F5B94A; --bad: #F4707C;
  --glow1: rgba(233,169,58,.16); --glow2: rgba(52,120,220,.18); --grid: rgba(120,160,230,.055); --shadow: 0 18px 50px rgba(0,0,0,.45);
  --ui: "Manrope", "Segoe UI", system-ui, sans-serif; --num: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --r: 14px; --side: 262px; color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F5F9; --bg2: #E9EEF5; --panel: rgba(255,255,255,.86); --panel2: #FFFFFF; --solid: #FFFFFF;
  --line: #DCE3EC; --line2: #C3CEDC; --ink: #0A1A30; --muted: #56667E; --faint: #8C99AD;
  --gold: #B67A08; --gold2: #9A6500; --on-gold: #FFFFFF; --blue: #0F4C86; --ok: #0E8A5F; --warn: #A86A00; --bad: #C2313F;
  --glow1: rgba(206,148,22,.16); --glow2: rgba(16,74,128,.12); --grid: rgba(8,45,89,.05); --shadow: 0 16px 40px rgba(8,45,89,.10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 600px at 100% -10%, var(--glow1), transparent 60%), radial-gradient(900px 700px at -10% 110%, var(--glow2), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0/44px 44px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0/44px 44px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .num { font-family: var(--num); letter-spacing: .01em; line-height: 1.05; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
.ic { flex: none; }
.muted { color: var(--muted); } .gold { color: var(--gold); } .okc { color: var(--ok); } .badc { color: var(--bad); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes ring { from { stroke-dashoffset: 100; } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes pop { 0% { transform: scale(.6) rotate(-14deg); opacity: 0; } 60% { transform: scale(1.12) rotate(-6deg); opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(220%); } }
@keyframes reveal { from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 5%)); } to { clip-path: circle(150% at var(--tx, 90%) var(--ty, 5%)); } }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal .65s cubic-bezier(.3,.7,.2,1); }
.view > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.view > :nth-child(2) { --i: 1 } .view > :nth-child(3) { --i: 2 } .view > :nth-child(4) { --i: 3 } .view > :nth-child(5) { --i: 4 } .view > :nth-child(6) { --i: 5 } .view > :nth-child(n+7) { --i: 6 }
.no-anim *, .no-anim *::before { animation: none !important; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.15fr .85fr; }
.art { position: relative; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font: 800 15px var(--ui); letter-spacing: .16em; text-transform: uppercase; }
.brand b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(140deg, var(--gold), var(--gold2)); color: var(--on-gold); font: 700 22px var(--num); letter-spacing: 0; }
.brand span span { color: var(--gold); }
.art h1 { font-size: clamp(44px, 5.2vw, 78px); font-weight: 700; text-transform: uppercase; max-width: 11ch; }
.art h1 em { font-style: normal; color: var(--gold); }
.art p.lead { color: var(--muted); font-size: 17px; max-width: 44ch; margin-top: 18px; }
.sketch { position: absolute; right: 28px; bottom: 96px; width: min(54%, 560px); opacity: .85; z-index: 0; }
.art > div, .art > .chips { position: relative; z-index: 1; }
.sketch path { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: draw 2.2s cubic-bezier(.5,.1,.2,1) both; animation-delay: calc(var(--d, 0) * 160ms); }
.sketch path.g { stroke: var(--gold); stroke-width: 2.2; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.fchip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; backdrop-filter: blur(8px); animation: rise .7s both, floaty 6s ease-in-out infinite; animation-delay: calc(var(--i) * 180ms + .8s), calc(var(--i) * -1.3s); }
.fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2.4s infinite; }
.gate { display: grid; place-items: center; padding: 32px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left)); }
.gatecard { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; padding: 34px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(18px); animation: rise .7s .15s both; }
.gatecard h2 { font-size: 38px; font-weight: 700; text-transform: uppercase; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.input, select.input { height: 50px; padding: 0 16px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line2); font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s; }
textarea.input { height: auto; padding: 12px 16px; min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); }
.err { color: var(--bad); font-weight: 700; min-height: 22px; font-size: 14px; }
.themebtn { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; z-index: 5; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 14.5px; background: var(--panel2); border: 1px solid var(--line2); transition: transform .15s, background .2s, border-color .2s, opacity .2s; position: relative; overflow: hidden; text-decoration: none; white-space: nowrap; }
@media (hover: hover) {
  .btn:hover { border-color: var(--gold); transform: translateY(-1px); }
  .iconbtn:hover { border-color: var(--gold); transform: rotate(-8deg); }
  button.chip:not([disabled]):hover { transform: scale(1.06); }
  .nav:hover { color: var(--ink); background: var(--panel); transform: translateX(3px); }
  .abtn:hover { transform: translateY(-3px); border-color: var(--gold); }
  .photo:hover img { transform: scale(1.07); }
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn.goldb { background: linear-gradient(140deg, var(--gold), var(--gold2)); color: var(--on-gold); border-color: transparent; }
.btn.goldb::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-120%); }
.btn.goldb:hover::after { animation: sheen .9s; }
.btn.big { height: 54px; font-size: 16px; border-radius: 14px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--t, var(--muted)) 16%, transparent); color: var(--t, var(--muted)); border: 1px solid color-mix(in srgb, var(--t, var(--muted)) 30%, transparent); transition: transform .15s; }
.chip.ok { --t: var(--ok); } .chip.warn { --t: var(--warn); } .chip.bad { --t: var(--bad); } .chip.info { --t: var(--blue); } .chip.goldc { --t: var(--gold); }
.sample { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); border: 1px dashed var(--line2); padding: 2px 8px; border-radius: 6px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 22px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 70%, transparent); backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; }
.side .brand { padding: 0 8px 4px; }
.navg { display: flex; flex-direction: column; gap: 2px; }
.navg > p { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 0 12px 6px; }
.nav { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none; position: relative; transition: color .2s, background .2s, transform .2s; }
.nav.on { color: var(--ink); background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 20%, transparent), transparent 85%); }
.nav.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav.on .ic { color: var(--gold); }
.who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(140deg, var(--blue), #1b3f77); color: #fff; font: 700 17px var(--num); flex: none; }
.who p { font-size: 13.5px; font-weight: 700; line-height: 1.25; } .who p small { display: block; color: var(--muted); font-weight: 600; }
.top { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 14px 28px; padding-top: max(14px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .title { flex: 1; min-width: 0; } .top .title h1 { font-size: 30px; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .title p { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; white-space: nowrap; text-decoration: none; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2.2s infinite; }
.pill b { font: 700 18px var(--num); color: var(--gold); letter-spacing: .03em; }
.main { padding: 26px 28px 60px; padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }
.view { display: flex; flex-direction: column; gap: 20px; max-width: 1320px; margin: 0 auto; }
.mob { display: none; }

/* ---------- cards ---------- */
.card { position: relative; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); padding: 22px; backdrop-filter: blur(10px); min-width: 0; overflow: hidden; transition: border-color .25s, transform .25s; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--gold) 13%, transparent), transparent 60%); }
.card:hover { border-color: var(--line2); } .card:hover::before { opacity: 1; }
.card > * { position: relative; }
.chead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.chead h2 { font-size: 24px; font-weight: 700; text-transform: uppercase; } .chead p { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
@media (min-width: 1280px) { .kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 901px) and (max-width: 1279px) { .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi:has(.spark) .sub { padding-right: 96px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.kpi .lab { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font: 700 52px/1 var(--num); letter-spacing: .01em; display: flex; align-items: baseline; gap: 6px; }
.kpi .val small { font-size: 20px; color: var(--muted); font-weight: 600; }
.kpi .sub { font-size: 13px; color: var(--muted); }
.kpi svg.spark { position: absolute; right: 14px; bottom: 14px; width: 92px; height: 38px; opacity: .9; }
.spark polyline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: draw 1.4s .3s both; }
.spark polygon { fill: color-mix(in srgb, var(--gold) 16%, transparent); }
.ringw { position: relative; display: grid; place-items: center; }
.ringw svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ringw circle { fill: none; stroke-width: 9; } .ringw .rt { stroke: var(--panel2); }
.ringw .rv { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); animation: ring 1.5s cubic-bezier(.3,.7,.2,1) both; }
.ringw b { position: absolute; font: 700 46px var(--num); } .ringw b small { font-size: 20px; color: var(--muted); }
.rows { display: flex; flex-direction: column; gap: 13px; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 14px; font-weight: 600; }
.prow span:nth-child(2) { font: 600 17px var(--num); color: var(--muted); } .prow .bar { grid-column: 1 / -1; }
.bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--p); border-radius: 99px; background: linear-gradient(90deg, var(--gold2), var(--gold)); transform-origin: left; animation: grow 1.1s cubic-bezier(.3,.7,.2,1) both; animation-delay: calc(var(--k, 0) * 50ms + .2s); }
.bar i.ok { background: linear-gradient(90deg, #1f9d74, var(--ok)); } .bar i.bad { background: linear-gradient(90deg, #b63a48, var(--bad)); } .bar i.blue { background: linear-gradient(90deg, #2c6cc0, var(--blue)); }
.feed { display: flex; flex-direction: column; }
.fitem { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; text-decoration: none; }
.fitem:last-child { border: 0; } .fitem i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-top: 6px; }
.fitem.new i { background: var(--ok); animation: pulse 1.6s infinite; } .fitem small { color: var(--muted); display: block; } .fitem time { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.empty { color: var(--muted); padding: 14px 0; }

/* ---------- tables ---------- */
.tw { overflow-x: auto; margin: 0 -6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; padding: 9px 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr { transition: background .2s; } .tbl tbody tr:hover { background: var(--panel); }
.tbl td.r, .tbl th.r { text-align: right; } .tbl td.n { font: 600 17px var(--num); white-space: nowrap; } .tbl tr.flag { background: color-mix(in srgb, var(--warn) 12%, transparent); } .tbl tr.tot td { font-weight: 800; border-top: 2px solid var(--line2); }
details.add { margin-bottom: 16px; } details.add > summary { list-style: none; display: inline-flex; } details.add > summary::-webkit-details-marker { display: none; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px dashed var(--line2); animation: rise .35s both; }
.formgrid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.formgrid .input { height: 44px; font-size: 15px; }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.seg button.on { background: var(--gold); color: var(--on-gold); }

/* ---------- specific views ---------- */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.abtn { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 700; transition: transform .2s, border-color .2s; }
.abtn .ic { color: var(--gold); } .abtn small { color: var(--muted); font-weight: 600; }
.steppers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.stp { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }
.stp div { display: flex; align-items: center; gap: 10px; } .stp b { font: 700 26px var(--num); min-width: 34px; text-align: center; }
.stp button { width: 38px; height: 38px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line2); font-size: 20px; font-weight: 700; transition: transform .1s, border-color .2s; } .stp button:active { transform: scale(.88); } .stp button:hover { border-color: var(--gold); }
.totalbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.totalbar .val { font: 700 44px var(--num); } .totalbar .val small { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.photo { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--line); background: var(--panel2); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.photo figcaption { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; font-size: 13px; font-weight: 700; } .photo figcaption small { display: block; font-weight: 500; opacity: .8; }
.drop { display: grid; place-items: center; gap: 8px; text-align: center; aspect-ratio: 4/3; border-radius: 16px; border: 2px dashed var(--line2); color: var(--muted); font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; } .drop:hover { border-color: var(--gold); color: var(--gold); } .drop input { display: none; }
.pour { display: flex; flex-direction: column; gap: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.ck { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: border-color .2s, background .2s, transform .1s; }
.ck:active { transform: scale(.98); } .ck b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line2); flex: none; color: transparent; transition: all .2s; }
.ck.on { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); } .ck.on b { background: var(--ok); border-color: var(--ok); color: #04130d; }
.stamp { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 16px; border: 3px solid var(--ok); color: var(--ok); border-radius: 10px; font: 700 20px var(--num); letter-spacing: .08em; text-transform: uppercase; transform: rotate(-6deg); animation: pop .6s cubic-bezier(.2,.8,.2,1) both; } .stamp small { font: 700 11px var(--ui); letter-spacing: .06em; }
.bubble { white-space: pre-line; padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: color-mix(in srgb, var(--ok) 13%, var(--solid)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); font-size: 14.5px; line-height: 1.55; max-width: 520px; } .bubble::first-line { font-weight: 800; }
.slot { display: flex; flex-direction: column; gap: 14px; } .slot .when { font: 700 54px/1 var(--num); } .slot .when small { font-size: 18px; color: var(--muted); margin-left: 8px; font-weight: 600; }
.chan { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; } .chan:last-child { border: 0; } .chan small { display: block; color: var(--muted); font-weight: 600; }
.gantt { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr); gap: 9px 14px; align-items: center; font-size: 13.5px; font-weight: 600; }
.gantt .axis, .gantt .trk { position: relative; height: 22px; } .gantt .axis span { position: absolute; top: 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); border-left: 1px solid var(--line2); padding-left: 5px; height: 100%; }
.gantt .trk { border-radius: 7px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 26 - 1px), var(--line) calc(100% / 26 - 1px) calc(100% / 26)); }
.gantt .pl { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); overflow: hidden; transform-origin: left; animation: grow .9s cubic-bezier(.3,.7,.2,1) both; animation-delay: calc(var(--k) * 60ms); }
.gantt .pl i { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, var(--gold2), var(--gold)); } .gantt .pl i.ok { background: linear-gradient(90deg, #1f9d74, var(--ok)); } .gantt .pl i.bad { background: var(--bad); }
.gantt .now { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--bad); border-radius: 2px; }
.msplit { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.pageimg { border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #fff; cursor: zoom-in; position: sticky; top: 96px; } .pageimg img { display: block; width: 100%; }
.zoom { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; animation: rise .25s both; } .zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.part .no { font: 700 64px/1 var(--num); color: var(--gold); } .part h3 { font-size: 26px; text-transform: uppercase; margin: 6px 0 4px; }
.part ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; } .part li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; font-size: 14.5px; font-weight: 600; }
.part li b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); font: 700 15px var(--num); }
.switch { width: 44px; height: 26px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line2); position: relative; flex: none; transition: background .25s; } .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s; }
.switch.on { background: color-mix(in srgb, var(--gold) 55%, transparent); } .switch.on::after { transform: translateX(18px); background: #fff; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14.5px; } .mrow:last-child { border: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14.5px; } .kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; font-weight: 700; }
pre.log { margin: 0; font: 500 12.5px/1.7 ui-monospace, Consolas, monospace; color: var(--muted); overflow-x: auto; }
pre.log b { color: var(--ok); font-weight: 600; } pre.log i { color: var(--gold); font-style: normal; }
.report { background: #fff; color: #10203a; border-radius: 12px; padding: 18px; overflow-x: auto; } .report h3 { font: 800 15px var(--ui); letter-spacing: .02em; } .report p { font-size: 12.5px; color: #4b5b73; }
.report table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; min-width: 460px; } .report th, .report td { border: 1px solid #9aa7ba; padding: 5px 7px; text-align: center; } .report th { background: #082d59; color: #fff; font-weight: 700; } .report td:nth-child(2) { text-align: left; font-weight: 700; }

/* ---------- toast, sheet ---------- */
.toasts { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--solid); border: 1px solid var(--line2); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; max-width: min(380px, calc(100vw - 32px)); animation: rise .35s both; transition: opacity .4s, transform .4s; }
.toast.bad { border-color: var(--bad); } .toast.out { opacity: 0; transform: translateY(10px); } .toast .ic { color: var(--ok); } .toast.bad .ic { color: var(--bad); }
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); animation: rise .2s both; }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 86dvh; overflow-y: auto; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--solid); border-top: 1px solid var(--line2); animation: sheetup .38s cubic-bezier(.2,.8,.2,1) both; display: flex; flex-direction: column; gap: 16px; }
@keyframes sheetup { from { transform: translateY(100%); } }
.sheet::before { content: ""; width: 44px; height: 5px; border-radius: 9px; background: var(--line2); align-self: center; }
.sheet h3 { font-size: 22px; text-transform: uppercase; } .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mgrid a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; text-decoration: none; line-height: 1.25; } .mgrid a .ic { color: var(--gold); }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; } .art { padding: 28px 22px 0; border: 0; min-height: 0; gap: 22px; } .art h1 { font-size: 46px; } .art p.lead { font-size: 15px; margin-top: 10px; }
  .sketch { position: relative; right: auto; bottom: auto; width: 100%; max-height: 180px; margin: -6px 0 -18px; } .chips { display: none; } .gate { padding-top: 18px; align-items: start; } .gatecard { padding: 24px; }
  .shell { grid-template-columns: 1fr; } .side { display: none; } .mob { display: flex; }
  .top { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); gap: 8px; } .top .title h1 { font-size: 24px; } .top .title p { display: none; } .top .desk { display: none; }
  .pill { height: 38px; padding: 0 10px; font-size: 12.5px; } .pill span { display: none; }
  .main { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .view { gap: 14px; } .cols, .cols.even, .msplit { grid-template-columns: 1fr; gap: 14px; } .stack { gap: 14px; } .card { padding: 16px; border-radius: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 14px; } .kpi .val { font-size: 40px; } .kpi .lab { font-size: 11px; letter-spacing: .05em; } .kpi svg.spark { width: 62px; height: 28px; right: 10px; bottom: 10px; }
  .chead h2 { font-size: 21px; } .pageimg { position: static; }
  .tbl thead { display: none; } .tbl, .tbl tbody { display: block; } .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 0; text-align: left !important; } .tbl td::before { content: attr(data-l); display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); } .tbl td.wide { grid-column: 1 / -1; }
  .gantt { grid-template-columns: 1fr; gap: 3px; } .gantt .lbl { margin-top: 8px; } .gantt .axis { display: none; } .gantt .hd { display: none; }
  .toasts { left: 14px; right: 14px; bottom: calc(92px + env(safe-area-inset-bottom)); align-items: stretch; } .toast { max-width: none; }
  .tabbar { position: fixed; z-index: 10; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; border-radius: 22px; background: color-mix(in srgb, var(--solid) 88%, transparent); border: 1px solid var(--line2); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; color: var(--muted); text-decoration: none; transition: color .2s, transform .2s; }
  .tabbar .on { color: var(--gold); transform: translateY(-2px); } .tabbar .fab { justify-self: center; width: 54px; height: 54px; border-radius: 18px; background: linear-gradient(140deg, var(--gold), var(--gold2)); color: var(--on-gold); display: grid; place-items: center; transform: translateY(-14px); box-shadow: 0 10px 24px color-mix(in srgb, var(--gold) 45%, transparent); }
  .tabbar .fab:active { transform: translateY(-12px) scale(.94); }
}
@media (min-width: 901px) { .tabbar { display: none; } }
@media print { body::before, .side, .top, .tabbar, .toasts, .noprint { display: none !important; } .shell { display: block; } .main { padding: 0; } .view > :not(.printme) { display: none; } .card { border: 0; padding: 0; background: none; } }

/* v2 — the same Regal palette, tuned for a working desk. */
:root { --r: 16px; --faint: #97A5BB; }
:root[data-theme="light"] { --faint: #596B83; --ok: #08744F; --gold: #996400; --gold2: #855700; --warn: #855200; }
body::before { background: radial-gradient(900px 600px at 100% -10%,var(--glow1),transparent 65%); }
::selection { color: var(--on-gold); background: var(--gold); }
* { scrollbar-color: var(--line2) var(--bg2); scrollbar-width: thin; }
input, textarea { caret-color: var(--gold); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
a { text-underline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.workspace, .view > *, .formgrid > *, .tbl td, .top > * { min-width: 0; }
.workspace { max-width: 100%; }
.side { gap: 18px; padding-bottom: 20px; }
.side .brand { font-size: 12px; letter-spacing: .09em; }
.nav { font-size: 13px; height: 36px; }
.navg > p { color: var(--muted); }
.nav.on::before { width: 2px; }
.card { backdrop-filter: none; }
.card::before { display: none; }
.bar { background: var(--line2); }
.ringw .rt { stroke: var(--line2); }
.top { gap: 16px; }
.site-picker { display: flex; flex-direction: column; gap: 3px; width: min(330px,32vw); }
.site-picker > span { font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.site-picker .input { height: 40px; font-size: 13px; padding: 0 30px 0 10px; border-radius: 10px; }
.site-picker.large { width: 100%; max-width: none; }
.site-picker.large .input { height: 52px; font-size: 17px; }
.welcome, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.welcome h2 { font-size: clamp(30px,3vw,42px); letter-spacing: -.01em; }
.welcome p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.section-heading { margin-top: 12px; }
.section-heading h2 { font-size: 27px; }
.countdown { display: grid; grid-template-columns: auto auto; column-gap: 18px; align-items: end; font-size: 12px; color: var(--muted); }
.countdown > span:first-child { grid-column: 1 / -1; }
.countdown strong { font: 600 30px var(--num); color: var(--gold); }
.countdown > span:last-child { font-variant-numeric: tabular-nums; padding-bottom: 4px; }
.checkin { display: flex; gap: 12px 24px; align-items: center; flex-wrap: wrap; padding: 20px 24px; border: 1px solid var(--line2); border-radius: 16px; background: var(--solid); }
.checkin > div { flex: 1; }
.checkin h2 { font-size: 26px; }
.checkin p { font-size: 13px; color: var(--muted); margin-top: 5px; }
.checkin small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.hero-checkin { padding: 28px; }
.hero-checkin h2 { font-size: 35px; }
.hero-checkin .btn { min-height: 76px; min-width: 240px; font-size: 23px; }
.dashboard-kpis { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.kpi { text-decoration: none; }
.kpi .lab { letter-spacing: .02em; font-size: 11px; }
.kpi .val { font-size: 47px; }
.kpi .sub { display: flex; gap: 8px; align-items: center; font-size: 11px; }
.site-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.site-card { display: flex; flex-direction: column; text-decoration: none; transition: border-color .2s; }
.site-card:hover { border-color: var(--gold); }
.site-card .chead { flex-wrap: nowrap; margin-bottom: 0; }
.site-card .chead h2 { font-size: 27px; text-transform: none; }
.site-progress { display: flex; align-items: baseline; gap: 14px; margin: 20px 0 8px; }
.site-progress strong { font: 600 48px/1 var(--num); }
.site-progress strong small { font-size: 22px; color: var(--muted); }
.site-progress > span { font-size: 12px; color: var(--muted); }
.site-facts { display: flex; gap: 28px; margin-top: auto; padding: 18px 0 12px; font-size: 12px; color: var(--muted); }
.site-facts b { color: var(--ink); font-size: 16px; margin-right: 3px; }
.site-card > p { font-size: 12px; }
.site-open { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--gold); font-size: 13px; font-weight: 800; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 35px 18px; min-height: 145px; text-align: center; }
.empty-state > .ic { color: var(--muted); }
.empty-state h3 { font-size: 23px; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 44ch; }
.empty-state .btn { margin-top: 8px; }
.formgrid { border-style: solid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.formgrid label { font-size: 12px; letter-spacing: 0; text-transform: none; }
.formgrid .full { grid-column: 1 / -1; }
.formgrid .checklabel, .checklabel { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); font-weight: 600; letter-spacing: 0; text-transform: none; }
.checklabel input { width: 20px; height: 20px; accent-color: var(--gold); flex: none; }
.formgrid textarea.input { height: auto; }
.formgrid fieldset { border: 1px solid var(--line2); border-radius: 10px; padding: 12px; }
.formgrid legend { font-size: 12px; color: var(--muted); padding: 0 5px; }
.formgrid input[type="password"] { min-width: 0; }
.site-checks { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-error { color: var(--bad); font-size: 13px; }
.form-error:empty { display: none; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.save-note, .help { font-size: 12px; color: var(--muted); }
.file-input { padding: 8px 10px; height: auto !important; min-height: 48px; }
input::file-selector-button { background: var(--bg2); color: var(--ink); border: 1px solid var(--line2); padding: 6px 9px; border-radius: 6px; font: inherit; margin-right: 10px; cursor: pointer; }
.textbutton { color: var(--gold); font-weight: 800; text-align: left; display: inline-flex; align-items: center; gap: 8px; }
.textbutton:hover { text-decoration: underline; }
.cell-note { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.tbl { width: 100%; table-layout: auto; }
.tbl th { white-space: normal; }
.tbl td { font-size: 12px; overflow-wrap: anywhere; vertical-align: top; }
.tbl th { font-size: 10px; }
.tbl td .btn { margin: 2px 0; }
.record-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 4px 0; }
.tbl td a:not(.btn) { color: var(--gold); }
.tbl td .inline-input { min-width: 85px; max-width: 130px; height: 40px; padding: 0 8px; font-size: 14px; }
.tbl td .month-strip { min-width: 0; }
.danger { color: var(--bad); }
.btn.status-button { font-size: 12px; }
.status-button.ok { color: var(--ok); }
.status-button.warn { color: var(--warn); }
.status-button.bad { color: var(--bad); }
.month-strip { display: flex; flex-wrap: wrap; gap: 5px; }
.day-cell { width: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 2px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.day-cell small { font-size: 10px; }
.day-cell.present { background: color-mix(in srgb,var(--ok) 13%,transparent); color: var(--ok); }
.day-cell.on-leave { background: color-mix(in srgb,var(--blue) 13%,transparent); color: var(--blue); }
.day-cell.is-today { border-color: var(--gold); }
.labrows { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.labrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 14px; }
.stepper { display: flex; align-items: center; flex: none; }
.stepper input { width: 48px; height: 44px; text-align: center; border: 0; background: transparent; font: 600 24px var(--num); appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.stepper .btn { width: 42px; padding: 0; }
.lab-total, .section-total, .grand-total { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 0; border-top: 1px solid var(--line); margin-top: 18px; }
.lab-total strong { font: 600 44px var(--num); }
.section-total { margin-top: 0; border-top: 0; padding-top: 0; }
.section-total strong { font: 600 28px var(--num); color: var(--gold); }
.grand-total strong { font: 600 37px var(--num); color: var(--gold); }
.action-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.action-tiles a { display: grid; grid-template-columns: 1fr auto; gap: 18px 6px; text-decoration: none; padding: 24px; border: 1px solid var(--line2); border-radius: 16px; background: var(--solid); }
.action-tiles a > .ic:first-child { grid-column: 1/-1; color: var(--gold); }
.action-tiles a:hover { border-color: var(--gold); }
.action-tiles strong { font-size: 17px; }
.pour-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.pour-checks { display: grid; gap: 12px; margin: 20px 0; }
.pour-checks .checklabel { padding: 8px 0; align-items: flex-start; }
.pour-checks .checklabel input { margin: 0; }
.pour-grid .chips { display: flex; }
.pour-grid .stamp { transform: rotate(-3deg); margin: 12px; text-align: center; }
.pour-grid .card > p:last-child { margin-top: 14px; font-size: 12px; }
.done-text { text-decoration: line-through; color: var(--muted); }
.photo-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.photo-group { min-width: 0; display: flex; flex-direction: column; }
/* Keep similar-photo disclosures in their own shared row beneath the main cards. */
.photo-gallery:has(.similar) > .photo-group { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
.photo-group > .photo-item, .photo-group > .photo-item > figcaption { display: flex; flex: 1; flex-direction: column; }
.photo-group > .photo-item > figcaption > .chip { margin-top: auto; align-self: flex-start; }
.photo-item { margin: 0; background: var(--bg2); border-radius: 12px; overflow: hidden; }
.photo-item > a { display: block; aspect-ratio: 4/3; background: var(--panel2); }
.photo-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-item figcaption { padding: 12px; font-size: 13px; overflow-wrap: anywhere; }
.photo-item figcaption small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.photo-actions { display: flex; gap: 7px; padding: 0 12px 12px; flex-wrap: wrap; }
.similar { margin-top: 8px; }
.similar summary { cursor: pointer; font-size: 12px; color: var(--gold); font-weight: 700; padding: 8px 0; }
.similar .photo-item { margin: 8px 0; }
.full-photo { max-width: 100%; max-height: 65dvh; object-fit: contain; border-radius: 10px; margin: 0 auto 12px; display: block; }
.update-text { font: 500 14px/1.8 var(--ui); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 18px; color: var(--ink); }
.update-history { padding: 14px 0; border-bottom: 1px solid var(--line); }
.update-history summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 13px; }
.update-history .update-text { padding-top: 16px; }
.detail-toolbar, .section-tools, .bill-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-toolbar .goldb { margin-left: auto; }
.section-tools { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.ai-draft { background: color-mix(in srgb,var(--gold) 9%,transparent); }
.draft-label { display: block; color: var(--gold); font-size: 11px; margin-top: 4px; font-weight: 700; }
.notice { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--gold); border-radius: 12px; padding: 18px; background: color-mix(in srgb,var(--gold) 8%,var(--bg)); }
.notice > .ic { color: var(--gold); }
.notice p { font-size: 13px; margin-top: 5px; color: var(--muted); }
.ai-job { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.ai-job small { flex-basis: 100%; }
.ai-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.ai-summary strong { font: 600 42px var(--num); color: var(--gold); }
.ai-summary span { font-size: 12px; color: var(--muted); }
.subhead { font-size: 22px; margin: 24px 0 12px; }
.bill-meta { margin-bottom: 20px; font-size: 13px; }
.bill-meta .goldb { margin-left: auto; }
.bill-totals { max-width: 400px; margin: 22px 0 0 auto; }
.bill-totals > div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bill-totals .net { color: var(--gold); font-size: 18px; }
.client-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 32px; margin-bottom: 32px; }
.client-progress h3 { font-size: 30px; }
.client-progress p { margin-top: 10px; }
.connection { background: color-mix(in srgb,var(--warn) 16%,var(--bg)); padding: 12px 28px; color: var(--warn); font-size: 13px; }
.login .art { background: var(--bg2); }
.login .art h1 { font-size: clamp(54px,6.5vw,94px); max-width: 12ch; }
.login .lead { max-width: 40ch; }
.login-foot { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 18px; }
.login-foot span:first-child { display: flex; align-items: center; gap: 8px; }
.gatecard { border-radius: 16px; box-shadow: none; backdrop-filter: none; }
.gatecard .help { text-align: center; }
.gatecard h2 { font-size: 39px; text-transform: none; margin-bottom: 9px; }
.boot-state { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; color: var(--muted); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 50; padding: 12px 18px; background: var(--solid); color: var(--gold); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dialog-open { overflow: hidden; }
.desk-dialog { color: var(--ink); background: var(--solid); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; width: min(700px,calc(100% - 32px)); max-height: 88dvh; overflow-y: auto; box-shadow: var(--shadow); }
.desk-dialog::backdrop { background: rgba(0,0,0,.65); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dialog-head h2 { font-size: 30px; }
.dialog-head .iconbtn { flex: none; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.dialog-user { margin-top: 22px; text-align: center; font-size: 12px; }
.desk-dialog .formgrid { margin: 0; }
.tabbar .fab { box-shadow: 0 7px 18px rgba(0,0,0,.2); }
@media (min-width:901px) and (max-width:1200px) {
 :root { --side: 220px; }
 .main { padding: 22px 20px 50px; }
 .top { padding: 14px 20px; }
 .dashboard-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .labrows, .pour-grid { grid-template-columns: 1fr; }
 .site-picker { width: 250px; }
}
@media (max-width:900px) {
 .top { display: grid; grid-template-columns: minmax(0,1fr) auto 44px 44px; gap: 8px; }
 .top .title { grid-column: 1; }
 .top .site-picker { grid-column: 1/-1; grid-row: 2; width: 100%; }
 .top .site-picker > span { display: none; }
 .top .site-picker .input { width: 100%; min-height: 44px; }
 .top > button, .top .language-control select, .subtabs .subtab { min-height: 44px; }
 .top > [data-do="theme"] { grid-column: 3; grid-row: 1; }
 .top > [data-do="logout"] { grid-column: 4; grid-row: 1; }
 .welcome h2 { font-size: 32px; }
 .welcome { gap: 16px; }
 .welcome .countdown { display: none; }
 .checkin { padding: 18px; gap: 16px; }
 .checkin > div { flex-basis: 100%; }
 .checkin .btn { width: 100%; }
 .hero-checkin .btn { min-height: 78px; min-width: 0; }
 .checkin h2 { font-size: 28px; }
 .checkin small { font-size: 11px; }
 .dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .dashboard-kpis .kpi:last-child { grid-column: 1/-1; display: grid; grid-template-columns: 1fr auto; align-items: center; }
 .dashboard-kpis .kpi:last-child .val { grid-column: 2; grid-row: 1/3; }
 .dashboard-kpis .val { font-size: 42px; }
 .kpi .lab { font-size: 11px; line-height: 1.5; }
 .site-grid, .pour-grid, .labrows { grid-template-columns: 1fr; }
 .site-card .chead h2 { font-size: 26px; }
 .formgrid { padding: 12px; gap: 12px; }
 .formgrid { grid-template-columns: minmax(0,1fr); }
 .formgrid .input { height: 48px; font-size: 16px; }
 .form-actions .btn { width: 100%; min-height: 48px; }
 .card > .chead { gap: 12px; }
 .chead > label { width: 100%; }
 .tbl tr { padding: 16px 0; gap: 14px 12px; }
 .tbl td { font-size: 13px; }
 .tbl td::before { margin-bottom: 4px; font-size: 10px; color: var(--muted); letter-spacing: .04em; }
 .tbl td:first-child, .tbl td:has(.month-strip) { grid-column: 1/-1; }
 .tbl td:first-child { font-size: 15px; }
 .tbl td .btn.sm { min-height: 40px; height: auto; padding: 8px 10px; }
 .tbl td .inline-input { width: 100%; max-width: none; min-width: 0; }
 .photo-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .photo-item figcaption { padding: 10px; font-size: 12px; }
 .photo-item figcaption small { font-size: 10px; }
 .photo-actions { padding: 0 8px 10px; }
 .photo-actions .btn { font-size: 11px; padding: 0 8px; width: 100%; white-space: normal; height: auto; min-height: 36px; }
 .action-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 .action-tiles a { padding: 20px; gap: 20px 4px; }
 .action-tiles strong { font-size: 15px; }
 .prow { grid-template-columns: 1fr; }
 .prow span:nth-child(2) { font-size: 15px; }
 .seg { display: flex; }
 .seg button { padding: 0 11px; font-size: 12px; }
 .section-total strong { font-size: 25px; }
 .detail-toolbar { gap: 8px; }
 .detail-toolbar .goldb { width: 100%; margin: 0; }
 .bill-meta .goldb { width: 100%; margin: 0; }
 .update-history summary { align-items: flex-start; }
 .notice { padding: 14px; }
 .kv { font-size: 13px; grid-template-columns: minmax(85px,auto) minmax(0,1fr); }
 .kv dd { overflow-wrap: anywhere; }
 .login .art { padding: 32px 24px; gap: 32px; }
 .login .art h1 { font-size: 58px; }
 .login .art .lead { font-size: 14px; }
 .login-foot { display: none; }
 .gate { padding: 22px 20px 40px; }
 .gatecard { padding: 24px; }
 .login .themebtn { top: 20px; }
 .desk-dialog { margin: auto 0 0; width: 100%; max-width: none; max-height: 90dvh; border-radius: 20px 20px 0 0; padding: 20px 16px max(24px,env(safe-area-inset-bottom)); animation: sheetup .25s cubic-bezier(.2,.8,.2,1); }
 .desk-dialog .mgrid { gap: 9px; }
 .desk-dialog .mgrid a { font-size: 12px; min-height: 90px; }
 .dialog-head h2 { font-size: 27px; }
}
@media (prefers-reduced-motion:reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* A2: a full-height sidebar surface with independently sticky navigation. */
.shell { position: relative; isolation: isolate; }
.shell::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--side); background: var(--bg2); border-right: 1px solid var(--line); z-index: -1; }
.side { align-self: start; background: transparent; backdrop-filter: none; border-right: 0; }
.language-control { display: inline-flex; flex: none; }
.language-control select { min-height: 44px; width: 102px; padding: 8px; border: 1px solid var(--line2); border-radius: 8px; background: var(--solid); color: var(--ink); font: 600 14px/1.5 var(--ui); cursor: pointer; }
.login-controls { position: absolute; right: 20px; top: 20px; display: flex; align-items: center; gap: 12px; z-index: 5; }
.login-controls .themebtn { position: static; }
.help-steps { padding-left: 22px; display: grid; gap: 10px; font-size: 14px; line-height: 1.7; }
.help-steps li { padding-left: 5px; }
.help-steps li::marker { color: var(--gold); font-weight: 800; }

/* A3 office references and per-site WhatsApp settings share the existing form grid. */
.rate-search { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 20px 0 12px; }
.rate-search > label { display: grid; gap: 8px; flex: 1; max-width: 520px; font-size: 13px; color: var(--muted); }
.rate-search > p { padding-bottom: 12px; white-space: nowrap; }
[data-rate-library] tr[hidden], [data-rate-empty][hidden] { display: none; }
.compact-notice { padding: 16px; }
.compact-notice p { margin-top: 6px; max-width: 72ch; }
.wa-connection { margin-bottom: 12px; }
.wa-site { margin-bottom: 8px; overflow-wrap: anywhere; }
.wa-recipient > .help { margin-bottom: 12px; }
.wa-recipient-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; margin-top: 16px; }
.wa-recipient input, .wa-recipient select { min-width: 0; width: 100%; }
.wa-recipient input[type=checkbox] { width: 20px; }
@media (max-width:600px) { .rate-search { align-items: stretch; flex-direction: column; gap: 8px; } .rate-search > p { padding-bottom: 0; } }
.file-chooser { position: relative; display: block; }
.file-chooser .btn { width: 100%; }
.file-chooser input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100% !important; opacity: 0; cursor: pointer; }
.file-chooser:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
.file-summary { overflow-wrap: anywhere; }
:lang(hi) { --ui: 'Nirmala UI', 'Noto Sans Devanagari', Manrope, sans-serif; --num: 'Nirmala UI', 'Noto Sans Devanagari', 'Barlow Condensed', sans-serif; }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3 { line-height: 1.5; letter-spacing: 0; }
:lang(hi) .nav, :lang(hi) .btn { line-height: 1.6; height: auto; min-height: 42px; white-space: normal; }
:lang(hi) .nav { padding-block: 9px; }
:lang(hi) .top .title h1 { white-space: normal; font-size: 25px; }
.print-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.print-dialog { width: min(1180px,calc(100% - 32px)); }
.print-report { background: #fff; color: #111; padding: 24px; font: 12px/1.5 Arial, 'Nirmala UI', sans-serif; overflow-x: auto; }
.print-report header { text-align: center; margin-bottom: 18px; }
.print-report header strong { font-size: 21px; }
.print-report header p { margin: 3px 0 12px; }
.print-report h1 { font: bold 18px/1.4 Arial,sans-serif; }
.report-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; margin: 16px 0; }
.report-meta > div { display: grid; grid-template-columns: 115px 1fr; gap: 8px; }
.report-meta dt { font-weight: bold; }
.report-meta dd { margin: 0; overflow-wrap: anywhere; }
.report-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.report-table th, .report-table td { border: 1px solid #444; padding: 7px 6px; text-align: left; overflow-wrap: anywhere; vertical-align: top; }
.report-table th { font-size: 10px; background: #eee; }
.report-table th:first-child { width: 6%; }
.report-repeat { display: none; }
.print-landscape:not(.attendance-report) .report-table th:nth-child(2) { width: 25%; }
.report-note { margin-top: 14px; font-size: 10px; }
.report-signatures { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; }
.print-report footer { margin-top: 24px; padding-top: 8px; border-top: 1px solid #aaa; font-size: 9px; }
.attendance-report .report-table { min-width: 950px; font-size: 8px; }
.attendance-report .report-table th, .attendance-report .report-table td { padding: 5px 1px; text-align: center; }
.attendance-report .report-table th { font-size: 7px; }
.attendance-report .report-table th:first-child { width: 3%; }
.attendance-report .report-table th:nth-child(2) { width: 14%; }
.attendance-report .report-table td:nth-child(2) { text-align: left; }
.attendance-report .report-table th:last-child { width: 7%; }
@media (max-width:900px) {
 .shell::before { display: none; }
 .main { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
 html { scroll-padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
 .top .title { grid-column: 1/3; }
 .top .site-picker { grid-column: 1/3; }
 .top > .language-control { grid-column: 3/5; grid-row: 2; justify-self: end; }
 .top .language-control select { width: 92px; min-height: 44px; }
 .desk-dialog { padding-bottom: max(40px,env(safe-area-inset-bottom)); scroll-padding-bottom: 40px; }
 .login .art { padding-top: 88px; }
 .login-controls { top: 16px; right: 16px; }
 .print-dialog { width: 100%; }
 .print-report { padding: 14px; }
 .print-report:not(.attendance-report) .report-table { min-width: 660px; }
 .report-meta { grid-template-columns: 1fr; }
 :lang(hi) .top .title h1 { font-size: 22px; }
 :lang(hi) .tabbar a, :lang(hi) .tabbar button { font-size: 11px; letter-spacing: 0; }
}
@page reportLandscape { size: A4 landscape; margin: 12mm; }
@page reportPortrait { size: A4 portrait; margin: 14mm; }
@media print {
 :root { color-scheme: light !important; }
 html, body { background: #fff !important; color: #111 !important; height: auto !important; overflow: visible !important; }
 body > :not(.print-dialog) { display: none !important; }
 .print-dialog { display: block !important; position: static !important; width: auto !important; max-width: none !important; max-height: none !important; height: auto !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0; box-shadow: none; background: #fff; }
 .print-dialog::backdrop, .print-dialog .dialog-head, .print-tools { display: none !important; }
 .print-report { padding: 0 !important; overflow: visible !important; print-color-adjust: exact; }
 .report-repeat { display: table-row; }
 .report-repeat th { font-size: 10px; padding: 8px; width: auto !important; }
 .report-meta { display: grid; grid-template-columns: 1fr 1fr; }
 .report-table { min-width: 0 !important; }
 .report-table thead { display: table-header-group; }
 .report-table tr, .report-signatures, .report-meta > div { break-inside: avoid; }
 .report-table th, .report-table td { display: table-cell; }
 .print-report h1 { line-height: 1.4; }
}

/* Official logo: only text is lightened for dark surfaces. */
.brand{flex-direction:column;align-items:flex-start;gap:7px;letter-spacing:0;text-transform:none}
.brand img{display:block;width:240px;max-width:100%;height:auto;flex:none}
.brand .brand-product{font:700 11px var(--ui);letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.brand .brand-light{display:none}:root[data-theme="light"] .brand .brand-dark{display:none}:root[data-theme="light"] .brand .brand-light{display:block}
.side .brand{padding:0 8px 8px}.side .brand img{width:210px}.header-mark{display:none}
.print-report header{display:grid;grid-template-columns:180px minmax(0,1fr);column-gap:24px;align-items:center;min-height:60px;text-align:right}
.print-report header .report-logo{display:block;width:180px;height:auto;margin:0;grid-column:1;grid-row:1/4}
.print-report header strong,.print-report header p,.print-report header h1{grid-column:2}
.print-report header strong{font-size:16px}.print-report header p{margin:0}.print-report header h1{margin:4px 0 0}
@media(max-width:900px){.top .title{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:8px;align-items:center}.header-mark{display:block;grid-row:1/3}.top .title h1,.top .title p{grid-column:2}.top .title h1{font-size:25px}.login .brand{max-width:240px}}
@media(max-width:600px){.login .brand{max-width:205px}}

.app-update{pointer-events:auto;display:flex;align-items:center;gap:12px;max-width:min(94vw,480px)}.app-update .btn{flex:none;min-height:44px}.app-update button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
/* Task U: shared operating surfaces, readable hierarchy and consistent controls. */
:root { --faint:#94A3BA; --space-1:8px; --space-2:16px; --space-3:24px; --space-4:32px; }
:root[data-theme="light"] { --faint:#5B6B80; }
body::before { background:none; }
.view > * { animation:none; }
.nav { min-height:40px; }
.navg > p { text-transform:none; letter-spacing:0; font-size:12px; padding-bottom:5px; }
.side { gap:22px; }
.menu-group + .menu-group { margin-top:24px; }
.menu-group h3 { font-family:var(--ui); font-size:15px; font-weight:700; color:var(--muted); margin-bottom:12px; }
.menu-group .mgrid { margin:0; }
.dashboard-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:-8px; }
.site-progress-note { font-size:12px; line-height:1.6; margin-top:7px; max-width:65ch; }
.onboarding { margin-top:8px; }
.onboarding .card { background:var(--bg2); }
.password-field { display:flex; position:relative; align-items:center; }
.password-field .input { padding-right:76px; width:100%; }
.password-field button { position:absolute; right:4px; min-width:64px; min-height:44px; color:var(--muted); text-transform:none; font-size:13px; font-weight:700; }
.material-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:20px 0; border-bottom:1px solid var(--line); margin-bottom:16px; }
.material-summary div { display:grid; gap:6px; }
.material-summary span,.material-summary p { font-size:13px; color:var(--muted); }
.material-summary strong { font-size:26px; font-variant-numeric:tabular-nums; }
@media screen {
 .card .chead h2,.section-heading h2,.checkin h2,.welcome h2,.top .title h1,.gatecard h2 { font-family:var(--ui); letter-spacing:-.025em; text-transform:none; line-height:1.25; }
 .card .chead h2 { font-size:19px; }
 .section-heading h2 { font-size:23px; }
 .top .title h1 { font-size:23px; }
 .welcome h2 { font-size:clamp(27px,2.6vw,36px); }
 .checkin h2 { font-size:23px; }
 .gatecard h2 { font-size:29px; }
 .gatecard { gap:20px; background:var(--solid); }
 .gatecard .err:empty { display:none; }
 .site-card h2 { font-size:22px; text-transform:none; }
 .kpi .lab { text-transform:none; letter-spacing:0; font-size:13px; }
 .kpi .sub { line-height:1.6; }
}
@media(max-width:600px) {
 .login .art { padding:80px 24px 20px; gap:22px; }
 .login .art h1 { font-size:44px; line-height:1.05; }
 .login .art h1 br { display:none; }
 .login .art p.lead { margin-top:10px; line-height:1.6; }
 .login .brand { max-width:195px; }
 .gate { padding:8px 20px 32px; }
 .gatecard { padding:24px; gap:18px; }
 .dashboard-actions .btn { flex:1 1 auto; justify-content:center; }
 .menu-group .mgrid a { min-height:72px; }
 .material-summary { align-items:flex-start; }
 .welcome h2 { font-size:27px; }
}

/* Keep table links and text actions comfortable to activate. */
.textbutton, .map-link { display: inline-flex; align-items: center; min-height: 32px; gap: 4px; }
@media (max-width: 600px) { .textbutton, .map-link { min-height: 44px; } }

/* T-037 (Aryan, 18 Nov): native dropdown lists were white with light text in dark mode. Style every option explicitly, site-wide. */
select { color-scheme: inherit; }
select option, select optgroup { background-color: var(--solid, #16202c); color: var(--ink, #eef2f7); font-weight: 500; }
select option:checked { background-color: color-mix(in srgb, var(--gold, #d6a64a) 30%, var(--solid, #16202c)); color: var(--ink, #eef2f7); }
select option:disabled { color: var(--faint, #8796a8); }

/* v55 Rigorous Declutter: subtabs, collapsible estimate sections, compact settings, unclipped dropdowns */
.card { overflow: visible; }
.install-banner { display: none; }
.estimate-header { display: grid; gap: 8px; }
.estimate-header .detail-toolbar { margin-bottom: 4px; }
.estimate-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.estimate-title h2 { font-size: clamp(25px, 4vw, 38px); line-height: 1.12; overflow-wrap: anywhere; }
.estimate-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--solid);
}
.estimate-summary dl, .estimate-summary nav { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
.estimate-summary dl { gap: 8px 22px; }
.estimate-summary dt { color: var(--muted); font-size: 11px; }
.estimate-summary dd { margin: 1px 0 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.estimate-summary nav { gap: 6px; }
.estimate-summary nav .btn { min-height: 36px; padding-inline: 10px; border-radius: 999px; }
.estimate-anchor { scroll-margin-top: 100px; }
.estimate-boq :is(td[data-l="Amount"], th:nth-child(5)), .estimate-boq input[data-rate] {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.estimate-boq .grand-total strong { font-variant-numeric: tabular-nums; }
@media (min-width: 901px) {
  .top > .site-picker { padding-top: 6px; }
}
@media (max-width: 900px) {
  .top > [data-do="logout"] { display: flex; align-items: center; justify-content: center; gap: 0; }
  .install-banner:not([hidden]) { display: flex; grid-column: 1/-1; grid-row: 3; align-items: center; gap: 4px; justify-self: start; }
  .install-banner .btn, .install-banner .iconbtn { min-height: 36px; height: 36px; }
  .install-banner .iconbtn { width: 36px; }
  .estimate-anchor { scroll-margin-top: 165px; }
  .estimate-summary { padding: 10px; }
  .estimate-summary dl { gap: 8px 12px; }
  .estimate-summary dd { font-size: 15px; }
  .estimate-summary nav .btn { font-size: 11px; }
}
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.subtab { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--muted); text-decoration: none; background: transparent; border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s; }
.subtab:hover { color: var(--ink); background: var(--panel); }
.subtab.on { color: var(--ink); background: var(--panel2); border-color: var(--line2); }
.subtab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold); }
.feed-count { display: inline-flex; align-items: center; padding: 1px 7px; margin-left: 6px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); }
.est-sec-acc { padding: 0; }
.est-sec-sum { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; user-select: none; }
.est-sec-sum::-webkit-details-marker { display: none; }
.est-sec-sum:hover { background: var(--panel); border-radius: var(--r); }
.est-sec-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.est-sec-title strong { font-size: 17px; font-weight: 700; }
.est-sec-title small { font-size: 12px; color: var(--muted); font-weight: 600; }
.est-sec-qty { font: 600 22px var(--num); color: var(--gold); white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.est-sec-qty::after { content: "▾"; font-size: 14px; color: var(--muted); transition: transform .2s; }
.est-sec-acc[open] .est-sec-qty::after { transform: rotate(180deg); }
.est-sec-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.est-sec-body .tw { margin-top: 14px; }
.programme-manage { margin-top: 18px; margin-bottom: 0; }
.programme-manage-body { margin-top: 14px; }
.settings-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wa-recipient:not(:has(input[name="recipient"]:checked)) .wa-recipient-fields { display: none; }
[data-labour-area] { margin-block: .75rem; padding: .75rem; border: 1px solid var(--line); }
[data-labour-area] > .btn { margin-top: .6rem; }
[data-labour-grid], .labour-custom-trade { margin-block: .5rem; }
[data-labour-grid] { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem; }
[data-labour-grid] label { flex: 1 1 12rem; }
.labour-custom-trade > .btn { margin-top: .35rem; }
.labour-area-summary { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .65rem; }
.labour-area-summary span { color: var(--muted); }
[data-site-drawing-register] > label { display: block; max-width: 26rem; margin-block: .75rem; }
[data-site-drawing-register] tr[hidden] { display: none; }
.drawing-exports .btn { min-height: 44px; }
.drawing-register-tabs { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.project-source-library { padding: 0; }
.project-source-filters { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 25rem); gap: 14px; padding: 18px 20px 10px; }
.project-source-status { padding: 0 20px 14px; font-size: 13px; }
.project-setup { margin: 10px 20px 14px; border-block: 1px solid var(--line); }
.project-setup-heading, .project-setup-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.project-setup-heading { padding: 14px 0 10px; }
.project-setup-heading h2 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.project-setup-heading p, .project-setup-row p { margin: 3px 0 0; font-size: 13px; }
.project-setup-list { list-style: none; margin: 0; padding: 0; }
.project-setup-row { padding: 10px 0; border-top: 1px solid var(--line); }
.project-setup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.project-source-upload { margin: 0 20px 14px; }
.project-source-upload form { margin-top: 12px; }
.project-source-upload input[type="file"] { width: 100%; min-width: 0; }
.project-source-message { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 20px 20px; }
.project-source-group h2 { padding: 12px 20px; border-block: 1px solid var(--line); background: var(--panel2); font-size: 21px; }
.project-source-group ul { list-style: none; margin: 0; padding: 0 20px; }
.project-source-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(13rem, 1fr) auto; align-items: center; gap: 18px; padding-block: 16px; }
.project-source-row + .project-source-row { border-top: 1px solid var(--line); }
.project-source-name, .project-source-meta { min-width: 0; overflow-wrap: anywhere; }
.project-source-name > p { margin-top: 3px; font-size: 13px; }
.project-source-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 14px; font-size: 14px; }
.project-source-meta span { display: block; color: var(--muted); font-size: 12px; }
.project-source-download { justify-self: start; }
@media (max-width: 660px) {
 .project-source-filters { grid-template-columns: 1fr; }
 .project-source-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
 .project-source-library .btn { min-height: 44px; }
}
.project-updates { min-width: 0; }
.project-update-heading, .project-update-filters, .project-update-slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.project-update-heading, .project-update-slot-head { justify-content: space-between; }
.project-update-heading h2, .project-update-heading p, .project-update-slot-head h3 { margin: 0; }
.project-update-heading p { margin-top: 4px; }
.project-update-filters { align-items: end; }
.project-update-filters .field, .project-update-form .field { margin: 0; }
.project-update-filters .btn, .project-update-form .btn { min-height: 44px; }
.project-update-filters .input { width: min(100%, 11rem); }
.project-update-form { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 3fr) auto; gap: 12px; align-items: end; margin: 16px 0; }
.project-update-form textarea { width: 100%; resize: vertical; }
.project-update-message { color: var(--muted); font-size: 13px; margin: 12px 0; }
.project-update-message:empty { display: none; }
.project-update-form .project-update-message { grid-column: 1 / -1; margin: 0; }
.project-update-guide { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.project-update-slot, .project-update-coverage { border-top: 1px solid var(--line); padding-block: 13px; }
.project-update-slot:last-child { padding-bottom: 2px; }
.project-update-heading + .project-update-message + [data-project-update-feed] { margin-top: 13px; }
.project-update-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.project-update-list, .project-update-evidence { list-style: none; margin: 0; padding: 0; }
.project-update-record { overflow-wrap: anywhere; padding-top: 10px; }
.project-update-record + .project-update-record { border-top: 1px solid var(--line); margin-top: 10px; }
.project-update-record-meta, .project-update-empty { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.project-update-body { margin: 5px 0 0; max-width: 74ch; white-space: pre-wrap; }
.project-update-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: 13px; }
.project-update-evidence a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.project-update-evidence li { min-width: 0; }
.project-update-coverage summary { cursor: pointer; font-weight: 650; min-height: 44px; align-content: center; }
.project-update-table-scroll { overflow: auto; margin-top: 8px; }
.project-update-coverage table { width: 100%; text-align: left; border-collapse: collapse; }
.project-update-coverage th, .project-update-coverage td { padding: 8px; font-size: 13px; border-bottom: 1px solid var(--line); }
.project-update-coverage td { font-variant-numeric: tabular-nums; }
@media (max-width: 660px) {
 .project-update-heading { align-items: start; }
 .project-update-form { grid-template-columns: minmax(0, 1fr); }
 .project-update-filters, .project-update-form .input { width: 100%; }
 .project-update-form .btn { justify-self: start; }
}
