/* ================================================
   ELIO — Design System V2
   Premium · Minimal · Warm
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=DM+Mono:wght@400;500&display=swap');

/* ================================================
   DESIGN TOKENS
   ================================================ */
:root {
  /* Brand */
  --amber: #C8902E;
  --amber-hover: #B5801F;
  --amber-light: #D9A84A;
  --amber-soft: #FBF3E4;
  --amber-softer: #FDF8F0;
  --amber-border: #F0D9A8;
  --amber-glow: rgba(200, 144, 46, 0.12);
  --amber-glow-strong: rgba(200, 144, 46, 0.25);

  /* Semantic */
  --green: #2D8A4E;
  --green-soft: #EDFAF1;
  --green-border: #B8E6C8;
  --red: #C4403A;
  --red-soft: #FDF0EF;
  --red-border: #F0C0BD;
  --orange: #D4870E;
  --orange-soft: #FEF6E7;
  --blue: #3574D4;
  --blue-soft: #EBF2FC;

  /* Surfaces — Light */
  --bg-0: #FAFAF8;
  --bg-1: #FFFFFF;
  --bg-2: #F5F5F0;
  --bg-3: #EEEDE8;
  --bg-4: #E8E6E1;
  --bg-5: #D8D6D0;

  /* Text */
  --t1: #1A1A18;
  --t2: #4A4A45;
  --t3: #6B6B65;
  --t4: #9C9C95;

  /* Borders */
  --border: #E8E6E1;
  --border-hover: #D8D6D0;
  --border-active: #C8902E;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);

  /* Layout */
  --sidebar-width: 240px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.15s;

  /* Semantic aliases */
  --accent: var(--amber);
  --accent-hover: var(--amber-hover);
  --accent-soft: var(--amber-soft);
  --accent-text: #FFFFFF;
  --accent-dim: var(--amber-light);
  --ring-track: var(--bg-3);
  --sidebar-bg: var(--bg-1);
  --sidebar-border: var(--border);
  --card-bg: var(--bg-1);
  --card-bg-elevated: var(--bg-1);

  /* Legacy aliases */
  --bg: var(--bg-0);
  --bg1: var(--bg-1);
  --bg2: var(--bg-2);
  --bg3: var(--bg-3);
  --gold-500: var(--amber);
  --gold-600: var(--amber);
  --gold-400: var(--amber-light);
  --gold-300: var(--amber-border);
  --gold-200: var(--amber-soft);
  --gold-100: var(--amber-softer);
  --gold-700: var(--amber-hover);
  --gold-900: #7A5A00;
  --gold-glow: var(--amber-glow);
  --gold-glow-strong: var(--amber-glow-strong);
  --surface: var(--bg-1);
  --surface-hover: var(--bg-2);
  --text: var(--t1);
  --text-secondary: var(--t3);
  --text-muted: var(--t4);
  --success: var(--green);
  --error: var(--red);
  --warning: var(--orange);
}

/* ================================================
   DARK THEME
   ================================================ */
[data-theme="dark"] {
  --bg-0: #111110;
  --bg-1: #1A1A18;
  --bg-2: #222220;
  --bg-3: #2E2E2B;
  --bg-4: #3A3A36;
  --bg-5: #4A4A44;

  --t1: #F0EEEA;
  --t2: #C8C6C0;
  --t3: #9C9C95;
  --t4: #6B6B65;

  --border: #2E2E2B;
  --border-hover: #3A3A36;
  --border-active: #D4A03A;

  --amber: #D4A03A;
  --amber-hover: #E0B04A;
  --amber-soft: #2A2416;
  --amber-softer: #1E1C14;
  --amber-border: #4A3D20;
  --amber-glow: rgba(212, 160, 58, 0.12);
  --amber-glow-strong: rgba(212, 160, 58, 0.25);

  --green: #3DA562;
  --green-soft: #1A2B1E;
  --red: #D4544E;
  --red-soft: #2B1A19;
  --orange: #D4970E;
  --orange-soft: #2A2410;
  --blue: #5090E0;
  --blue-soft: #1A2230;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);

  --sidebar-bg: var(--bg-1);
  --sidebar-border: var(--border);
  --card-bg: var(--bg-1);
  --card-bg-elevated: var(--bg-2);
}

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--t1);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; font-weight: 600; }

a {
  color: var(--accent);
  text-decoration: none;
}

/* ================================================
   SCREEN SYSTEM
   ================================================ */
.screen {
  display: none;
  height: 100vh;
  width: 100vw;
}

.screen.active {
  display: flex;
}

/* ================================================
   AUTH SCREEN
   ================================================ */
#auth-screen.active {
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  width: 100%;
  max-width: 380px;
  padding: 32px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--t1);
  margin-bottom: 6px;
}

.auth-logo h1 span,
.auth-logo .logo-o {
  color: var(--accent);
}

.auth-logo p {
  color: var(--t4);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--t4);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.auth-tab.active {
  color: var(--t1);
  border-bottom-color: var(--accent);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ================================================
   FORMS
   ================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
}

.form-group input,
.form-group textarea,
.form-group select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--t1);
  background: var(--bg-1);
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.form-group input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--t4);
}

.error-message {
  color: var(--red);
  font-size: 13px;
  padding: 8px 12px;
  background: var(--red-soft);
  border-radius: var(--radius-sm);
  display: none;
}

.error-message.visible,
.error-message.show {
  display: block;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-1);
  color: var(--t1);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--t3);
  border: none;
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--t1);
  background: var(--bg-2);
}

.btn-danger {
  background: var(--red);
  color: #FFFFFF;
  border-color: var(--red);
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-full {
  width: 100%;
}

.btn-large {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================================================
   LAYOUT: SIDEBAR + MAIN
   ================================================ */
#main-app {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .logo-icon {
  display: none;
}

.sidebar-brand h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--t1);
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--t3);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}

.theme-toggle:hover {
  background: var(--bg-2);
  border-color: var(--border-hover);
}

.sidebar-nav {
  flex: 1;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t4);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 400;
  color: var(--t3);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}

.nav-item:hover {
  color: var(--t1);
  background: var(--bg-2);
}

.nav-item.active {
  color: var(--t1);
  background: var(--amber-soft);
  font-weight: 500;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  line-height: 1;
}

.sidebar-footer {
  padding: 12px 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 11px;
  color: var(--t4);
}

.minutes-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--t4);
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.btn-logout {
  width: 100%;
  margin-top: 8px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--t3);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.btn-logout:hover {
  background: var(--bg-2);
  color: var(--t1);
}

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-0);
  height: 100vh;
}

.page {
  display: none;
  padding: 28px 36px;
  max-width: 1200px;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--t1);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--t4);
  margin-bottom: 20px;
}

/* ================================================
   FILTER BAR
   ================================================ */
.filters-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-select {
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--t2);
  background: var(--bg-1);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239C9C95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
  transition: border-color var(--duration) var(--ease);
}

.filter-select:hover {
  border-color: var(--border-hover);
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

/* ================================================
   STAT CARDS (Home)
   ================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color var(--duration) var(--ease);
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-card.accent {
  border-color: var(--amber-border);
  background: var(--amber-softer);
}

.stat-card .stat-label,
.stat-card label {
  font-size: 12px;
  font-weight: 500;
  color: var(--t4);
  display: block;
  margin-bottom: 6px;
}

.stat-card .stat-value,
.stat-card .value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--t1);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-card.accent .stat-value,
.stat-card.accent .value {
  color: var(--accent);
}

.stat-card .stat-trend {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.stat-card .stat-trend.up { color: var(--green); }
.stat-card .stat-trend.down { color: var(--red); }

/* ================================================
   GENERIC CARDS
   ================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ================================================
   HOME: RECENT CALLS SECTION
   ================================================ */
.home-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.home-section-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
}

.home-section-header a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.home-section-header a:hover {
  text-decoration: underline;
}

/* ================================================
   HOME: TRAIN CTA
   ================================================ */
.home-train-cta {
  background: var(--amber-softer);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.home-train-cta:hover {
  border-color: var(--accent);
}

.train-cta-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.train-cta-icon {
  font-size: 28px;
  line-height: 1;
}

.train-cta-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
}

.train-cta-content p {
  font-size: 13px;
  color: var(--t3);
}

/* ================================================
   CALLS: OVERVIEW
   ================================================ */
.calls-overview {
  margin-bottom: 24px;
}

.calls-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.overview-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.overview-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--t1);
  display: block;
  letter-spacing: -0.02em;
}

.overview-stat-label {
  font-size: 12px;
  color: var(--t4);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

.calls-overview-chart {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}

.calls-overview-chart canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* ================================================
   CALLS: SPLIT VIEW
   ================================================ */
.calls-split,
.split-view {
  display: flex;
  gap: 0;
  margin: 0 -36px;
  height: calc(100vh - 340px);
  min-height: 400px;
}

.calls-list,
.split-list {
  width: 360px;
  min-width: 360px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 0;
}

.calls-list .empty-state,
.split-list .empty-state {
  padding: 32px 20px;
  text-align: center;
  color: var(--t4);
  font-size: 13px;
}

.call-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: all var(--duration) var(--ease);
}

.call-item:hover {
  background: var(--bg-2);
}

.call-item.active {
  background: var(--amber-soft);
  border-left-color: var(--accent);
}

.call-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.call-item-info,
.call-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.call-item-name,
.call-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-item-meta,
.call-meta {
  font-size: 12px;
  color: var(--t4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.call-item-score,
.call-score {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* Score colors */
.score-high, .score-green { color: var(--green); }
.score-mid, .score-amber { color: var(--amber); }
.score-low, .score-red { color: var(--red); }

/* Processing call indicator */
.call-item.processing {
  opacity: 0.85;
}

.call-item.processing .call-icon {
  animation: processingPulse 1.5s ease-in-out infinite;
}

.call-processing-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--amber);
  font-weight: 500;
  margin-top: 2px;
}

.processing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: processingPulse 1.5s ease-in-out infinite;
}

@keyframes processingPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ================================================
   CALL DETAIL
   ================================================ */
.call-detail,
.split-detail {
  flex: 1;
  overflow-y: auto;
  padding: 24px 36px;
}

.call-detail .empty-state,
.split-detail .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--t4);
  font-size: 14px;
  gap: 8px;
}

.split-detail.has-content {
  display: block;
}

.detail-header {
  margin-bottom: 20px;
}

.detail-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 4px;
}

.detail-meta {
  font-size: 13px;
  color: var(--t4);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-context-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--amber-soft);
  color: var(--accent);
}

/* ================================================
   BADGES
   ================================================ */
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badge-type {
  background: var(--amber-soft);
  color: var(--accent);
}

.closed-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.closed-badge.yes {
  background: var(--green-soft);
  color: var(--green);
}

.closed-badge.no {
  background: var(--red-soft);
  color: var(--red);
}

/* ================================================
   DETAIL TABS
   ================================================ */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.detail-tabs::-webkit-scrollbar {
  display: none;
}

.detail-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t4);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-body);
  transition: all var(--duration) var(--ease);
}

.detail-tab:hover {
  color: var(--t2);
}

.detail-tab.active {
  color: var(--t1);
  border-bottom-color: var(--accent);
}

.detail-tab .tab-count {
  background: var(--amber-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

.tab-content,
.detail-tab-content {
  display: none;
}

.tab-content.active,
.detail-tab-content.active {
  display: block;
}

/* ================================================
   SCORE HERO
   ================================================ */
.score-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.score-circle.high { background: var(--green-soft); color: var(--green); }
.score-circle.mid { background: var(--amber-soft); color: var(--amber); }
.score-circle.low { background: var(--red-soft); color: var(--red); }

/* ================================================
   CLOSE TOGGLE
   ================================================ */
.close-toggle-section {
  margin-bottom: 20px;
}

.close-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-toggle-btn {
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--duration) var(--ease);
}

.close-toggle-btn.open {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.close-toggle-btn.closed {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.deal-amount {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
  width: 120px;
  color: var(--t1);
  background: var(--bg-1);
  outline: none;
}

.deal-amount:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

/* ================================================
   PROSPECT CARDS
   ================================================ */
.prospects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.prospect-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.prospect-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.prospect-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--t4);
  font-size: 20px;
}

.prospect-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  text-align: center;
  margin-bottom: 2px;
}

.prospect-info {
  font-size: 12px;
  color: var(--t4);
  text-align: center;
  margin-bottom: 8px;
}

.prospect-offer {
  font-size: 12px;
  color: var(--accent);
  text-align: center;
  margin-bottom: 6px;
}

.prospect-difficulty {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--amber-soft);
  color: var(--accent);
  display: inline-block;
  margin: 0 auto 10px;
}

.prospect-personality {
  font-size: 12px;
  color: var(--t3);
  text-align: center;
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prospect-objections {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 14px;
}

.prospect-objection-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--red-soft);
  color: var(--red);
}

.prospect-actions {
  margin-top: auto;
}

.prospect-actions .btn {
  width: 100%;
}

.prospect-edit,
.prospect-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg-2);
  color: var(--t4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: all var(--duration) var(--ease);
}

.prospect-card:hover .prospect-edit,
.prospect-card:hover .prospect-delete {
  opacity: 1;
}

.prospect-edit { right: 40px; }

.niche-group-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.niche-group-title .count {
  font-size: 12px;
  color: var(--t4);
  font-weight: 400;
  background: var(--bg-2);
  padding: 1px 8px;
  border-radius: var(--radius-full);
}

/* ================================================
   TRAINING MODES
   ================================================ */
.train-modes {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.train-mode-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--t3);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--duration) var(--ease);
}

.train-mode-btn:hover {
  border-color: var(--border-hover);
  color: var(--t1);
}

.train-mode-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* ================================================
   TRAINING RECOMMENDATION
   ================================================ */
.train-recommendation {
  background: var(--amber-softer);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.train-rec-icon {
  font-size: 24px;
  line-height: 1;
}

.train-rec-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.train-rec-text {
  font-size: 13px;
  color: var(--t3);
}

/* ================================================
   PRODUCTS GRID
   ================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  position: relative;
}

.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.product-card.active {
  border-color: var(--accent);
  background: var(--amber-softer);
}

.product-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-4);
  position: absolute;
  top: 18px;
  right: 18px;
}

.product-card.active .product-card-dot {
  background: var(--accent);
}

.product-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 4px;
}

.product-card-desc {
  font-size: 13px;
  color: var(--t3);
  margin-bottom: 8px;
}

.product-card-active {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

/* ================================================
   MODALS
   ================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--t4);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}

.modal-close:hover {
  background: var(--bg-2);
  color: var(--t1);
}

.modal-body {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ================================================
   ROLEPLAY SCREEN
   ================================================ */
#roleplay-screen.active {
  background: var(--bg-0);
  flex-direction: column;
}

.roleplay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.roleplay-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.prospect-display {
  text-align: center;
}

.prospect-display .avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--amber-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: var(--bg-2);
}

.prospect-display .prospect-name {
  font-size: 20px;
  font-weight: 600;
}

.prospect-display .prospect-role {
  font-size: 14px;
  color: var(--t4);
}

.roleplay-timer {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--t1);
}

.roleplay-status {
  font-size: 13px;
  color: var(--t4);
}

.roleplay-footer {
  padding: 24px;
  display: flex;
  justify-content: center;
}

.webcam-container {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 160px;
  height: 120px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-3);
}

.webcam-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================================
   ANALYZING SCREEN
   ================================================ */
#analyzing-screen.active {
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
}

.analyzing-wrapper {
  text-align: center;
}

.analyzing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.analyzing-content h2 {
  font-size: 20px;
  font-weight: 600;
}

.analyzing-content p {
  font-size: 14px;
  color: var(--t3);
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================
   REVIEW SCREEN
   ================================================ */
#review-screen.active {
  flex-direction: column;
  background: var(--bg-0);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.review-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 36px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ================================================
   EMPTY STATES
   ================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--t4);
  font-size: 14px;
}

.empty-state.hidden {
  display: none;
}

/* ================================================
   TOOLTIPS / MISC
   ================================================ */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ================================================
   SCROLLBAR
   ================================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-5);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .stats-row,
  .calls-overview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    transition: left 0.3s var(--ease);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }

  .page {
    padding: 20px 16px;
  }

  .stats-row,
  .calls-overview-stats {
    grid-template-columns: 1fr 1fr;
  }

  .calls-split,
  .split-view {
    flex-direction: column;
    height: auto;
    margin: 0;
  }

  .calls-list,
  .split-list {
    width: 100%;
    min-width: 100%;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .call-detail,
  .split-detail {
    padding: 20px 16px;
  }

  .prospects-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .header-actions {
    flex-wrap: wrap;
  }
}
/* ================================================
   TRAINING: CALL TYPE TABS
   ================================================ */
.call-types {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  width: fit-content;
}
.call-type-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--t3);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.call-type-btn:hover { color: var(--t1); background: var(--bg-1); }
.call-type-btn.active { background: var(--card-bg); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }

/* PROSPECT CARD FIXES */
.prospects-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.prospect-card { align-items: center; text-align: center; }
.prospect-card:hover { transform: translateY(-2px); }
.prospect-title { font-size: 12px; color: var(--t4); margin-bottom: 4px; }
.prospect-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.prospect-tags .tag { font-size: 11px; font-weight: 500; padding: 2px 10px; border-radius: var(--radius-full); }
.prospect-tags .tag.difficulty-easy { background: var(--green-soft); color: var(--green); }
.prospect-tags .tag.difficulty-medium { background: var(--amber-soft); color: var(--accent); }
.prospect-tags .tag.difficulty-hard { background: var(--red-soft); color: var(--red); }
.prospect-description { font-size: 13px; color: var(--t3); line-height: 1.5; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prospect-card-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; opacity: 0; transition: opacity var(--duration) var(--ease); }
.prospect-card:hover .prospect-card-actions { opacity: 1; }
.prospect-action-btn { width: 28px; height: 28px; border-radius: var(--radius-sm); border: none; background: var(--bg-2); color: var(--t4); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.prospect-action-btn:hover { background: var(--bg-3); color: var(--t1); }
.prospect-action-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.btn-start-session { width: 100%; margin-top: auto; }
.niche-group { margin-bottom: 24px; }
.niche-group-header { font-size: 15px; font-weight: 600; color: var(--t1); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.niche-count { font-size: 12px; color: var(--t4); font-weight: 400; background: var(--bg-2); padding: 1px 8px; border-radius: var(--radius-full); font-family: var(--font-mono); }

/* CALL TYPE TABS WITH DESCRIPTIONS */
.call-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px 8px;
}
.ctype-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.ctype-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--t4);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.call-type-btn:hover .ctype-desc,
.call-type-btn.active .ctype-desc {
  max-height: 20px;
  opacity: 1;
}
.call-type-btn.active .ctype-desc {
  color: var(--accent);
  opacity: 0.7;
}

/* ================================================
   PRODUCT CARDS — IMPROVED LAYOUT
   ================================================ */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.product-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  position: static;
}

.product-card-info {
  flex: 1;
  min-width: 0;
}

.product-card-edit {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.product-card:hover .product-card-edit { opacity: 1; }
.product-card-edit:hover { background: var(--bg-2); }

.product-card-stats {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.product-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.product-stat-val {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--t1);
}

.product-stat-label {
  font-size: 11px;
  color: var(--t4);
  margin-top: 2px;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--t3);
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.product-card-badge.active {
  color: var(--accent);
  background: var(--amber-soft);
}

/* CONFIG CARDS */
.config-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.config-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.config-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.config-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 4px;
}

.config-card p {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.4;
}

/* COLOR PICKER */
.color-picker {
  display: flex;
  gap: 8px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.color-dot:hover { transform: scale(1.15); }
.color-dot.active { border-color: var(--t1); transform: scale(1.15); }

/* ================================================
   MODAL CONTAINER FIX
   ================================================ */
.modal-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-container.active {
  display: flex;
}

/* ================================================
   CONFIG CARDS
   ================================================ */
.config-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.config-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.config-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.config-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 4px;
}
.config-card p {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.4;
}

/* ================================================
   PRODUCT CARD IMPROVED
   ================================================ */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.product-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  position: static;
}
.product-card-info { flex: 1; min-width: 0; }
.product-card-edit {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.product-card:hover .product-card-edit { opacity: 1; }
.product-card-edit:hover { background: var(--bg-2); }
.product-card-stats {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.product-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.product-stat-val {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--t1);
}
.product-stat-label {
  font-size: 11px;
  color: var(--t4);
  margin-top: 2px;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--t3);
  padding: 4px 14px;
  border-radius: 999px;
}
.product-card-badge.active {
  color: var(--accent);
  background: var(--amber-soft);
}

/* COLOR PICKER */
.color-picker { display: flex; gap: 8px; }
.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active { border-color: var(--t1); transform: scale(1.15); }

/* ================================================
   SCORECARD MODAL
   ================================================ */
.scorecard-row {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sc-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--t1);
  font-family: var(--font-body);
}
.sc-weight-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.sc-weight {
  width: 52px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--t1);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.sc-weight-suffix {
  font-size: 13px;
  color: var(--t4);
  font-weight: 500;
}
.sc-desc {
  width: 100%;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--t2);
  font-family: var(--font-body);
}
.sc-desc::placeholder { color: var(--t4); }
.sc-remove {
  background: none;
  border: none;
  color: var(--t4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all 0.15s;
}
.sc-remove:hover { color: var(--red); background: var(--red-soft); }
.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 8px;
}
.sc-total {
  font-size: 13px;
  color: var(--t3);
  font-family: var(--font-mono);
}

/* ================================================
   METHODOLOGY MODAL
   ================================================ */
.method-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 3px;
  background: var(--bg-2);
  border-radius: var(--radius-md);
  width: fit-content;
}
.methodology-tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 3px; background: var(--bg-2); border-radius: var(--radius-md); width: fit-content; }
.method-tab {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--t3);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.method-tab:hover { color: var(--t1); }
.method-tab.active { background: var(--card-bg); color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.method-content { margin-bottom: 16px; }
.method-content.hidden { display: none; }
.method-content textarea {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--t1);
  background: var(--bg-1);
  resize: vertical;
}
.method-content textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--amber-glow); }
.method-current {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--green-soft);
  border: 1px solid var(--green);
  margin-bottom: 16px;
}
.method-current.empty {
  background: var(--amber-softer);
  border-color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}
.method-current.empty p { font-size: 13px; color: var(--t2); margin: 0; }
.method-current-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.method-current-header strong { font-size: 13px; color: var(--green); display: block; }
.method-current-source { font-size: 12px; color: var(--t3); display: block; }
.method-current-icon { font-size: 18px; flex-shrink: 0; }
.method-current-preview {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.5;
  max-height: 80px;
  overflow: hidden;
}
.current-methodology { padding: 12px 16px; border-radius: var(--radius-md); background: var(--bg-2); margin-bottom: 16px; }
.current-methodology h4 { font-size: 13px; font-weight: 600; color: var(--t1); margin-bottom: 6px; }
.methodology-preview { font-size: 12px; color: var(--t3); line-height: 1.5; }

/* Fix scorecard weight input width */
.sc-weight { width: 64px !important; padding: 6px 4px 6px 8px !important; }

/* ================================================
   OBJECTIONS MODAL
   ================================================ */
.objection-row {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.obj-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.obj-type {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  max-width: 200px;
}
.obj-remove {
  background: none;
  border: none;
  color: var(--t4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all 0.15s;
}
.obj-remove:hover { color: var(--red); background: var(--red-soft); }
.obj-text {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}
.obj-text::placeholder { color: var(--t4); font-weight: 400; font-style: italic; }
.obj-response {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--amber-softer);
  color: var(--t2);
  font-family: var(--font-body);
  font-size: 13px;
}
.obj-response::placeholder { color: var(--t4); }

/* ================================================
   BILLING BANNER
   ================================================ */
.billing-banner {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.billing-banner.trial {
  background: var(--amber-softer);
  border: 1px solid var(--accent);
}
.billing-banner.expired {
  background: var(--red-soft);
  border: 1px solid var(--red);
}
.billing-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.billing-banner-content span {
  font-size: 13px;
  color: var(--t2);
}
.billing-banner.expired .billing-banner-content span {
  color: var(--red);
  font-weight: 500;
}

/* ================================================
   RESPONSIVE — MOBILE PATCH
   ================================================ */

/* Hamburger toggle button (hidden on desktop) */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-1);
  border: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--t2);
  box-shadow: var(--shadow-sm);
}

/* Overlay behind sidebar on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}

@media (max-width: 768px) {
  /* Show hamburger */
  .mobile-toggle {
    display: flex;
  }

  /* Fix main content margin */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Sidebar becomes drawer */
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 100;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }

  /* Show overlay when sidebar open */
  .sidebar.open ~ .sidebar-overlay,
  body.sidebar-open .sidebar-overlay {
    display: block;
  }

  /* Page header — stack buttons */
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
    padding-top: 48px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .header-actions .btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Stats row — 2 columns */
  .stats-row,
  .calls-overview-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  /* Insights — stack */
  .insights-grid {
    grid-template-columns: 1fr !important;
  }

  /* Calls split view — stack */
  .calls-split,
  .split-view {
    flex-direction: column !important;
    height: auto !important;
  }

  .calls-list,
  .split-list {
    width: 100% !important;
    min-width: 100% !important;
    max-height: 250px;
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }

  .call-detail,
  .split-detail {
    padding: 16px !important;
  }

  /* Tabs — horizontal scroll */
  .detail-tabs,
  .tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .detail-tabs::-webkit-scrollbar,
  .tab-nav::-webkit-scrollbar {
    display: none;
  }

  .detail-tabs .tab,
  .tab-nav .tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Products grid */
  .products-grid {
    grid-template-columns: 1fr !important;
  }

  .config-sections {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Prospects grid */
  .prospects-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Train page — mode tabs stack */
  .call-type-tabs {
    flex-wrap: wrap;
  }

  .call-type-tabs .ctype-tab {
    flex: 1 1 45%;
    min-width: 140px;
  }

  /* Filters row */
  .filters-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Modal responsive */
  .modal-container .modal,
  .modal {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 85vh;
    margin: 8px;
  }

  /* Billing banner */
  .billing-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Score hero section */
  .v2-score-hero {
    padding: 16px !important;
  }

  .v2-score-number {
    font-size: 48px !important;
  }

  /* Analysis categories */
  .v2-categories-grid {
    grid-template-columns: 1fr !important;
  }

  /* Quick log / upload buttons full width */
  .btn-quick-log,
  .btn-upload {
    width: 100%;
  }

  /* Chart container */
  .chart-container {
    height: 200px !important;
  }

  /* Page padding */
  .page {
    padding: 16px 12px !important;
  }

  /* Home last calls */
  .last-calls .call-item {
    padding: 10px 12px;
  }

  /* Coach chat */
  .coach-messages {
    max-height: 300px;
  }

  .coach-input-row {
    flex-direction: column;
    gap: 8px;
  }

  .coach-input-row input {
    width: 100%;
  }

  .coach-input-row .btn {
    width: 100%;
  }
}

/* Tablet tweaks */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }

  .main-content {
    margin-left: 200px;
  }

  .stats-row,
  .calls-overview-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .insights-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* === LOGO ELIO === */
.auth-logo-icon {
  margin-bottom: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
}

.sidebar-brand svg {
  flex-shrink: 0;
}

.nav-brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-brand svg {
  display: block;
}
