/* ============================================================
   Theme tokens - QNODEA premium green.
   Charcoal base, natural deep greens, soft glossy green accent,
   frosted glass surfaces and a fine grain (60 / 30 / 10).
   ============================================================ */
:root {
  --lime: #6fc04f;          /* main accent (name kept for existing rules) */
  --lime-600: #4f9c3e;
  --deep: #14301a;
  --black: #0b0c0b;
  --white: #eef0ec;
  --grad: linear-gradient(135deg, #9bdc7c 0%, #4f9c3e 42%, #1d4219 100%);
  --gloss: linear-gradient(180deg, #82d062 0%, #4c9b3c 55%, #3b7f30 100%);

  --font-logo: 'Cyber Copix', 'Orbitron', sans-serif;
  --font-head: 'New Black', 'Outfit', sans-serif;
  --font-sub: 'Bokra', 'Outfit', sans-serif;
  --font-body: 'Visby CF', 'Urbanist', system-ui, sans-serif;

  --radius: 24px;
  --gap: 20px;
  --pad: 24px;
  --radius-sm: 12px;
  --pill: 999px;
  --rail-w: 88px;
  --rail-w-open: 252px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* dark (default) */
:root, :root[data-theme="dark"] {
  --bg: #0b0c0b;
  --bg-glow: radial-gradient(1100px 620px at 88% -12%, rgba(79, 156, 62, .16), transparent 60%),
             radial-gradient(900px 600px at -12% 112%, rgba(29, 66, 25, .35), transparent 60%);
  --surface: rgba(255, 255, 255, .028);
  --surface-2: rgba(255, 255, 255, .055);
  --surface-solid: #131513;
  --surface-pop: #161916;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, .05);
  --text: #e8ebe7;
  --text-2: #b3b9b2;
  --muted: #7d847c;
  --accent: #6fc04f;
  --accent-text: #8fd46f;
  --accent-soft: rgba(111, 192, 79, .13);
  --on-accent: #ffffff;
  --rail-bg: rgba(255, 255, 255, .03);
  --rail-btn: rgba(255, 255, 255, .045);
  --rail-icon: #b9c0b8;
  --rail-active-bg: #f1f3ef;
  --rail-active-fg: #0b0c0b;
  --input-bg: rgba(255, 255, 255, .035);
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --danger: #ff7a6e;
  --danger-soft: rgba(255, 122, 110, .12);
  --warn: #f2c26b;
  --warn-soft: rgba(242, 194, 107, .12);
  --info: #8cc8f2;
  --info-soft: rgba(140, 200, 242, .12);
  --grid-dot: rgba(255, 255, 255, .03);
  --grain-opacity: .06;
  --card-shadow: 0 0 #0000;
  color-scheme: dark;
}

/* light */
:root[data-theme="light"] {
  --bg: #e8ebe5;
  --bg-glow: radial-gradient(1100px 620px at 90% -12%, rgba(79, 156, 62, .16), transparent 60%),
             radial-gradient(800px 500px at -10% 110%, rgba(20, 48, 26, .06), transparent 60%);
  --surface: #ffffff;
  --surface-2: rgba(20, 35, 18, .045);
  --surface-solid: #ffffff;
  --surface-pop: #ffffff;
  --border: rgba(20, 35, 18, .06);
  --border-strong: rgba(20, 35, 18, .14);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, .9);
  --card-shadow: 0 1px 2px rgba(20, 35, 18, .05), 0 12px 32px -14px rgba(20, 35, 18, .16);
  --text: #142312;
  --text-2: #3a4637;
  --muted: #6f786d;
  --accent: #3f8a33;
  --accent-text: #2f7426;
  --accent-soft: rgba(63, 138, 51, .11);
  --on-accent: #ffffff;
  --rail-bg: #ffffff;
  --rail-btn: #ffffff;
  --rail-icon: #3a4637;
  --rail-active-bg: #1b3a17;
  --rail-active-fg: #ffffff;
  --input-bg: #ffffff;
  --shadow: 0 24px 60px rgba(20, 35, 18, .12);
  --danger: #c4453a;
  --danger-soft: rgba(196, 69, 58, .1);
  --warn: #9a6b0c;
  --warn-soft: rgba(242, 176, 50, .16);
  --info: #2a6b9e;
  --info-soft: rgba(42, 107, 158, .1);
  --grid-dot: rgba(20, 35, 18, .045);
  --grain-opacity: .03;
  --tile: #f6f7f4;
  color-scheme: light;
}

/* ============================================================ base */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.5 var(--font-body);
  font-weight: 500;
  color: var(--text);
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
body::before { /* subtle dot grid like the reference header */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
}
body::after { /* film grain for a premium, tactile surface */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--accent-text); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; margin: 0; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 12px; margin: 22px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-sub); }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--lime); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ============================================================ layout */
#app { position: relative; z-index: 1; display: flex; min-height: 100vh; }

/* --- icon rail (sidebar) --- */
.rail {
  position: sticky; top: 0; height: 100vh; width: var(--rail-w); flex-shrink: 0;
  padding: 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 30; transition: width .3s var(--ease);
}
.rail-inner {
  height: 100%; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: transparent; border: 1px solid transparent; border-radius: 30px; padding: 14px 0;
  transition: background .3s, border-color .3s;
}
.rail-logo { display: flex; align-items: center; gap: 10px; padding: 4px 0 14px; color: var(--text); }
.logo-mark { width: 46px; height: 40px; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; border-radius: 10px; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.q-mark { display: block; width: 100%; height: auto; overflow: visible; }
.q-word { display: block; height: 15px; width: auto; }
.rail-name { font: 700 15px var(--font-logo); color: var(--text); white-space: nowrap; display: none; letter-spacing: .02em; }
.rail-nav { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; flex: 1; min-height: 0; width: 100%; padding: 0 10px; }
#app.expanded .rail-nav { overflow-y: auto; justify-content: flex-start; padding-top: 8px; }
.rail-item { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.rail-btn {
  width: 48px; height: 48px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--rail-btn); box-shadow: var(--highlight), var(--card-shadow);
  color: var(--rail-icon); display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease), width .3s var(--ease);
  font: 600 14px var(--font-body); padding: 0;
}
.rail-btn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--border-strong); }
.rail-item.active > .rail-btn { background: var(--rail-active-bg); color: var(--rail-active-fg); border-color: transparent; box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 0 0 4px var(--accent-soft); }
.rail-label { display: none; white-space: nowrap; }
.rail-sub {
  position: absolute; left: calc(100% + 34px); top: -6px; min-width: 210px; display: none; flex-direction: column; gap: 2px;
  background: var(--surface-pop); border: 1px solid var(--border); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); z-index: 60;
}
.rail-sub .sub-title { font: 600 11px var(--font-sub); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 6px 12px 4px; }
.rail-sub a { padding: 9px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.rail-sub a:hover { background: var(--surface-2); color: var(--text); }
.rail-sub a.active { background: var(--accent-soft); color: var(--accent-text); }
.rail-item.open > .rail-sub { display: flex; animation: pop .18s var(--ease); }
.rail-bottom { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; padding: 10px 10px 4px; }
.rail-divider { width: 28px; height: 1px; background: var(--border); margin: 4px 0; }

/* expanded rail */
#app.expanded .rail { width: var(--rail-w-open); }
#app.expanded .rail-inner { align-items: stretch; padding: 14px 0; background: var(--rail-bg); border-color: var(--border); backdrop-filter: blur(20px); box-shadow: var(--highlight); }
#app.expanded .rail-logo { padding: 4px 16px 14px; }
#app.expanded .rail-name { display: block; }
:root[data-theme="dark"] #app.expanded .rail-name { color: var(--text); }
#app.expanded .rail-nav, #app.expanded .rail-bottom { align-items: stretch; }
#app.expanded .rail-item { align-items: stretch; }
#app.expanded .rail-btn { width: 100%; justify-content: flex-start; padding: 0 14px; }
#app.expanded .rail-label { display: inline; }
#app.expanded .rail-sub { position: static; display: none; box-shadow: none; background: transparent; border: 0; padding: 4px 0 6px 18px; min-width: 0; }
#app.expanded .rail-item.active > .rail-sub { display: flex; }
#app.expanded .rail-sub .sub-title { display: none; }
#app.expanded .rail-sub a { color: var(--text-2); }
:root[data-theme="dark"] #app.expanded .rail-sub a { color: var(--text-2); }
#app.expanded .rail-sub a.active { color: var(--accent-text); background: var(--accent-soft); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* --- floating header --- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 18px 40px 14px 20px;
}
.topbar::before { /* soft fade so content scrolls under the bar */
  content: ''; position: absolute; inset: 0 0 -10px 0; z-index: -1;
  background: linear-gradient(var(--bg) 55%, transparent); pointer-events: none;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 10px; }
.tb-right { margin-left: auto; }
.icon-btn {
  position: relative; width: 46px; height: 46px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--highlight), var(--card-shadow);
  backdrop-filter: blur(14px); transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.icon-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn .dot {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #e5484d; color: #fff; font: 700 11px/19px var(--font-body); text-align: center;
}
.avatar {
  width: 46px; height: 46px; border-radius: var(--pill); display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); font: 700 14px var(--font-sub); color: var(--text);
}
.avatar.sm { width: 40px; height: 40px; font-size: 13px; }
.timeline {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; justify-content: center;
}
.date-chip {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: var(--pill); white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; backdrop-filter: blur(14px); box-shadow: var(--card-shadow);
}
.tl-pill {
  display: flex; align-items: center; gap: 6px; height: 46px; padding: 4px; border-radius: var(--pill); min-width: 0; overflow: hidden;
  background: var(--gloss); color: #fff; max-width: 640px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 30px rgba(63, 138, 51, .25);
}
.tl-item {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--pill); white-space: nowrap;
  background: rgba(11, 12, 11, .78); color: #eef0ec; backdrop-filter: blur(6px); font-size: 13px; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis;
}
.tl-item small { color: #9aa39b; font-weight: 600; }
.tl-item.over small { color: #ff8a8a; }
.tl-empty { padding: 0 16px; font-weight: 700; font-size: 13px; }
.content { padding: 4px 40px 56px 20px; position: relative; width: 100%; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: var(--gap); flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* dropdowns from header */
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 280px; max-width: 360px; z-index: 70;
  background: var(--surface-pop); border: 1px solid var(--border); border-radius: 18px; padding: 8px; box-shadow: var(--shadow);
  animation: pop .18s var(--ease);
}
.dropdown .dd-head { padding: 8px 12px; font: 600 12px var(--font-sub); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.dropdown a, .dropdown button.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; color: var(--text);
  background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button.dd-item:hover { background: var(--surface-2); }
.dropdown .dd-sub { color: var(--muted); font-size: 12px; }
.anchor { position: relative; }

/* ============================================================ controls */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap;
  font: 600 14px var(--font-body); backdrop-filter: blur(14px); transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
}
.btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.btn.primary { background: var(--gloss); border-color: rgba(255, 255, 255, .18); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 24px rgba(63, 138, 51, .28); }
.btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 32px rgba(63, 138, 51, .38); }
.btn.danger { color: var(--danger); }
.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; }
input, select, textarea {
  font: 500 14px var(--font-body); padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--text); width: 100%; transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 4px var(--accent-soft); }
select option { background: var(--surface-solid); color: var(--text); }
textarea { min-height: 84px; resize: vertical; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: var(--date-icon-filter, none); }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.85); }
.search { width: 260px; border-radius: var(--pill); height: 42px; padding: 0 18px; }
.toolbar select { border-radius: var(--pill); height: 42px; padding: 0 16px; }
label { display: block; font: 600 12px var(--font-sub); color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============================================================ cards & tables */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--pad);
  backdrop-filter: blur(20px); box-shadow: var(--highlight), var(--card-shadow); transition: border-color .2s, transform .2s var(--ease);
}
.card + .card { margin-top: var(--gap); }
.grid > .card + .card { margin-top: 0; }
a.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.grid { display: grid; gap: var(--gap); }
.grid.kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.dash-grid > .card { display: flex; flex-direction: column; min-height: 320px; margin: 0; }
.dash-grid > .card > .table-wrap { flex: 1; }
.dash-grid > .card > .table-wrap:has(.empty) { display: grid; place-items: center; }
.dash-grid > .card .bars { flex: 1; min-height: 220px; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.kpi .card { padding: 18px 20px; }
.card > h2::before, .card > .page-head h2::before { /* angled tick borrowed from the logo's diagonals */
  content: ''; display: inline-block; width: 9px; height: 15px; margin-right: 10px; vertical-align: -1px;
  background: var(--lime); transform: skewX(-33deg); border-radius: 1px;
}
.kpi .card .label { color: var(--muted); font: 600 12.5px var(--font-sub); }
.kpi .card .value { font: 700 25px var(--font-head); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(18px); box-shadow: var(--card-shadow); }
.card .table-wrap { background: transparent; border: 0; border-radius: 0; backdrop-filter: none; box-shadow: none; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.card th:first-child, .card td:first-child { padding-left: 4px; } .card th:last-child, .card td:last-child { padding-right: 4px; }
tbody tr:last-child td { border-bottom: 0; }
th { font: 600 11.5px var(--font-sub); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
tbody tr { transition: background .15s; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; background: var(--surface-2); }
tr.section td { font: 600 12px var(--font-sub); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); font-weight: 600; }
.empty::before { /* quiet check badge above empty-state text */
  content: ''; display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236fc04f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 12.5 3 3 7-7'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--pill); font: 700 11.5px var(--font-body);
  background: var(--surface-2); color: var(--text-2); text-transform: capitalize;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.green { background: var(--accent-soft); color: var(--accent-text); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.muted { color: var(--muted); }
.neg { color: var(--danger); }

/* breadcrumb row */
.crumbs { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 4px 18px; font: 600 11.5px var(--font-sub); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.crumbs i { font-style: normal; margin: 0 10px; opacity: .5; }
.crumb-path span:last-child { color: var(--text-2); }
.crumb-meta { display: flex; align-items: center; gap: 6px; letter-spacing: .02em; text-transform: none; font-size: 13px; }
.crumb-meta svg.i { width: 15px; height: 15px; }
.crumb-meta i { margin: 0 4px; }

/* card header: icon tile + title + subtitle + action */
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.ch-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--border); }
.ch-icon svg.i { width: 20px; height: 20px; }
.ch-text { min-width: 0; padding-top: 1px; }
.ch-title { font: 600 19px/1.25 var(--font-head); letter-spacing: -.01em; }
.ch-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ch-action { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  color: var(--text-2); font-size: 12.5px; font-weight: 600; background: var(--surface); transition: border-color .2s, color .2s; }
.chip-btn:hover { border-color: var(--border-strong); color: var(--text); }
.chip-btn svg.i { width: 14px; height: 14px; }

/* page cards: filter bar, search, segmented control */
.list-card + .list-card, .doc-head + .card, .card + .dash-grid, .profile + .dash-grid { margin-top: var(--gap); }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 18px; padding: 10px; border-radius: 16px;
  background: var(--tile, var(--surface-2)); border: 1px solid var(--border); }
.filter-bar select, .filter-bar input[type="date"] { width: auto; height: 40px; padding: 0 14px; border-radius: 12px; }
.filter-bar .btn { height: 40px; border-radius: 12px; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box > svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .search { width: 100%; max-width: none; height: 40px; padding-left: 42px; border-radius: 12px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.seg a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg a.on { background: var(--gloss); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.list-card .kanban { margin: 0 -4px; padding: 0 4px 6px; }
.list-card .kcol { background: var(--tile, var(--surface-2)); box-shadow: none; }
.back-tile { color: var(--text-2); background: var(--surface); transition: border-color .2s, color .2s; }
.back-tile:hover { color: var(--text); border-color: var(--border-strong); }
.ch-title.big { font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar.lg { width: 54px; height: 54px; font-size: 18px; flex-shrink: 0; background: var(--grad); color: #fff; border: 0; }
.profile .card-head { align-items: center; }
.s-line { font: 600 15px/1.3 var(--font-body); margin-top: 4px; word-break: break-word; }
.doc-stats { margin-top: 4px; }
.doc-head .ch-action { flex-wrap: wrap; justify-content: flex-end; }
.print-bar { margin-bottom: var(--gap); padding: 18px 22px; }
.print-bar .card-head { margin: 0; align-items: center; }
.user-cell { display: inline-flex; align-items: center; gap: 10px; }
.card .lines th:first-child, .card .lines td:first-child { padding-left: 6px; }

/* stat tiles inside a card */
.snapshot { margin-bottom: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: block; padding: 16px 18px 18px; border-radius: 18px; border: 1px solid var(--border); background: var(--tile, var(--surface-2)); color: var(--text);
  transition: border-color .2s, transform .2s var(--ease), background .2s; }
.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.s-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: var(--accent-text); border: 1px solid var(--border); margin-bottom: 14px; }
.s-icon svg.i { width: 17px; height: 17px; }
.s-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.s-value { font: 700 24px/1.2 var(--font-head); margin-top: 4px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.s-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* dashboard hero */
.hero {
  position: relative; overflow: hidden; display: flex; gap: 20px; align-items: stretch; justify-content: space-between; flex-wrap: wrap;
  padding: 32px 36px; margin-bottom: var(--gap); border-radius: var(--radius); color: #ececec;
  background: radial-gradient(700px 340px at 85% -10%, rgba(111, 192, 79, .30), transparent 65%), linear-gradient(135deg, #1f4a1c 0%, #14301a 45%, #0d150d 100%);
  border: 1px solid rgba(143, 212, 111, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 80px rgba(0, 0, 0, .25);
}
.hero-pattern { position: absolute; inset: 0; opacity: .16; background: url(brand/pattern-outline.svg) 0 0 / 70px auto;
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%); }
.hero-left { position: relative; max-width: 560px; }
.hero-kicker { font: 600 12px var(--font-sub); letter-spacing: .14em; text-transform: uppercase; color: #a6e08a; }
.hero h1 { font-size: 34px; margin: 8px 0 6px; color: #fff; }
.hero p { color: #aab3ab; margin: 0 0 20px; }
.hero-stat {
  position: relative; min-width: 290px; padding: 22px 24px; border-radius: 22px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)), rgba(111, 192, 79, .22);
  border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 20px 50px rgba(0, 0, 0, .25); transition: transform .2s var(--ease);
}
.hero-stat:hover { transform: translateY(-2px); }
.hero-stat::after { content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .18; background: url(brand/pattern-dark.svg) 0 0 / 56px auto;
  mask-image: linear-gradient(200deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(200deg, #000, transparent 70%); }
.hero-stat .label { font: 600 12.5px var(--font-sub); opacity: .75; position: relative; }
.hero-stat .big { font: 700 34px var(--font-head); letter-spacing: -.02em; position: relative; margin-top: 4px; }
.hero-stat .delta { position: relative; font-weight: 700; font-size: 13px; margin-top: 6px; }
.hero-stat .delta { color: #c9f2b4; }
.hero-stat .delta.down { color: #ffb3a8; }
.btn.glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #ececec; }
.btn.dark { background: #f1f3ef; border-color: #f1f3ef; color: #0b0c0b; }

/* bars chart */
.bars { display: flex; align-items: flex-end; gap: 16px; height: 200px; padding-top: 12px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; gap: 4px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar { width: 42%; max-width: 22px; border-radius: 8px 8px 3px 3px; min-height: 3px; transition: height .6s var(--ease); }
.bar.sales { background: linear-gradient(180deg, #9bdc7c, #3f8a33); box-shadow: 0 0 24px rgba(111, 192, 79, .35); }
.bar.costs { background: var(--surface-2); border: 1px solid var(--border-strong); }
.bar-col .lbl { font: 600 11px var(--font-sub); color: var(--muted); padding: 3px 10px; border: 1px solid var(--border); border-radius: var(--pill); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.kcol { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: 262px; flex-shrink: 0; padding: 12px; min-height: 240px; backdrop-filter: blur(18px); box-shadow: var(--card-shadow); }
.kcol.over { border-color: var(--lime); box-shadow: 0 0 0 4px var(--accent-soft); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font: 700 14px var(--font-head); margin: 2px 4px 12px; text-transform: capitalize; }
.kcol-head span { color: var(--muted); font: 600 12px var(--font-body); }
.kcol[data-stage="won"] .kcol-head { color: var(--accent-text); }
.kcol[data-stage="lost"] .kcol-head { color: var(--danger); }
.kcard { background: var(--surface-solid); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; cursor: grab; transition: transform .2s var(--ease), border-color .2s; }
.kcard:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.kcard .t { font-weight: 700; } .kcard .s { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; margin-top: 6px; }
.kcard .s b { color: var(--text); }

/* tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding: 6px; background: var(--surface); box-shadow: var(--card-shadow); border: 1px solid var(--border); border-radius: var(--pill); width: fit-content; max-width: 100%; }
.tabs a { padding: 8px 16px; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--gloss); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }

/* document editor */
.lines td { padding: 6px; vertical-align: top; border-bottom: 0; }
.lines input, .lines select { padding: 9px 11px; }
.lines .c-item { width: 210px; } .lines .c-num { width: 100px; } .lines .c-desc { min-width: 240px; }
.totals { margin-left: auto; width: 320px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text-2); }
.totals .grand { font: 700 18px var(--font-head); color: var(--text); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 6, 6, .55); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 70px 16px; z-index: 80; overflow-y: auto; animation: fade .2s; }
.modal { background: var(--surface-pop); border: 1px solid var(--border); border-radius: 26px; width: 660px; max-width: 100%; box-shadow: var(--shadow); animation: pop .22s var(--ease); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; }
.x { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 0; font-size: 20px; cursor: pointer; color: var(--muted); }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface-pop); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--lime); padding: 12px 18px; border-radius: 14px; z-index: 100; box-shadow: var(--shadow); font-weight: 600; animation: pop .2s var(--ease); }
.toast.err { border-left-color: var(--danger); }

/* command palette */
.palette { width: 620px; max-width: 100%; background: var(--surface-pop); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; animation: pop .2s var(--ease); }
.palette .p-input { display: flex; align-items: center; gap: 12px; padding: 6px 18px; border-bottom: 1px solid var(--border); }
.palette .p-input input { border: 0; background: transparent; box-shadow: none; padding: 16px 0; font-size: 16px; }
.palette .p-list { max-height: 420px; overflow-y: auto; padding: 8px; }
.palette .p-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; cursor: pointer; color: var(--text); }
.palette .p-row.sel { background: var(--accent-soft); }
.palette .p-row .p-kind { margin-left: auto; font: 600 11px var(--font-sub); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
kbd { font: 600 11px var(--font-body); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--muted); }

/* ============================================================ login */
.auth { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; padding: 18px; gap: 18px; }
.auth-art {
  position: relative; overflow: hidden; border-radius: 32px; padding: 44px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(700px 500px at 75% 30%, rgba(111, 192, 79, .32), transparent 60%), linear-gradient(160deg, #1f4a1c 0%, #14301a 45%, #0b0c0b 100%);
  color: #ececec; border: 1px solid rgba(255, 255, 255, .06);
}
.auth-art::after { /* fine grid */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.auth-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; color: #ececec; }
.auth-brand .q-mark { width: 54px; }
.auth-brand .q-word { height: 22px; }
.auth-pattern { position: absolute; inset: 0; z-index: 0; opacity: .22; background: url(brand/pattern-outline.svg) 0 0 / 84px auto;
  mask-image: linear-gradient(200deg, #000 0%, transparent 55%); -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 55%); }
.hero-mark { position: absolute; right: -40px; top: 90px; width: 360px; z-index: 0; filter: drop-shadow(0 30px 80px rgba(111, 192, 79, .35)); animation: float 9s ease-in-out infinite; }
.auth-brand .name { font: 700 20px var(--font-logo); letter-spacing: .03em; }
.orb { position: absolute; right: -60px; top: -40px; width: 300px; height: 300px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 35% 35%, #d8ff7a, #6fc04f 30%, #3d7a00 60%, transparent 72%);
  filter: blur(2px); box-shadow: 0 0 120px 30px rgba(111, 192, 79, .25); animation: float 9s ease-in-out infinite; opacity: .9; }
.orb::after { content: ''; position: absolute; inset: -40px; border-radius: 50%; border: 1px solid rgba(111, 192, 79, .25); animation: spin 30s linear infinite; border-top-color: transparent; }
.auth-copy { position: relative; z-index: 1; max-width: 520px; }
.auth-copy h1 { font: 700 46px/1.05 var(--font-head); letter-spacing: -.02em; margin-bottom: 16px; }
.auth-copy h1 em { font-style: normal; color: #9bdc7c; }
.auth-copy p { color: #aab3ab; font-size: 16px; margin: 0 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: var(--pill); border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); font-size: 13px; font-weight: 600; backdrop-filter: blur(10px); }
.auth-stats { position: relative; z-index: 1; display: flex; gap: 12px; }
.auth-stat { flex: 1; padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(12px); }
.auth-stat b { display: block; font: 700 24px var(--font-head); color: #9bdc7c; }
.auth-stat span { font-size: 12.5px; color: #9aa39b; }
.auth-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 30px; }
.auth-panel .theme-fab { position: absolute; top: 12px; right: 12px; }
.login { width: 100%; max-width: 400px; }
.login .hello { font: 600 12px var(--font-sub); text-transform: uppercase; letter-spacing: .16em; color: var(--accent-text); margin-bottom: 10px; }
.login h1 { font-size: 34px; margin-bottom: 6px; }
.login .sub { color: var(--muted); margin: 0 0 30px; }
.field { margin-bottom: 16px; }
.input-icon { position: relative; }
.input-icon > svg.i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 46px; height: 52px; border-radius: 16px; }
.input-icon .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; display: grid; }
.login .btn.primary { width: 100%; justify-content: center; height: 52px; font-size: 15px; margin-top: 8px; }
.login .foot { margin-top: 34px; color: var(--muted); font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.foot-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.foot-brand .q-mark { width: 20px; } .foot-brand .q-word { height: 10px; }

/* ============================================================ printable document (always light) */
.paper {
  --text: #142312; --text-2: #2f3b2c; --muted: #6b7568; --border: rgba(6, 25, 2, .12); --surface-2: #f3f5f0;
  background: #fff; color: #142312; max-width: 840px; margin: 0 auto; padding: 44px; border-radius: 24px; border: 1px solid var(--border);
}
.paper .head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 3px solid var(--lime); }
.paper .doc-title { font: 700 26px var(--font-head); text-align: right; }
.paper .parties { display: flex; justify-content: space-between; margin-bottom: 22px; gap: 20px; }
.paper table th { background: #14301a; color: #eef0ec; }
.paper table th:first-child { border-radius: 10px 0 0 10px; } .paper table th:last-child { border-radius: 0 10px 10px 0; }
.paper .foot { margin-top: 30px; font-size: 12.5px; color: var(--muted); white-space: pre-wrap; }

/* ============================================================ motion */
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes spin { to { transform: rotate(360deg); } }
#view > * { animation: pop .3s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============================================================ responsive */
@media (max-width: 1024px) {
  .span-8, .span-4 { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .grid.kpi, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-6 { grid-column: span 12; }
  .tl-pill { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 300px; }
  .auth-copy h1 { font-size: 34px; }
  .auth-stats, .orb { display: none; }
  .hero-mark { width: 220px; top: 20px; right: -50px; opacity: .5; }
}
@media (max-width: 760px) {
  .rail { position: fixed; left: 0; transform: translateX(-110%); transition: transform .3s var(--ease); width: var(--rail-w-open); }
  #app.mobile-open .rail { transform: none; }
  #app.mobile-open .rail-inner { align-items: stretch; background: var(--surface-pop); box-shadow: var(--shadow); }
  :root[data-theme="light"] #app.mobile-open .rail-inner { background: var(--rail-bg); }
  #app.mobile-open .rail-name, #app.mobile-open .rail-label { display: inline; }
  #app.mobile-open .rail-nav, #app.mobile-open .rail-item, #app.mobile-open .rail-bottom { align-items: stretch; }
  #app.mobile-open .rail-btn { width: 100%; justify-content: flex-start; padding: 0 14px; }
  #app.mobile-open .rail-sub { position: static; box-shadow: none; background: transparent; border: 0; padding-left: 18px; }
  .topbar { padding: 12px 16px; }
  .timeline { display: none; }
  .content { padding: 4px 16px 32px; }
  .crumb-meta { display: none; }
  .stat-grid { gap: 10px; } .stat { padding: 14px; } .s-value { font-size: 18px; } .s-icon { margin-bottom: 10px; }
  .card-head { flex-wrap: wrap; }
  .ch-action { margin-left: 0; width: 100%; justify-content: flex-start; }
  .search-box { max-width: none; }
  .grid.kpi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi .card { padding: 14px; }
  .kpi .card .value { font-size: 18px; }
  .bars { gap: 6px; } .bar-col .lbl { padding: 2px 6px; font-size: 10px; }
  .hero { padding: 20px; } .hero h1 { font-size: 26px; } .hero-stat { min-width: 0; width: 100%; } .hero-stat .big { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .grid.two { grid-template-columns: 1fr; }
  .auth { padding: 10px; }
  .auth-art { padding: 28px; min-height: 0; }
  .auth-copy p, .chips { display: none; }
  h1 { font-size: 22px; }
}
@media print {
  .rail, .topbar, .no-print { display: none !important; }
  body { background: #fff; } body::before { display: none; }
  .content { padding: 0; }
  .paper { border: 0; padding: 0; max-width: none; border-radius: 0; }
}

/* licence banner + support indicator (workspaces managed by the QNODEA master panel) */
.lic-banner { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; padding: 14px 18px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--card-shadow); }
.lic-banner > svg.i { width: 22px; height: 22px; flex-shrink: 0; }
.lic-banner b { display: block; font-size: 14.5px; }
.lic-banner span { color: var(--text-2); font-size: 13px; }
.lic-banner.warn { border-color: rgba(242, 194, 107, .4); } .lic-banner.warn > svg.i { color: var(--warn); }
.lic-banner.bad { border-color: rgba(255, 122, 110, .4); } .lic-banner.bad > svg.i { color: var(--danger); }
.support-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: var(--warn-soft); color: var(--warn); border: 1px solid rgba(242, 194, 107, .35); }
.support-pill svg.i { width: 15px; height: 15px; }

/* ============================================================
   Premium finish: gradient hairline edges, glossy icon tiles,
   deeper soft shadows. Shared by the CRM and the QNODEA panel.
   ============================================================ */
:root, :root[data-theme="dark"] {
  --edge: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .045) 38%, rgba(255, 255, 255, .03) 70%, rgba(143, 212, 111, .14));
  --edge-soft: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 24px 60px -32px rgba(0, 0, 0, .75);
  --tile-gloss: linear-gradient(160deg, #9ad97d 0%, #57a645 45%, #2f6e27 100%);
}
:root[data-theme="light"] {
  --edge: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(20, 35, 18, .06) 45%, rgba(20, 35, 18, .11));
  --edge-soft: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(20, 35, 18, .12));
  --tile-gloss: linear-gradient(160deg, #8fd46f 0%, #4f9c3e 50%, #2c6625 100%);
}

/* edge ring drawn with a masked gradient instead of a flat border */
body :is(.card, .stat, .modal, .kcol, .table-wrap, .filter-bar, .lic-banner, .module, .mp-grid > div, .tabs, .palette, .cred-row) { border-color: transparent; position: relative; }
body :is(.node, .dropdown, .map-title, .map-toolbar, .map-palette, .map-capacity, .map-panel, .rail-sub) { border-color: transparent; }
body :is(.date-chip, .icon-btn, .chip-btn, .rail-btn, .btn:not(.primary):not(.dark):not(.glass), .avatar:not(.lg):not(.sm)) { border-color: transparent; position: relative; }
:is(.card, .stat, .modal, .kcol, .table-wrap, .filter-bar, .lic-banner, .module, .mp-grid > div, .tabs, .palette, .cred-row,
  .node, .dropdown, .map-title, .map-toolbar, .map-palette, .map-capacity, .map-panel, .rail-sub)::after,
:is(.date-chip, .icon-btn, .chip-btn, .rail-btn, .btn:not(.primary):not(.dark):not(.glass), .avatar:not(.lg):not(.sm))::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 0;
  background: var(--edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:is(.date-chip, .icon-btn, .chip-btn, .rail-btn, .btn, .avatar, .stat, .module, .mp-grid > div, .cred-row, .filter-bar)::after { background: var(--edge-soft); }
.rail-item.active > .rail-btn::after, .node.sel::after, .module.on::after, .kcol.over::after { opacity: 0; }
.node.sel, .module.on { border-color: rgba(111, 192, 79, .55); }

/* glossy icon tiles (app-icon feel) */
.ch-icon, .node.plan .n-icon {
  background: var(--tile-gloss); color: #fff; border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 6px rgba(0, 0, 0, .18), 0 6px 16px -6px rgba(63, 138, 51, .55);
}
.ch-icon.back-tile { background: var(--surface); color: var(--text-2); box-shadow: var(--highlight), var(--card-shadow); }
.ch-icon.back-tile:hover { color: var(--text); }
.mp-head .ch-icon:has(.q-mark) { background: #0d150d; }
.s-icon { background: var(--accent-soft); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.avatar.lg, .client-cell .avatar, .n-icon.logo { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 18px -8px rgba(63, 138, 51, .6); }

/* refined details */
.badge { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent); }
th { letter-spacing: .1em; }
tbody tr.clickable:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.card .table-wrap table tbody tr td { transition: background .15s; }
.ch-title, h1, h2 { letter-spacing: -.015em; }
.modal-bg { backdrop-filter: blur(10px) saturate(120%); }
::-webkit-scrollbar { width: 8px; height: 8px; }
.stat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
:root[data-theme="light"] .stat { box-shadow: inset 0 1px 0 #fff; }

/* grid children never inherit the stacked-card top margin */
:is(.grid, .dash-grid, .stat-grid, .plan-grid, .module-grid) > .card + .card { margin-top: 0; }

/* ============================================================
   Polish round 2: skeletons, charts, toasts, tables, forms, mobile
   ============================================================ */
/* skeleton */
.sk-wrap { display: grid; gap: var(--gap); }
.sk-card { display: grid; gap: 12px; }
.sk-hero { min-height: 170px; align-content: center; }
.sk-rows { display: grid; gap: 14px; margin-top: 10px; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 40%, var(--border-strong)) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.stat .sk + .sk { margin-top: 10px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* area chart */
.chart { position: relative; margin-top: 4px; flex: 1; display: flex; flex-direction: column; min-height: 220px; }
.ch-svg { width: 100%; flex: 1; min-height: 200px; overflow: visible; display: block; }
.ch-grid { stroke: var(--border); stroke-dasharray: 3 6; }
.ch-line { fill: none; stroke-width: 2.6; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.ch-line.main { stroke: var(--lime); filter: drop-shadow(0 4px 10px rgba(111, 192, 79, .45)); }
.ch-line.alt { stroke: var(--muted); stroke-dasharray: 5 6; stroke-width: 1.8; }
.ch-cursor { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; transition: opacity .15s; }
.ch-labels { display: flex; justify-content: space-between; padding: 6px 2px 0; }
.ch-labels span { font: 600 11.5px var(--font-sub); color: var(--muted); padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); }
.ch-dots { position: absolute; inset: 0 0 34px 0; pointer-events: none; }
.ch-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--surface-pop); border: 2px solid var(--lime); }
.ch-dot.alt { border-color: var(--muted); width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
.ch-tip { position: absolute; top: 0; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: var(--surface-pop); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); font-size: 12.5px; display: grid; gap: 4px; pointer-events: none; z-index: 3; }
.ch-tip b { font-size: 13px; }
.ch-tip span { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.ch-tip i { width: 8px; height: 8px; border-radius: 3px; background: var(--lime); } .ch-tip i.alt { background: var(--muted); }
.ch-tip em { font-style: normal; margin-left: auto; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* toasts */
.toast { display: flex; align-items: center; gap: 10px; overflow: hidden; padding: 12px 16px 14px; border-left-width: 1px; border-color: var(--border); }
.toast .t-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; font-size: 13px; background: var(--gloss); color: #fff; }
.toast.err .t-icon { background: var(--danger); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--gloss); transform-origin: left; animation: tbar 2.6s linear forwards; }
.toast.err .t-bar { background: var(--danger); animation-duration: 4.2s; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes tbar { to { transform: scaleX(0); } }

/* press feedback + busy state */
:is(.btn, .chip-btn, .icon-btn, .rail-btn, .tb-btn, .pal):active { transform: scale(.96); }
.btn.busy { pointer-events: none; opacity: .75; }
.btn.busy::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* tables: sticky header inside list cards, pager, row icons */
.list-card > .table-wrap { max-height: calc(100vh - 290px); overflow: auto; }
.list-card > .table-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-pop); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; }
.pager .pg-info { margin-right: auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.pager .chip-btn:disabled { opacity: .4; pointer-events: none; }
.avatar.tint { background: var(--accent-soft); color: var(--accent-text); border: 0; width: 34px; height: 34px; font-size: 12px; border-radius: 10px; }
.row-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--accent-text); }
.row-ic svg.i { width: 16px; height: 16px; }
.empty .btn { margin-top: 16px; }

/* forms */
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b928a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--border-strong); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 13.5px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }

/* mobile */
.mp-grip { display: none; }
@media (max-width: 900px) {
  .map-panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 72%; border-radius: 24px 24px 0 0; padding-top: 8px; transition: transform .2s var(--ease); }
  .mp-grip { display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--border-strong); margin: 4px auto 6px; touch-action: none; cursor: grab; flex-shrink: 0; }
  .map-actions .chip-btn { display: none; }
  .map-palette { top: auto; bottom: 16px; transform: none; flex-direction: row; left: 12px; }
}
@media (max-width: 760px) {
  .topbar .date-chip { display: none; }
  .timeline .btn.primary { height: 40px; padding: 0 14px; }
  .list-card > .table-wrap { max-height: none; }
  .pager { justify-content: space-between; }
  .ch-labels span { padding: 2px 6px; font-size: 10px; }
}

/* ============ activity timeline + lead stages ============ */
.composer { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--tile, var(--surface-2)); margin-bottom: 18px; position: relative; }
.comp-tabs { width: fit-content; max-width: 100%; flex-wrap: wrap; }
.comp-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.comp-tabs svg.i { width: 15px; height: 15px; }
.comp-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr .8fr; gap: 10px; }
.comp-grid [hidden] { display: none; }
.composer textarea { min-height: 70px; }
.comp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.tl-list { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl-list::before { content: ''; position: absolute; left: 22px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(var(--border-strong), transparent); }
.tl-row { position: relative; display: flex; gap: 14px; padding: 10px 0; }
.tl-ic { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-pop); border: 1px solid var(--border-strong); color: var(--text-2); }
.tl-ic svg.i { width: 17px; height: 17px; }
.tl-row.k-activity .tl-ic { background: var(--tile-gloss); color: #fff; border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.tl-row.t-call .tl-ic { background: linear-gradient(160deg, #7cc6ff, #2f7fc0); }
.tl-row.t-meeting .tl-ic { background: linear-gradient(160deg, #c6a0ff, #7a4fd1); }
.tl-row.t-email .tl-ic { background: linear-gradient(160deg, #ffd27a, #c98a0b); }
.tl-row.t-whatsapp .tl-ic { background: linear-gradient(160deg, #6ee39a, #1f9d61); }
.tl-body { flex: 1; min-width: 0; padding: 2px 0; }
.tl-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tl-head b, .tl-head a { font-weight: 700; font-size: 14px; color: var(--text); }
.tl-head a:hover { color: var(--accent-text); }
.tl-head time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tl-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-body p { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--tile, var(--surface-2)); white-space: pre-wrap; font-size: 13.5px; color: var(--text-2); }
.tl-del { opacity: 0; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; align-self: flex-start; transition: opacity .15s; }
.tl-row:hover .tl-del { opacity: 1; }
.tl-list .empty::before { display: none; }

.stage-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.step { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--tile, var(--surface-2)); color: var(--muted); font: 600 13px var(--font-body); text-transform: capitalize; cursor: pointer; transition: all .2s; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; background: var(--surface-pop); border: 1px solid var(--border-strong); }
.step:hover { color: var(--text); border-color: var(--border-strong); }
.step.done { color: var(--accent-text); } .step.done i { background: var(--accent-soft); border-color: transparent; }
.step.on { background: var(--gloss); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 20px -8px rgba(63, 138, 51, .6); }
.step.on i { background: rgba(255, 255, 255, .25); border: 0; }
.step.on.lost { background: linear-gradient(180deg, #ff8a7e, #c4453a); }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); border: 0; display: inline-grid; place-items: center; }
.avatar.xs::after { display: none; }
@media (max-width: 1100px) { .comp-grid { grid-template-columns: 1fr 1fr; } .stage-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .stage-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tl-head { flex-direction: column; gap: 2px; } }

/* ============ tags, import wizard ============ */
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 7px; font: 700 11px var(--font-body); background: var(--accent-soft); color: var(--accent-text); }
.tag::before { content: '#'; opacity: .55; margin-right: 1px; }
.ch-text .tag-row { margin-top: 8px; }
.imp-drop { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; border: 1.5px dashed var(--border-strong); background: var(--tile, var(--surface-2)); flex-wrap: wrap; }
.imp-drop > div { flex: 1; min-width: 200px; } .imp-drop b { display: block; } .imp-drop span.muted { font-size: 13px; }
.imp-map { display: grid; gap: 8px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.imp-row { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--tile, var(--surface-2)); }
.imp-row b { display: block; font-size: 14px; } .imp-row .muted { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-arrow { color: var(--muted); text-align: center; }
.imp-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
@media (max-width: 760px) { .imp-row { grid-template-columns: 1fr; } .imp-arrow { display: none; } .imp-result { grid-template-columns: 1fr; } }

/* ============ pipelines, lead scores, assignment ============ */
.score { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font: 800 11.5px var(--font-body); white-space: nowrap; cursor: help; }
.score.hot { background: rgba(255, 122, 80, .14); color: #ff8a5c; box-shadow: inset 0 0 0 1px rgba(255, 122, 80, .3); }
.score.warm { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.score.cold { background: var(--info-soft); color: var(--info); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 30%, transparent); }
:root[data-theme="light"] .score.hot { color: #d4541f; }
.kcard .t { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kcard .t .score { font-size: 10.5px; padding: 2px 7px; }
.ch-title .score { font-size: 12px; }
.stage-list { display: grid; gap: 8px; }
.stage-row { display: grid; grid-template-columns: 18px 1fr 80px auto auto; gap: 8px; align-items: center; padding: 8px; border-radius: 14px; background: var(--tile, var(--surface-2)); }
.stage-row .grip { color: var(--muted); letter-spacing: -2px; text-align: center; }
.stage-row .chip-btn { height: 36px; width: 36px; justify-content: center; padding: 0; }
.stage-fixed { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; font-size: 12.5px; }
.assign-mode { display: inline-flex; margin-bottom: 4px; }
.assign-mode label { margin: 0; cursor: pointer; }
.assign-mode input { display: none; }
.assign-mode span { display: block; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.assign-mode input:checked + span { background: var(--gloss); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.assign-body[hidden], [data-source-map][hidden] { display: none; }
.user-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px 7px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--tile, var(--surface-2));
  color: var(--text); font: 600 13px var(--font-body); cursor: pointer; }
.pick input { display: none; }
.pick:has(input:checked) { border-color: var(--lime); background: var(--accent-soft); }
.tl-row.system .tl-ic { background: var(--surface-pop) !important; color: var(--muted); border: 1px dashed var(--border-strong); box-shadow: none; }
.tl-row.system .tl-head b { font-weight: 600; color: var(--text-2); }

/* ============ web forms ============ */
.ff-list { display: grid; gap: 8px; }
.ff-row { display: grid; grid-template-columns: 46px 1fr auto 110px; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 14px; background: var(--tile, var(--surface-2)); opacity: .65; transition: opacity .2s; }
.ff-row.on { opacity: 1; }
.ff-row .ff-label { padding: 9px 12px; }
.ff-req { display: inline-flex; align-items: center; gap: 6px; margin: 0; font: 600 12.5px var(--font-body); color: var(--text-2); white-space: nowrap; }
.ff-req input { width: auto; }
.ff-row .muted { font-size: 12px; text-align: right; }
.share-grid { display: grid; gap: 12px; }
.share-block { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; padding: 14px; border-radius: 16px; background: var(--tile, var(--surface-2)); }
.share-block > div { grid-column: 1 / -1; } .share-block b { display: block; } .share-block span.muted { font-size: 12.5px; }
.share-block input, .share-block textarea { font: 500 12.5px ui-monospace, Consolas, monospace; }
.share-block textarea { min-height: 90px; }
@media (max-width: 760px) { .ff-row { grid-template-columns: 46px 1fr; } .ff-row .muted { display: none; } }

/* ============ targets & commission ============ */
.span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; }
.month-pick { width: auto; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 13px; }
.pbar { display: block; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.pbar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #ffb36b, #ff8a5c); transition: width .8s var(--ease); }
.pbar.near i { background: linear-gradient(90deg, #f2c26b, #d9a441); }
.pbar.done i { background: var(--gloss); box-shadow: 0 0 12px rgba(111, 192, 79, .5); }
.pbar.none i { width: 0 !important; }
.leaderboard { display: flex; flex-direction: column; gap: 4px; }
.lb-row { display: grid; grid-template-columns: 34px 36px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; transition: background .2s; }
.lb-row:hover { background: var(--surface-2); }
.lb-row.me { background: var(--accent-soft); }
.lb-rank { font: 700 18px var(--font-head); text-align: center; color: var(--muted); }
.lb-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
.lb-top b { font-size: 15px; }
.lb-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lb-meta b { margin-left: auto; color: var(--accent-text); font-size: 12.5px; }
.tg-head, .tg-row { display: grid; grid-template-columns: 1.4fr 1fr .7fr .9fr; gap: 10px; align-items: center; }
.tg-head { font: 600 11.5px var(--font-sub); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 12px 8px; }
.tg-list { display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.tg-row { padding: 8px 12px; border-radius: 14px; background: var(--tile, var(--surface-2)); }
@media (max-width: 1024px) { .span-5, .span-7 { grid-column: span 12; } }
@media (max-width: 760px) { .tg-head { display: none; } .tg-row { grid-template-columns: 1fr 1fr; } .lb-meta b { margin-left: 0; } }
.ch-tip[hidden] { display: none; }

/* document chain + delivery note signatures */
.doc-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.chain-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--tile, var(--surface-2)); color: var(--text); font-weight: 600; }
.chain-pill svg.i { width: 14px; height: 14px; color: var(--accent-text); }
.chain-pill:hover { box-shadow: 0 0 0 1px var(--border-strong); }
.sign-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.sign-row div { border-top: 1px solid var(--border-strong); padding-top: 8px; font-size: 12px; color: var(--muted); }

/* switches and toggle rows (shared with the master panel) */
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--tile, var(--surface-2)); cursor: pointer; transition: border-color .2s; }
.module:hover { border-color: var(--border-strong); }
.module .m-text { flex: 1; min-width: 0; }
.module .m-text b { display: block; font-size: 14.5px; }
.module .m-text span { color: var(--muted); font-size: 12.5px; }
.module.on { border-color: rgba(111, 192, 79, .45); }
.module.extra .m-text b::after { content: 'add-on'; margin-left: 8px; font: 700 10px var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: background .2s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--gloss); }
.switch input:checked + span::after { transform: translateX(18px); }

