/* ─── Gravik Agent Dashboard CSS ─────────────────────────────────────── */
:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #21262d;
  --border:    rgba(255,255,255,0.08);
  --accent:    #7c3aed;
  --accent2:   #a855f7;
  --green:     #22c55e;
  --red:       #ef4444;
  --amber:     #f59e0b;
  --blue:      #3b82f6;
  --text:      #e6edf3;
  --text2:     #8b949e;
  --glass-bg:  rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.09);
  --radius:    14px;
  --radius-sm: 8px;
  --sidebar-w: 220px;
  --topbar-h:  64px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

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

html, body {
  height: 100%; font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5; overflow: hidden;
}

/* ─── Utilities ────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.glass  { background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(12px); }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { color: var(--red); font-size: 13px; margin-top: 10px; text-align: center; }

/* ─── Login Overlay ─────────────────────────────────────────────────── */
.overlay-backdrop {
  position: fixed; inset: 0; z-index: 999;
  background: radial-gradient(ellipse at 30% 40%, rgba(124,58,237,0.25) 0%, var(--bg) 60%);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  width: 400px; border-radius: 20px; padding: 40px;
  box-shadow: var(--shadow-lg);
  background: rgba(22,27,34,0.92);
  border: 1px solid rgba(124,58,237,0.3);
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }

.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand .brand-icon { font-size: 40px; margin-bottom: 8px; filter: drop-shadow(0 0 16px #7c3aed); }
.login-brand h1 { font-size: 22px; font-weight: 700; }
.login-brand p  { color: var(--text2); font-size: 13px; margin-top: 4px; }

.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.field-input {
  width: 100%; padding: 10px 14px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }
.field-input option { background: var(--bg2); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; background: var(--accent);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(124,58,237,0.4);
}
.btn-primary:hover  { background: var(--accent2); box-shadow: 0 4px 20px rgba(124,58,237,0.5); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; justify-content: center; padding: 12px; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: transparent;
  border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: border-color .2s, background .2s;
}
.btn-outline:hover { border-color: var(--accent); background: rgba(124,58,237,0.12); }

.login-plans { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.plan-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
}
.plan-badge.pro        { border-color: var(--blue);  color: var(--blue); }
.plan-badge.gold       { border-color: var(--accent); color: var(--accent2); }
.plan-badge.enterprise { border-color: var(--amber);  color: var(--amber); }

/* ─── App Shell ─────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ─── Sidebar ───────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%;
  padding: 0 0 16px;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
}
.brand-icon-sm { font-size: 22px; filter: drop-shadow(0 0 8px #7c3aed); }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }

.nav-list { list-style: none; padding: 12px 10px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text2);
  transition: background .15s, color .15s; position: relative;
  font-size: 14px; font-weight: 500; margin-bottom: 2px;
}
.nav-item:hover  { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: rgba(124,58,237,0.18); color: var(--accent2); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--accent2); border-radius: 0 3px 3px 0;
}
.nav-icon  { font-size: 16px; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 10px;
}

.sidebar-footer {
  padding: 12px 10px 0;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.user-pill { display: flex; align-items: center; gap: 10px; flex: 1; overflow: hidden; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; overflow: hidden; }
.user-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan  { font-size: 11px; color: var(--accent2); font-weight: 500; }
.btn-logout {
  background: none; border: 1px solid var(--border); color: var(--text2);
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ─── Main Content ──────────────────────────────────────────────────── */
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: var(--bg);
}

.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  padding: 0 28px; display: flex;
  align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,0.8); backdrop-filter: blur(8px);
}
.topbar-left   { display: flex; flex-direction: column; }
.page-title    { font-size: 18px; font-weight: 700; }
.page-sub      { font-size: 12px; color: var(--text2); margin-top: 1px; }
.topbar-right  { display: flex; align-items: center; gap: 12px; }
.account-chip  {
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: rgba(124,58,237,0.18); border: 1px solid rgba(124,58,237,0.4);
  color: var(--accent2);
}
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100%{ box-shadow:0 0 6px var(--green); } 50%{ box-shadow:0 0 14px var(--green); } }

/* ─── Tab Sections ──────────────────────────────────────────────────── */
.tab-section { flex: 1; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.tab-section.hidden { display: none; }

/* ─── KPI Cards ─────────────────────────────────────────────────────── */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.kpi-card {
  padding: 20px; border-radius: var(--radius);
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-card::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(135deg,#e6edf3,#a855f7); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.kpi-sub   { font-size: 11px; color: var(--text2); margin-top: 6px; }

/* ─── Charts ────────────────────────────────────────────────────────── */
.charts-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.chart-card { border-radius: var(--radius); padding: 20px; }
.chart-card.chart-full { grid-column: 1/-1; }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-title  { font-size: 14px; font-weight: 600; }
.chart-select { padding: 4px 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; }
.apex-chart   { min-height: 240px; }
.chart-empty  { text-align: center; color: var(--text2); padding: 40px; font-size: 13px; }

/* ─── Reports ───────────────────────────────────────────────────────── */
.reports-toolbar {
  padding: 16px 20px; border-radius: var(--radius);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
}
.report-picker, .date-range, .date-single, .report-actions { display: flex; align-items: flex-end; gap: 10px; }
.field-group-inline { display: flex; flex-direction: column; gap: 5px; }
.field-group-inline label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing:.5px; }
.field-group-inline .field-input { width: 140px; }

.report-output { flex: 1; }
.report-table-wrap { overflow-x: auto; border-radius: var(--radius); }
.report-table {
  width: 100%; border-collapse: collapse;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); overflow: hidden;
}
.report-table th {
  padding: 11px 16px; text-align: left; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  background: rgba(124,58,237,0.15); color: var(--accent2);
  border-bottom: 1px solid var(--border);
}
.report-table td {
  padding: 10px 16px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.report-table tr:last-child td { border-bottom: none; }
.report-table tr:hover td { background: rgba(255,255,255,0.03); }
.report-meta { font-size: 12px; color: var(--text2); padding: 10px 0; }
.report-section-head { background: rgba(255,255,255,0.04) !important; }
.report-section-head td { font-weight: 700; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing:.4px; }
.report-total-row td { font-weight: 700; color: var(--accent2); border-top: 1px solid var(--border); }

/* Aging buckets */
.aging-current  { color: var(--green); font-weight:600; }
.aging-30       { color: #84cc16; font-weight:600; }
.aging-60       { color: var(--amber); font-weight:600; }
.aging-90       { color: var(--red); font-weight:600; }

/* ─── Explorer ──────────────────────────────────────────────────────── */
.explorer-toolbar { padding: 14px 18px; border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.entity-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.entity-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text2);
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.entity-btn:hover  { border-color: var(--accent); color: var(--accent2); }
.entity-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(124,58,237,0.4); }
.explorer-search { display: flex; gap: 8px; align-items: center; }

.explorer-grid { border-radius: var(--radius); overflow: auto; flex: 1; }
.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th {
  padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  background: rgba(124,58,237,0.12); color: var(--accent2);
  position: sticky; top: 0; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.grid-table td { padding: 9px 14px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); white-space: nowrap; }
.grid-table tr:hover td { background: rgba(124,58,237,0.06); cursor: pointer; }
.grid-empty { text-align:center; padding:60px; color:var(--text2); }
.grid-count  { font-size:12px; color:var(--text2); padding:8px 4px; }

/* ─── Chat ──────────────────────────────────────────────────────────── */
.chat-shell { border-radius: var(--radius); display: flex; flex-direction: column; flex: 1; overflow: hidden; height: calc(100vh - var(--topbar-h) - 48px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.chat-welcome { text-align: center; padding: 40px 20px; }
.chat-welcome-icon { font-size: 48px; margin-bottom: 12px; }
.chat-welcome h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.chat-welcome p  { color: var(--text2); font-size: 13px; margin-bottom: 16px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.chip {
  padding: 6px 14px; background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3); border-radius: 20px;
  color: var(--accent2); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.chip:hover { background: rgba(124,58,237,0.3); }

.chat-msg { display: flex; gap: 10px; max-width: 85%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble {
  padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.6;
  background: var(--bg3); border: 1px solid var(--border);
}
.chat-msg.user .chat-bubble { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =========================================
   LOGIN OVERLAY (SPLIT PANE)
   ========================================= */
.split-container {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  padding: 0 16px;
}

.login-left-panel {
  flex: 0.8;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  position: relative;
  width: auto;
  max-width: none;
}

.login-right-panel {
  flex: 1.2;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  max-width: none;
}

/* Robot Container & Lottie */
.robot-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 20px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.robot-container dotlottie-wc {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.robot-container.speaking {
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.2); }
  50% { box-shadow: 0 0 60px rgba(124, 58, 237, 0.5); }
  100% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.2); }
}

spline-viewer {
  width: 100%;
  height: 100%;
}

/* Voice Play Overlay */
.voice-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

.voice-overlay:hover {
  background: rgba(15, 23, 42, 0.5);
}

.play-icon {
  font-size: 32px;
  color: var(--accent2);
  margin-bottom: 8px;
}

.voice-overlay span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Synchronized Intro Text */
.intro-text {
  text-align: center;
  width: 100%;
}

.intro-line {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.intro-line.highlight {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .split-container { flex-direction: column; }
  .login-left-panel { display: none; }
}

.chat-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  display:flex; align-items:center; justify-content:center; font-size:12px;
}

.chat-grid-wrap { overflow-x: auto; margin-top: 8px; }
.chat-grid-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.chat-grid-table th { padding: 6px 10px; background: rgba(124,58,237,0.2); color: var(--accent2); text-align:left; font-size:10px; text-transform:uppercase; }
.chat-grid-table td { padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }

.chat-input-bar {
  padding: 14px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center;
}
.chat-input {
  flex: 1; padding: 10px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 22px; color: var(--text); font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.chat-input:focus { border-color: var(--accent); }

.chat-header-bar {
  padding: 12px 16px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn-clear-chat {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-clear-chat:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239,68,68,0.1);
}

/* ─── Scrollbars ────────────────────────────────────────────────────── */
::-webkit-scrollbar            { width: 6px; height: 6px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.2); }

/* ─── Voice Input Button ─────────────────────────────────────────────────── */
.btn-voice-input {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all .2s;
  flex-shrink: 0;
}
.btn-voice-input:hover {
  border-color: var(--accent);
  color: var(--accent2);
}
.btn-voice-input.recording {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  animation: voice-pulse 1s infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ─── Voice Settings Button ───────────────────────────────────────────────── */
.btn-voice-settings {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all .2s;
}
.btn-voice-settings:hover {
  color: var(--text);
  background: var(--bg3);
}

/* ─── Voice Recording Indicator ────────────────────────────────────── */
.voice-indicator {
  padding: 8px 16px;
  background: rgba(239,68,68,0.15);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 12px;
}
.voice-pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-dot 1s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
#voiceStatusText {
  flex: 1;
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
}
.btn-stop-voice {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-stop-voice:hover {
  background: #dc2626;
}

/* ─── Voice Settings Panel ─────────────────────────────────────────── */
.voice-settings-panel {
  position: fixed;
  top: 80px; right: 20px;
  width: 280px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.voice-settings-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.voice-settings-header h3 {
  font-size: 14px;
  font-weight: 600;
}
.voice-settings-header button {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
}
.voice-settings-header button:hover {
  border-color: var(--red);
  color: var(--red);
}
.voice-settings-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.voice-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-setting-row label {
  font-size: 13px;
  color: var(--text);
  min-width: 80px;
}
.voice-setting-row input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: var(--bg3);
  border-radius: 2px;
  outline: none;
}
.voice-setting-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.voice-setting-row select {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}
.voice-setting-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
}
.voice-setting-row span {
  font-size: 12px;
  color: var(--text2);
  min-width: 35px;
  text-align: right;
}
.btn-test-voice {
  width: 100%;
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn-test-voice:hover {
  background: var(--accent2);
}

/* ─── Voice Output (Read Aloud) Button ─────────────────────────────── */
.btn-read-aloud {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text2);
  font-size: 11px;
  cursor: pointer;
  transition: all .2s;
  margin-left: 8px;
}
.btn-read-aloud:hover {
  border-color: var(--accent);
  color: var(--accent2);
}
.btn-read-aloud.reading {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
