/* ================================================================
   AI Sales CRM — Design System (Claude-inspired)
   Warm off-white surfaces · dark refined sidebar · clay accent
   ================================================================ */
:root {
  /* Surfaces */
  --cream:      #FAF9F5;   /* primary background  (Claude cream) */
  --cream-2:    #F4F1EA;   /* subtle elevation    */
  --cream-3:    #EFECE3;   /* deeper warm panel   */
  --paper:      #FFFFFF;

  /* Text */
  --walnut:     #1F1E1B;   /* primary text & dark sidebar */
  --walnut-2:   #2A2926;   /* sidebar gradient end        */
  --walnut-3:   #3A3833;   /* tertiary dark               */
  --ink:        #1F1E1B;
  --muted:      #6B6960;   /* secondary text              */

  /* Accent (Claude clay) */
  --amber:      #C96442;   /* primary accent (clay/terracotta) */
  --amber-2:    #B0573A;   /* accent hover/pressed             */
  --amber-soft: #F4E0D6;   /* accent tint                      */

  /* Semantic */
  --moss:       #6B8E3D;   /* success (muted olive)        */
  --moss-2:     #4F6C2A;
  --danger:     #B84C3A;
  --danger-bg:  #F5DDD7;

  /* Lines */
  --border:     #E5E2D9;   /* primary subtle border        */
  --border-2:   #D4D0C1;

  /* Elevation */
  --shadow:     0 1px 2px rgba(31,30,27,0.04), 0 4px 12px rgba(31,30,27,0.04);
  --shadow-lg:  0 8px 24px rgba(31,30,27,0.08);

  /* Radii */
  --radius:     12px;
  --radius-sm:  8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
h1, h2, h3, h4 { margin: 0; color: var(--walnut); letter-spacing: -0.015em; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
em {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: var(--amber);
  font-weight: 500;
}
a { color: inherit; text-decoration: none; }
.font-serif { font-family: 'Source Serif 4', Georgia, serif !important; font-weight: 500 !important; letter-spacing: -0.01em; }

/* ================================================================
   APP SHELL
   ================================================================ */
.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: #1F1E1B;
  color: #E5E2D9;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.brand { display: flex; gap: 10px; align-items: center; margin: 4px 8px 18px; }
.brand-logo {
  width: 32px; height: 32px;
  background: var(--amber);
  color: #fff;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
}
.brand-name { font-weight: 600; letter-spacing: 0; font-size: 14px; color: #FAF9F5; }
.brand-sub { font-size: 11px; color: #A8A49A; letter-spacing: 0; margin-top: 1px; font-weight: 400; }

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; padding: 0 4px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.nav-divider {
  font-size: 10px; letter-spacing: 0.08em;
  color: #76736B; padding: 14px 10px 6px;
  text-transform: uppercase; font-weight: 500;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #BFBBB1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 450;
  user-select: none;
  transition: all 0.12s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #FAF9F5; }
.nav-item.active {
  background: rgba(201,100,66,0.14);
  color: #E68666;
  font-weight: 500;
}
.nav-item.active::before {
  content: ''; position: absolute;
  left: 0; top: 7px; bottom: 7px; width: 2px;
  background: var(--amber); border-radius: 2px;
}
.nav-ico { display: inline-block; width: 16px; text-align: center; opacity: 0.7; font-size: 13px; }
.nav-item.active .nav-ico { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.08);
  color: #BFBBB1;
  font-size: 10px; padding: 1px 7px;
  border-radius: 10px; font-weight: 500;
}
.nav-item.active .nav-badge { background: var(--amber); color: #fff; }

.sidebar-footer { padding: 10px 8px 4px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 8px; }
.user-card {
  display: flex; gap: 10px; align-items: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.12s;
}
.user-card:hover { background: rgba(255,255,255,0.04); }
.user-card-info { flex: 1; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), #B0573A);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 500; font-size: 11px;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: #FAF9F5; }
.user-role { font-size: 11px; color: #8E8B81; }
.logout-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.12);
  color: #BFBBB1; cursor: pointer; padding: 5px 9px;
  border-radius: 6px; font-size: 13px; font-family: inherit;
  transition: all 0.15s;
}
.logout-btn:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.2); }
.credit {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 10px; color: #76736B;
  text-align: center; letter-spacing: 0;
  font-weight: 400;
}
.credit b { color: #A8A49A; font-weight: 500; }

/* ---------- Main ---------- */
.main { background: var(--cream); display: flex; flex-direction: column; min-width: 0; overflow-x: hidden; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.crumbs { font-size: 13px; color: var(--walnut); font-weight: 500; display: flex; align-items: center; }
.crumb-sep { margin: 0 8px; color: var(--muted); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.search { position: relative; }
.search input {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 8px 14px 8px 34px;
  width: 320px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  border-color: var(--walnut);
  box-shadow: 0 0 0 3px rgba(31,30,27,0.06);
}
.search::before {
  content: '\1F50D';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: 0.45;
}

/* ---------- Buttons ---------- */
.btn {
  border: none; cursor: pointer; padding: 8px 14px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  font-family: inherit;
  transition: all 0.12s;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: inherit;
  letter-spacing: -0.005em;
}
.btn-primary { background: var(--walnut); color: #FAF9F5; }
.btn-primary:hover { background: #2A2926; }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: var(--amber-2); }
.btn-ghost {
  background: var(--paper);
  color: var(--walnut);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--cream-2); border-color: var(--border-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--moss); color: #fff; }
.btn.lg { padding: 11px 20px; font-size: 14px; }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn.xs { padding: 4px 9px; font-size: 11px; }
.btn.full { width: 100%; justify-content: center; }
.icon-btn { padding: 7px 11px; background: var(--paper); border: 1px solid var(--border); }

/* ================================================================
   SCREENS
   ================================================================ */
.screen { display: none; padding: 28px; min-width: 0; }
.screen.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 20px; gap: 20px;
}
.page-head h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.page-head-actions { display: flex; gap: 8px; }

/* ================================================================
   HERO (dashboard)
   ================================================================ */
.hero {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px 36px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px;
  align-items: center;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; right: -120px; top: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(201,100,66,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.eyebrow {
  font-size: 11px; letter-spacing: 0.08em; color: var(--amber);
  font-weight: 500; text-transform: uppercase;
}
.hero-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 34px; font-weight: 500;
  color: var(--walnut); margin: 10px 0 12px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.hero-sub { color: var(--muted); font-size: 14px; max-width: 520px; line-height: 1.55; }
.hero-cta { display: flex; gap: 10px; margin-top: 24px; }
.hero-art { display: flex; justify-content: center; }
.hero-card {
  background: var(--cream-2);
  padding: 18px 20px;
  border-radius: 10px;
  width: 100%; max-width: 320px;
  border: 1px solid var(--border);
}
.hero-card-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--walnut);
}
.hero-card-row:last-of-type { border: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-a { background: var(--amber); }
.dot-b { background: var(--moss); }
.dot-c { background: var(--walnut-3); }
.dot-d { background: #B0573A; }
.dot-e { background: #6D5499; }
.hero-mini {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted); font-weight: 500;
  letter-spacing: 0; text-transform: none;
}

/* ================================================================
   STAT TILES
   ================================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: var(--paper); padding: 18px 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: border-color 0.15s;
}
.stat:hover { border-color: var(--border-2); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 450; text-transform: none; letter-spacing: 0; }
.stat-value {
  font-size: 28px; font-weight: 500; color: var(--walnut);
  margin: 8px 0 4px;
  font-family: 'Source Serif 4', Georgia, serif;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-trend { font-size: 11px; color: var(--moss); font-weight: 500; }
.stat-trend.down { color: var(--danger); }
.stat-trend.warn { color: var(--amber); }
.stat-suffix { font-size: 14px; color: var(--muted); font-family: 'Inter', sans-serif; font-weight: 500; }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
}
.card.flush { padding: 0; }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 10px;
}
.card-head h3 { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.two-col-rev { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }

/* ================================================================
   TOP PERFORMER + LEADERBOARD
   ================================================================ */
.sales-activity {
  display: grid; grid-template-columns: 300px 1fr; gap: 16px;
  margin-bottom: 22px;
}
.top-performer {
  background: #1F1E1B;
  color: #E5E2D9;
  text-align: center;
  padding: 24px 20px;
  position: relative; overflow: hidden;
  border: 1px solid #2A2926;
  border-radius: var(--radius);
}
.top-performer::before {
  content: ''; position: absolute;
  top: -80px; right: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(201,100,66,0.22), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.tp-eyebrow {
  position: relative; z-index: 1;
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--amber); font-weight: 500;
  margin-bottom: 16px; text-transform: uppercase;
}
.tp-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 500;
  color: #fff; margin: 0 auto 12px;
  border: 2px solid rgba(201,100,66,0.5);
  position: relative; z-index: 1;
  font-family: 'Source Serif 4', Georgia, serif;
}
.tp-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px; font-weight: 500;
  color: #FAF9F5; margin-bottom: 2px;
  position: relative; z-index: 1;
  letter-spacing: -0.015em;
}
.tp-role {
  font-size: 12px; color: #A8A49A;
  margin-bottom: 18px; position: relative; z-index: 1;
}
.tp-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.tp-stat-num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 42px; font-weight: 500;
  color: var(--amber); line-height: 1;
  letter-spacing: -0.02em;
}
.tp-stat-lbl { font-size: 11px; color: #A8A49A; text-align: left; line-height: 1.4; }
.tp-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  position: relative; z-index: 1;
}
.tp-meta > div {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.tp-meta b { color: #FAF9F5; font-size: 14px; font-family: 'Source Serif 4', Georgia, serif; font-weight: 500; }
.tp-meta span { font-size: 9px; color: #8E8B81; letter-spacing: 0.06em; text-transform: uppercase; }

.lb-tabs { display: flex; gap: 2px; background: var(--cream-2); padding: 3px; border-radius: 8px; }
.lb-tab {
  background: transparent; border: none;
  padding: 5px 11px; font-size: 11px;
  border-radius: 6px; cursor: pointer; font-family: inherit;
  font-weight: 500; color: var(--muted);
  transition: all 0.12s;
}
.lb-tab:hover { color: var(--walnut); }
.lb-tab.active { background: var(--paper); color: var(--walnut); }

.lb-summary {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; padding: 14px 16px;
  background: var(--cream-2); border-radius: var(--radius-sm);
  margin: 12px 0 16px;
}
.lb-summary > div { border-right: 1px solid var(--border); padding-right: 14px; }
.lb-summary > div:last-child { border-right: none; }
.lb-summary-num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px; font-weight: 500;
  color: var(--walnut); line-height: 1;
  letter-spacing: -0.015em;
}
.lb-summary-lbl { font-size: 11px; color: var(--muted); margin-top: 4px; }

.leaderboard { list-style: none; padding: 0; margin: 0; }
.leaderboard li {
  display: grid;
  grid-template-columns: 28px 32px 1.4fr 1.2fr auto;
  gap: 12px; align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.leaderboard li:last-child { border-bottom: none; }
.lb-rank {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px; font-weight: 500;
  color: var(--muted); text-align: center;
}
.leaderboard li:first-child .lb-rank { color: var(--amber); }
.lb-thumb { width: 32px; height: 32px; font-size: 11px; }
.lb-name { font-weight: 500; font-size: 13px; color: var(--walnut); display: flex; align-items: center; gap: 8px; }
.lb-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.lb-bar-wrap { padding-right: 8px; }
.lb-bar { background: var(--cream-2); height: 5px; border-radius: 4px; overflow: hidden; }
.lb-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.leaderboard li:first-child .lb-fill { background: var(--moss); }
.lb-count { text-align: right; min-width: 80px; display: flex; flex-direction: column; }
.lb-count b {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px; color: var(--walnut); font-weight: 500; line-height: 1;
  letter-spacing: -0.015em;
}
.lb-count span { font-size: 10px; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* ================================================================
   GRADIENT THUMBS, AVATARS
   ================================================================ */
.proj-thumb {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.gradient-1 { background: linear-gradient(135deg, #ff6633, #7a4f2c); }
.gradient-2 { background: linear-gradient(135deg, #5b8a3a, #3b6024); }
.gradient-3 { background: linear-gradient(135deg, #b04a2c, #7a2f1a); }
.gradient-4 { background: linear-gradient(135deg, #5a3a8e, #3b2462); }
.gradient-5 { background: linear-gradient(135deg, #c08a2b, #7a5a1a); }
.gradient-6 { background: linear-gradient(135deg, #2c6a78, #1a4252); }

/* ================================================================
   TABLES
   ================================================================ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 11px; color: var(--muted);
  font-weight: 500; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0; text-transform: none;
  background: var(--cream-2);
}
.data-table th:first-child { border-top-left-radius: var(--radius); }
.data-table th:last-child { border-top-right-radius: var(--radius); }
.data-table td {
  padding: 12px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
  color: var(--walnut);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.row-link { cursor: pointer; transition: background 0.1s; }
.data-table tr.row-link:hover td { background: var(--cream-2); }
.cell-stacked { display: flex; gap: 10px; align-items: center; }
.cell-name { font-weight: 500; color: var(--walnut); font-size: 13px; }
.cell-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ================================================================
   TAGS, BADGES, STATUS
   ================================================================ */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0;
}
.tag-blue { background: #DDE6F2; color: #3D5A80; }
.tag-green { background: #DCE8D0; color: #4F6C2A; }
.tag-amber { background: #F4E0D6; color: #8A4B2C; }
.tag-purple { background: #E4DAEC; color: #5C3D7A; }
.tag-rose { background: #F0D9D2; color: #8A3F2C; }
.tag-walnut { background: var(--cream-2); color: var(--walnut); border: 1px solid var(--border); }

.status { font-weight: 600; font-size: 12px; }
/* BRD V3 6.4 Lead Status Workflow — 9 stages */
.status-new        { color: #2c4a78; }   /* New Lead */
.status-attempted  { color: #7a5a1a; }   /* Attempted Contact */
.status-connected  { color: var(--amber-2); } /* Connected */
.status-interested { color: #2f6e35; }   /* Interested */
.status-followup   { color: #5a2a78; }   /* Follow-up Required */
.status-proposal   { color: #2c4a78; }   /* Proposal Sent */
.status-converted  { color: var(--moss-2); } /* Converted */
.status-lost       { color: var(--muted); }  /* Lost */
.status-invalid    { color: #9a3434; }   /* Invalid Lead */
/* legacy aliases */
.status-contacted  { color: var(--amber-2); }
.status-qualified  { color: var(--moss); }
.status-won        { color: var(--moss-2); }

/* Status badge pills (used in tables, Kanban stage dots) */
.stage-dot-new        { background: #3b82f6; }
.stage-dot-attempted  { background: #f59e0b; }
.stage-dot-connected  { background: #ff6633; }
.stage-dot-interested { background: #5b8a3a; }
.stage-dot-followup   { background: #a78bfa; }
.stage-dot-proposal   { background: #2c4a78; }
.stage-dot-converted  { background: #2f6e35; }
.stage-dot-lost       { background: #94a3b8; }
.stage-dot-invalid    { background: #b45454; }

.pill-hot {
  background: var(--amber); color: #fff;
  padding: 2px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.02em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 4px;
}
.pill-warm { background: #F4E0D6; color: #8A4B2C; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }
.pill-cold { background: #DDE6F2; color: #3D5A80; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }

.role-badge {
  display: inline-block; padding: 1px 8px;
  border-radius: 999px; font-size: 10px; font-weight: 500;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.role-badge.admin { background: #F4E0D6; color: #8A4B2C; }
.role-badge.manager { background: #DDE6F2; color: #3D5A80; }
.role-badge.agent { background: #DCE8D0; color: #4F6C2A; }
.role-badge.senior { background: #E4DAEC; color: #5C3D7A; }

/* ================================================================
   FILTER PILLS / SEGMENT TABS
   ================================================================ */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill {
  background: var(--paper); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  cursor: pointer; font-weight: 450; color: var(--walnut);
  font-family: inherit;
  transition: all 0.12s;
  letter-spacing: -0.005em;
}
.pill:hover { border-color: var(--border-2); }
.pill.active { background: var(--walnut); color: #FAF9F5; border-color: var(--walnut); }

.segment-tabs {
  display: flex; gap: 2px;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px;
  margin-bottom: 16px; overflow-x: auto;
}
.seg-tab {
  flex-shrink: 0;
  background: transparent; border: none;
  padding: 8px 16px;
  font-size: 12px; font-weight: 450;
  color: var(--muted); cursor: pointer;
  border-radius: 7px; font-family: inherit;
  transition: all 0.12s;
  letter-spacing: -0.005em;
}
.seg-tab:hover { color: var(--walnut); }
.seg-tab.active { background: var(--walnut); color: #FAF9F5; font-weight: 500; }

/* ================================================================
   FORMS
   ================================================================ */
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--walnut); margin-bottom: 6px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.input, .select, textarea.input {
  display: block; width: 100%;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-family: inherit;
  outline: none;
  color: var(--ink);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input::placeholder, textarea.input::placeholder { color: var(--muted); }
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--walnut);
  box-shadow: 0 0 0 3px rgba(31,30,27,0.06);
}
textarea.input { resize: vertical; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: #fff; border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px;
  font-size: 12px; cursor: pointer; font-family: inherit;
  color: var(--walnut); font-weight: 500;
}
.chip.active { background: var(--amber); color: var(--walnut); border-color: var(--amber); }

/* ================================================================
   ACTIVITY FEED
   ================================================================ */
.activity { list-style: none; padding: 0; margin: 0; }
.activity li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  display: flex; align-items: flex-start; gap: 10px;
}
.activity li:last-child { border: none; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }

/* ================================================================
   PROGRESS BARS
   ================================================================ */
.progress {
  width: 100%; height: 5px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.progress-fill.moss { background: var(--moss); }
.progress-fill.danger { background: var(--danger); }
.progress-fill.walnut { background: var(--walnut); }

/* ================================================================
   AI LOG / INSIGHT BOX
   ================================================================ */
.ai-log {
  background: var(--cream-2); padding: 14px;
  border-radius: var(--radius-sm); margin-top: 12px;
}
.ai-log-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--amber-2); margin-bottom: 8px;
}
.ai-log ul { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.ai-log li { padding: 4px 0; color: var(--walnut); }

.insight-card {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  margin-bottom: 8px;
}
.insight-card.amber {
  border-left: 2px solid var(--amber);
  background: rgba(201,100,66,0.04);
  border-color: rgba(201,100,66,0.18);
}
.insight-card.moss {
  border-left: 2px solid var(--moss);
  background: rgba(107,142,61,0.05);
  border-color: rgba(107,142,61,0.18);
}
.insight-card.danger {
  border-left: 2px solid var(--danger);
  background: rgba(184,76,58,0.05);
  border-color: rgba(184,76,58,0.18);
}
.insight-card.walnut {
  border: 1px solid #2A2926;
  background: #1F1E1B;
  color: #E5E2D9;
}
.insight-card.walnut .insight-title { color: var(--amber); }
.insight-card.walnut .insight-body { color: #BFBBB1; }
.insight-title { font-size: 13px; font-weight: 500; color: var(--walnut); margin-bottom: 3px; }
.insight-body { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ================================================================
   TIMELINE
   ================================================================ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute;
  left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -28px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--amber);
  display: flex; align-items: center; justify-content: center;
}
.timeline-dot.moss { border-color: var(--moss); }
.timeline-dot.walnut { border-color: var(--walnut); }
.timeline-dot.danger { border-color: var(--danger); }
.timeline-row { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.timeline-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.timeline-title { font-size: 13px; font-weight: 700; color: var(--walnut); }
.timeline-body { font-size: 12px; color: #5a4636; margin-top: 4px; line-height: 1.5; }
.timeline-quote {
  font-size: 12px; color: var(--walnut); margin-top: 6px;
  padding: 10px 14px; background: var(--cream-2);
  border-radius: 8px; border-left: 3px solid var(--amber);
  font-style: italic;
}

/* ================================================================
   SOFTPHONE (agent workspace)
   ================================================================ */
.softphone {
  background: #1F1E1B;
  color: #E5E2D9;
  border-radius: var(--radius);
  padding: 22px;
  position: relative; overflow: hidden;
  border: 1px solid #2A2926;
}
.softphone::before {
  content: ''; position: absolute;
  top: -120px; right: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(201,100,66,0.18), transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}
.softphone > * { position: relative; z-index: 1; }
.call-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; font-weight: 700;
  color: var(--amber); margin-bottom: 14px;
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--moss); border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,138,58,0.7); }
  50% { box-shadow: 0 0 0 8px rgba(91,138,58,0); }
}
.caller-card {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.caller-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px; font-weight: 700; color: #fff;
}
.caller-meta { font-size: 12px; color: #c8b89e; margin-top: 2px; }
.caller-tags { display: flex; gap: 6px; margin-top: 8px; }
.caller-tag {
  background: rgba(255,255,255,0.1);
  color: #f1e6d6;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.4px;
}
.caller-tag.amber { background: rgba(255,102,51,0.25); color: #ffb088; }

.waveform-mini {
  display: flex; align-items: flex-end; gap: 2px;
  height: 30px; margin: 0 auto 20px; justify-content: center;
}
.wave-bar {
  width: 3px; background: rgba(255,255,255,0.3); border-radius: 1px;
}
.wave-bar.live { background: rgba(91,138,58,0.9); }

.phone-controls { display: flex; justify-content: center; gap: 12px; }
.phone-btn {
  width: 50px; height: 50px;
  border-radius: 50%; border: none;
  background: rgba(255,255,255,0.1); color: #fff;
  cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: background 0.15s;
}
.phone-btn:hover { background: rgba(255,255,255,0.18); }
.phone-btn.hang { background: var(--danger); }
.phone-btn.hang:hover { background: #8a2616; }

/* ================================================================
   AI ASSIST TIPS
   ================================================================ */
.ai-tip {
  padding: 12px 14px; border-radius: 8px;
  font-size: 12px; margin-bottom: 6px;
  background: #1F1E1B;
  color: #E5E2D9;
  border: 1px solid #2A2926;
  line-height: 1.5;
}
.ai-tip.amber {
  background: rgba(201,100,66,0.08);
  color: #8A4B2C;
  border-color: rgba(201,100,66,0.2);
}
.ai-tip.moss {
  background: rgba(107,142,61,0.08);
  color: #4F6C2A;
  border-color: rgba(107,142,61,0.2);
}
.ai-tip-label {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.75; margin-bottom: 4px;
}

/* ================================================================
   CALL DETAIL: AUDIO + TRANSCRIPT
   ================================================================ */
.waveform-full {
  flex: 1; height: 48px;
  background: var(--cream-2);
  border-radius: 8px;
  padding: 6px;
  display: flex; align-items: center; gap: 2px;
}
.wf-bar { flex: 1; background: var(--border); border-radius: 1px; }
.wf-bar.played { background: var(--walnut); }
.wf-bar.live { background: var(--amber); }

.transcript-line {
  display: flex; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  margin-bottom: 8px;
}
.transcript-line.agent { background: var(--cream-2); }
.transcript-line.customer { background: var(--cream-3); }
.transcript-line.highlight { background: #fff3d8; border-left: 3px solid var(--amber); }
.transcript-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted); white-space: nowrap;
  padding-top: 3px; min-width: 44px;
}
.transcript-speaker {
  font-size: 12px; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.transcript-speaker.agent { color: var(--walnut); }
.transcript-speaker.customer { color: var(--moss); }
.transcript-text { font-size: 13px; color: var(--walnut); line-height: 1.55; }
.transcript-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.transcript-tags .tag { font-size: 10px; padding: 2px 7px; }

/* ================================================================
   SCORE RING + BREAKDOWN
   ================================================================ */
.score-ring {
  width: 110px; height: 110px;
  margin: 0 auto;
  position: relative;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring-value {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-ring-num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 30px; font-weight: 500;
  color: var(--walnut); line-height: 1;
  letter-spacing: -0.025em;
}
.score-ring-lbl {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin-top: 4px; font-weight: 500;
}

.weight-row {
  display: grid; grid-template-columns: 140px 60px 1fr 40px;
  gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.weight-row:last-child { border-bottom: none; }
.weight-name { font-size: 12px; font-weight: 500; color: var(--walnut); }
.weight-pct { font-size: 11px; color: var(--muted); margin-top: 1px; }
.weight-score { font-family: 'Source Serif 4', Georgia, serif; font-size: 16px; font-weight: 500; color: var(--walnut); text-align: right; letter-spacing: -0.01em; }

/* ================================================================
   CALL DETAIL — PLAYER HEADER
   ================================================================ */
.player-header {
  display: flex; gap: 14px; align-items: center;
  margin-top: 18px;
}
.play-btn {
  width: 48px; height: 48px;
  border: none; background: var(--walnut); color: #fff;
  border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.play-btn:hover { background: var(--walnut-2); }
.player-time { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--walnut); min-width: 50px; }
.player-time.dim { color: var(--muted); }

/* ================================================================
   KPI ROW (small)
   ================================================================ */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); margin-top: 18px; }
.kpi-lbl { font-size: 11px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 450; }
.kpi-val { font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; color: var(--walnut); font-weight: 500; margin-top: 4px; letter-spacing: -0.02em; }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ================================================================
   LOGIN
   ================================================================ */
.auth-wrap {
  display: grid; grid-template-columns: 1.1fr 1fr;
  min-height: 100vh; background: var(--cream);
}
.auth-art {
  background: #1F1E1B;
  color: #E5E2D9; padding: 56px;
  display: flex; align-items: center; position: relative;
  overflow: hidden;
}
.auth-art::before {
  content: ''; position: absolute;
  right: -200px; top: -200px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(201,100,66,0.22), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-art::after {
  content: ''; position: absolute;
  left: -120px; bottom: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(201,100,66,0.10), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-art-inner { position: relative; z-index: 1; max-width: 520px; }
.auth-brand { margin-bottom: 60px; }
.auth-brand .brand-name, .auth-brand .brand-sub { color: #FAF9F5; }
.auth-brand .brand-sub { color: #A8A49A; }
.auth-headline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 44px; line-height: 1.15; color: #FAF9F5;
  margin-bottom: 16px; font-weight: 500;
  letter-spacing: -0.025em;
}
.auth-headline em { color: var(--amber); }
.auth-tag { font-size: 15px; color: #A8A49A; margin-bottom: 28px; line-height: 1.6; }
.auth-points { list-style: none; padding: 0; margin: 0 0 36px; }
.auth-points li {
  padding: 10px 0 10px 26px; position: relative;
  font-size: 13px; color: #C7C4B9;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.auth-points li::before {
  content: '\2713'; position: absolute; left: 0;
  color: var(--amber); font-weight: 500;
}
.auth-stats { display: flex; gap: 32px; }
.auth-stat-num { font-family: 'Source Serif 4', Georgia, serif; font-size: 28px; color: #FAF9F5; font-weight: 500; letter-spacing: -0.02em; }
.auth-stat-lbl { font-size: 11px; color: #8E8B81; letter-spacing: 0; margin-top: 2px; }
.auth-credit {
  position: absolute; bottom: 24px; left: 56px;
  font-size: 11px; color: #76736B; letter-spacing: 0;
  z-index: 1;
}
.auth-credit b { color: #A8A49A; font-weight: 500; }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--paper); border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
}
.auth-tabs {
  display: flex; gap: 2px;
  background: var(--cream-2); padding: 3px;
  border-radius: 8px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; background: transparent;
  border: none; padding: 7px; font-size: 12px;
  border-radius: 6px; cursor: pointer; font-family: inherit;
  font-weight: 500; color: var(--muted);
  transition: all 0.12s;
}
.auth-tab:hover { color: var(--walnut); }
.auth-tab.active { background: var(--paper); color: var(--walnut); }
.auth-pane { display: none; }
.auth-pane.active { display: block; animation: fadeIn 0.2s ease; }
.auth-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 24px; margin-bottom: 4px; font-weight: 500; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); margin-bottom: 22px; font-size: 13px; }
.auth-error {
  display: none;
  background: var(--danger-bg); border: 1px solid #f4c4bf;
  color: var(--danger); padding: 10px 14px;
  border-radius: 8px; font-size: 12px; margin-bottom: 16px;
}
.auth-error.show { display: block; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--walnut); cursor: pointer; }
.check input { accent-color: var(--amber); }
.link { color: var(--amber-2); cursor: pointer; font-weight: 600; }
.link:hover { text-decoration: underline; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 12px; }

.demo-accounts { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.demo-title {
  font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px; font-weight: 500;
}
.demo-row {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-family: inherit;
  margin-bottom: 6px; text-align: left;
  transition: all 0.12s;
}
.demo-row:hover { background: var(--paper); border-color: var(--border-2); }
.demo-name { font-size: 13px; font-weight: 500; color: var(--walnut); display: flex; align-items: center; gap: 8px; }
.demo-meta { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: 'JetBrains Mono', monospace; }

/* ================================================================
   SWITCH (toggle)
   ================================================================ */
.switch {
  position: relative;
  width: 36px; height: 20px;
  background: var(--border); border-radius: 10px;
  cursor: pointer; flex-shrink: 0;
}
.switch.on { background: var(--amber); }
.switch::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff; border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.switch.on::after { left: 18px; }

/* ================================================================
   RULE BUILDER (assignment rules)
   ================================================================ */
.rule-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.rule-head {
  padding: 14px 18px;
  background: var(--cream-2);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.rule-priority {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--walnut); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700; font-size: 13px;
}
.rule-priority.fallback { background: var(--amber); color: var(--walnut); }
.rule-body { padding: 16px 18px; }
.cond-row {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--cream-2); border-radius: 8px;
  font-size: 12px; color: var(--walnut);
}
.cond-conn { font-size: 10px; font-weight: 700; color: var(--muted); padding: 0 4px; letter-spacing: 0.5px; }
.then-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 12px 14px;
  background: linear-gradient(180deg, #fffaf0, var(--cream-2));
  border-radius: 8px; border-left: 3px solid var(--amber);
}
.then-label { font-size: 11px; font-weight: 700; color: var(--amber-2); letter-spacing: 0.5px; }

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
.notif-row {
  display: flex; gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.notif-row:hover { background: var(--cream-3); }
.notif-row.unread { background: #fff8ec; }
.notif-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
.notif-icon.amber { background: var(--amber-soft); color: var(--amber-2); }
.notif-icon.moss { background: #e6f0d8; color: var(--moss-2); }
.notif-icon.walnut { background: var(--cream-2); color: var(--walnut); }
.notif-icon.danger { background: var(--danger-bg); color: var(--danger); }
.notif-body { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--walnut); }
.notif-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--muted); white-space: nowrap; align-self: center; }

/* ================================================================
   INTEGRATION CARD (settings)
   ================================================================ */
.integration {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: border-color 0.12s;
}
.integration:hover { border-color: var(--border-2); }
.integration-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 500; font-size: 14px;
  flex-shrink: 0;
  font-family: 'Source Serif 4', Georgia, serif;
}
.integration-info { flex: 1; }
.integration-name {
  font-size: 13px; font-weight: 500; color: var(--walnut);
  display: flex; align-items: center; gap: 8px;
}
.integration-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.integration-meta { font-size: 11px; color: var(--muted); margin-right: 12px; text-align: right; }
.connected-badge {
  background: rgba(107,142,61,0.12); color: var(--moss-2);
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase;
}

/* ================================================================
   SLIDERS (settings — scoring weights)
   ================================================================ */
.slider-track {
  position: relative; height: 6px;
  background: var(--cream-2); border-radius: 3px;
}
.slider-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  border-radius: 3px;
}
.slider-thumb {
  position: absolute; top: -5px;
  width: 16px; height: 16px;
  background: #fff;
  border: 2px solid var(--amber);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transform: translateX(-50%);
}

/* ================================================================
   TOAST
   ================================================================ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--walnut); color: #fff;
  padding: 12px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0; transform: translateY(20px);
  transition: all 0.25s; z-index: 2000;
  pointer-events: none;
  border-left: 4px solid var(--amber);
}
.toast.show { opacity: 1; transform: none; }

/* ================================================================
   KANBAN PIPELINE
   ================================================================ */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  overflow-x: auto;
}
.kanban-col {
  background: var(--cream-2);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 500px;
  display: flex; flex-direction: column;
}
.kanban-col-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding: 4px 4px 10px;
  border-bottom: 1px solid var(--border);
}
.kanban-col-head .stage-name {
  font-weight: 500; color: var(--walnut); font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.kanban-col-head .stage-dot { width: 8px; height: 8px; border-radius: 50%; }
.kanban-col-head .count {
  background: var(--paper); padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--border);
}
.kanban-card {
  background: var(--paper);
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  cursor: grab;
  transition: all 0.12s;
}
.kanban-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.kanban-card-head {
  display: flex; justify-content: space-between; align-items: start;
  gap: 8px; margin-bottom: 6px;
}
.kanban-card-name { font-weight: 500; color: var(--walnut); font-size: 13px; letter-spacing: -0.005em; }
.kanban-card-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.kanban-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}
.kanban-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.kanban-card-value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px; font-weight: 500; color: var(--walnut);
  letter-spacing: -0.01em;
}

/* ================================================================
   INCOMING CALL MODAL
   ================================================================ */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(59, 42, 31, 0.55);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-backdrop.show { display: flex; animation: fadeIn 0.2s ease; }
.incoming-call-modal {
  background: linear-gradient(165deg, var(--walnut) 0%, var(--walnut-2) 70%, #1a120c 100%);
  color: #f1e6d6;
  border-radius: var(--radius);
  width: 100%; max-width: 380px;
  padding: 36px 28px;
  text-align: center;
  position: relative; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}
.incoming-call-modal::before {
  content: ''; position: absolute;
  top: -80px; right: -80px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,102,51,0.4), transparent 70%);
  border-radius: 50%;
}
.incoming-call-modal > * { position: relative; z-index: 1; }
.ringing-pulse {
  width: 100px; height: 100px;
  margin: 0 auto 20px;
  background: var(--amber);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: #fff;
  animation: ringPulse 1.2s infinite;
  font-family: 'Source Serif 4', Georgia, serif;
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,102,51,0.6); }
  50% { box-shadow: 0 0 0 20px rgba(255,102,51,0); }
}
.incoming-eyebrow {
  font-size: 11px; letter-spacing: 2px;
  color: var(--amber); font-weight: 700;
  margin-bottom: 14px; text-transform: uppercase;
}
.incoming-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px; color: #fff; font-weight: 700;
  margin-bottom: 4px;
}
.incoming-phone { font-size: 13px; color: #d8c9b3; margin-bottom: 18px; }
.incoming-context {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px; margin-bottom: 24px;
  text-align: left;
  font-size: 12px;
}
.incoming-context b { color: #fff; }
.incoming-actions { display: flex; gap: 14px; justify-content: center; }
.incoming-actions .phone-btn { width: 60px; height: 60px; }
.incoming-actions .phone-btn.accept { background: var(--moss); }
.incoming-actions .phone-btn.accept:hover { background: var(--moss-2); }

/* ================================================================
   UTILITIES
   ================================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.font-serif { font-family: 'Source Serif 4', Georgia, serif; }
.amber { color: var(--amber-2); }
.moss { color: var(--moss); }
.walnut { color: var(--walnut); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .app { grid-template-columns: 72px 1fr; }
  .brand-name, .brand-sub, .nav-item span:not(.nav-ico),
  .user-card-info, .credit { display: none; }
  .sidebar { padding: 18px 10px; }
  .nav-item { justify-content: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .three-col, .sales-activity { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero-title { font-size: 28px; }
  .two-col, .two-col-rev { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { padding: 32px; }
  .auth-headline { font-size: 30px; }
  .search input { width: 180px; }
}

/* ============================================================
   V3 Platform Overview — 3-pillar architecture landing
   ============================================================ */
.platform-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: linear-gradient(120deg, var(--walnut) 0%, #2c2a25 100%);
  border-radius: 16px; padding: 32px 36px; flex-wrap: wrap;
}
.platform-banner .hero-title { font-size: 34px; }
.platform-banner-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 320px; justify-content: flex-end; }
.pbt {
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px; border-radius: 999px;
}
.pillar-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.pillar-card {
  background: var(--paper); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column;
}
.pillar-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pillar-num {
  width: 34px; height: 34px; border-radius: 9px; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.pillar-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pillar-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 9px; font-size: 13.5px; color: var(--walnut);
  cursor: pointer; transition: background .15s ease; font-weight: 500;
}
.pillar-link:hover { background: var(--cream-2); }
.pillar-foot {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.ie-layer { display: flex; flex-wrap: wrap; gap: 10px; }
.ie-chip {
  font-size: 13px; font-weight: 600; color: var(--walnut);
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.ext-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ext-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  text-align: left; color: var(--walnut);
}
.ext-ico { font-size: 22px; margin-bottom: 8px; }
.outcome-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.outcome {
  border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center;
  background: var(--cream-2);
}
@media (max-width: 1100px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .ext-grid { grid-template-columns: repeat(2, 1fr); }
  .outcome-grid { grid-template-columns: repeat(3, 1fr); }
}
