/* ==========================================================================
   AI Automation Lab , Console (product dashboard) styles.
   Loaded AFTER brand.css. Reuses brand tokens and primitives only.
   Adds the SPA shell: auth card, sidebar, topbar, sections, skeletons,
   toasts, modal. Dark, premium, matches the marketing site.
   No em dashes anywhere. Use commas or periods.
   ========================================================================== */

/* ---- App root and boot skeleton ---- */
.app-root { position: relative; z-index: 2; min-height: 100vh; }
.boot {
  min-height: 100vh; display: flex; flex-direction: column; gap: 18px;
  align-items: center; justify-content: center; color: var(--ink-dim);
}
.boot-mark { opacity: 0.9; filter: drop-shadow(0 0 24px rgba(110,123,255,0.4)); }
.boot-text { font-size: 0.9rem; display: inline-flex; align-items: center; gap: 10px; }
.boot-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent); display: inline-block;
}

.nojs {
  position: relative; z-index: 3; margin: 18vh auto 0; max-width: 460px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 24px 26px; color: var(--ink-soft); line-height: 1.6;
}
.nojs strong { display: block; color: var(--ink); margin-bottom: 6px; }

/* =========================================================
   AUTH GATE (centered login / signup card)
   ========================================================= */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; position: relative; z-index: 2;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); padding: clamp(26px, 4vw, 38px);
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(110,123,255,0.18), transparent 60%);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; position: relative; }
.auth-brand .lm { width: 34px; height: 34px; filter: drop-shadow(0 0 16px rgba(110,123,255,0.45)); }
.auth-brand .nm { font-weight: 640; font-size: 1.12rem; letter-spacing: -0.02em; }
.auth-brand .nm em { font-style: normal; color: var(--ink-dim); font-weight: 500; }
.auth-card h1 { font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 6px; position: relative; }
.auth-card .sub { color: var(--ink-dim); font-size: 0.92rem; margin-bottom: 22px; position: relative; }
.auth-form { display: flex; flex-direction: column; gap: 14px; position: relative; }
.auth-form .btn-primary { width: 100%; margin-top: 6px; }
.auth-toggle { margin-top: 18px; text-align: center; font-size: 0.88rem; color: var(--ink-dim); position: relative; }
.auth-toggle button {
  background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 560; padding: 0;
}
.auth-toggle button:hover { text-decoration: underline; }
.auth-err {
  display: none; background: rgba(251,113,133,0.1); border: 1px solid rgba(251,113,133,0.32);
  color: #ffb9c5; border-radius: var(--r); padding: 10px 13px; font-size: 0.86rem; position: relative;
}
.auth-err.show { display: block; }
.auth-demo {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r); position: relative;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-dim);
}
.auth-demo code { font-family: var(--mono); color: var(--ink-soft); }

/* =========================================================
   CONSOLE SHELL (sidebar + topbar + main)
   ========================================================= */
.shell {
  display: grid;
  grid-template-columns: 256px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "side top" "side main";
  min-height: 100vh; position: relative; z-index: 2;
}

/* ---- Sidebar ---- */
.side {
  grid-area: side; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: rgba(8,9,13,0.72);
  backdrop-filter: blur(14px); padding: 22px 16px; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.side-brand .lm { width: 30px; height: 30px; filter: drop-shadow(0 0 14px rgba(110,123,255,0.4)); }
.side-brand .nm { font-weight: 640; font-size: 1.02rem; letter-spacing: -0.02em; }
.side-brand .nm em { font-style: normal; color: var(--ink-dim); font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r); color: var(--ink-dim); font-size: 0.92rem; font-weight: 520;
  transition: background 0.2s, color 0.2s; cursor: pointer; position: relative;
}
.nav a .ic { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.85; }
.nav a:hover { background: rgba(255,255,255,0.045); color: var(--ink-soft); }
.nav a.active { background: rgba(110,123,255,0.14); color: var(--ink); }
.nav a.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 99px; background: var(--grad-volt);
}
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.tenant-chip {
  display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--r);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
}
.tenant-chip .av {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  display: grid; place-items: center; font-weight: 680; font-size: 0.92rem; color: #08101e;
  background: var(--grad-volt);
}
.tenant-chip .meta { min-width: 0; }
.tenant-chip .tn { font-size: 0.88rem; font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-chip .tp { font-size: 0.74rem; color: var(--ink-dim); text-transform: capitalize; }
.side-logout {
  width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px; border-radius: var(--r); background: transparent; border: 1px solid var(--line-2);
  color: var(--ink-dim); font-size: 0.85rem; cursor: pointer; transition: 0.2s;
}
.side-logout:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255,255,255,0.04); }

/* ---- Topbar ---- */
.top {
  grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter); border-bottom: 1px solid var(--line);
  background: rgba(6,7,10,0.6); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 5;
}
.top .menu-btn { display: none; }
.top-route { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.top-route .crumb { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.top-route .ttl { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.health-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hchip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); font-size: 0.78rem; color: var(--ink-soft);
}
.hchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); transition: 0.3s; }
.hchip.ok .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hchip.warn .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.hchip.bad .dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.hchip.loading .dot { background: var(--ink-faint); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---- Main scroll area + route transition ---- */
.main { grid-area: main; padding: clamp(22px, 3.2vw, 40px) var(--gutter) 80px; min-width: 0; }
.view { animation: viewIn 0.4s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-head { margin-bottom: 26px; }
.view-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; }
.view-head p { color: var(--ink-dim); margin-top: 7px; max-width: 60ch; }

/* ---- Section grids ---- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-12 { grid-template-columns: 1.4fr 1fr; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; }

/* ---- Stat cards ---- */
.stat { padding: 20px 22px; }
.stat .lbl { font-size: 0.78rem; color: var(--ink-dim); letter-spacing: 0.02em; }
.stat .val { font-size: 1.9rem; font-weight: 660; letter-spacing: -0.03em; margin-top: 8px; }
.stat .val small { font-size: 0.95rem; color: var(--ink-dim); font-weight: 500; margin-left: 4px; }
.stat .delta { font-size: 0.78rem; color: var(--ink-dim); margin-top: 6px; }
.stat .delta.up { color: var(--ok); }

/* ---- Quick actions ---- */
.qa-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Sparkline panel ---- */
.spark-card { padding: 22px 24px; }
.spark-card .hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.spark-card .hd .t { font-weight: 580; font-size: 0.96rem; }
.spark-card .hd .v { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-dim); }
.spark-svg { width: 100%; height: 120px; display: block; }
.spark-svg .area { fill: url(#sparkfill); }
.spark-svg .ln { fill: none; stroke: url(#sparkline); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.spark-x { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--ink-faint); margin-top: 8px; font-family: var(--mono); }

/* =========================================================
   AGENTS
   ========================================================= */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.agent-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.agent-card .ac-top { display: flex; align-items: flex-start; gap: 13px; }
.agent-card .ac-av {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 44px; display: grid; place-items: center;
  font-weight: 680; color: #08101e; background: var(--grad-volt); font-size: 1.05rem;
}
.agent-card .ac-name { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.02em; }
.agent-card .ac-voice { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-dim); margin-top: 3px; }
.agent-card .ac-persona {
  font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.agent-card .ac-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-card .ac-actions { display: flex; gap: 8px; margin-top: auto; }
.agent-card .ac-actions .btn { flex: 1; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; padding: 4px 9px;
  border-radius: var(--r-pill); background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  color: var(--ink-dim); font-family: var(--mono);
}
.empty {
  text-align: center; padding: 48px 20px; color: var(--ink-dim);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}
.empty .ttl { color: var(--ink-soft); font-size: 1.05rem; font-weight: 560; margin-bottom: 6px; }

/* ---- Builder form (also used in Voice Studio) ---- */
.builder { padding: 24px; }
.builder h3 { font-size: 1.05rem; margin-bottom: 4px; }
.builder .hint { color: var(--ink-dim); font-size: 0.85rem; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); height: 4px; }
.range-row .rv {
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink-soft); min-width: 42px; text-align: right;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px;
}
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--bg-2); border: 1px solid var(--line-2); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--ink-dim); padding: 7px 15px; border-radius: var(--r-pill);
  font-size: 0.85rem; font-weight: 540; cursor: pointer; transition: 0.2s; white-space: nowrap;
}
.seg button.on { background: rgba(110,123,255,0.18); color: var(--ink); }
.seg button:hover:not(.on) { color: var(--ink-soft); }

/* =========================================================
   VOICE STUDIO
   ========================================================= */
.studio-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.studio-main { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.studio-text { min-height: 200px; font-size: 1rem; line-height: 1.6; }
.studio-side { display: flex; flex-direction: column; gap: 18px; }
.cost-readout { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cost-readout .c-chars { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-dim); }
.cost-readout .c-cost { font-family: var(--mono); font-size: 0.95rem; }
.cost-readout .c-cost b { color: var(--gold); }
.wave-wrap {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; position: relative;
}
.wave-canvas { width: 100%; height: 90px; display: block; }
.player-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.player-row audio { flex: 1; height: 36px; }
.streamtoggle { display: inline-flex; align-items: center; gap: 9px; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }
.streamtoggle input { accent-color: var(--accent); width: 16px; height: 16px; }

/* =========================================================
   TALK TO IT
   ========================================================= */
.talk-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.talk-panel { padding: 0; display: flex; flex-direction: column; height: min(64vh, 620px); overflow: hidden; }
.talk-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.talk-head .who { font-size: 0.9rem; font-weight: 560; }
.talk-head .who span { color: var(--ink-dim); font-weight: 400; }
.transcript { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 11px 15px; border-radius: 16px; font-size: 0.92rem; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: rgba(110,123,255,0.16); border: 1px solid rgba(110,123,255,0.3); border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: var(--raised); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.sys { align-self: center; background: transparent; color: var(--ink-faint); font-size: 0.8rem; max-width: 100%; text-align: center; }
.bubble .typing { display: inline-flex; gap: 4px; }
.bubble .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim); animation: bob 1s ease-in-out infinite; }
.bubble .typing i:nth-child(2) { animation-delay: 0.15s; } .bubble .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%,100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-4px); opacity: 1; } }
.talk-input { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.talk-input .input { flex: 1; }
.mic-btn {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--raised); color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; transition: 0.2s;
}
.mic-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.mic-btn.rec { background: rgba(251,113,133,0.18); border-color: var(--bad); color: #ffb9c5; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,113,133,0.4); } 50% { box-shadow: 0 0 0 8px rgba(251,113,133,0); } }
.talk-side .card-pad { display: flex; flex-direction: column; gap: 14px; }

/* =========================================================
   TELEPHONY
   ========================================================= */
.tel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.status-line:last-child { border-bottom: 0; }
.status-line .k { color: var(--ink-dim); }
.status-line .v { font-family: var(--mono); font-size: 0.84rem; color: var(--ink-soft); text-align: right; }
.wallet-big { font-size: 2.1rem; font-weight: 680; letter-spacing: -0.03em; }
.wallet-big small { font-size: 1rem; color: var(--ink-dim); font-weight: 500; }
.did-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.did-row .num { font-family: var(--mono); font-size: 0.88rem; }
.did-row .exp { font-size: 0.74rem; color: var(--ink-faint); }
.inbound-note {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r); font-size: 0.82rem; line-height: 1.55;
  background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.3); color: #f2dca6;
}
.dial-form { display: flex; flex-direction: column; gap: 14px; }
.dial-input-row { display: flex; gap: 10px; }
.dial-input-row .prefix {
  display: grid; place-items: center; padding: 0 14px; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--line-2); font-family: var(--mono); color: var(--ink-dim); font-size: 0.9rem;
}
.dial-input-row .input { flex: 1; }
.cost-warn { font-size: 0.8rem; color: var(--ink-dim); }
.cost-warn b { color: var(--gold); }

/* =========================================================
   SETTINGS
   ========================================================= */
.prov-layer { margin-bottom: 26px; }
.prov-layer .lh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.prov-layer .lh .lt { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.prov-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.prov-card .pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prov-card .pc-name { font-weight: 580; font-size: 0.98rem; }
.prov-card .pc-needs { font-size: 0.8rem; color: var(--ink-dim); line-height: 1.5; }
.prov-card .pc-needs code { font-family: var(--mono); color: var(--ink-soft); background: var(--raised); padding: 2px 6px; border-radius: 6px; font-size: 0.78rem; }
.badge-live, .badge-ready {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 560;
  padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.badge-live { background: rgba(52,211,153,0.14); border: 1px solid rgba(52,211,153,0.35); color: var(--ok); }
.badge-ready { background: rgba(255,255,255,0.05); border: 1px solid var(--line-2); color: var(--ink-dim); }
.badge-live .d, .badge-ready .d { width: 6px; height: 6px; border-radius: 50%; }
.badge-live .d { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.badge-ready .d { background: var(--ink-faint); }
.settings-form { max-width: 480px; display: flex; flex-direction: column; gap: 16px; }
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type="color"] { width: 46px; height: 38px; padding: 0; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); cursor: pointer; }

/* =========================================================
   SKELETON LOADERS
   ========================================================= */
.sk {
  position: relative; overflow: hidden; background: var(--panel-2); border-radius: var(--r);
}
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 13px; border-radius: 6px; margin-bottom: 10px; }
.sk-card { height: 150px; }
.sk-stat { height: 108px; }

/* =========================================================
   TOASTS
   ========================================================= */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--r);
  background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop);
  font-size: 0.88rem; color: var(--ink-soft); animation: toastIn 0.3s var(--ease-out) both;
}
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
.toast .ti { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; }
.toast.ok .ti { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.toast.err .ti { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.toast.info .ti { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.toast b { color: var(--ink); font-weight: 580; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* =========================================================
   MODAL
   ========================================================= */
.modal-host {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px;
  background: rgba(3,4,7,0.72); backdrop-filter: blur(6px); animation: fade 0.25s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 26px; animation: pop 0.3s var(--ease-out) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 1.2rem; margin-bottom: 10px; }
.modal p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; margin-bottom: 8px; }
.modal .danger-note {
  background: rgba(251,113,133,0.1); border: 1px solid rgba(251,113,133,0.32); color: #ffc2cb;
  border-radius: var(--r); padding: 12px 14px; font-size: 0.86rem; margin: 14px 0; line-height: 1.5;
}
.modal .danger-note b { color: #ffd9de; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-12, .studio-grid, .talk-grid, .tel-grid { grid-template-columns: 1fr; }
  .talk-panel { height: min(56vh, 520px); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
  .side {
    position: fixed; left: 0; top: 0; z-index: 40; width: 270px; height: 100vh;
    transform: translateX(-100%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow-pop);
  }
  .shell.nav-open .side { transform: none; }
  .nav-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,0.5); display: none; }
  .shell.nav-open .nav-scrim { display: block; }
  .top .menu-btn {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: var(--raised); border: 1px solid var(--line-2); color: var(--ink-soft); cursor: pointer;
  }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .agents-grid { grid-template-columns: 1fr; }
  .health-row .hchip .lbl-txt { display: none; }
  .top-route .ttl { font-size: 0.96rem; }
}
