/* Oakfield Electrical demo, warm and crafted */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/demos/oakfield-electrical/fonts/fraunces-latin.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400 600; font-display: swap; src: url(/demos/oakfield-electrical/fonts/fraunces-latin-italic.woff2) format('woff2'); }

:root {
  --paper: #f5efe3; --paper2: #ece3d1; --card: #fffcf6; --card2: #faf5ea;
  --ink: #25261f; --ink2: #57554a; --ink3: #858171; --line: #e4dac7; --line2: #d3c5aa;
  --forest: #1f4d3a; --forest2: #2e6b51; --forest3: #dce8de; --forest4: #163a2b;
  --copper: #b4643a; --copper2: #f4e2d4; --copper3: #8f4a26;
  --gold: #b98a2e; --gold2: #f5e9cc; --red: #a83c32; --red2: #f6e0db; --blue: #4f7591; --blue2: #e1eaf0;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r: 14px; --r2: 10px;
  --sh: 0 1px 1px rgba(70, 50, 20, .05), 0 8px 22px -10px rgba(70, 50, 20, .22);
  --sh2: 0 18px 50px -12px rgba(40, 30, 10, .35);
  --side: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 14.5px/1.5 var(--sans); color: var(--ink); background: var(--paper);
  background-image: radial-gradient(ellipse at 15% 0%, rgba(255, 250, 238, .9), transparent 55%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; letter-spacing: -.01em; margin: 0; color: var(--ink); font-variation-settings: 'opsz' 72, 'SOFT' 50; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 .7em; }
a { color: var(--forest2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--copper); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 6px; z-index: 100; background: var(--forest); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.num { font-variant-numeric: tabular-nums; }
.pad { padding: 14px 16px; margin: 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden-val { color: var(--ink3); letter-spacing: .1em; font-size: 12px; }

/* banner */
.banner { background: var(--forest4); color: #efe6d3; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 44px 6px 14px; position: relative; }
.banner p { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.banner .ic { color: #e9b48f; width: 15px; height: 15px; }
.banner a { color: #f6c9a6; font-weight: 600; }
.banner .b-home { color: #cfc4ad; font-weight: 400; }
.banner .iconbtn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: #cfc4ad; width: 30px; height: 30px; }
.banner .iconbtn:hover { background: rgba(255, 255, 255, .1); }

/* layout */
.app { display: flex; min-height: calc(100vh - 32px); }
.side { width: var(--side); flex: none; background: var(--forest); color: #e8e0cc; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 18px 14px 14px; background-image: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%); }
body[data-role=customer] .side { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 0 6px 16px; }
.brand b { font-family: var(--serif); font-size: 18px; font-weight: 600; display: block; line-height: 1.1; color: #fff7e8; }
.brand small { display: block; font-size: 11px; color: #b9c8b8; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #9fb5a3; padding: 14px 10px 5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #e8e0cc; text-decoration: none; font-size: 14px; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .07); }
.nav a[aria-current=page] { background: #f5efe3; color: var(--forest); font-weight: 600; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.nav a[aria-current=page] .ic { color: var(--copper); }
.nav a em { margin-left: auto; font-style: normal; font-size: 11px; background: var(--copper); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 2px; }
.side-foot .linkish { color: #c7d3c4; justify-content: flex-start; padding: 7px 10px; }
.side-foot .linkish:hover { color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: rgba(245, 239, 227, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 62px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.brand-mob, .brand-top { display: none; color: var(--ink); }
.brand-top { display: flex; padding: 0; }
.brand-top b { color: var(--forest); }
.brand-top small { color: var(--ink3); }
.searchbtn { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 8px 10px 8px 14px; min-width: 300px; color: var(--ink3); cursor: pointer; box-shadow: inset 0 1px 2px rgba(80, 60, 20, .05); }
.searchbtn:hover { border-color: var(--line2); }
.searchbtn span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 11px/1 var(--sans); background: var(--paper2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; color: var(--ink2); }
.today-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); padding: 5px 10px; border: 1px dashed var(--line2); border-radius: 99px; margin-right: 4px; }
.today-chip .ic { width: 15px; height: 15px; color: var(--copper); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 9px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink2); position: relative; }
.iconbtn:hover { background: var(--paper2); color: var(--ink); }
.iconbtn .ic { width: 20px; height: 20px; }
.tour-btn span { font-size: 13px; font-weight: 500; }
#mobSearch { display: none; }
.bell em { position: absolute; top: 3px; right: 2px; background: var(--copper); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--paper); }
.rolebtn { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 10px 4px 4px; cursor: pointer; text-align: left; }
.rolebtn:hover { border-color: var(--line2); }
.rolebtn b { display: block; font-size: 13px; line-height: 1.1; }
.rolebtn small { display: block; font-size: 11px; color: var(--copper3); line-height: 1.2; }
.rolebtn .ic { width: 15px; height: 15px; color: var(--ink3); }
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex: none; letter-spacing: .02em; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.av.lg { width: 46px; height: 46px; font-size: 16px; }
main { flex: 1; outline: none; }
.page { padding: 26px 32px 60px; max-width: 1400px; width: 100%; margin: 0 auto; animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ph p { margin: 4px 0 0; color: var(--ink2); }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--copper); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ''; width: 18px; height: 1.5px; background: var(--copper); border-radius: 2px; }
.crumbs { font-size: 13px; color: var(--ink3); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--ink2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 18px 20px; min-width: 0; }
.card + .card { margin-top: 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { display: flex; align-items: center; gap: 8px; }
.card-h p { margin: 2px 0 0; font-size: 13px; color: var(--ink3); width: 100%; }
.card-h .hl { flex: 1; min-width: 0; }
.card-h .hl p { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.grid21 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-top: 18px; }
.grid12 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.grid2 > .card + .card, .grid3 > .card + .card, .grid21 > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 18px; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 18px 0; }
.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi + .kpi { margin-top: 0; }
.kpi .kl { font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.kpi .kl .ic { width: 15px; height: 15px; color: var(--copper); }
.kpi .kv { font-family: var(--serif); font-size: 27px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-variation-settings: 'opsz' 96; line-height: 1.15; }
.kpi .kd { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.kpi .kd b { color: var(--forest2); font-weight: 600; }
.kpi .kd b.down { color: var(--red); }
.kpi::after { content: ''; position: absolute; right: -16px; top: -16px; width: 58px; height: 58px; border-radius: 50%; border: 1.5px dashed var(--line2); opacity: .6; }

/* buttons and controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--forest); background: var(--forest); color: #fdf8ec; font-weight: 600; font-size: 14px; padding: 8px 15px; border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 0 rgba(0, 0, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .12); transition: background .15s, transform .05s; }
.btn:hover { background: var(--forest2); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line2); box-shadow: 0 1px 0 rgba(80, 60, 20, .06); }
.btn.ghost:hover { background: var(--paper2); }
.btn.copper { background: var(--copper); border-color: var(--copper); }
.btn.copper:hover { background: var(--copper3); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 12px 20px; font-size: 15.5px; border-radius: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkish { border: 0; background: none; padding: 4px 6px; color: var(--forest2); cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; border-radius: 6px; font-size: 13.5px; }
.linkish:hover { text-decoration: underline; }
.seg { display: inline-flex; background: var(--paper2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink2); font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--forest); box-shadow: 0 1px 3px rgba(60, 40, 10, .15); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line2); background: var(--card); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { border-color: var(--ink3); }
.chip[aria-pressed=true] { background: var(--forest); border-color: var(--forest); color: #fdf8ec; }
.chip i { font-style: normal; font-size: 11.5px; opacity: .75; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.input, .field input, .field select, .field textarea, select.input { width: 100%; border: 1px solid var(--line2); background: #fffefa; border-radius: 9px; padding: 8px 11px; font-size: 14px; color: var(--ink); min-height: 38px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--forest2); box-shadow: 0 0 0 3px rgba(46, 107, 81, .16); }
.search-in { position: relative; min-width: 220px; }
.search-in .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink3); width: 16px; height: 16px; }
.search-in input { padding-left: 34px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.field .hint { font-size: 12px; color: var(--ink3); }
.field .err { font-size: 12.5px; color: var(--red); display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fff8f6; }
.field.invalid .err { display: block; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.frow3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
textarea { resize: vertical; min-height: 76px; }
input[readonly], select:disabled, textarea[readonly] { background: var(--paper2) !important; color: var(--ink2); cursor: not-allowed; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .tr { width: 38px; height: 22px; background: var(--line2); border-radius: 99px; position: relative; transition: background .15s; flex: none; }
.switch .tr::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .tr { background: var(--forest2); }
.switch input:checked + .tr::after { transform: translateX(16px); }
.switch input:focus-visible + .tr { outline: 2.5px solid var(--copper); outline-offset: 2px; }
.switch input:disabled + .tr { opacity: .5; }
.cbx { width: 17px; height: 17px; accent-color: var(--forest); cursor: pointer; }

/* tags */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 13%, #fff); color: color-mix(in srgb, var(--pc) 85%, #000); white-space: nowrap; border: 1px solid color-mix(in srgb, var(--pc) 22%, transparent); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }
.pill-lost { background: #eee9e0; color: var(--ink3); padding: 2px 9px; border: 1px solid var(--line); }
.ttag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.ttag::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--tc); transform: rotate(45deg) scale(.85); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; background: var(--paper2); color: var(--ink2); }
.tag .ic { width: 13px; height: 13px; }
.tag-good { background: var(--forest3); color: var(--forest); }
.tag-warn { background: var(--gold2); color: #7c5a12; }
.tag-bad { background: var(--red2); color: var(--red); }
.tag-info { background: var(--blue2); color: #2f5370; }
.tag-copper { background: var(--copper2); color: var(--copper3); }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink3); padding: 9px 10px; border-bottom: 1.5px solid var(--line2); white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
.tbl th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tbl th button:hover { color: var(--ink); }
.tbl th button .ic { width: 13px; height: 13px; }
.tbl th[aria-sort] button { color: var(--forest); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fbf6ea; }
.tbl tr.sel { background: #f3efe0; }
.tbl .r { text-align: right; }
.tbl a.rowlink { color: var(--ink); text-decoration: none; font-weight: 600; }
.tbl a.rowlink:hover { color: var(--forest2); text-decoration: underline; }
.tbl small { display: block; color: var(--ink3); font-size: 12px; }
.tbl .w1 { width: 1%; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; font-size: 13px; color: var(--ink2); flex-wrap: wrap; }
.pager div { display: flex; gap: 6px; }
.bulkbar { display: flex; align-items: center; gap: 10px; background: var(--forest); color: #fdf8ec; padding: 8px 12px; border-radius: 11px; margin-bottom: 12px; flex-wrap: wrap; animation: pageIn .2s; }
.bulkbar select { background: var(--forest2); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 5px 8px; }
.bulkbar .btn.ghost { padding: 5px 10px; font-size: 13px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 9px 13px; cursor: pointer; color: var(--ink2); font-weight: 500; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-selected=true] { color: var(--forest); border-bottom-color: var(--copper); font-weight: 600; }
.tabs button i { font-style: normal; font-size: 11.5px; background: var(--paper2); border-radius: 99px; padding: 0 7px; }

/* empty and loading */
.empty { text-align: center; padding: 36px 16px; max-width: 460px; margin: 0 auto; }
.empty-art { width: 140px; height: 94px; margin-bottom: 8px; }
.empty h3 { font-size: 19px; margin-bottom: 6px; }
.empty p { color: var(--ink2); }
.sk { background: linear-gradient(90deg, #ebe2cf 25%, #f4ecdd 50%, #ebe2cf 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
.sk-line { height: 16px; }
.sk-big { height: 30px; margin-top: 12px; width: 75%; }
.sk-block { height: 220px; }
.sk-card { margin-top: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.scrim { position: absolute; inset: 0; background: rgba(34, 30, 18, .42); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.dlg { position: relative; background: var(--card); border-radius: 18px; box-shadow: var(--sh2); width: min(620px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: dlgIn .22s cubic-bezier(.2, .9, .3, 1.2); border: 1px solid var(--line); }
.dlg-sm { width: min(460px, 100%); }
.dlg-lg { width: min(860px, 100%); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dlg > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px 22px; gap: 10px; }
.dlg > header h2 { font-size: 21px; }
.dlg-body { padding: 4px 22px 18px; overflow-y: auto; }
.dlg > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--card2); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.is-drawer { justify-content: flex-end; padding: 0; }
.is-drawer .dlg { height: 100%; max-height: none; border-radius: 18px 0 0 18px; width: min(560px, 100%); animation: drawerIn .26s cubic-bezier(.2, .9, .3, 1); }
.is-drawer .dlg > footer { border-radius: 0 0 0 18px; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .3; } }
.nav-drawer { background: var(--forest) !important; color: #e8e0cc; width: min(320px, 88vw) !important; }
.nav-drawer h2 { color: #fff7e8; }
.nav-drawer .iconbtn { color: #e8e0cc; }
.menu-pop { position: absolute; z-index: 70; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh2); min-width: 240px; max-width: calc(100vw - 20px); padding: 6px; animation: dlgIn .16s; }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px; font-size: 13px; }
.pop-head b { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.pop-notes { width: 380px; }
.notes { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.notes a { display: flex; gap: 10px; padding: 9px 10px; text-decoration: none; color: var(--ink); border-radius: 10px; }
.notes a:hover { background: var(--paper); }
.notes b { display: block; font-size: 13.5px; font-weight: 600; }
.notes small { display: block; color: var(--ink2); font-size: 12.5px; }
.notes li.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; background: var(--copper); border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.n-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--blue2); color: var(--blue); }
.n-warn { background: var(--copper2); color: var(--copper3); }
.n-good { background: var(--forest3); color: var(--forest); }
.role-opt { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.role-opt:hover, .role-opt:focus-visible { background: var(--paper); }
.role-opt[aria-current=true] { background: var(--forest3); }
.role-opt b { display: block; font-size: 13.5px; }
.role-opt small { display: block; font-size: 12px; color: var(--ink2); }
.role-opt span { flex: 1; }
.role-opt > .ic { color: var(--forest); }
.pop-roles { width: 340px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #26302a; color: #f5efe3; padding: 10px 16px; border-radius: 12px; box-shadow: var(--sh2); font-size: 14px; animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.3); max-width: calc(100vw - 30px); }
.toast .ic { color: #9fd3b0; }
.toast.warn .ic { color: #f0b48a; }
.toast.info .ic { color: #b9d2e3; }
.toast .linkish { color: #f6c9a6; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.tip { position: fixed; z-index: 95; pointer-events: none; background: #26302a; color: #f5efe3; font-size: 12.5px; padding: 7px 10px; border-radius: 9px; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .12s; max-width: 260px; line-height: 1.4; }
.tip b { color: #fff; }
.tip.on { opacity: 1; }

/* palette */
.overlay:has(.palette) { align-items: flex-start; padding-top: 10vh; }
.palette { width: min(640px, 100%); }
.palette > header { display: none; }
.palette .dlg-body { padding: 0; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pal-in .ic { color: var(--copper); width: 20px; height: 20px; }
.pal-in input::-webkit-search-cancel-button { display: none; }
.pal-in input { border: 0; outline: none; flex: 1; font-size: 17px; background: transparent; }
.pal-res { max-height: 50vh; overflow-y: auto; padding: 6px; }
.pal-g { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink3); padding: 10px 12px 4px; }
.pal-it { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.pal-it .ic { color: var(--ink3); }
.pal-it b { display: block; font-weight: 600; font-size: 14px; }
.pal-it small { display: block; color: var(--ink2); font-size: 12.5px; }
.pal-it.sel, .pal-it:hover { background: var(--forest3); }
.pal-it.sel .ic { color: var(--forest); }
.pal-hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink3); display: flex; gap: 5px; align-items: center; background: var(--card2); border-radius: 0 0 18px 18px; }

/* tour */
.tour-ring { position: absolute; z-index: 80; border-radius: 14px; box-shadow: 0 0 0 3px var(--copper), 0 0 0 9999px rgba(30, 26, 14, .38); pointer-events: none; transition: all .25s; }
.tour-pop { position: absolute; z-index: 81; width: 340px; background: var(--card); border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--sh2); border: 1px solid var(--line); animation: dlgIn .25s; }
.tour-pop.tour-corner { position: fixed; right: 24px; bottom: 24px; }
.tour-pop.tour-bottom { position: fixed; left: 12px; right: 12px; bottom: 80px; width: auto; }
.tour-n { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--copper); font-weight: 700; margin-bottom: 4px; }
.tour-pop h3 { font-size: 19px; margin-bottom: 6px; }
.tour-pop p { color: var(--ink2); font-size: 14px; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.tour-btns span { display: flex; gap: 6px; }
.tour-offer { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--sh2); width: 360px; animation: toastIn .4s; }
.tour-offer b { font-family: var(--serif); font-size: 16.5px; font-weight: 600; }
.tour-offer p { font-size: 13px; color: var(--ink2); margin: 4px 0 6px; }

/* dashboard */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hello h1 { font-size: 34px; }
.hello h1 em { font-style: italic; color: var(--copper); font-weight: 500; }
.hello p { margin: 6px 0 0; color: var(--ink2); }
.week { padding: 0; overflow: hidden; }
.week .card-h { padding: 16px 20px 0; }
.wk { display: grid; grid-template-columns: 150px repeat(6, minmax(0, 1fr)); font-size: 12.5px; }
.wk-h { padding: 8px 8px; text-align: left; color: var(--ink3); font-weight: 600; border-bottom: 1px solid var(--line); font-size: 12px; }
.wk-h.today { color: var(--copper); }
.wk-h b { font-family: var(--serif); font-size: 17px; color: var(--ink); font-weight: 600; margin-right: 3px; }
.wk-h.today b { color: var(--copper); }
.wk-c { border-bottom: 1px dashed var(--line); border-left: 1px dashed var(--line); padding: 5px; min-height: 46px; position: relative; display: flex; flex-direction: column; gap: 3px; }
.wk-c.today { background: rgba(180, 100, 58, .05); }
.wk-c.sat { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(160, 140, 100, .06) 6px 12px); }
.wk-crew { padding: 7px 10px 7px 20px; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; justify-content: center; }
.wk-crew b { font-size: 13px; display: flex; align-items: center; gap: 7px; }
.wk-crew b i { width: 8px; height: 8px; border-radius: 50%; }
.wk-crew small { color: var(--ink3); font-size: 11.5px; }
.wk-job { display: block; background: color-mix(in srgb, var(--tc) 14%, #fff); border-left: 3px solid var(--tc); border-radius: 5px; padding: 3px 6px; text-decoration: none; color: var(--ink); line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.8px; }
.wk-job:hover { background: color-mix(in srgb, var(--tc) 24%, #fff); }
.wk-job.clash { box-shadow: 0 0 0 1.5px var(--red); }
.wk-job small { color: var(--ink3); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--sans); fill: var(--ink3); font-size: 11px; }
.chart .axis path, .chart .axis line { stroke: var(--line2); }
.chart .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .grid path { display: none; }
.chart .lbl-v { fill: var(--ink); font-weight: 600; font-size: 12px; }
.chart .big { font-family: var(--serif); fill: var(--ink); font-size: 30px; font-weight: 600; }
.ch-note { font-size: 12px; color: var(--ink3); margin-top: 6px; }
.overdue-list { list-style: none; padding: 0; margin: 10px 0 0; }
.overdue-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.overdue-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.overdue-list a:hover { text-decoration: underline; }
.hidden-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--ink2); min-height: 200px; background: repeating-linear-gradient(135deg, var(--card) 0 10px, var(--card2) 10px 20px); }
.hidden-card .ic { width: 28px; height: 28px; color: var(--copper); margin-bottom: 8px; }

/* kanban */
.kb { display: grid; grid-template-columns: repeat(7, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kb-col { background: var(--paper2); border-radius: 14px; padding: 10px; min-height: 300px; border: 1px solid var(--line); transition: background .15s, box-shadow .15s; }
.kb-col.over { background: var(--forest3); box-shadow: inset 0 0 0 2px var(--forest2); }
.kb-col header { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 10px; gap: 6px; }
.kb-col header h3 { font-size: 15px; display: flex; align-items: center; gap: 7px; }
.kb-col header h3 i { width: 9px; height: 9px; border-radius: 50%; }
.kb-col header small { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; text-align: right; }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-card { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; cursor: grab; box-shadow: 0 1px 2px rgba(60, 40, 10, .07); position: relative; transition: box-shadow .12s, transform .12s; }
.kb-card:hover { box-shadow: 0 6px 16px -6px rgba(60, 40, 10, .3); }
.kb-card.dragging { opacity: .45; transform: rotate(-1.5deg); }
.kb-card .t { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ink3); }
.kb-card a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; display: block; margin: 3px 0; line-height: 1.3; }
.kb-card a:hover { color: var(--forest2); }
.kb-card .b { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; }
.kb-card .mv { position: absolute; right: 6px; bottom: 6px; opacity: 0; }
.kb-card:hover .mv, .kb-card:focus-within .mv { opacity: 1; }
.kb-card .mv select { font-size: 12px; border: 1px solid var(--line2); border-radius: 6px; background: var(--card); padding: 2px; }
.kb-more { text-align: center; font-size: 12.5px; color: var(--ink3); padding: 6px; }

/* schedule */
.sch-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.sch { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.sch-scroll { overflow-x: auto; }
.sch-grid { min-width: 820px; }
.sch-head, .sch-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.sch-days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sch-head .sch-days div { padding: 10px 10px 8px; border-left: 1px solid var(--line); font-size: 12px; color: var(--ink3); font-weight: 600; border-bottom: 1.5px solid var(--line2); }
.sch-head .sch-days div b { font-family: var(--serif); font-size: 20px; color: var(--ink); display: block; line-height: 1; font-weight: 600; }
.sch-head .sch-days div.today { background: rgba(180, 100, 58, .07); color: var(--copper); }
.sch-head .sch-days div.today b { color: var(--copper); }
.sch-head > div:first-child { border-bottom: 1.5px solid var(--line2); padding: 10px 14px; font-size: 12px; color: var(--ink3); display: flex; align-items: flex-end; }
.sch-crew { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; background: var(--card2); }
.sch-crew b { display: block; font-size: 14px; }
.sch-crew small { display: block; color: var(--ink3); font-size: 11.5px; line-height: 1.3; }
.sch-crew .dot { width: 10px; height: 34px; border-radius: 4px; flex: none; }
.sch-row.mine .sch-crew { background: var(--copper2); }
.sch-lane { position: relative; border-bottom: 1px solid var(--line); min-height: 78px; }
.sch-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sch-bg div { border-left: 1px solid var(--line); }
.sch-bg div.today { background: rgba(180, 100, 58, .05); }
.sch-bg div.sat { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(160, 140, 100, .07) 7px 14px); }
.sch-bg div.drop { background: rgba(46, 107, 81, .16); box-shadow: inset 0 0 0 2px var(--forest2); }
.sch-bg div.drop.bad { background: rgba(168, 60, 50, .13); box-shadow: inset 0 0 0 2px var(--red); }
.sch-jobs { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(62px, auto); gap: 4px 0; padding: 6px 0; }
.sch-job { margin: 0 4px; border-radius: 9px; padding: 7px 9px; background: color-mix(in srgb, var(--tc) 15%, #fffdf8); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); border-left: 4px solid var(--tc); cursor: grab; font-size: 12.5px; line-height: 1.3; overflow: hidden; text-align: left; color: var(--ink); display: block; width: auto; box-shadow: 0 1px 2px rgba(60, 40, 10, .08); position: relative; }
.sch-job:hover { box-shadow: 0 6px 16px -6px rgba(60, 40, 10, .35); }
.sch-job b { display: block; font-size: 12.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-job span { display: block; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.sch-job.clash { border-color: var(--red); box-shadow: 0 0 0 1.5px var(--red); }
.sch-job.clash b { padding-right: 16px; }
.sch-job .cl { position: absolute; top: 5px; right: 6px; color: var(--red); }
.sch-job .cl .ic { width: 15px; height: 15px; }
.sch-job.dragging { opacity: .4; }
.sch-job.picked { outline: 2.5px solid var(--copper); outline-offset: 1px; }
.sch-job.done { opacity: .72; }
.tray { position: sticky; top: 80px; }
.tray .card { padding: 14px; }
.tray-list { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.tray-list .sch-job { margin: 0; }
.tray.over .card { box-shadow: inset 0 0 0 2px var(--forest2); }
.clash-bar { display: flex; align-items: center; gap: 10px; background: var(--red2); color: var(--red); border: 1px solid rgba(168, 60, 50, .25); padding: 9px 14px; border-radius: 11px; margin-bottom: 12px; font-size: 13.5px; }
.clash-bar .ic { flex: none; }

/* job detail */
.pipe { display: flex; gap: 4px; margin: 14px 0 4px; flex-wrap: wrap; }
.pipe button { flex: 1; min-width: 92px; border: 0; background: var(--paper2); color: var(--ink3); padding: 9px 8px 9px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); text-align: center; white-space: nowrap; }
.pipe button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.pipe button.done { background: var(--forest3); color: var(--forest); }
.pipe button.cur { background: var(--forest); color: #fdf8ec; }
.pipe button:hover:not(.cur):not([disabled]) { background: var(--copper2); color: var(--copper3); }
.pipe button[disabled] { cursor: default; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.dl dt { color: var(--ink3); font-size: 13px; }
.dl dd { margin: 0; }
.money-box { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: 14px; }
.money-box .tot { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.money-box hr { grid-column: 1 / -1; border: 0; border-top: 1px dashed var(--line2); margin: 4px 0; width: 100%; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { border-bottom: 1px dashed var(--line); }
.check-list label { display: flex; gap: 11px; align-items: center; padding: 9px 2px; cursor: pointer; }
.check-list input:checked + span { text-decoration: line-through; color: var(--ink3); }
.prog { height: 7px; background: var(--paper2); border-radius: 99px; overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--forest2), var(--forest)); border-radius: 99px; transition: width .4s; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper2); margin: 0; }
.photo figcaption { font-size: 12px; padding: 5px 8px; color: var(--ink2); }
.photo-svg { display: block; width: 100%; height: auto; }
.add-photo { border: 1.5px dashed var(--line2); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink2); background: transparent; cursor: pointer; min-height: 120px; font-size: 13px; }
.add-photo:hover { border-color: var(--copper); color: var(--copper3); background: var(--copper2); }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl li { position: relative; padding: 0 0 14px 24px; font-size: 13.5px; }
.tl li::before { content: ''; position: absolute; left: 5px; top: 7px; bottom: -7px; width: 1.5px; background: var(--line2); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ''; position: absolute; left: 0; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 2px solid var(--copper); }
.tl li.live::after { background: var(--copper); }
.tl small { display: block; color: var(--ink3); font-size: 12px; }
.note { background: #fff8e6; border: 1px solid #efe0b8; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 8px; }
.note small { display: block; color: var(--ink3); font-size: 12px; margin-top: 3px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; font-size: 13px; background: var(--card2); }
.file .ic { color: var(--copper); }
.cust-card { display: flex; gap: 12px; align-items: flex-start; }
.cust-card b { display: block; }
.cust-card small { display: block; color: var(--ink2); font-size: 13px; }
.lines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lines th { text-align: left; font-size: 11.5px; color: var(--ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 6px 6px; border-bottom: 1.5px solid var(--line2); }
.lines td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines .r { text-align: right; }
.lines input, .lines select { width: 100%; border: 1px solid var(--line); background: #fffefa; border-radius: 7px; padding: 5px 7px; font-size: 13.5px; }
.lines input.q { width: 64px; text-align: right; }
.lines input.u { width: 90px; text-align: right; }
.lines tfoot td { border: 0; padding: 4px 6px; }
.lines tfoot .gt td { font-family: var(--serif); font-size: 18px; font-weight: 600; padding-top: 8px; }
.callout { display: flex; gap: 12px; align-items: flex-start; background: var(--copper2); border: 1px solid #ecc9ad; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.callout .ic { color: var(--copper3); margin-top: 1px; }
.callout.green { background: var(--forest3); border-color: #bcd3c2; }
.callout.green .ic { color: var(--forest); }
.callout.red { background: var(--red2); border-color: #e7b9b1; }
.callout.red .ic { color: var(--red); }

/* quote builder */
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.opt { border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px; display: flex; flex-direction: column; position: relative; }
.opt.rec { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper2); }
.opt.chosen { border-color: var(--forest2); box-shadow: 0 0 0 3px var(--forest3); }
.opt .badge { position: absolute; top: -11px; left: 14px; background: var(--copper); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; letter-spacing: .05em; text-transform: uppercase; }
.opt h3 { font-size: 22px; }
.opt h3 small { font-family: var(--sans); font-size: 12px; color: var(--ink3); font-weight: 500; margin-left: 6px; }
.opt .ql { list-style: none; padding: 0; margin: 10px 0; flex: 1; }
.opt .ql li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; align-items: center; }
.opt .ql li .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--copper3); font-weight: 700; }
.opt .ql input { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 13px; background: #fffefa; width: 100%; }
.opt .ql .qrow { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.opt .ql .qrow input.q { width: 58px; text-align: right; }
.opt .ql .qrow input.u { width: 84px; text-align: right; }
.opt .ql .qrow select { border: 1px solid var(--line); border-radius: 6px; font-size: 12px; padding: 4px; background: #fffefa; }
.opt .tots { border-top: 1.5px solid var(--line2); padding-top: 8px; font-size: 13px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.opt .tots .g { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--forest); }
.qstat { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* stepper */
.steps { display: flex; gap: 0; margin-bottom: 20px; counter-reset: st; flex-wrap: wrap; }
.steps li { list-style: none; flex: 1; min-width: 110px; display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink3); padding: 8px 0; position: relative; }
.steps li::before { counter-increment: st; content: counter(st); width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; font-weight: 700; background: var(--card); flex: none; font-size: 13px; }
.steps li::after { content: ''; flex: 1; height: 1.5px; background: var(--line2); margin: 0 10px; }
.steps li:last-child::after { display: none; }
.steps li.on { color: var(--forest); font-weight: 600; }
.steps li.on::before { background: var(--forest); color: #fff; border-color: var(--forest); }
.steps li.done::before { content: '✓'; background: var(--forest3); color: var(--forest); border-color: var(--forest3); }
.wiz { max-width: 920px; }
.wiz-foot { display: flex; justify-content: space-between; margin-top: 20px; gap: 10px; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; padding: 2px; }
.pick { border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 11px; background: var(--card); cursor: pointer; text-align: left; }
.pick b { display: block; font-size: 13.5px; }
.pick small { color: var(--ink3); font-size: 12px; }
.pick[aria-pressed=true] { border-color: var(--forest2); background: var(--forest3); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.type-grid .pick { display: flex; gap: 9px; align-items: center; }
.type-grid .pick i { width: 12px; height: 12px; border-radius: 4px; transform: rotate(45deg); flex: none; }
.success { text-align: center; padding: 30px 10px; }
.success .tick { width: 74px; height: 74px; border-radius: 50%; background: var(--forest3); display: grid; place-items: center; margin: 0 auto 12px; animation: pop .5s cubic-bezier(.2, .9, .3, 1.4); }
.success .tick .ic { width: 38px; height: 38px; color: var(--forest); stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

/* lists of cards */
.enq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.enq { display: flex; flex-direction: column; gap: 6px; }
.enq + .enq { margin-top: 0; }
.enq .t { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink3); }
.enq h3 { font-size: 17px; }
.enq p { font-size: 13.5px; color: var(--ink2); margin: 0; }
.enq .acts { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.feed li .when { margin-left: auto; color: var(--ink3); font-size: 12.5px; white-space: nowrap; }
.feed li b { font-weight: 600; }
.feed .day-h { font-family: var(--serif); font-size: 16px; padding: 16px 0 4px; border: 0; color: var(--copper3); font-weight: 600; }
.feed a { color: var(--forest2); }
.feed .live-dot { width: 8px; height: 8px; background: var(--copper); border-radius: 50%; display: inline-block; margin-left: 6px; }
.stock-bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.stock-bar .prog { flex: 1; height: 6px; }
.stock-bar .prog i.low { background: var(--copper); }
.stock-bar .prog i.out { background: var(--red); }
.qty-ctl { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.qty-ctl button { border: 0; background: var(--card2); width: 28px; height: 28px; cursor: pointer; font-size: 15px; color: var(--ink2); }
.qty-ctl button:hover { background: var(--paper2); }
.qty-ctl span { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.perm-tbl td, .perm-tbl th { text-align: center; }
.perm-tbl td:first-child, .perm-tbl th:first-child { text-align: left; }
.sync-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, var(--card), var(--forest3)); }
.sync-ic { width: 58px; height: 58px; border-radius: 16px; background: var(--forest); color: #fdf8ec; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; font-weight: 700; flex: none; }
.sync-card .grow { flex: 1; min-width: 220px; }
.sync-prog { height: 8px; background: var(--paper2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.sync-prog i { display: block; height: 100%; width: 0; background: var(--copper); transition: width .2s; }
.link-flow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.link-flow i { flex: 1; height: 1.5px; background: repeating-linear-gradient(90deg, var(--forest2) 0 6px, transparent 6px 10px); min-width: 30px; animation: flow 1s linear infinite; background-size: 10px 2px; }
@keyframes flow { to { background-position: 10px 0; } }
.sig { border: 1.5px dashed var(--line2); border-radius: 12px; background: #fffefa; touch-action: none; width: 100%; height: 160px; display: block; cursor: crosshair; }

/* field app phone */
.field-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
.field-copy { max-width: 440px; padding-top: 20px; }
.field-copy h1 { font-size: 36px; margin-bottom: 12px; }
.field-copy ul { padding-left: 0; list-style: none; }
.field-copy li { display: flex; gap: 10px; padding: 6px 0; color: var(--ink2); }
.field-copy li .ic { color: var(--copper); margin-top: 2px; }
.phone { width: 380px; height: 780px; border-radius: 48px; background: #1b1f1c; padding: 13px; box-shadow: var(--sh2), inset 0 0 0 2px #3a403b; position: relative; }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 98px; height: 26px; background: #000; border-radius: 20px; z-index: 3; }
.phone-scr { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--paper); position: relative; display: flex; flex-direction: column; }
.fa-status { height: 50px; flex: none; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 26px 6px; font-size: 13px; font-weight: 600; background: var(--forest); color: #fff; }
.fa-top { background: var(--forest); color: #fdf8ec; padding: 8px 18px 16px; flex: none; }
.fa-top small { color: #b9c8b8; font-size: 12.5px; }
.fa-top h2 { color: #fff7e8; font-size: 22px; }
.fa-top .iconbtn { color: #fdf8ec; height: 34px; min-width: 34px; padding: 0; margin-left: -6px; }
.fa-top .iconbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.fa-body { flex: 1; overflow-y: auto; padding: 14px 14px 20px; }
.fa-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(60, 40, 10, .06); display: block; width: 100%; text-align: left; color: var(--ink); cursor: pointer; text-decoration: none; }
.fa-card b { font-size: 16px; display: block; }
.fa-card small { color: var(--ink2); display: block; font-size: 13px; }
.fa-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fa-big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; font-size: 17px; font-weight: 700; border-radius: 16px; border: 0; background: var(--forest); color: #fdf8ec; cursor: pointer; margin-bottom: 10px; }
.fa-big.copper { background: var(--copper); }
.fa-big.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line2); }
.fa-big .ic { width: 22px; height: 22px; }
.fa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.fa-grid button, .fa-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); text-decoration: none; }
.fa-grid .ic { width: 24px; height: 24px; color: var(--copper); }
.fa-tabs { display: flex; border-top: 1px solid var(--line); background: var(--card); flex: none; padding-bottom: 14px; }
.fa-tabs button { flex: 1; border: 0; background: none; padding: 9px 0 3px; font-size: 11.5px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink3); cursor: pointer; }
.fa-tabs button[aria-current=true] { color: var(--forest); font-weight: 700; }
.fa-check label { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px dashed var(--line); font-size: 15px; cursor: pointer; }
.fa-check input { width: 22px; height: 22px; accent-color: var(--forest); }
.fa-sec { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--copper3); font-weight: 700; margin: 14px 2px 8px; }

/* customer portal */
.portal { max-width: 1060px; }
.portal-hero { background: var(--forest); color: #fdf8ec; border-radius: 20px; padding: 26px 28px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; position: relative; overflow: hidden; }
.portal-hero h1 { color: #fff7e8; font-size: 32px; }
.portal-hero p { color: #cbd8c9; margin: 6px 0 0; }
.portal-hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 2px dashed rgba(233, 180, 143, .4); }
.visit { background: var(--card); color: var(--ink); border-radius: 16px; padding: 14px 18px; display: flex; gap: 14px; align-items: center; position: relative; z-index: 1; }
.visit .d { text-align: center; border-right: 1px dashed var(--line2); padding-right: 14px; }
.visit .d b { font-family: var(--serif); font-size: 32px; line-height: 1; display: block; color: var(--copper); }
.visit .d small { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink3); }
.track { display: flex; margin: 12px 0 4px; }
.track span { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink3); position: relative; padding-top: 22px; }
.track span::before { content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--paper2); border: 2px solid var(--line2); z-index: 1; }
.track span::after { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line2); }
.track span:first-child::after { display: none; }
.track span.done { color: var(--forest); }
.track span.done::before { background: var(--forest2); border-color: var(--forest2); }
.track span.done::after { background: var(--forest2); }
.track span.cur { color: var(--copper3); font-weight: 700; }
.track span.cur::before { background: var(--copper); border-color: var(--copper); box-shadow: 0 0 0 4px var(--copper2); }
.preview-bar { display: flex; align-items: center; gap: 10px; background: var(--gold2); border: 1px solid #e9d29b; border-radius: 12px; padding: 9px 14px; margin-bottom: 16px; font-size: 13.5px; flex-wrap: wrap; }
.preview-bar select { max-width: 260px; }

/* heatmap */
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink3); justify-content: flex-end; }
.hm-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* tab bar (phones) */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .searchbtn { min-width: 220px; }
  .today-chip { display: none; }
}
@media (max-width: 1100px) {
  :root { --side: 216px; }
  .page { padding: 22px 22px 60px; }
  .top { padding: 10px 22px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid12 { grid-template-columns: 1fr; }
  .sch-wrap { grid-template-columns: 1fr; }
  .tray { position: static; }
  .opts { grid-template-columns: 1fr 1fr; }
  .tour-btn span { display: none; }
  .wk { grid-template-columns: 112px repeat(6, minmax(0, 1fr)); }
  .field-wrap { grid-template-columns: 1fr; justify-items: center; }
  .field-copy { max-width: 600px; text-align: center; padding-top: 0; }
  .field-copy ul { display: inline-block; text-align: left; }
}
@media (max-width: 900px) {
  :root { --side: 70px; }
  .side { padding: 14px 10px; }
  .side .brand > span, .side .nav a > span { display: none; }
  .side .nav-sec, .side .nav em, .side .side-foot .linkish { font-size: 0; }
  .side .brand { padding: 0 0 12px; justify-content: center; }
  .side .nav a { justify-content: center; padding: 10px; }
  .side .nav-sec { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 6px; }
  .side .nav em { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; padding: 0; }
  .side .side-foot .linkish { justify-content: center; }
  .searchbtn { min-width: 0; flex: 1; max-width: 300px; }
  .grid2, .grid21 { grid-template-columns: 1fr; }
  .wk { grid-template-columns: 96px repeat(6, minmax(0, 1fr)); }
  .wk-crew { padding-left: 10px; }
  .wk-crew small { display: none; }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .app { min-height: 0; }
  .side { display: none; }
  .top { padding: 8px 12px; min-height: 56px; gap: 6px; }
  .brand-mob { display: flex; align-items: center; gap: 8px; padding: 0; text-decoration: none; }
  .brand-mob b { font-family: var(--serif); font-size: 18px; color: var(--forest); }
  .searchbtn { display: none; }
  #mobSearch { display: inline-flex; }
  .rolebtn { padding: 3px; }
  .rolebtn > span:not(.av), .rolebtn > .ic { display: none; }
  .tour-btn { display: none; }
  .banner { font-size: 12px; padding: 5px 38px 5px 10px; }
  .banner p { gap: 2px 8px; }
  .banner p > .ic { display: none; }
  .brand-top small { display: none; }
  .page { padding: 16px 16px 100px; }
  h1, .hello h1 { font-size: 26px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .kv { font-size: 22px; }
  .kpi { padding: 12px; }
  .card { padding: 14px 14px; border-radius: 13px; }
  .tbl-wrap { margin: 0 -14px; padding: 0 14px; }
  .grid3, .opts { grid-template-columns: 1fr; }
  .frow, .frow3 { grid-template-columns: 1fr; gap: 0; }
  .ph { align-items: flex-start; }
  .ph-actions { width: 100%; }
  .seg { overflow-x: auto; max-width: 100%; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 252, 246, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  body[data-role=customer] .tabbar { display: none; }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink3); text-decoration: none; border: 0; background: none; padding: 4px 0; cursor: pointer; }
  .tabbar .ic { width: 23px; height: 23px; }
  .tabbar a[aria-current=page] { color: var(--forest); font-weight: 700; }
  .tabbar a[aria-current=page] .ic { color: var(--copper); }
  .toasts { bottom: 84px; }
  .tour-offer { left: 12px; right: 12px; bottom: 80px; width: auto; }
  .is-drawer .dlg { border-radius: 18px 18px 0 0; height: auto; max-height: 92vh; width: 100%; margin-top: auto; animation: sheetIn .26s cubic-bezier(.2, .9, .3, 1); }
  .is-drawer { align-items: flex-end; }
  .is-modal { align-items: flex-end; padding: 0; }
  .is-modal .dlg { border-radius: 18px 18px 0 0; max-height: 92vh; width: 100%; }
  .overlay:has(.palette) { padding: 0; align-items: flex-start; }
  .palette { border-radius: 0 0 18px 18px !important; }
  .nav-drawer { width: 100% !important; }
  .dlg > footer { border-radius: 0; }
  @keyframes sheetIn { from { transform: translateY(40px); } }
  .pop-notes, .pop-roles { width: calc(100vw - 20px); }
  .dl { grid-template-columns: 110px 1fr; }
  /* week strip becomes a list per day */
  .wk { grid-template-columns: 74px repeat(6, minmax(78px, 1fr)); overflow-x: auto; }
  .week .wk-wrap { overflow-x: auto; }
  .week .wk { min-width: 560px; }
  .wk-h b { font-size: 15px; }
  .kb { grid-template-columns: repeat(7, 82vw); scroll-snap-type: x mandatory; }
  .kb-col { scroll-snap-align: start; }
  .kb-card .mv { opacity: 1; position: static; margin-top: 6px; }
  .field-copy { display: none; }
  .field-page { padding: 0 0 90px !important; }
  .phone { width: 100%; height: auto; border-radius: 0; padding: 0; box-shadow: none; background: none; }
  .phone-scr { height: auto; overflow: visible; min-height: calc(100vh - 230px); }
  .fa-body { overflow: visible; }
  .fa-tabs { position: sticky; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 5; padding-bottom: 4px; border: 1px solid var(--line); border-radius: 14px; margin: 0 8px; box-shadow: var(--sh); }
  .phone::before { display: none; }
  .phone-scr { border-radius: 0; }
  .fa-status { display: none; }
  .portal-hero { padding: 20px; }
  .portal-hero h1 { font-size: 26px; }
  .steps li { min-width: 0; font-size: 0; flex: none; }
  .steps li::after { width: 18px; flex: none; margin: 0 4px; }
  .steps li.on { font-size: 13px; }
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .lines td { border: 0; padding: 0; }
  .lines td:first-child { grid-column: 1 / -1; }
  .lines tfoot tr { display: flex; justify-content: space-between; }
  .tbl.cards thead { display: none; }
  .tbl.cards tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl.cards td { border: 0; padding: 0; }
  .tbl.cards td.hide-m { display: none; }
  .tbl.cards td.c-main { grid-column: 2; }
  .tbl.cards td.c-end { grid-column: 3; grid-row: 1 / span 2; text-align: right; align-self: center; }
  .tbl.cards td.c-sub { grid-column: 2; font-size: 12.5px; color: var(--ink2); }
  .tbl.cards td.c-chk { grid-row: 1 / span 2; align-self: center; }
  .sch-grid { min-width: 720px; }
  .sch-head, .sch-row { grid-template-columns: 110px minmax(0, 1fr); }
  .sch-crew small { display: none; }
  .bulkbar { position: sticky; top: 60px; z-index: 5; }
  .inline-add { grid-template-columns: 1fr auto !important; gap: 8px !important; }
  .inline-add .field:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
