/* YRB Voicedesk design system */

:root {
  --bg: #08080a;
  --bg-2: #0d0d10;
  --glass: rgba(255, 255, 255, .028);
  --glass-2: rgba(255, 255, 255, .05);
  --hover: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --text: #ededef;
  --text-2: #c9c9ce;
  --muted: #8f8f98;
  --faint: #5e5e67;
  --live: #6fdba6;
  --live-soft: rgba(111, 219, 166, .1);
  --warn: #e8c070;
  --warn-soft: rgba(232, 192, 112, .1);
  --bad: #ef7f74;
  --bad-soft: rgba(239, 127, 116, .1);
  --info: #9ab8f5;
  --info-soft: rgba(154, 184, 245, .1);
  --radius: 14px;
  --radius-sm: 9px;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 1px 1px rgba(0, 0, 0, .35), 0 12px 32px -12px rgba(0, 0, 0, .5);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
/* One soft light source from above, plus fine grain. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 50% -260px, rgba(255, 255, 255, .075), transparent 70%),
    radial-gradient(700px 400px at 100% 0%, rgba(140, 160, 255, .035), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(255, 255, 255, .18); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .14); }
a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .88em; background: var(--glass-2); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--text-2); }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 500 11px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); background: var(--glass); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- Brand mark ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: linear-gradient(180deg, #2a2a2f, #151518); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.logo-mark svg { width: 16px; height: 16px; stroke: var(--text); stroke-width: 2; stroke-linecap: round; fill: none; }
.logo b { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.logo small { display: block; font-size: 11.5px; color: var(--faint); font-weight: 450; margin-top: -1px; }

/* ---------- Glass panel ---------- */
.card {
  position: relative; border-radius: var(--radius); padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .042), rgba(255, 255, 255, .018));
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card-sep { height: 1px; background: var(--line); margin: 18px -20px; }

h1, h2, h3 { margin: 0; color: var(--text); text-wrap: balance; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 13.5px; font-weight: 550; }
.lead { color: var(--muted); margin: 6px 0 0; max-width: 620px; font-size: 14px; }
.label { font-size: 12px; color: var(--muted); font-weight: 500; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt { margin-top: 14px; }
.stack > * + * { margin-top: 14px; }

/* ---------- Pills & status ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--text-2);
  background: var(--glass-2); border: 1px solid var(--line);
}
.pill.ok { color: var(--live); background: var(--live-soft); border-color: rgba(111, 219, 166, .2); }
.pill.bad { color: var(--bad); background: var(--bad-soft); border-color: rgba(239, 127, 116, .2); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(232, 192, 112, .2); }
.pill.info { color: var(--info); background: var(--info-soft); border-color: rgba(154, 184, 245, .2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--live); box-shadow: 0 0 0 3px rgba(111, 219, 166, .15); }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(111, 219, 166, 0); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px;
  font: 500 13.5px var(--sans); letter-spacing: -.005em; cursor: pointer; text-decoration: none; white-space: nowrap;
  border-radius: var(--radius-sm); border: 1px solid transparent; color: #0a0a0c; background: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(0, 0, 0, .4);
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.lg { height: 42px; padding: 0 18px; font-size: 14.5px; border-radius: 10px; }
.btn.full { width: 100%; margin-top: 16px; }
.btn.ghost {
  color: var(--text); background: var(--glass-2); border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.btn.ghost:hover { background: var(--hover); border-color: var(--line-2); }
.btn.quiet { color: var(--muted); background: transparent; box-shadow: none; padding: 0 8px; }
.btn.quiet:hover { color: var(--text); background: var(--hover); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.danger { color: #fff; background: #c4483d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.danger:hover { background: #d4554a; }
.btn.live { color: #06140d; background: var(--live); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 1px rgba(111, 219, 166, .3); }
.btn.live:hover { background: #86e6b7; }
.btn svg.i { width: 15px; height: 15px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass); color: var(--muted);
}
.icon-btn:hover { color: var(--text); background: var(--hover); }

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
label .opt { color: var(--faint); font-weight: 400; }
input, textarea, select {
  width: 100%; height: 36px; padding: 0 11px; font: 13.5px var(--sans); color: var(--text);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, background .15s; color-scheme: dark;
}
textarea { height: auto; min-height: 84px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238f8f98' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover, select:hover { border-color: var(--line-2); }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(255, 255, 255, .3); box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); background-color: rgba(0, 0, 0, .4); }
input[type=range] { height: 4px; padding: 0; border: 0; background: var(--line-2); border-radius: 4px; appearance: none; box-shadow: none; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); cursor: pointer; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.check-line { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13.5px; color: var(--text-2); cursor: pointer; font-weight: 400; }
.check-line input { width: 15px; height: 15px; accent-color: #ededef; }
.form-err { margin-top: 12px; padding: 9px 12px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-size: 13px; display: none; border: 1px solid rgba(239, 127, 116, .2); }
.form-err.show { display: block; }
.field-group { padding: 18px 0; border-top: 1px solid var(--line); }
.field-group:first-child { border-top: 0; padding-top: 0; }
.field-group > h3 { margin-bottom: 2px; }
.field-group > p { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; }

/* ---------- Segmented / tabs ---------- */
.tabs { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.tabs button { height: 26px; border: 0; background: none; color: var(--muted); font: 500 12.5px var(--sans); padding: 0 11px; border-radius: 7px; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.underline-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.underline-tabs button { position: relative; height: 38px; border: 0; background: none; color: var(--muted); font: 500 13.5px var(--sans); padding: 0; cursor: pointer; white-space: nowrap; }
.underline-tabs button:hover { color: var(--text); }
.underline-tabs button.on { color: var(--text); }
.underline-tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--text); border-radius: 2px; }
.underline-tabs .count { margin-left: 6px; color: var(--faint); font-weight: 400; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
aside.side {
  position: sticky; top: 0; height: 100vh; padding: 14px 10px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: rgba(10, 10, 12, .6); backdrop-filter: blur(20px);
}
.side .logo { padding: 6px 8px 12px; }
.switcher { padding: 0 2px 8px; }
.switcher select { height: 34px; background-color: var(--glass); }
.search-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 8px 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--glass); color: var(--faint); font: 13px var(--sans); cursor: pointer; text-align: left; margin-bottom: 6px;
}
.search-btn:hover { color: var(--muted); border-color: var(--line-2); }
.search-btn span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav#nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; flex: 1; }
.nav-sec { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 14px 10px 5px; }
.nav-sec:first-child { padding-top: 4px; }
nav#nav a {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px;
  color: var(--muted); text-decoration: none; font-weight: 450; white-space: nowrap; transition: background .12s, color .12s;
}
nav#nav a:hover { color: var(--text); background: var(--hover); }
nav#nav a.active { color: var(--text); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
nav#nav a kbd { margin-left: auto; opacity: 0; transition: opacity .12s; }
nav#nav a:hover kbd { opacity: 1; }
nav#nav a .badge { margin-left: auto; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px 2px; border-top: 1px solid var(--line); }
.avatar { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; flex: none; }
.user-row div { flex: 1; min-width: 0; font-size: 12px; line-height: 1.3; }
.user-row b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row span { color: var(--faint); }

main.main { padding: 28px 36px 80px; min-width: 0; }
.page { display: none; max-width: 1180px; margin: 0 auto; }
.page.show { display: block; animation: enter .3s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head .crumb { font-size: 12.5px; color: var(--faint); margin-bottom: 6px; }
.page-head .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stat { padding: 16px 18px; }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat .v { font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--faint); margin-top: 2px; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 6px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.chart .bar { width: 40%; max-width: 14px; border-radius: 3px 3px 1px 1px; background: rgba(255, 255, 255, .22); min-height: 2px; transition: height .6s var(--ease); }
.chart .bar.b { background: var(--live); opacity: .85; }
.chart small { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.legend-row { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend-row i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: rgba(255, 255, 255, .3); margin-right: 6px; }
.legend-row i.b { background: var(--live); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--faint); padding: 0 12px 10px; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.dtable tbody tr { cursor: pointer; }
.dtable tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.dtable.static tbody tr { cursor: default; }
.dtable.static tbody tr:hover td { background: none; }
.dtable .num { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; color: var(--text-2); }
.dtable .muted { color: var(--muted); }
.dtable .clip { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 20px; }
.card.flush table th:last-child, .card.flush table td:last-child { padding-right: 20px; }
.card.flush table th { padding-top: 14px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar-row input[type=search] { max-width: 260px; height: 30px; }
.spacer { flex: 1; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13.5px; }
.empty b { display: block; color: var(--text); font-weight: 550; margin-bottom: 4px; }
.env-table td p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.env-table td a { color: var(--text-2); }

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; padding-top: 0; }
.checklist p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.check-ico { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; border: 1px solid rgba(239, 127, 116, .4); color: var(--bad); }
.check-ico.ok { border-color: rgba(111, 219, 166, .45); color: var(--live); background: var(--live-soft); }
.check-ico svg.i { width: 10px; height: 10px; stroke-width: 2.4; }

/* ---------- Drawer ---------- */
.drawer-ov { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); display: none; }
.drawer-ov.show { display: block; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(540px, calc(100% - 16px)); z-index: 81; border-radius: 16px;
  background: rgba(16, 16, 19, .92); backdrop-filter: blur(30px) saturate(150%); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
  transform: translateX(calc(100% + 16px)); transition: transform .3s var(--ease); display: flex; flex-direction: column;
}
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 8px; font-size: 12px; font-weight: 500; color: var(--faint); }
audio { width: 100%; height: 38px; margin-bottom: 4px; filter: invert(.92) hue-rotate(180deg) saturate(.5); border-radius: 10px; }

/* Transcript bubbles */
.tx { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.msg.agent { align-self: flex-start; background: var(--glass-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: #e9e9ec; color: #111; border-bottom-right-radius: 4px; }
.msg .who { display: block; font-size: 11px; font-weight: 500; color: var(--faint); margin-bottom: 1px; }

/* ---------- Clients ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pick-card { display: flex; flex-direction: column; text-align: left; cursor: pointer; font: inherit; color: inherit; min-height: 0; }
.pick-card:hover { border-color: var(--line-2); }
.client-card .meta { display: grid; gap: 7px; margin: 14px 0 16px; font-size: 13px; color: var(--muted); }
.client-card .meta span { display: flex; justify-content: space-between; gap: 10px; }
.client-card .meta b { color: var(--text-2); font-weight: 450; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-card .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.add-card { display: grid; place-items: center; min-height: 210px; cursor: pointer; color: var(--muted); font: inherit; border-style: dashed; background: transparent; box-shadow: none; }
.add-card:hover { color: var(--text); border-color: var(--line-2); background: var(--glass); }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(232, 192, 112, .22); background: var(--warn-soft); color: #e9d6ac; font-size: 13px; margin-bottom: 16px; }
.banner svg.i { color: var(--warn); margin-top: 2px; }
.banner.info { border-color: rgba(154, 184, 245, .22); background: var(--info-soft); color: #c9d7f7; }
.banner.info svg.i { color: var(--info); }

/* ---------- Test tools ---------- */
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.day { flex: none; width: 54px; padding: 7px 0; border-radius: 9px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; cursor: pointer; text-align: center; line-height: 1.3; }
.day small { display: block; font-size: 11px; color: var(--muted); }
.day b { display: block; font-size: 16px; font-weight: 600; }
.day:hover { border-color: var(--line-2); }
.day.on { background: var(--text); color: #0a0a0c; border-color: var(--text); }
.day.on small { color: #4a4a50; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 14px; }
.slot { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--text); font: 500 13px var(--mono); cursor: pointer; }
.slot:hover { border-color: var(--line-2); background: var(--hover); }
.result { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 13px; display: none; gap: 9px; align-items: flex-start; }
.result.show { display: flex; }
.result.ok { background: var(--live-soft); color: var(--live); border: 1px solid rgba(111, 219, 166, .2); }
.result.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(239, 127, 116, .2); }
.phone-check { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); font-size: 13px; }
.phone-check b { font: 500 14px var(--mono); }
.log { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.log li { border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log summary { list-style: none; display: grid; grid-template-columns: 64px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 0; cursor: pointer; font-size: 13px; }
.log summary::-webkit-details-marker { display: none; }
.log .t { color: var(--faint); font: 12px var(--mono); }
.log .ep { font: 12.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .ms { color: var(--faint); font-size: 12px; }
.log pre { margin: 0 0 10px; }
pre.code { margin: 0; padding: 12px 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; overflow: auto; max-height: 420px; color: var(--text-2); }

/* ---------- Agent builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.builder-side { position: sticky; top: 24px; display: grid; gap: 14px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.status-strip div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.status-strip small { color: var(--faint); font-size: 11.5px; }
.status-strip b { font-weight: 500; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.voice-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.voice-tools input[type=search] { flex: 1; min-width: 160px; height: 32px; }
.voice-tools select { width: auto; height: 32px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 520px; overflow-y: auto; padding: 1px; }
.voice {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 11px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .2); color: var(--text); font: inherit; transition: border-color .12s, background .12s;
}
.voice:hover { border-color: var(--line-2); background: var(--glass); }
.voice.on { border-color: rgba(255, 255, 255, .55); background: var(--glass-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.voice .play { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text); cursor: pointer; }
.voice .play:hover { background: var(--text); color: #0a0a0c; }
.voice .play svg.i { width: 13px; height: 13px; }
.voice .play.playing { background: var(--text); color: #0a0a0c; }
.voice .meta { min-width: 0; flex: 1; }
.voice .meta b { display: block; font-weight: 550; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice .meta span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.voice .tick { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: #0a0a0c; flex: none; opacity: 0; }
.voice.on .tick { opacity: 1; }
.voice .tick svg.i { width: 10px; height: 10px; stroke-width: 2.6; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row output { font: 500 12.5px var(--mono); color: var(--text-2); width: 42px; text-align: right; }
.model-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.model-opt { padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.model-opt:hover { border-color: var(--line-2); }
.model-opt.on { border-color: rgba(255, 255, 255, .5); background: var(--glass-2); }
.model-opt b { display: block; font-weight: 550; font-size: 13px; }
.model-opt span { font-size: 12px; color: var(--muted); }
.number-list { display: grid; gap: 6px; }
.number-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.number-row b { font: 500 13.5px var(--mono); }
.number-row span { color: var(--muted); font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Live call panel */
.call-panel { padding: 0; overflow: hidden; }
.call-stage { position: relative; display: grid; place-items: center; padding: 34px 20px 22px; text-align: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(260px 160px at 50% 40%, rgba(255, 255, 255, .05), transparent 70%); }
.voice-orb { position: relative; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #3a3a40, #151518 70%); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 50px -10px rgba(0, 0, 0, .8); }
.voice-orb::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .06); transform: scale(var(--level, 1)); transition: transform .08s linear, border-color .2s; }
.voice-orb.talking::before { border-color: rgba(111, 219, 166, .45); }
.voice-orb.listening::before { border-color: rgba(255, 255, 255, .22); }
.voice-orb .bars { display: flex; align-items: center; gap: 3px; height: 30px; }
.voice-orb .bars i { width: 3px; height: 20%; border-radius: 3px; background: var(--text-2); transition: height .1s linear; }
.call-stage .who { margin-top: 18px; font-weight: 550; font-size: 15px; }
.call-stage .state { margin-top: 3px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; justify-content: center; }
.call-stage .timer { font: 500 12.5px var(--mono); color: var(--faint); }
.call-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.call-transcript { padding: 14px 16px; max-height: 340px; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.call-transcript .empty { padding: 26px 8px; font-size: 13px; }

/* ---------- Overlays ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 100;
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  background: rgba(24, 24, 28, .95); border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  transition: opacity .2s, transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg.i { color: var(--live); }
.overlay { position: fixed; inset: 0; z-index: 90; display: none; place-items: start center; padding: 14vh 16px 16px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
.overlay.show { display: grid; animation: fade .12s ease; }
.palette { width: min(560px, 100%); border-radius: 14px; background: rgba(18, 18, 22, .96); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05); overflow: hidden; backdrop-filter: blur(30px); }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-in input { border: 0; background: none; height: 48px; padding: 0; font-size: 15px; box-shadow: none; }
.palette-in input:focus { box-shadow: none; background: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--text-2); }
.palette li.sel { background: var(--hover); color: var(--text); }
.palette li small { margin-left: auto; }

.mobile-only { display: none !important; }
.role-client .admin-only, .role-client .col-client { display: none !important; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .builder-side { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  aside.side { position: sticky; top: 0; z-index: 30; height: auto; padding: 10px 12px 0; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .side .logo { padding: 2px 4px 2px; }
  .search-btn, .user-row, .nav-sec { display: none; }
  nav#nav { flex-direction: row; overflow-x: auto; gap: 2px; padding-bottom: 8px; scrollbar-width: none; flex: none; }
  nav#nav a { height: 30px; font-size: 13px; }
  nav#nav a kbd { display: none; }
  nav#nav a.mobile-only { display: flex !important; }
  .switcher { padding: 0; }
  main.main { padding: 20px 16px 64px; }
  .g2 { grid-template-columns: 1fr; }
  .dtable .clip { max-width: 160px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .env-table thead { display: none; }
  .env-table tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .env-table td { display: block; border: 0; padding: 3px 0; }
  .model-opts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .row { flex-direction: column; gap: 0; }
  .stat .v { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Colour & gloss theme: deep navy, cobalt + aqua light, glossy glass
   ===================================================================== */
:root {
  --bg: #050914;
  --bg-2: #0a1122;
  --accent: #4d7bff;
  --accent-2: #2fd6c4;
  --accent-soft: rgba(77, 123, 255, .16);
  --glass: rgba(148, 170, 255, .045);
  --glass-2: rgba(160, 180, 255, .08);
  --hover: rgba(160, 180, 255, .09);
  --line: rgba(170, 190, 255, .11);
  --line-2: rgba(180, 200, 255, .2);
  --text: #eef2ff;
  --text-2: #c8d1ea;
  --muted: #8d98b8;
  --faint: #5e6888;
  --live: #3ee0c8;
  --live-soft: rgba(62, 224, 200, .12);
  --info: #8fb0ff;
  --info-soft: rgba(120, 155, 255, .14);
  --radius: 16px;
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .02), 0 2px 4px rgba(0, 0, 0, .25), 0 24px 48px -18px rgba(2, 6, 23, .8);
}
body { background: var(--bg); }
/* Soft coloured light behind the glass. */
body::before {
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(64, 104, 255, .38), transparent 62%),
    radial-gradient(800px 560px at 100% 8%, rgba(36, 200, 190, .22), transparent 60%),
    radial-gradient(900px 700px at 70% 110%, rgba(110, 80, 255, .18), transparent 60%),
    linear-gradient(180deg, #060b18, #050914 60%);
}
body::after { opacity: .045; }
::selection { background: rgba(77, 123, 255, .45); }
a { text-decoration-color: rgba(143, 176, 255, .45); }

.logo-mark {
  background: linear-gradient(145deg, #6d93ff 0%, #3b5ff0 55%, #22c3b5 130%);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 18px -6px rgba(77, 123, 255, .8);
}
.logo-mark svg { stroke: #fff; }

/* Glossy glass: blur + saturation, a lit top edge and a soft sheen. */
.card {
  background: linear-gradient(180deg, rgba(150, 175, 255, .1), rgba(120, 145, 230, .035) 55%, rgba(110, 135, 220, .025));
  border-color: rgba(185, 205, 255, .14);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 32%);
}
.card > * { position: relative; z-index: 1; }

/* Buttons */
.btn {
  color: #fff;
  background: linear-gradient(180deg, #6a92ff, #3f66f2);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .15), 0 8px 22px -8px rgba(63, 102, 242, .9);
}
.btn:hover { background: linear-gradient(180deg, #7b9fff, #4a70f7); }
.btn.ghost {
  color: var(--text);
  background: linear-gradient(180deg, rgba(170, 190, 255, .12), rgba(150, 170, 255, .05));
  border-color: rgba(185, 205, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
}
.btn.ghost:hover { background: linear-gradient(180deg, rgba(170, 190, 255, .18), rgba(150, 170, 255, .08)); border-color: rgba(185, 205, 255, .28); }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.quiet:hover { background: var(--hover); color: var(--text); }
.btn.live { color: #04201c; background: linear-gradient(180deg, #6ff0dc, #2fd0b9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 22px -8px rgba(47, 214, 196, .9); }
.btn.live:hover { background: linear-gradient(180deg, #86f5e4, #3ddac4); }
.btn.danger { background: linear-gradient(180deg, #f07167, #d94a40); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px -8px rgba(217, 74, 64, .8); }

/* Inputs */
input, textarea, select { background-color: rgba(8, 14, 32, .55); border-color: rgba(170, 190, 255, .14); }
input:focus, textarea:focus, select:focus { border-color: rgba(110, 150, 255, .75); box-shadow: 0 0 0 3px rgba(77, 123, 255, .22); background-color: rgba(8, 14, 32, .75); }
input[type=range] { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.check-line input { accent-color: var(--accent); }

/* Tabs and selection states */
.tabs { background: rgba(8, 14, 32, .5); }
.tabs button.on { background: linear-gradient(180deg, rgba(110, 145, 255, .32), rgba(77, 123, 255, .18)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 0 0 1px rgba(120, 155, 255, .35); }
.underline-tabs button.on::after { background: linear-gradient(90deg, var(--accent), var(--accent-2)); height: 2px; }
.day.on { background: linear-gradient(180deg, #6a92ff, #3f66f2); border-color: transparent; color: #fff; }
.day.on small { color: rgba(255, 255, 255, .8); }
.voice.on, .model-opt.on { border-color: rgba(120, 155, 255, .7); background: linear-gradient(180deg, rgba(110, 145, 255, .2), rgba(77, 123, 255, .08)); box-shadow: inset 0 0 0 1px rgba(120, 155, 255, .35), 0 8px 24px -12px rgba(77, 123, 255, .8); }
.voice .tick { background: var(--accent); color: #fff; }
.voice .play:hover, .voice .play.playing { background: var(--accent); color: #fff; border-color: transparent; }

/* Sidebar */
aside.side { background: rgba(8, 13, 30, .55); backdrop-filter: blur(28px) saturate(160%); border-right-color: rgba(170, 190, 255, .1); }
nav#nav a.active { color: #fff; background: linear-gradient(90deg, rgba(77, 123, 255, .26), rgba(77, 123, 255, .06)); box-shadow: inset 0 0 0 1px rgba(120, 155, 255, .22); }
nav#nav a.active svg.i { color: #9db8ff; }
.avatar { background: linear-gradient(145deg, #6d93ff, #2fd6c4); border-color: rgba(255, 255, 255, .25); color: #fff; }

/* Data */
.chart .bar { background: linear-gradient(180deg, #7aa0ff, #3f66f2); }
.chart .bar.b { background: linear-gradient(180deg, #6ff0dc, #22b8a6); opacity: 1; }
.legend-row i { background: #5a83ff; }
.legend-row i.b { background: var(--live); }
.msg.user { background: linear-gradient(180deg, #6a92ff, #3f66f2); color: #fff; border: 1px solid rgba(255, 255, 255, .15); }
.msg.agent { background: rgba(150, 175, 255, .1); border-color: rgba(170, 190, 255, .16); }
.dtable tbody tr:hover td { background: rgba(120, 150, 255, .05); }
.check-ico.ok { border-color: rgba(62, 224, 200, .5); }

/* Live call orb */
.call-stage { background: radial-gradient(280px 180px at 50% 40%, rgba(77, 123, 255, .22), transparent 70%); }
.voice-orb { background: radial-gradient(circle at 35% 28%, #8eacff, #3f66f2 45%, #1b2c78 100%); border-color: rgba(255, 255, 255, .25);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .35), inset 0 -10px 24px rgba(10, 20, 70, .6), 0 20px 50px -10px rgba(63, 102, 242, .7); }
.voice-orb .bars i { background: #fff; }
.voice-orb.talking::before { border-color: rgba(62, 224, 200, .6); }
.voice-orb.listening::before { border-color: rgba(143, 176, 255, .45); }

/* Overlays */
.drawer { background: rgba(10, 16, 36, .88); border-color: rgba(170, 190, 255, .18); }
.palette, .toast { background: rgba(12, 18, 40, .92); border-color: rgba(170, 190, 255, .18); }

/* =====================================================================
   Theme v3: dark jewel gradients, glossy glass, gradient-lit edges
   ===================================================================== */
:root {
  --bg: #04040b;
  --accent: #7b6cff;
  --accent-2: #2ee6c8;
  --grad: linear-gradient(135deg, #8b7bff 0%, #5b6cff 45%, #2fb8e6 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 123, 255, .22), rgba(47, 184, 230, .12));
  --edge: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .05) 35%, rgba(255, 255, 255, .03) 60%, rgba(140, 150, 255, .3));
  --glass-fill: linear-gradient(160deg, rgba(150, 140, 255, .1), rgba(90, 100, 200, .04) 45%, rgba(40, 180, 200, .04));
  --line: rgba(190, 185, 255, .1);
  --line-2: rgba(200, 195, 255, .18);
  --text: #f1f0ff;
  --text-2: #cdcbe8;
  --muted: #9693b8;
  --faint: #625f85;
  --live: #39e6c9;
  --live-soft: rgba(57, 230, 201, .12);
  --info: #a99cff;
  --info-soft: rgba(139, 123, 255, .16);
  --glass-2: rgba(170, 160, 255, .08);
  --hover: rgba(170, 160, 255, .09);
}
body { background: var(--bg); }
body::before {
  background:
    radial-gradient(60vw 50vw at 0% 0%, rgba(88, 60, 220, .42), transparent 60%),
    radial-gradient(50vw 45vw at 100% 10%, rgba(20, 130, 160, .3), transparent 60%),
    radial-gradient(55vw 50vw at 85% 95%, rgba(140, 40, 130, .26), transparent 62%),
    radial-gradient(50vw 45vw at 10% 100%, rgba(30, 50, 170, .32), transparent 60%),
    linear-gradient(180deg, #06051a 0%, #04040b 55%, #050412 100%);
}
body::after { opacity: .05; }
::selection { background: rgba(123, 108, 255, .5); }

/* Gradient-lit glass: fill on the padding box, a light-catching gradient on the border box. */
.card, .drawer, .palette {
  border: 1px solid transparent;
  background: var(--glass-fill) padding-box, rgba(12, 11, 30, .55) padding-box, var(--edge) border-box;
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 30px 60px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .25);
}
.card::after { background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 30%); }
.drawer { background: linear-gradient(160deg, rgba(150, 140, 255, .1), rgba(20, 18, 50, .2)) padding-box, rgba(10, 9, 26, .92) padding-box, var(--edge) border-box; }
.add-card { background: transparent; border: 1px dashed var(--line-2); box-shadow: none; }
.add-card:hover { background: var(--glass-2); }

.logo-mark { background: var(--grad); border: 1px solid rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 22px -8px rgba(110, 100, 255, .9); }
.avatar { background: var(--grad); }

/* Glossy gradient buttons */
.btn {
  color: #fff; border: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 52%), var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 6px rgba(20, 10, 80, .25), 0 10px 26px -10px rgba(110, 100, 255, .95);
}
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .02) 52%), var(--grad); filter: saturate(1.1); }
.btn.ghost {
  color: var(--text); border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)) padding-box, rgba(14, 12, 34, .5) padding-box, var(--edge) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); filter: none;
}
.btn.ghost:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)) padding-box, rgba(20, 18, 46, .6) padding-box, var(--edge) border-box; }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; }
.btn.live { color: #04201b; background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 52%), linear-gradient(135deg, #5ff5dc, #22c3d6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 26px -10px rgba(46, 230, 200, .9); }
.btn.danger { background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 52%), linear-gradient(135deg, #ff6b8b, #d9365e); }

/* Inputs, tabs, states */
input, textarea, select { background-color: rgba(8, 7, 24, .6); border-color: rgba(190, 185, 255, .14); }
input:focus, textarea:focus, select:focus { border-color: rgba(139, 123, 255, .8); box-shadow: 0 0 0 3px rgba(123, 108, 255, .25); }
input[type=range] { background: var(--grad); }
.tabs { background: rgba(8, 7, 24, .55); }
.tabs button.on { background: var(--grad-soft); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 0 0 1px rgba(150, 135, 255, .45); }
.underline-tabs button.on::after { background: var(--grad); }
.day.on { background: var(--grad); }
.voice.on, .model-opt.on { border-color: rgba(150, 135, 255, .7); background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(150, 135, 255, .35), 0 10px 28px -14px rgba(110, 100, 255, .9); }
.voice .tick, .voice .play:hover, .voice .play.playing { background: var(--grad); color: #fff; }
.pill.info { color: #c3b9ff; background: rgba(123, 108, 255, .16); border-color: rgba(150, 135, 255, .3); }

/* Sidebar: glass column with a lit edge */
aside.side { background: linear-gradient(180deg, rgba(120, 100, 255, .08), rgba(20, 18, 50, .15)), rgba(8, 7, 22, .6); border-right: 1px solid rgba(190, 185, 255, .12); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .03); }
nav#nav a.active { background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(150, 135, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .08); }
nav#nav a.active svg.i { color: #b9adff; }

/* Data */
.chart .bar { background: linear-gradient(180deg, #a497ff, #5b6cff); }
.chart .bar.b { background: linear-gradient(180deg, #6cf5df, #22b7c9); }
.legend-row i { background: #8b7bff; }
.msg.user { background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 60%), var(--grad); border-color: rgba(255, 255, 255, .2); }
.msg.agent { background: rgba(160, 150, 255, .09); border-color: rgba(190, 185, 255, .16); }

/* Call orb */
.call-stage { background: radial-gradient(300px 190px at 50% 40%, rgba(123, 108, 255, .28), transparent 70%); }
.voice-orb { background: radial-gradient(circle at 32% 26%, #d4ccff 0%, #8b7bff 22%, #4b4fe0 55%, #1a1660 100%); box-shadow: inset 0 3px 8px rgba(255, 255, 255, .45), inset 0 -12px 26px rgba(10, 8, 50, .7), 0 22px 60px -10px rgba(110, 100, 255, .8); }
/* Outline buttons need a brighter lit edge than panels to read as buttons. */
.btn.ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)) padding-box, rgba(14, 12, 34, .55) padding-box,
    linear-gradient(135deg, rgba(200, 190, 255, .55), rgba(255, 255, 255, .14) 45%, rgba(120, 200, 255, .45)) border-box;
}
.btn.ghost:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)) padding-box, rgba(22, 20, 50, .65) padding-box,
    linear-gradient(135deg, rgba(210, 200, 255, .8), rgba(255, 255, 255, .2) 45%, rgba(120, 210, 255, .7)) border-box;
}
