/* Copperline Ops — demo by Phoenix Valley Tech */
:root {
  --bg: #F6F5F2; --surface: #FFFFFF; --surface-2: #FBFAF8; --sunken: #F1EFEB;
  --border: #E6E3DD; --border-strong: #D5D1C9;
  --text: #1A1917; --text-2: #4F4D49; --muted: #75726C;
  --accent: #B4602F; --accent-hover: #9C5226; --accent-soft: #F7EAE1; --accent-text: #974A1E; --on-accent: #FFFFFF;
  --green: #1C7F53; --green-soft: #E2F2E9; --amber: #9A6510; --amber-soft: #FBF0D9;
  --red: #BB3A34; --red-soft: #FBE5E3; --blue: #2C67B3; --blue-soft: #E3EDFA;
  --shadow-sm: 0 1px 2px rgba(25, 20, 15, .05);
  --shadow: 0 1px 2px rgba(25, 20, 15, .04), 0 6px 20px -6px rgba(25, 20, 15, .08);
  --shadow-lg: 0 24px 60px -12px rgba(25, 20, 15, .28), 0 2px 6px rgba(25, 20, 15, .08);
  --scrim: rgba(20, 18, 15, .38);
  --r: 12px; --r-sm: 8px;
  --pill-h: 0px; --tab-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0D0E; --surface: #141517; --surface-2: #17191B; --sunken: #1C1E21;
    --border: #25282C; --border-strong: #34373C;
    --text: #EDECE9; --text-2: #BBB9B4; --muted: #8F8D88;
    --accent: #D9854F; --accent-hover: #E69A69; --accent-soft: #2C1D13; --accent-text: #EBA778; --on-accent: #1A0E06;
    --green: #45C18A; --green-soft: #11261C; --amber: #E2A845; --amber-soft: #2A2111;
    --red: #F07A72; --red-soft: #2E1715; --blue: #73A9EE; --blue-soft: #132139;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0D0E; --surface: #141517; --surface-2: #17191B; --sunken: #1C1E21;
  --border: #25282C; --border-strong: #34373C;
  --text: #EDECE9; --text-2: #BBB9B4; --muted: #8F8D88;
  --accent: #D9854F; --accent-hover: #E69A69; --accent-soft: #2C1D13; --accent-text: #EBA778; --on-accent: #1A0E06;
  --green: #45C18A; --green-soft: #11261C; --amber: #E2A845; --amber-soft: #2A2111;
  --red: #F07A72; --red-soft: #2E1715; --blue: #73A9EE; --blue-soft: #132139;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 550; font-size: 13.5px;
  text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--sunken); border-color: transparent; color: var(--text); }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-icon-sm { width: 40px; padding: 0; }
.btn-danger { color: var(--red); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (pointer: coarse) {
  .btn, .btn-small { min-height: 44px; }
  .btn-icon-sm { width: 44px; }
}

/* Demo pill */
.demo-pill {
  position: fixed; z-index: 60; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 14px;
  background: var(--text); color: var(--bg); border-radius: 999px; box-shadow: var(--shadow-lg);
  font-size: 12.5px; font-weight: 550;
}
.demo-pill a { text-decoration: none; padding: 6px 2px; }
.demo-pill a:hover { text-decoration: underline; }
.demo-pill-x { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .75; }
.demo-pill-x:hover { opacity: 1; background: rgba(127, 127, 127, .25); }
.demo-pill-x .ic { width: 14px; height: 14px; }
html.pill-off .demo-pill { display: none; }

/* Layout */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; width: 248px; flex: none;
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px;
  border-right: 1px solid var(--border); background: var(--surface-2); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.logo { display: inline-grid; width: 32px; height: 32px; flex: none; }
.logo svg { width: 100%; height: 100%; }
.logo rect { fill: var(--accent); }
.logo path { fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-txt strong { font-size: 14.5px; letter-spacing: -.01em; }
.brand-txt small { color: var(--muted); font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px;
  border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500;
}
.side-nav a:hover { background: var(--sunken); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.side-nav a[aria-current="page"] .ic { color: var(--accent); }
.nav-count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--sunken); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.nav-count:empty { display: none; }
.nav-count.warn { color: var(--red); background: var(--red-soft); }
.nav-count.accent { color: var(--on-accent); background: var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.side-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--text-2); font-weight: 500; text-decoration: none; border-radius: 8px; }
.side-link:hover { background: var(--sunken); color: var(--text); }
.cta-card { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.cta-card .muted { font-size: 12.5px; line-height: 1.45; }
.owner { display: flex; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.owner span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.owner small { color: var(--muted); font-size: 12px; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: var(--pill-h); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { display: none; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.topbar-title p { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.hide-desk { display: none !important; }

.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 16px 28px 0; padding: 8px 8px 8px 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.demo-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.demo-banner > span:nth-child(2) { flex: 1; min-width: 180px; }
.demo-banner .btn { background: var(--surface); }

main { padding: 20px 28px 32px; outline: none; }
.view { animation: viewIn .28s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.foot { padding: 20px 28px 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; }
.foot a { color: var(--accent-text); }

.tabbar { display: none; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; flex-wrap: wrap; }
.card-h h2 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.card-h .spacer { flex: 1; }
.card-b { padding: 14px 16px 16px; }
.link-btn { background: none; border: 0; padding: 6px 4px; color: var(--accent-text); font-weight: 550; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.link-btn:hover { text-decoration: underline; }
.link-btn .ic { width: 14px; height: 14px; }

/* Overview */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden; }
.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.kpi-label .ic { width: 15px; height: 15px; }
.kpi-value { font-size: 27px; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--text-2); }
.kpi-sub .bad { color: var(--red); font-weight: 600; }
.kpi .spark { position: absolute; right: 12px; top: 16px; width: 84px; height: 32px; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark path.area { fill: var(--accent); opacity: .12; }
.spark circle { fill: var(--accent); }
.kpi.flash .kpi-value { animation: flash .9s var(--ease); }
@keyframes flash { 0% { color: var(--accent); transform: scale(1.04); } 100% { color: var(--text); transform: none; } }
.kpi-value { transform-origin: left center; }

.ov-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-top: 16px; }
.ov-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--border); }
.seg button { min-height: 30px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-weight: 550; font-size: 12.5px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
@media (pointer: coarse) { .seg button { min-height: 40px; min-width: 48px; } }
.chart-stats { display: flex; gap: 24px; padding: 4px 16px 0; flex-wrap: wrap; }
.chart-stats div { display: flex; flex-direction: column; }
.chart-stats strong { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart-stats span { font-size: 12px; color: var(--muted); }
.delta { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle; letter-spacing: 0; }
.delta.up { color: var(--green); background: var(--green-soft); }
.delta.down { color: var(--red); background: var(--red-soft); }
.chart-wrap { position: relative; padding: 8px 8px 8px 4px; touch-action: pan-y; }
.chart-wrap:focus-visible { outline-offset: -2px; }
.chart-wrap svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .today-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .hover-line { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart .hover-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.tip {
  position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2;
  padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--bg);
  font-size: 12px; line-height: 1.35; box-shadow: var(--shadow-lg); white-space: nowrap;
  opacity: 0; transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }

.list { list-style: none; margin: 0; padding: 0; }
.upnext li + li, .activity li + li, .overdue li + li { border-top: 1px solid var(--border); }
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; background: none; border: 0; text-align: left; cursor: pointer; min-height: 52px; color: inherit; text-decoration: none; }
.row-btn:hover .row-main strong { color: var(--accent-text); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.row-main strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.time-chip { flex: none; width: 54px; font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.activity li { display: flex; gap: 10px; padding: 10px 0; font-size: 13px; align-items: flex-start; }
.activity .a-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--text-2); flex: none; }
.activity .a-ic .ic { width: 14px; height: 14px; }
.activity time { display: block; color: var(--muted); font-size: 12px; }
.pipe-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--sunken); margin: 6px 0 14px; }
.pipe-bar span { display: block; height: 100%; transition: width .4s var(--ease); }
.pipe-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 12.5px; }
.pipe-legend div { display: flex; flex-direction: column; }
.pipe-legend b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pipe-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.cta-wide { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-top: 16px; flex-wrap: wrap; background: linear-gradient(120deg, var(--accent-soft), var(--surface) 70%); }
.cta-wide div { flex: 1; min-width: 220px; }
.cta-wide h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.cta-wide p { color: var(--text-2); font-size: 13px; margin-top: 2px; }

/* Avatars & badges */
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--av, var(--accent)) 16%, var(--surface)); color: color-mix(in srgb, var(--av, var(--accent)) 80%, var(--text)); font-size: 12px; font-weight: 650; letter-spacing: .02em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--av, var(--accent)) 30%, transparent); }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sunken); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.paid, .badge.done, .badge.won { color: var(--green); background: var(--green-soft); }
.badge.unpaid, .badge.scheduled { color: var(--blue); background: var(--blue-soft); }
.badge.overdue, .badge.lost { color: var(--red); background: var(--red-soft); }
.badge.progress, .badge.quoted { color: var(--amber); background: var(--amber-soft); }
.badge.new { color: var(--accent-text); background: var(--accent-soft); }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.input, .search input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.search input { padding-left: 34px; }
.input:focus, .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
@media (pointer: coarse) { .input, .search input { min-height: 44px; font-size: 16px; } }

/* Schedule */
.sched-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.sched-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.stat-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.timeline { padding: 0; overflow: hidden; }
.tl-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.tl-inner { min-width: 860px; position: relative; }
.tl-hours { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tl-hours-track { position: relative; height: 34px; }
.tl-hours-track span { position: absolute; top: 9px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-hours-track span:first-child { transform: none; padding-left: 6px; }
.tl-row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--border); }
.tl-row:last-child { border-bottom: 0; }
.tl-tech { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-right: 1px solid var(--border); }
.tl-tech div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tl-tech strong { font-weight: 600; }
.tl-tech span { font-size: 12px; color: var(--muted); }
.tl-track { position: relative; min-height: 88px; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: calc(100% / 11) 100%; }
.job {
  position: absolute; top: 10px; bottom: 10px; left: var(--l); width: calc(var(--w) - 6px); margin-left: 3px;
  display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 10px 6px 12px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); text-align: left; cursor: pointer;
  overflow: hidden; box-shadow: var(--shadow-sm); color: var(--text); min-width: 0; line-height: 1.3;
  transition: transform .15s var(--ease), box-shadow .15s, border-color .15s;
}
.job::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.job:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.job .j-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .j-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .j-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job.progress { background: color-mix(in srgb, var(--amber-soft) 70%, var(--surface)); }
.job.progress::before { background: var(--amber); }
.job.done { background: var(--surface-2); }
.job.done::before { background: var(--green); }
.job.done .j-title { color: var(--text-2); }
.job.short { padding: 6px 6px 6px 10px; justify-content: flex-start; }
.job.short .j-time { display: none; }
.job.short .j-title { white-space: normal; font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.job.short .j-sub { font-size: 11.5px; margin-top: 2px; }
.job.short .j-check { top: auto; bottom: 6px; right: 6px; }
.job .j-check { position: absolute; right: 8px; top: 8px; color: var(--green); width: 14px; height: 14px; }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 3; pointer-events: none; margin-left: 199px; }
.now-line::before { content: attr(data-label); position: absolute; top: 6px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 10.5px; font-weight: 650; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }

/* Kanban */
.pipe-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kcol { background: var(--sunken); border-radius: var(--r); border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; transition: background .15s, border-color .15s, box-shadow .15s; }
.kcol.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 70%, var(--sunken)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.kcol-h h2 { font-size: 13px; font-weight: 600; }
.kcol-h .k-count { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface); border-radius: 999px; padding: 0 7px; border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.kcol-h .k-val { margin-left: auto; font-size: 12.5px; color: var(--text-2); font-weight: 550; font-variant-numeric: tabular-nums; }
.k-dot { width: 8px; height: 8px; border-radius: 50%; }
.kcol-b { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 10px; min-height: 120px; }
.k-empty { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 18px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.lead {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px 10px;
  box-shadow: var(--shadow-sm); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: box-shadow .15s, border-color .15s, opacity .15s;
  -webkit-touch-callout: none;
}
.lead:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.lead.placeholder { opacity: .35; box-shadow: none; border-style: dashed; }
.lead.ghost { position: fixed; z-index: 90; pointer-events: none; margin: 0; box-shadow: var(--shadow-lg); transform-origin: 30% 30%; cursor: grabbing; }
.lead.pressing { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.lead-top { display: flex; align-items: flex-start; gap: 8px; }
.lead-top strong { flex: 1; font-weight: 600; font-size: 13.5px; line-height: 1.3; padding-top: 2px; }
.lead-svc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.lead-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.lead-meta b { margin-left: auto; color: var(--text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.src { padding: 1px 6px; border-radius: 5px; background: var(--sunken); font-weight: 550; color: var(--text-2); }
.moveto { position: relative; flex: none; width: 32px; height: 32px; margin: -6px -6px 0 0; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.moveto:hover, .moveto:focus-within { background: var(--sunken); color: var(--text); }
.moveto:focus-within { outline: 2px solid var(--accent); }
.moveto select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; font-size: 16px; }
.moveto .ic { width: 16px; height: 16px; }
@media (pointer: coarse) { .moveto { width: 44px; height: 44px; margin: -12px -10px -6px 0; } }
.drag-hint { font-size: 12.5px; color: var(--muted); margin-left: auto; }

/* Table */
.summary-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mini-stat { padding: 12px 14px; }
.mini-stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 550; }
.mini-stat strong { font-size: 19px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-stat.bad strong { color: var(--red); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data th { text-align: left; font-weight: 550; font-size: 12px; color: var(--muted); padding: 0 12px; height: 40px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.data th:first-child { border-top-left-radius: var(--r); }
.data th:last-child { border-top-right-radius: var(--r); }
.data th button { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 8px 0; color: inherit; font: inherit; cursor: pointer; }
.data th button:hover { color: var(--text); }
.data th button .ic { width: 13px; height: 13px; opacity: .35; }
.data th[aria-sort] button { color: var(--text); }
.data th[aria-sort] button .ic { opacity: 1; }
.data th[aria-sort="descending"] button .ic { transform: rotate(180deg); }
.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data tr:last-child td { border-bottom: 0; }
.data tbody tr { transition: background .12s; }
.data tbody tr:hover { background: var(--surface-2); }
.data .r { text-align: right; }
.data td.r { font-variant-numeric: tabular-nums; font-weight: 550; }
.data .inv-no { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 550; }
.data .cust-cell { display: flex; align-items: center; gap: 10px; }
.data .cust-cell .avatar { width: 28px; height: 28px; font-size: 11px; }
.data .actions { display: flex; gap: 6px; justify-content: flex-end; }
.data .paid-on { font-size: 12.5px; color: var(--muted); }
.data tr.just-paid { animation: rowflash 1.2s var(--ease); }
@keyframes rowflash { from { background: var(--green-soft); } to { background: transparent; } }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }

/* Split views (customers / messages) */
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.split-list { display: flex; flex-direction: column; overflow: hidden; }
.split-list .search { max-width: none; margin: 12px; }
.split-list ul { max-height: calc(100vh - 290px); min-height: 300px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; min-height: 60px; border: 0; background: none; text-align: left; cursor: pointer; border-top: 1px solid var(--border); color: inherit; }
.pick:hover { background: var(--surface-2); }
.pick[aria-current="true"] { background: var(--accent-soft); }
.pick[aria-current="true"] .row-main strong { color: var(--accent-text); }
.pick .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pick.unread .row-main strong { font-weight: 700; }
.pick .row-end { font-size: 12px; color: var(--muted); align-self: flex-start; padding-top: 2px; }
.detail { min-height: 420px; }
.detail-h { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.detail-h h2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.detail-h .grow { flex: 1; min-width: 160px; }
.detail-h p { font-size: 13px; color: var(--muted); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-btn { display: none; }
.dstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.dstats div { padding: 14px 20px; }
.dstats div + div { border-left: 1px solid var(--border); }
.dstats span { display: block; font-size: 12px; color: var(--muted); }
.dstats strong { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.detail section { padding: 16px 20px; }
.detail section + section { border-top: 1px solid var(--border); }
.detail h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.history { list-style: none; margin: 0; padding: 0; position: relative; }
.history li { position: relative; display: flex; gap: 12px; padding: 8px 0 8px 22px; }
.history li::before { content: ""; position: absolute; left: 5px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.history li::after { content: ""; position: absolute; left: 9px; top: 27px; bottom: -9px; width: 1.5px; background: var(--border); }
.history li:last-child::after { display: none; }
.history .row-main span { white-space: normal; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Messages */
.convo { display: flex; flex-direction: column; min-height: 520px; }
.bubbles { flex: 1; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 380px); min-height: 260px; }
.bubble { max-width: min(78%, 520px); padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; background: var(--sunken); border-bottom-left-radius: 4px; align-self: flex-start; animation: bubbleIn .25s var(--ease); overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.bubble time { display: block; font-size: 11px; opacity: .7; margin-top: 3px; }
.bubble.typing { color: var(--muted); font-style: italic; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); padding: 2px 8px; }
.composer { border-top: 1px solid var(--border); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0 12px; min-height: 32px; font-size: 12.5px; cursor: pointer; color: var(--text-2); }
.quick button:hover { border-color: var(--accent); color: var(--accent-text); }
@media (pointer: coarse) { .quick button { min-height: 40px; } }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer-row textarea { resize: none; min-height: 44px; max-height: 140px; }

/* Layers: drawer, modal */
.layer { position: fixed; inset: 0; z-index: 80; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%); background: var(--surface);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; outline: none;
  animation: drawerIn .28s var(--ease); border-left: 1px solid var(--border);
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.layer-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.layer-h h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; flex: 1; line-height: 1.3; }
.layer-h p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.layer-h .close { margin: -6px -8px 0 0; }
.layer-b { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.layer-f { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.status-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.status-seg button { min-height: 44px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 550; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); }
.status-seg button:hover { border-color: var(--border-strong); }
.status-seg button[aria-pressed="true"][data-status="scheduled"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.status-seg button[aria-pressed="true"][data-status="progress"] { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.status-seg button[aria-pressed="true"][data-status="done"] { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.status-seg .sd { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; display: block; }
.note-box { background: var(--sunken); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--text-2); }

.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100% - 32px));
  max-height: calc(100% - 48px); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; outline: none; animation: modalIn .25s var(--ease); border: 1px solid var(--border);
}
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.98); } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label, .lines-h { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 72px 104px 92px 40px; gap: 8px; align-items: center; }
.line .line-total { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; font-size: 13.5px; }
.line-head { display: grid; grid-template-columns: minmax(0, 1fr) 72px 104px 92px 40px; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 550; }
.line-head span:nth-child(4) { text-align: right; }
.line .rm { width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.line .rm:hover { background: var(--red-soft); color: var(--red); }
.totals { margin-left: auto; width: min(260px, 100%); display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 18px; font-weight: 650; padding-top: 8px; border-top: 1px solid var(--border); }
.form-err { color: var(--red); font-size: 13px; font-weight: 550; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-row3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 899px) {
  :root { --pill-h: 34px; --tab-h: calc(62px + env(safe-area-inset-bottom)); }
  html.pill-off { --pill-h: 0px; }
  body { padding-top: var(--pill-h); padding-bottom: var(--tab-h); }
  .sidebar { display: none; }
  .hide-desk { display: inline-flex !important; }
  .hide-phone { display: none !important; }
  .demo-pill { left: 0; right: 0; top: 0; bottom: auto; height: var(--pill-h); border-radius: 0; justify-content: center; padding: 0 4px 0 12px; box-shadow: none; font-size: 12px; z-index: 70; }
  .demo-pill-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; }
  .topbar { padding: 10px 16px; padding-left: max(16px, env(safe-area-inset-left)); gap: 10px; }
  .topbar-brand { display: block; }
  .topbar-title h1 { font-size: 17px; }
  .demo-banner { margin: 12px 16px 0; font-size: 12.5px; }
  main { padding: 16px 16px 24px; }
  .foot { padding: 18px 16px 28px; flex-direction: column; }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: var(--tab-h); padding: 4px 4px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border-top: 1px solid var(--border);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 550; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--accent-text); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -4px; width: 24px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tab-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; font-style: normal; display: grid; place-items: center; border: 2px solid var(--surface); }
  .tab-badge:empty { display: none; }
  .toasts { bottom: calc(var(--tab-h) + 12px); }

  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .spark { position: static; width: 100%; height: 30px; margin-top: 6px; }
  .kpi-value { font-size: 23px; }
  .kpi-label { font-size: 12px; }
  .kpi-sub { font-size: 12px; }
  .ov-row3 { grid-template-columns: minmax(0, 1fr); }

  /* Schedule becomes an agenda */
  .timeline { background: transparent; border: 0; box-shadow: none; }
  .tl-scroll { overflow: visible; }
  .tl-inner { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
  .tl-hours, .now-line { display: none; }
  .tl-row { grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
  .tl-row:last-child { border-bottom: 1px solid var(--border); }
  .tl-tech { border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 14px; }
  .tl-track { background: none; display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; }
  .job.short { padding: 10px 36px 10px 16px; justify-content: center; }
  .job.short .j-time { display: block; }
  .job.short .j-title { font-size: 13px; display: block; white-space: nowrap; }
  .job.short .j-check { top: 8px; bottom: auto; right: 8px; }
  .job { position: relative; left: auto; top: auto; bottom: auto; width: auto; margin: 0; min-height: 64px; padding: 10px 36px 10px 16px; }

  /* Kanban scrolls horizontally inside itself */
  .kanban { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 8px; scroll-padding: 0 16px; overscroll-behavior-x: contain; }
  .kcol { flex: 0 0 82%; scroll-snap-align: start; }
  .kanban.dragging { scroll-snap-type: none; }
  .drag-hint { margin-left: 0; width: 100%; }

  /* Invoices table collapses into cards */
  .summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .mini-stat { padding: 10px 12px; }
  .mini-stat strong { font-size: 16px; }
  .search { max-width: none; flex-basis: 100%; }
  .inv-table { background: transparent; border: 0; box-shadow: none; }
  .table-wrap { overflow: visible; }
  table.data, .data tbody, .data tr, .data td { display: block; }
  .data thead { display: none; }
  .data tbody { display: flex; flex-direction: column; gap: 10px; }
  .data tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
  .data tbody tr:hover { background: var(--surface); }
  .data td { padding: 0; border: 0; }
  .data td.c-cust { grid-column: 1; grid-row: 1; }
  .data td.c-amt { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 650; }
  .data td.c-no { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  .data td.c-status { grid-column: 2; grid-row: 2; text-align: right; }
  .data td.c-issued { display: none; }
  .data td.c-due { grid-column: 1 / -1; grid-row: 3; font-size: 12.5px; color: var(--muted); }
  .data td.c-due::before { content: "Due "; }
  .data td.c-act { grid-column: 1 / -1; grid-row: 4; margin-top: 8px; }
  .data td.c-act:empty { display: none; }
  .data .actions { justify-content: stretch; }
  .data .actions > * { flex: 1; }
  .data .cust-cell .avatar { display: none; }

  /* Split views show one pane at a time */
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.has-sel .split-list { display: none; }
  .split:not(.has-sel) .detail { display: none; }
  .split-list ul { max-height: none; min-height: 0; }
  .back-btn { display: inline-flex; }
  .detail-h { padding: 14px 16px; }
  .dstats div { padding: 12px 14px; }
  .detail section { padding: 14px 16px; }
  .bubbles { max-height: none; min-height: 300px; padding: 16px; }
  .convo { min-height: 0; }

  .drawer { top: auto; left: 0; width: 100%; max-height: 88%; border-radius: 18px 18px 0 0; border-left: 0; animation-name: sheetIn; }
  .drawer::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 8px auto 0; }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
  .modal { left: 0; right: 0; bottom: 0; top: auto; transform: none; width: 100%; max-height: 94%; border-radius: 18px 18px 0 0; animation-name: sheetIn; }
  .form-grid { grid-template-columns: 1fr; }
  .line-head { display: none; }
  .line { grid-template-columns: 1fr 1fr 40px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
  .line .l-desc { grid-column: 1 / -1; }
  .line .line-total { grid-column: 1 / 3; text-align: left; }
  .line .rm { grid-column: 3; grid-row: 2 / 4; }
  .line .line-total { grid-row: 3; }
  .layer-b { padding: 16px; }
  .layer-h, .layer-f { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .summary-row .mini-stat span { font-size: 11px; }
  .topbar-title p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
