:root {
  --bg: #07090f;
  --bg-elev: #0e121c;
  --ink: #e8eef7;
  --ink-soft: #b7c2d4;
  --muted: #7d8aa3;
  --line: rgba(140, 170, 220, 0.14);
  --cyan: #5ce1c5;
  --cyan-dim: #2a9d8a;
  --violet: #8b7cff;
  --violet-hot: #b4a8ff;
  --amber: #f0b45a;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font: "Outfit", sans-serif;
  --display: "Syne", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar: 248px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  color-scheme: dark;
}

body { overflow-x: hidden; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(139, 124, 255, 0.28), transparent 55%),
    radial-gradient(800px 480px at 92% 8%, rgba(92, 225, 197, 0.18), transparent 50%),
    radial-gradient(600px 400px at 50% 110%, rgba(92, 225, 197, 0.08), transparent 45%),
    linear-gradient(165deg, #07090f 0%, #0b1020 55%, #071018 100%);
  animation: ambient-shift 16s ease-in-out infinite alternate;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 170, 220, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 170, 220, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.07;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 2px,
    rgba(0, 0, 0, 0.35) 3px
  );
}

.login-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.login-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.55;
  animation: orb-float 11s ease-in-out infinite alternate;
}
.login-orbs span:first-child {
  width: 280px;
  height: 280px;
  left: 12%;
  top: 18%;
  background: rgba(139, 124, 255, 0.45);
}
.login-orbs span:last-child {
  width: 240px;
  height: 240px;
  right: 10%;
  bottom: 12%;
  background: rgba(92, 225, 197, 0.38);
  animation-delay: -4s;
}
@keyframes orb-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -18px, 0) scale(1.08); }
}

@keyframes ambient-shift {
  from { filter: hue-rotate(0deg) saturate(1); }
  to { filter: hue-rotate(-12deg) saturate(1.12); }
}

[hidden] { display: none !important; }

.brand-fal { color: var(--ink); }
.brand-ai {
  background: linear-gradient(120deg, var(--violet-hot), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(139, 124, 255, 0.35);
}

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  z-index: 1;
}

.login-stage {
  width: min(520px, 100%);
  text-align: center;
  animation: rise 0.7s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.brand { font-family: var(--display); letter-spacing: -0.04em; }

.brand-hero {
  margin: 0;
  font-size: clamp(4.2rem, 13vw, 6.4rem);
  line-height: 0.88;
  font-weight: 800;
  animation: brand-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand-corp {
  margin: 0.85rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes brand-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

.login-tagline {
  margin: 1.35rem 0 0.55rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  letter-spacing: -0.03em;
}

.login-sub {
  margin: 0 auto 1.8rem;
  max-width: 40ch;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 0.9rem;
  text-align: left;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 18, 28, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-form label { display: grid; gap: 0.35rem; }
.login-form span { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.04em; }

.login-form input, .login-form select, .inline-form input, .inline-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: rgba(7, 9, 15, 0.65);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus, .inline-form input:focus, .login-form select:focus, .inline-form select:focus {
  outline: none;
  border-color: rgba(92, 225, 197, 0.55);
  box-shadow: 0 0 0 3px rgba(92, 225, 197, 0.12);
}

.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0e121c inset;
  box-shadow: 0 0 0 1000px #0e121c inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
}

.form-error { margin: 0; color: var(--danger); font-size: 0.9rem; }
.form-ok { margin: 0; color: var(--ok); font-size: 0.9rem; }
.form-links { display: flex; justify-content: space-between; gap: 1rem; margin: 0; }
.form-links a { color: var(--cyan); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.form-links a:hover { color: var(--violet-hot); }

.otp-hint { margin: 0; color: var(--muted); }

.phone-sms {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: #05070c;
  border: 1px solid rgba(92, 225, 197, 0.18);
  color: #d7fff4;
}
.phone-sms-label { margin: 0 0 0.4rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.phone-sms-body { margin: 0; font-size: 0.95rem; line-height: 1.45; }

.btn {
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #3ecfb4 50%, var(--violet) 140%);
  color: #06110e;
  padding: 0.85rem 1.3rem;
  box-shadow: 0 10px 28px rgba(92, 225, 197, 0.22);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  padding: 0.85rem 1.3rem;
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-danger { background: var(--danger); color: #1a0505; padding: 0.85rem 1.3rem; }
.btn-ghost { background: transparent; color: var(--ink-soft); padding: 0.45rem 0.75rem; }
.btn-sm { font-size: 0.85rem; padding: 0.35rem 0.7rem; }

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 0.9rem 1rem;
  border-right: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.78);
  backdrop-filter: blur(18px);
  z-index: 12;
}

.brand-mark {
  display: grid;
  text-decoration: none;
  padding: 0.35rem 0.55rem 1.1rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.brand-mark small {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
}

.side-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow: auto;
}

.nav-glow {
  position: absolute;
  left: 0;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(92, 225, 197, 0.18), rgba(139, 124, 255, 0.14));
  box-shadow: inset 0 0 0 1px rgba(92, 225, 197, 0.28), 0 0 22px rgba(92, 225, 197, 0.08);
  transition: top 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), left 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

.tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.62rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  transition: color 0.18s ease, transform 0.18s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.nav-ico {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-foot {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.app-stage { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.stage-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 15, 0.45);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 8;
}
.crumb {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.stage-bar h1 {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stage-bar h1.title-swap { animation: title-in 0.32s ease both; }
@keyframes title-in {
  from { opacity: 0; transform: translateY(8px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.stage-hint { margin: 0; color: var(--muted); font-size: 0.86rem; max-width: 36ch; text-align: right; }

.app-view.is-ready { animation: rise 0.45s ease both; }

kbd {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

.cmdk {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(4, 6, 12, 0.62);
  backdrop-filter: blur(10px);
  animation: fade-in 0.18s ease;
}
.cmdk-box {
  width: min(520px, calc(100% - 2rem));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(14, 18, 28, 0.94);
  box-shadow: var(--shadow), 0 0 0 1px rgba(92, 225, 197, 0.08);
  padding: 0.85rem;
}
.cmdk-label {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.cmdk-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: rgba(7, 9, 15, 0.7);
  color: var(--ink);
}
.cmdk-box input:focus {
  outline: none;
  border-color: rgba(92, 225, 197, 0.55);
  box-shadow: 0 0 0 3px rgba(92, 225, 197, 0.12);
}
.cmdk-box ul { list-style: none; margin: 0.45rem 0 0; padding: 0; max-height: 320px; overflow: auto; }
.cmdk-box li button {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.cmdk-box li button:hover,
.cmdk-box li button.is-active { background: rgba(92, 225, 197, 0.1); }
.cmdk-box li small { color: var(--muted); font-size: 0.78rem; }

.stage-scroll { flex: 1; }

.currency-toggle {
  display: inline-flex;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  width: fit-content;
}
.cur-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.cur-btn.active { background: rgba(92, 225, 197, 0.16); color: var(--cyan); }
.voice-toggle {
  display: inline-flex;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  margin-top: 0.6rem;
}
.voice-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
}
.voice-btn.active { background: rgba(139, 124, 255, 0.2); color: var(--violet-hot); }
.fx-label, .fx-hint { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: rgba(92, 225, 197, 0.12);
  color: var(--cyan);
  width: fit-content;
}
.pill.warn { background: rgba(240, 180, 90, 0.16); color: var(--amber); }
.pill.bad { background: rgba(255, 107, 107, 0.12); color: var(--danger); }
.user-label { color: var(--muted); font-size: 0.78rem; word-break: break-all; }

.console { width: min(1180px, 100%); margin: 0 auto; padding: 1.35rem 1.25rem 3rem; display: grid; gap: 1rem; }
.tab-panel.is-active { animation: panel-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--violet-hot);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 18, 28, 0.62);
  backdrop-filter: blur(12px);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; gap: 0.75rem; }
.panel-head h3 { margin: 0; font-size: 1rem; font-weight: 650; }

.ai-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #06110e;
  background: linear-gradient(90deg, var(--cyan), var(--violet-hot));
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
}
.ai-chip { color: var(--violet-hot) !important; }

.overview-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1rem; }

.softphone-hero { text-align: center; }
.softphone-hero h2 {
  margin: 0.4rem 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: -0.03em;
}
.phone-dest { font-weight: 650; margin: 0.4rem 0 0; }
.phone-text { color: var(--muted); min-height: 1.4em; margin: 0.3rem 0 1rem; }

.listen-ring { width: 168px; height: 168px; margin: 0 auto 1rem; position: relative; display: grid; place-items: center; }
.ring-pulse { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(92, 225, 197, 0.28); }
.listen-ring[data-state="ringing"] .ring-pulse { animation: pulse 1.15s ease-out infinite; border-color: rgba(240, 180, 90, 0.7); }
.listen-ring[data-state="in-progress"] .ring-pulse,
.listen-ring[data-state="answered"] .ring-pulse { animation: pulse 1.5s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(0.92); opacity: 0.9; } 100% { transform: scale(1.38); opacity: 0; } }

.ring-core {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #2a3348, #12151f);
  box-shadow: 0 0 0 1px rgba(139, 124, 255, 0.25), 0 12px 30px rgba(92, 225, 197, 0.12);
}
.listen-ring[data-state="ringing"] .ring-core { background: radial-gradient(circle at 35% 30%, #e0a35a, #8a4f12); }
.listen-ring[data-state="in-progress"] .ring-core,
.listen-ring[data-state="answered"] .ring-core { background: radial-gradient(circle at 35% 30%, #5ce1c5, #1a5f55); }

.wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}
.wave i {
  display: block;
  width: 3px;
  height: 30%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.75);
}
.listen-ring[data-state="ringing"] .wave i,
.listen-ring[data-state="in-progress"] .wave i,
.listen-ring[data-state="answered"] .wave i {
  animation: eq 0.7s ease-in-out infinite;
}
.wave i:nth-child(2) { animation-delay: 0.08s; }
.wave i:nth-child(3) { animation-delay: 0.16s; }
.wave i:nth-child(4) { animation-delay: 0.05s; }
.wave i:nth-child(5) { animation-delay: 0.2s; }
.wave i:nth-child(6) { animation-delay: 0.12s; }
.wave i:nth-child(7) { animation-delay: 0.24s; }
@keyframes eq {
  0%, 100% { height: 22%; }
  50% { height: 100%; }
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.listen-status { margin: 1rem 0 0; color: var(--muted); min-height: 1.4em; font-family: var(--mono); font-size: 0.78rem; }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.kpi {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(14, 18, 28, 0.7);
}
.kpi p { margin: 0; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kpi strong { display: block; font-family: var(--display); font-size: 1.85rem; font-weight: 700; margin: 0.2rem 0; }
.kpi span { color: var(--muted); font-size: 0.85rem; }

.spark { width: 100%; height: 90px; }
.spark polyline { stroke: url(#none); stroke: var(--cyan); }

.inline-form { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1rem; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 140px; }
.chk { display: flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.row-gap { display: flex; gap: 0.5rem; align-items: center; }
.calls-filters { flex-wrap: wrap; justify-content: flex-end; }
.date-filter { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.date-filter input[type="date"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  background: rgba(7, 9, 15, 0.65);
  color: var(--ink);
  color-scheme: dark;
}

.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.45rem 0.5rem;
}
table.data td { padding: 0.55rem 0.5rem; border-top: 1px solid var(--line); }
table.data tr { cursor: pointer; transition: background 0.15s ease; }
table.data tr:hover td { background: rgba(139, 124, 255, 0.08); }
table.data .actions { white-space: nowrap; cursor: default; }
table.data .actions .btn { margin: 0.1rem 0.15rem 0.1rem 0; }
table.data input[type="number"] {
  width: 7.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  background: rgba(7, 9, 15, 0.65);
  color: var(--ink);
}
.status { font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; }
.status.completed, .status.sent { background: rgba(74, 222, 128, 0.12); color: var(--ok); }
.status.ringing, .status.queued { background: rgba(240, 180, 90, 0.14); color: var(--amber); }
.status.failed, .status.busy, .status.canceled { background: rgba(255, 107, 107, 0.12); color: var(--danger); }
.status.in-progress, .status.answered { background: rgba(92, 225, 197, 0.12); color: var(--cyan); }

.drawer {
  position: fixed; inset: 0; background: rgba(4, 6, 12, 0.55); z-index: 20;
  display: grid; justify-items: end;
  backdrop-filter: blur(6px);
  animation: fade-in 0.22s ease;
}
.drawer-inner {
  width: min(420px, 100%); height: 100%;
  background: #0e121c;
  border-left: 1px solid var(--line);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  overflow: auto;
  animation: drawer-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer-inner h3 { font-family: var(--display); font-weight: 700; font-size: 1.7rem; margin: 0.4rem 0 1rem; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }

.transcript {
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-family: var(--mono);
  background: #05070c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: rgba(14, 18, 28, 0.92);
  color: var(--ink);
  border: 1px solid rgba(92, 225, 197, 0.3);
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  z-index: 30;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: rise 0.25s ease;
}

@media (max-width: 960px) {
  .app-view { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
  }
  .brand-mark { padding: 0 0.4rem 0 0; font-size: 1.4rem; }
  .brand-mark small { display: none; }
  .side-nav { flex-direction: row; flex: 1; overflow-x: auto; scrollbar-width: thin; }
  .stage-hint { text-align: left; }
  .tab { white-space: nowrap; }
  kbd { display: none; }
  .sidebar-foot { border: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
  .overview-grid { grid-template-columns: 1fr; }
  .stage-bar { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient, .brand-hero, .listen-ring .ring-pulse, .wave i, .tab-panel.is-active,
  .drawer, .drawer-inner, .login-orbs span, .nav-glow, .stage-bar h1.title-swap,
  .app-view.is-ready, .cmdk { animation: none; }
  .nav-glow { transition: none; }
}
