/* Panda Technology typography
   Headings: Made Mirage
   Body/descriptions: Proxima Nova
   Font files are intentionally not bundled. Place licensed files in /public/fonts. */
@font-face {
  font-family: "Made Mirage";
  src: url("/fonts/MadeMirage-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Proxima Nova";
  src: url("/fonts/ProximaNova-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Proxima Nova";
  src: url("/fonts/ProximaNova-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Proxima Nova";
  src: url("/fonts/ProximaNova-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  /* Panda Technology Services brand palette */
  --panda-red: #e31e24;
  --panda-red-dark: #b5121b;
  --panda-navy: #0b4d6b;
  --panda-navy-dark: #063b52;
  --panda-red-soft: #fff0f1;
  --navy-950: #031923;
  --navy-900: #063b52;
  --navy-800: #0b4d6b;
  --blue-700: #b5121b;
  --blue-600: #e31e24;
  --blue-500: #f04b50;
  --cyan-400: #0b4d6b;
  --cyan-100: #e7f1f5;
  --white: #ffffff;
  --canvas: #f5f7f9;
  --surface: #ffffff;
  --line: #dde4e8;
  --text: #102f40;
  --muted: #6b7e88;
  --success: #0f9f6e;
  --danger: #b4232c;
  --warning: #d99614;
  --shadow: 0 18px 45px rgba(6, 59, 82, .12);
  --shadow-soft: 0 8px 24px rgba(6, 59, 82, .09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --sidebar: 270px;
  --font-display: "Made Mirage", Georgia, "Times New Roman", serif;
  --font-body: "Proxima Nova", "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--canvas);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 15%, rgba(227, 30, 36, .28), transparent 32%),
    radial-gradient(circle at 88% 85%, rgba(11, 77, 107, .34), transparent 34%),
    linear-gradient(145deg, #031923, #063b52 58%, #0b4d6b);
}
.login-ambient { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .5; }
.ambient-one { width: 360px; height: 360px; background: rgba(227,30,36,.18); top: -140px; right: 10%; }
.ambient-two { width: 300px; height: 300px; background: rgba(255,255,255,.1); bottom: -120px; left: 7%; }
.login-card {
  width: min(520px, 100%);
  padding: 38px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 80px rgba(0,0,0,.3);
  position: relative;
  z-index: 2;
}
.brand-lockup { display: flex; gap: 20px; align-items: center; margin-bottom: 30px; }
.brand-logo { width: 84px; height: 84px; filter: drop-shadow(0 12px 18px rgba(6,59,82,.24)); }
.brand-lockup h1 { margin: 3px 0 6px; font-size: clamp(30px, 5vw, 42px); line-height: 1; }
.brand-lockup p:last-child { margin: 0; color: var(--muted); }
.eyebrow { margin: 0 0 5px; font-size: 11px; letter-spacing: .14em; font-weight: 800; color: var(--blue-600); }

.stack-form, .stack-form label { display: grid; gap: 9px; }
.stack-form { gap: 18px; }
label > span { font-size: 13px; font-weight: 750; color: #29495a; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfdfd;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(227,30,36,.14); background: white; }
textarea { resize: vertical; }
.form-error { min-height: 20px; margin: 0; color: var(--danger); font-size: 13px; }

.button {
  border: 0;
  border-radius: 12px;
  padding: 11px 17px;
  font-weight: 800;
  color: var(--text);
  background: #edf1f3;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: white; background: linear-gradient(135deg, var(--panda-red), var(--panda-red-dark)); box-shadow: 0 10px 20px rgba(227,30,36,.22); }
.button-primary:hover { box-shadow: 0 14px 24px rgba(227,30,36,.3); }
.button-secondary { background: #eef2f4; color: #29495a; }
.button-white { background: white; color: var(--navy-900); }
.button-ghost-light { color: white; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.button-large { min-height: 48px; padding: 13px 22px; }
.text-button { border: 0; padding: 4px; color: var(--blue-600); background: transparent; font-size: 13px; font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); font-size: 20px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  color: white;
  background:
    radial-gradient(circle at 10% 10%, rgba(227,30,36,.18), transparent 25%),
    linear-gradient(180deg, var(--navy-900), #042d40 72%, #031923);
  box-shadow: 16px 0 40px rgba(3,25,35,.16);
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 25px; }
.sidebar-logo { width: 48px; height: 48px; }
.sidebar-brand strong { display: block; font-size: 18px; }
.sidebar-brand span { display: block; margin-top: 2px; font-size: 11px; color: #b3c5ce; }
.nav-list { display: grid; gap: 7px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 0;
  border-radius: 13px;
  color: #c7d3d9;
  background: transparent;
  text-align: left;
  font-weight: 750;
  transition: .2s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(227,30,36,.96), rgba(11,77,107,.72)); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.nav-icon { width: 22px; text-align: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding: 18px 7px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.assistant-mini-status { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.assistant-mini-status strong, .assistant-mini-status small { display: block; }
.assistant-mini-status small { margin-top: 2px; color: #a9bcc5; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #8796a8; }
.status-dot.online { background: #37db9d; box-shadow: 0 0 0 5px rgba(55,219,157,.11); }
.sidebar-footer .text-button { color: #b7c8d0; }

.main-area { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219,229,239,.8);
  background: rgba(245,247,249,.92);
  backdrop-filter: blur(16px);
}
.topbar-title h2 { margin: 0; font-size: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.brand-switcher { display: flex; align-items: center; gap: 9px; padding: 8px 10px 8px 13px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.brand-switcher > span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.brand-switcher select { width: auto; min-width: 160px; padding: 4px 25px 4px 5px; border: 0; background: transparent; font-size: 13px; font-weight: 800; box-shadow: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 5px; }
.user-chip > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--navy-800), var(--blue-600)); font-size: 13px; font-weight: 900; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 13px; }
.user-chip small { margin-top: 1px; font-size: 10px; color: var(--muted); }
.notification-button { position: relative; }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--canvas); border-radius: 999px; color: white; background: var(--danger); font-size: 10px; font-weight: 900; }

.view { display: none; padding: 28px 30px 45px; animation: fadeUp .28s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 20px; }
.hero-card {
  min-height: 330px;
  padding: 38px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-xl);
  color: white;
  background:
    radial-gradient(circle at 78% 12%, rgba(227,30,36,.40), transparent 30%),
    linear-gradient(135deg, #031923 0%, #0b4d6b 60%, #e31e24 100%);
  box-shadow: var(--shadow);
}
.hero-copy { position: relative; z-index: 3; }
.hero-copy h1 { max-width: 520px; margin: 18px 0 13px; font-size: clamp(38px, 4vw, 64px); line-height: .98; letter-spacing: -.045em; }
.hero-copy > p { max-width: 570px; margin: 0; color: #f8e9ea; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; width: fit-content; padding: 6px 9px; border-radius: 999px; color: var(--blue-700); background: #fff0f1; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.pill-light { color: white; background: rgba(255,255,255,.14); }
.pill.success { color: #08734f; background: #daf7ec; }
.hero-orb-wrap { min-height: 250px; display: grid; place-items: center; position: relative; }
.hero-orb { width: 142px; height: 142px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.96); box-shadow: 0 25px 70px rgba(0,0,0,.28), inset 0 0 0 10px rgba(227,30,36,.10); position: relative; z-index: 3; animation: floatOrb 4s ease-in-out infinite; }
.hero-orb img { width: 112px; height: 112px; }
.hero-ring { position: absolute; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.ring-a { width: 205px; height: 205px; animation: pulseRing 3s ease-out infinite; }
.ring-b { width: 275px; height: 275px; animation: pulseRing 3s 1s ease-out infinite; }
@keyframes floatOrb { 50% { transform: translateY(-9px); } }
@keyframes pulseRing { 0% { opacity: .9; transform: scale(.75); } 80%,100% { opacity: 0; transform: scale(1.12); } }

.briefing-card, .panel, .stat-card {
  border: 1px solid rgba(219,229,239,.9);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.briefing-card { padding: 25px; border-radius: var(--radius-xl); }
.card-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.card-heading-row h3 { margin: 3px 0 0; font-size: 20px; }
.briefing-content { display: grid; gap: 15px; margin-top: 24px; }
.briefing-line { display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: start; }
.briefing-line span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--blue-600); background: #fff0f1; font-weight: 900; }
.briefing-line p { margin: 5px 0 0; color: #3f5966; line-height: 1.45; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--radius-lg); }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(145deg, var(--panda-red), var(--panda-navy)); box-shadow: 0 9px 18px rgba(227,30,36,.20); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); }
.stat-card strong { margin-top: 2px; font-size: 26px; }
.content-grid { display: grid; gap: 20px; margin-top: 20px; }
.content-grid.two-thirds { grid-template-columns: 1.45fr .75fr; }
.panel { padding: 24px; border-radius: var(--radius-lg); }
.list-stack { display: grid; gap: 10px; margin-top: 18px; }
.plan-list-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fcfdfd; }
.plan-list-item strong, .plan-list-item small { display: block; }
.plan-list-item small { margin-top: 4px; color: var(--muted); }
.quick-actions { display: grid; gap: 10px; margin-top: 18px; }
.quick-actions button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #fcfdfd; text-align: left; }
.quick-actions button:hover { border-color: #e5b8ba; background: #fff7f7; }
.quick-actions button > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--blue-600); background: #fff0f1; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions small { margin-top: 2px; color: var(--muted); }
.empty-state { min-height: 120px; display: grid; place-items: center; color: var(--muted); text-align: center; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 4px 0 24px; }
.section-heading h1 { margin: 4px 0 8px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; }
.section-heading p:last-child { margin: 0; color: var(--muted); }
.section-heading.split { align-items: center; }

.voice-layout { min-height: calc(100vh - 145px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .65fr); gap: 20px; }
.voice-stage {
  min-height: 680px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: white;
  background:
    radial-gradient(circle at 50% 48%, rgba(227,30,36,.24), transparent 28%),
    radial-gradient(circle at 5% 5%, rgba(227,30,36,.22), transparent 25%),
    linear-gradient(155deg, #031923 0%, #063b52 54%, #0b4d6b 100%);
  box-shadow: var(--shadow);
}
.voice-stage::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: radial-gradient(circle, #ef7579 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(to bottom, black, transparent); }
.voice-topline { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 3; }
.voice-topline .eyebrow { color: #ef7579; }
.voice-topline h1 { margin: 4px 0 0; font-size: 30px; }
.connection-badge { padding: 7px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #cbd9df; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 800; }
.connection-badge.connected { color: #b9ffe4; border-color: rgba(55,219,157,.28); background: rgba(55,219,157,.1); }
.voice-orb-zone { min-height: 470px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; z-index: 2; }
.voice-orb {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #fff0f1 62%, #ef7579);
  box-shadow: 0 0 0 14px rgba(227,30,36,.09), 0 30px 75px rgba(0,0,0,.35), inset 0 -10px 26px rgba(181,18,27,.18);
  transition: transform .2s, box-shadow .3s;
}
.voice-orb:hover { transform: scale(1.025); }
.voice-orb img { width: 150px; height: 150px; }
.voice-stage.listening .voice-orb { animation: listenPulse 1.25s ease-in-out infinite; box-shadow: 0 0 0 17px rgba(227,30,36,.10), 0 0 65px rgba(227,30,36,.38), 0 30px 75px rgba(0,0,0,.35); }
.voice-stage.speaking .voice-orb { animation: speakPulse .75s ease-in-out infinite alternate; }
@keyframes listenPulse { 50% { transform: scale(1.055); box-shadow: 0 0 0 28px rgba(227,30,36,.05), 0 0 85px rgba(227,30,36,.5), 0 30px 75px rgba(0,0,0,.35); } }
@keyframes speakPulse { to { transform: scale(1.04) rotate(1deg); filter: brightness(1.05); } }
.voice-halo { position: absolute; border: 1px solid rgba(227,30,36,.22); border-radius: 50%; }
.halo-one { width: 280px; height: 280px; }
.halo-two { width: 380px; height: 380px; }
.voice-stage.listening .halo-one, .voice-stage.speaking .halo-one { animation: pulseRing 2s infinite; }
.voice-stage.listening .halo-two, .voice-stage.speaking .halo-two { animation: pulseRing 2s .6s infinite; }
.waveform { height: 42px; display: flex; align-items: center; justify-content: center; gap: 4px; margin: 22px 0 8px; }
.waveform i { width: 4px; height: 8px; border-radius: 999px; background: linear-gradient(to top, var(--panda-red), #ef7579); opacity: .6; }
.voice-stage.listening .waveform i, .voice-stage.speaking .waveform i { animation: wave .8s ease-in-out infinite alternate; }
@keyframes wave { from { height: 7px; opacity: .5; } to { height: var(--h, 30px); opacity: 1; } }
.voice-orb-zone h2 { margin: 8px 0 6px; font-size: 25px; }
.voice-orb-zone > p { margin: 0; color: #c4d1d7; text-align: center; }
.voice-controls { display: flex; justify-content: center; align-items: center; gap: 12px; position: relative; z-index: 3; }
.round-control { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: white; background: rgba(255,255,255,.08); }
.round-control.danger { color: #ffdce2; background: rgba(217,72,95,.2); }
.privacy-note { position: relative; z-index: 3; margin: 17px 0 0; color: #9aafb9; font-size: 11px; text-align: center; }
.voice-transcript-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: white; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.transcript-list { flex: 1; min-height: 400px; max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin: 18px -5px 12px 0; padding-right: 5px; }
.transcript-placeholder { min-height: 340px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.transcript-placeholder span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; color: var(--blue-600); background: #fff0f1; font-size: 22px; }
.transcript-placeholder p { max-width: 260px; line-height: 1.6; }
.transcript-item { padding: 12px 13px; border-radius: 14px; line-height: 1.5; font-size: 13px; white-space: pre-wrap; }
.transcript-item.assistant { background: #fff3f3; color: #304f5e; }
.transcript-item.tool { border: 1px dashed #e7c1c3; background: #fcfdfd; color: #496671; }
.transcript-item.system { background: #f1f4f7; color: #677a8d; font-size: 12px; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.suggestion-chips button { border: 1px solid #e8c7c9; border-radius: 999px; padding: 7px 10px; color: var(--blue-700); background: #fff8f8; font-size: 11px; font-weight: 750; }

.chat-shell { height: calc(100vh - 205px); min-height: 570px; display: grid; grid-template-rows: 1fr auto; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: white; box-shadow: var(--shadow-soft); }
.chat-messages { overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.chat-welcome { margin: auto; display: grid; place-items: center; text-align: center; color: var(--muted); }
.chat-welcome img { width: 90px; height: 90px; }
.chat-welcome h3 { margin: 14px 0 5px; color: var(--text); font-size: 25px; }
.chat-welcome p { max-width: 470px; margin: 0; }
.chat-message { max-width: min(780px, 88%); padding: 15px 17px; border-radius: 17px; line-height: 1.65; white-space: pre-wrap; }
.chat-message.user { align-self: flex-end; color: white; background: linear-gradient(135deg, var(--panda-red), var(--panda-red-dark)); border-bottom-right-radius: 5px; }
.chat-message.assistant { align-self: flex-start; color: #304f5e; background: #f4f7f8; border-bottom-left-radius: 5px; }
.chat-message.loading { animation: fadePulse 1s infinite alternate; }
@keyframes fadePulse { to { opacity: .55; } }
.citations { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.citations a { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 9px; border-radius: 999px; color: var(--blue-700); background: white; text-decoration: none; font-size: 10px; font-weight: 800; }
.chat-composer { padding: 16px; border-top: 1px solid var(--line); background: #fcfdfd; }
.chat-composer textarea { min-height: 72px; border: 0; background: white; box-shadow: 0 5px 18px rgba(6,59,82,.07); }
.composer-row, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 11px; }
.toggle-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.toggle-label input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-label > span { width: 36px; height: 20px; padding: 2px; border-radius: 999px; background: #cbd6e2; transition: .2s; }
.toggle-label > span::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.17); transition: .2s; }
.toggle-label input:checked + span { background: var(--blue-600); }
.toggle-label input:checked + span::after { transform: translateX(16px); }

.form-panel { margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: .55fr 1.45fr; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid label { display: grid; gap: 7px; }
.wide-field { grid-column: span 2; }
.full-field { grid-column: 1 / -1; }
.form-actions > div { display: flex; gap: 9px; }
.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-soft); overflow: hidden; }
.plan-card-head { padding: 20px 20px 15px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.plan-card h3 { margin: 7px 0 5px; }
.plan-card small { color: var(--muted); }
.plan-card-content { max-height: 390px; overflow-y: auto; padding: 18px 20px; color: #37516d; line-height: 1.62; white-space: pre-wrap; font-size: 13px; }
.plan-card-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fcfdfd; }

.automation-info-banner { display: flex; gap: 14px; align-items: center; padding: 17px 20px; margin-bottom: 20px; border: 1px solid #e7bfc1; border-radius: var(--radius-lg); background: linear-gradient(90deg, #fff0f1, #f7fafb); }
.automation-info-banner > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: white; background: var(--blue-600); font-size: 21px; }
.automation-info-banner p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.automation-list { display: grid; gap: 13px; }
.automation-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-soft); }
.automation-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.automation-actions { display: flex; gap: 8px; align-items: center; }
.automation-switch { width: 42px; height: 23px; padding: 3px; border: 0; border-radius: 999px; background: #ccd7e2; }
.automation-switch::after { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: white; transition: .2s; box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.automation-switch.on { background: var(--success); }
.automation-switch.on::after { transform: translateX(19px); }

.brands-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.brand-card { min-height: 255px; padding: 21px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-soft); }
.brand-card-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 15px; color: white; background: linear-gradient(145deg, var(--panda-navy), var(--panda-red)); font-size: 20px; font-weight: 900; }
.brand-card h3 { margin: 14px 0 5px; }
.brand-card > p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.brand-card-detail { margin-top: 15px; display: grid; gap: 7px; color: #496671; font-size: 12px; }
.brand-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.full-span { grid-column: 1 / -1; }
.status-list { display: grid; gap: 12px; margin-top: 18px; }
.status-row, .setting-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child, .setting-row:last-child { border-bottom: 0; }
.status-row small, .setting-row small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.status-value { font-size: 12px; font-weight: 900; }
.status-value.good { color: var(--success); }
.status-value.warn { color: var(--warning); }
.deployment-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 20px; }
.deployment-steps div { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fcfdfd; }
.deployment-steps span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--blue-600); font-weight: 900; }
.deployment-steps p { margin: 12px 0 0; color: var(--muted); line-height: 1.5; font-size: 12px; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 80; padding: 22px; border-left: 1px solid var(--line); background: white; box-shadow: -18px 0 55px rgba(3,25,35,.22); animation: slideIn .2s ease; }
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(3,25,35,.34); backdrop-filter: blur(2px); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; }
.drawer-header h3 { margin: 2px 0 0; font-size: 23px; }
.drawer-action { margin: 18px 0 8px; }
.notification-list { display: grid; gap: 10px; }
.notification-item { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fcfdfd; }
.notification-item.unread { border-color: #e6b6b8; background: #fff4f4; }
.notification-item strong { display: block; }
.notification-item p { margin: 5px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.notification-item small { color: #8294a8; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translateX(-50%); max-width: min(460px, 90vw); padding: 12px 16px; border-radius: 13px; color: white; background: #063b52; box-shadow: 0 15px 35px rgba(0,0,0,.22); font-size: 13px; font-weight: 750; animation: toastUp .2s ease; }
.toast.error { background: #b5121b; }
@keyframes toastUp { from { opacity: 0; transform: translate(-50%, 8px); } }
.loading-overlay { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; align-content: center; gap: 16px; color: white; background: rgba(3,25,35,.76); backdrop-filter: blur(6px); }
.loader-orb { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%; background: white; animation: listenPulse 1.1s infinite; }
.loader-orb img { width: 64px; height: 64px; }
.mobile-only { display: none; }

@media (max-width: 1180px) {
  :root { --sidebar: 230px; }
  .hero-grid, .voice-layout { grid-template-columns: 1fr; }
  .voice-transcript-panel { min-height: 500px; }
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .deployment-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --sidebar: 270px; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-only { display: grid; }
  .topbar { padding: 0 18px; }
  .topbar-title .eyebrow, .user-chip div, .brand-switcher > span { display: none; }
  .view { padding: 22px 18px 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid.two-thirds, .settings-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: repeat(2, 1fr); }
  .full-span { grid-column: auto; }
}
@media (max-width: 640px) {
  .login-card { padding: 25px; }
  .brand-lockup { align-items: flex-start; }
  .brand-logo { width: 64px; height: 64px; }
  .topbar { height: 74px; gap: 9px; }
  .topbar-title { display: none; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .brand-switcher { flex: 1; min-width: 0; }
  .brand-switcher select { width: 100%; min-width: 0; }
  .user-chip { display: none; }
  .hero-card { min-height: 560px; grid-template-columns: 1fr; padding: 27px; }
  .hero-copy h1 { font-size: 45px; }
  .hero-orb-wrap { min-height: 210px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-card strong { font-size: 21px; }
  .section-heading.split { align-items: flex-start; flex-direction: column; }
  .section-heading.split .button { width: 100%; }
  .voice-stage { min-height: 620px; padding: 21px; }
  .voice-orb { width: 155px; height: 155px; }
  .voice-orb img { width: 122px; height: 122px; }
  .halo-one { width: 230px; height: 230px; }
  .halo-two { width: 300px; height: 300px; }
  .voice-controls { flex-wrap: wrap; }
  .voice-controls .button { width: 100%; order: -1; }
  .chat-shell { height: calc(100vh - 170px); }
  .chat-messages { padding: 16px; }
  .chat-message { max-width: 94%; }
  .composer-row { align-items: flex-end; }
  .form-grid, .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .wide-field, .full-field { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .brands-grid { grid-template-columns: 1fr; }
  .automation-card { grid-template-columns: 1fr; }
  .automation-actions { justify-content: flex-end; }
  .deployment-steps { grid-template-columns: 1fr; }
}


/* Panda typography hierarchy */
h1, h2, h3, h4, h5, h6,
.brand-lockup h1,
.sidebar-brand strong,
.topbar-title h2,
.card-heading-row h3,
.section-heading h1,
.voice-topline h1,
.voice-orb-zone h2,
.chat-welcome h3,
.plan-card h3,
.brand-card h3,
.drawer-header h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}

body, button, input, textarea, select, label, p, small, span, a, li,
.nav-item, .button, .eyebrow, .pill, .connection-badge,
.transcript-item, .plan-card-content, .automation-meta {
  font-family: var(--font-body);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.035em;
}

.hero-copy > p, .section-heading > div > p:last-child,
.brand-lockup p:last-child, .voice-orb-zone > p, .privacy-note {
  font-family: var(--font-body);
  font-weight: 400;
}
