/* ============================================
   Marsirius × KKTCELL — Voice Intelligence
   Liquid glass on Marsirius navy ambient
   Lifestats-mirror layout · Apple minimal UX
   ============================================ */

:root {
  /* atmosphere */
  --navy-1: #0C1024;
  --navy-2: #0A0D1F;
  --navy-3: #060818;

  /* signature accents */
  --violet:  #8B5CF6;
  --violet-2:#A78BFA;
  --indigo:  #6366F1;
  --cyan:    #22D3EE;
  --magenta: #E879F9;
  --gold:    #FFD200;

  --kktc-yellow: #FFD200;
  --kktc-red:    #FF4747;
  --kktc-blue:   #4D8FFF;

  /* semantic */
  --green:  #34D399;
  --green-2:#10F296;
  --amber:  #FBBF24;
  --red:    #FB7185;

  /* glass */
  --glass:        rgba(255, 255, 255, 0.06);
  --glass-2:      rgba(255, 255, 255, 0.10);
  --glass-3:      rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-2: rgba(255, 255, 255, 0.26);
  --glass-shadow-line: 0 1px 0 rgba(255,255,255,0.18) inset;

  /* text */
  --ink:      #FFFFFF;
  --ink-2:    #F5F6FB;
  --ink-soft: #E2E3EE;
  --muted:    #B8BACC;
  --muted-2:  #8E90A6;
  --muted-3:  #6A6C82;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;

  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--navy-3);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; color: inherit; background: none; border: none; padding: 0; }
input { font-family: inherit; font-size: inherit; color: inherit; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* ============================================
   AMBIENT BACKGROUND — Marsirius atmosphere
   ============================================ */
.ambient {
  position: fixed;
  inset: 0;
  background-image: url("assets/bg-glass.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  overflow: hidden;
}
.ambient::before {
  /* puslu / mist blur over the image */
  content: "";
  position: absolute;
  inset: -10%;
  backdrop-filter: blur(40px) saturate(1.15);
  -webkit-backdrop-filter: blur(40px) saturate(1.15);
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(50% 50% at 80% 70%, rgba(255, 215, 180, 0.10), transparent 60%);
  pointer-events: none;
  animation: aurora 32s ease-in-out infinite alternate;
}
.ambient::after {
  /* soft vignette + slight desaturation tint so glass overlay reads */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 0%, rgba(30, 40, 60, 0.10) 60%, rgba(20, 30, 50, 0.22) 100%),
    /* fine noise for texture */
    repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 3px);
  pointer-events: none;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.03); }
}

/* twinkling Marsirius sparks */
.spark {
  position: fixed;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  opacity: 0.7;
  z-index: 1;
  pointer-events: none;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 0.9; transform: scale(1.1); }
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 32px 48px 104px;
}
@media (max-width: 800px) { .app { padding: 16px 16px 80px; } }

/* ============================================
   FLOATING LEFT NAV RAIL
   ============================================ */
.rail {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 999px;
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.36) inset,
    0 20px 60px -10px rgba(30, 40, 70, 0.40),
    0 0 0 1px rgba(255,255,255,0.06);
  z-index: 30;
}
.rail::before {
  content: "";
  position: absolute;
  top: 6px; bottom: 6px;
  left: 0; right: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.10) 50%, transparent);
  pointer-events: none;
  border-radius: 999px;
}
.rail-item {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.65);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  position: relative;
}
.rail-item:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}
.rail-item.is-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(99, 102, 241, 0.45));
  color: #fff;
  border-color: rgba(255,255,255,0.40);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.40) inset,
    0 6px 16px rgba(139, 92, 246, 0.40),
    0 0 0 1px rgba(139, 92, 246, 0.30);
}
.rail-item .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.30), 0 0 6px var(--amber);
}
.rail-item .badge-count {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid rgba(255,255,255,0.50);
}
.rail-sep {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 4px 8px;
}

/* rail brand mark + partner */
.rail-brand,
.rail-partner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.30) inset,
    0 6px 14px rgba(6, 8, 24, 0.30);
}
.rail-brand {
  /* Marsirius black mark → invert to white, fill circle on dark backing */
  background: linear-gradient(135deg, #1B1F36, #0E1126);
  border: 1px solid rgba(255,255,255,0.22);
}
.rail-brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 6px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.rail-partner {
  /* Turkcell yellow circle — fill edge-to-edge */
  background: #FFD200;
  border: 1px solid rgba(0,0,0,0.10);
}
.rail-partner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* tooltip showing label */
.rail-item .rail-tip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: rgba(20, 30, 50, 0.92);
  color: #fff;
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.10);
  font-weight: 500;
}
.rail-item:hover .rail-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
.rail-item .rail-tip::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: inherit;
  border-left: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

@media (max-width: 800px) {
  .rail {
    left: 50%;
    top: auto;
    bottom: 16px;
    transform: translateX(-50%) translateY(0);
    flex-direction: row;
    border-radius: 999px;
  }
  .rail-sep { width: 1px; height: auto; margin: 8px 4px; }
  .rail-item .rail-tip { display: none; }
}

/* ============================================
   APP SHELL — big frosted glass panel
   ============================================ */
.shell {
  width: 100%;
  max-width: 1280px;
  background:
    linear-gradient(180deg, rgba(18, 22, 40, 0.62), rgba(14, 18, 36, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-2xl);
  backdrop-filter: blur(48px) saturate(170%);
  -webkit-backdrop-filter: blur(48px) saturate(170%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.30) inset,
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 50px 100px -20px rgba(8, 12, 30, 0.55),
    0 30px 60px -30px rgba(8, 12, 30, 0.45),
    0 0 0 1px rgba(255,255,255,0.04);
  padding: 30px 32px 28px;
  position: relative;
  overflow: hidden;
}
.shell::before {
  content: "";
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
  pointer-events: none;
}
.shell::after {
  /* soft inner glow */
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.20), transparent 70%);
  pointer-events: none;
}
@media (max-width: 800px) { .shell { padding: 18px; } }

/* ============================================
   HEADER
   ============================================ */
.shell-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.shell-head-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.shell-head-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.shell-head-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 900px) {
  .shell-head { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .shell-head-center { grid-column: 1 / -1; order: 3; }
}

/* Saved by Zero — Ray Larabie (futuristic display) */
@font-face {
  font-family: "Saved By Zero V3";
  src:
    url("https://db.onlinewebfonts.com/t/110cb68ded11d5796f549465454710bb.woff2") format("woff2"),
    url("https://db.onlinewebfonts.com/t/110cb68ded11d5796f549465454710bb.woff") format("woff"),
    url("https://db.onlinewebfonts.com/t/110cb68ded11d5796f549465454710bb.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* page eyebrow at center — futuristic display font */
.page-eyebrow {
  font-family: "Saved By Zero V3", "Orbitron", "SF Pro Display", -apple-system, sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(90deg, #C4B5FD 0%, #67E8F9 50%, #F0ABFC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.40);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.30));
  opacity: 0.98;
}
.shell-brand { display: flex; align-items: center; gap: 18px; }

/* Direct logo placement — no white card backing */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo-mars {
  margin: -22px -16px -22px -14px; /* counter the heavy transparent padding inside the PNG */
  display: block;
}
.brand-logo-mars img {
  /* original black-on-transparent logo → white for dark glass */
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,0.40));
  opacity: 0.98;
}
.brand-logo-kktc {
  margin: -10px -12px;
}
.brand-logo-kktc img {
  /* keep original yellow + blue colors */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.shell-brand-text { display: flex; flex-direction: column; gap: 8px; }

.shell-brand-eyebrow {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0,0,0,0.30);
  opacity: 0.92;
}

.partner-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.partner-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 700;
  opacity: 0.75;
}

.shell-brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05));
  border: 1px solid var(--glass-border-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.shell-brand-mark img {
  width: 24px;
  height: 24px;
  filter: invert(1) brightness(2.4);
}
.shell-brand-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0,0,0,0.30);
}
.shell-brand-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.shell-brand-sub .mono { font-size: 11.5px; color: var(--ink); opacity: 0.85; }

.shell-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.icon-btn:hover { color: var(--ink); background: var(--glass-2); border-color: var(--glass-border-2); transform: translateY(-1px); }
.icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--navy-1), 0 0 8px var(--green);
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  border: 1px solid var(--glass-border-2);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.30);
}

.shell-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 9px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52,211,153,0.20), 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
.status-dot.is-off { background: var(--muted-2); box-shadow: none; animation: none; }
.status-dot.is-err { background: var(--red); box-shadow: 0 0 0 3px rgba(251,113,133,0.25); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.40), 0 0 8px var(--green); }
  50%      { box-shadow: 0 0 0 5px rgba(52,211,153,0), 0 0 8px var(--green); }
}

/* ============================================
   PILLS
   ============================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.no-dot::before { display: none; }
.pill.is-green  { background: rgba(52,211,153,0.15); color: var(--green); border-color: rgba(52,211,153,0.35); }
.pill.is-amber  { background: rgba(251,191,36,0.15); color: var(--amber); border-color: rgba(251,191,36,0.35); }
.pill.is-red    { background: rgba(251,113,133,0.15); color: var(--red); border-color: rgba(251,113,133,0.35); }
.pill.is-slate  { background: var(--glass); color: var(--ink-soft); border-color: var(--glass-border); }
.pill.is-violet { background: rgba(139,92,246,0.18); color: var(--violet-2); border-color: rgba(139,92,246,0.40); }
.pill.is-cyan   { background: rgba(34,211,238,0.15); color: var(--cyan); border-color: rgba(34,211,238,0.35); }
.pill.is-yellow { background: rgba(255,210,0,0.16); color: var(--gold); border-color: rgba(255,210,0,0.40); }

/* ============================================
   GLASS CARD
   ============================================ */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    linear-gradient(180deg, rgba(14, 18, 36, 0.42), rgba(10, 14, 30, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    inset 0 0 0 1px rgba(255,255,255,0.04),
    0 10px 30px rgba(6, 8, 24, 0.30);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
}

.card-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}
.card-h-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.20);
}
.card-h-tools { display: inline-flex; align-items: center; gap: 6px; }

.dropdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.dropdown-pill:hover { background: var(--glass-2); color: var(--ink); }
.dropdown-pill svg { color: var(--muted); transition: transform 0.18s; }
.dropdown-pill:hover svg { transform: translateY(1px); }

/* ============================================
   GRID
   ============================================ */
.grid-top {
  display: grid;
  grid-template-columns: 1.45fr 0.82fr 1.10fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 1100px) { .grid-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px)  { .grid-top { grid-template-columns: 1fr; } }

.grid-mid {
  display: grid;
  grid-template-columns: 1.45fr 1.40fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 900px) { .grid-mid { grid-template-columns: 1fr; } }

/* ============================================
   ACTIVITY CARD — vertical bars
   ============================================ */
.act-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  height: 130px;
  margin-top: 6px;
  padding: 0 2px;
}
.act-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  cursor: default;
}
.act-bar-val {
  font-size: 10.5px;
  color: var(--ink-soft);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  transition: color 0.15s;
  font-weight: 600;
  opacity: 0.85;
}
.act-bar-track {
  flex: 1;
  width: 100%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.act-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.18));
  border-radius: 12px;
  transition: height 0.6s cubic-bezier(0.32, 0.72, 0, 1), background 0.18s;
  position: relative;
  min-height: 6px;
  box-shadow: 0 -1px 0 rgba(255,255,255,0.2) inset;
}
.act-bar.is-peak .act-bar-fill {
  background: linear-gradient(180deg, var(--violet-2), var(--violet));
  box-shadow: 0 -1px 0 rgba(255,255,255,0.30) inset, 0 0 18px rgba(139,92,246,0.35);
}
.act-bar:hover .act-bar-fill { background: linear-gradient(180deg, var(--cyan), var(--violet)); box-shadow: 0 -1px 0 rgba(255,255,255,0.30) inset, 0 0 18px rgba(34,211,238,0.30); }
.act-bar:hover .act-bar-val { color: var(--ink); }
.act-bar-label {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 600;
  opacity: 0.85;
}

/* ============================================
   MINI STAT CARDS
   ============================================ */
.mini-col { display: flex; flex-direction: column; gap: 10px; }
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    linear-gradient(180deg, rgba(14, 18, 36, 0.42), rgba(10, 14, 30, 0.36));
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--r-md);
  padding: 14px 16px;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  flex: 1;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 8px 20px rgba(6, 8, 24, 0.25);
}
.mini-card::before {
  content: "";
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
.mini-card-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
}
.mini-card-icon.is-pink   { background: linear-gradient(135deg, rgba(232,121,249,0.30), rgba(232,121,249,0.10)); color: #F0ABFC; border-color: rgba(232,121,249,0.40); }
.mini-card-icon.is-cyan   { background: linear-gradient(135deg, rgba(34,211,238,0.30), rgba(34,211,238,0.10)); color: #67E8F9; border-color: rgba(34,211,238,0.40); }
.mini-card-icon.is-violet { background: linear-gradient(135deg, rgba(139,92,246,0.30), rgba(139,92,246,0.10)); color: var(--violet-2); border-color: rgba(139,92,246,0.40); }
.mini-card-icon.is-amber  { background: linear-gradient(135deg, rgba(251,191,36,0.30), rgba(251,191,36,0.10)); color: var(--amber); border-color: rgba(251,191,36,0.40); }
.mini-card-icon.is-green  { background: linear-gradient(135deg, rgba(52,211,153,0.30), rgba(52,211,153,0.10)); color: var(--green); border-color: rgba(52,211,153,0.40); }

.mini-card-val {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.mini-card-val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.mini-card-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================
   OVERVIEW DONUT
   ============================================ */
.donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}
.donut {
  width: 132px;
  height: 132px;
  position: relative;
  flex-shrink: 0;
}
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-track { stroke: rgba(255,255,255,0.10); fill: none; }
.donut-fill { fill: none; stroke-linecap: butt; transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-num {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0,0,0,0.30);
}
.donut-num small { font-size: 14px; color: var(--muted); margin-left: 2px; font-weight: 500; letter-spacing: 0; }
.donut-of { font-size: 10.5px; color: var(--muted); margin-top: 4px; letter-spacing: 0.04em; }

.donut-legend { display: flex; flex-direction: column; gap: 10px; }
.donut-leg-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.donut-leg-k { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.donut-leg-swatch { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.donut-leg-v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 13px; }
.donut-leg-d { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 500; }

/* ============================================
   CHALLENGES — feature progress list
   ============================================ */
.chal-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.chal-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 10px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.chal-row:last-child { border-bottom: none; }
.chal-ring {
  width: 32px; height: 32px;
  position: relative;
}
.chal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.chal-ring-track { stroke: rgba(255,255,255,0.10); fill: none; }
.chal-ring-fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.chal-ring-on .chal-ring-fill { stroke: var(--green); filter: drop-shadow(0 0 4px rgba(52,211,153,0.50)); }
.chal-ring-off .chal-ring-fill { stroke: var(--muted-2); }
.chal-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 700;
}
.chal-ring-on .chal-ring-center { color: var(--green); }

.chal-row-label { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.chal-row-id { font-size: 10.5px; color: var(--ink-soft); font-family: var(--font-mono); margin-top: 2px; opacity: 0.7; }
.chal-row-val { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 500; }
.chal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--glass-border);
}
.chal-foot-summary { display: flex; flex-direction: column; }
.chal-foot-num { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.chal-foot-num small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.chal-foot-label { font-size: 11px; color: var(--muted); }

/* ============================================
   RECENT CALLS STRIP — week-strip style
   ============================================ */
.week-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.week-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}
.week-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  position: relative;
}
.week-cell:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.20); }
.week-cell.is-active {
  background: linear-gradient(180deg, rgba(139,92,246,0.30), rgba(139,92,246,0.10));
  border-color: rgba(139,92,246,0.40);
  box-shadow: 0 6px 16px rgba(139,92,246,0.20);
}
.week-cell-day { font-size: 10px; color: var(--ink-soft); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; opacity: 0.85; }
.week-cell.is-active .week-cell-day { color: var(--violet-2); opacity: 1; }
.week-cell-num { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 4px; letter-spacing: -0.02em; text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.week-cell-kktc {
  position: absolute;
  top: 4px; right: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--kktc-yellow);
  box-shadow: 0 0 6px var(--kktc-yellow);
}

.nav-arrows { display: inline-flex; gap: 4px; }
.nav-arrow {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:hover { background: var(--glass-2); color: var(--ink); }

/* ============================================
   OUTPUT CARD (action)
   ============================================ */
.output-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    linear-gradient(180deg, rgba(14, 18, 36, 0.42), rgba(10, 14, 30, 0.36));
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--r-md);
  padding: 12px 14px;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 8px 20px rgba(6, 8, 24, 0.25);
}
.output-card::before {
  content: "";
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
.output-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.30), rgba(34,211,238,0.20));
  border: 1px solid rgba(139,92,246,0.40);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--violet-2);
  flex-shrink: 0;
}
.output-body { flex: 1; min-width: 0; }
.output-body-text {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.45;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}
.output-body-k {
  font-size: 10.5px;
  color: var(--violet-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 3px;
}

/* ============================================
   SPEAKER BALANCE BAR
   ============================================ */
.balance-bar {
  display: flex;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.20);
}
.balance-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: width 0.6s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  overflow: hidden;
}
.balance-seg.is-agent {
  background: linear-gradient(135deg, #FF6B6B, #B91C1C);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.20);
}
.balance-seg.is-customer {
  background: linear-gradient(135deg, #22D3EE, #0E9FB5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.20);
}
.balance-seg-pct {
  text-shadow: 0 1px 2px rgba(0,0,0,0.30);
  font-variant-numeric: tabular-nums;
}

.balance-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
}
.balance-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
}
.balance-leg b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}
.balance-leg-swatch {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.balance-leg-swatch.is-agent { background: linear-gradient(135deg, #FF6B6B, #B91C1C); box-shadow: 0 0 6px rgba(248,113,113,0.40); }
.balance-leg-swatch.is-customer { background: linear-gradient(135deg, #22D3EE, #0E9FB5); box-shadow: 0 0 6px rgba(34,211,238,0.40); }

.balance-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px dashed var(--glass-border);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ============================================
   AGENTS TABLE — F19
   ============================================ */
.agents-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agents-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 60px 70px 90px 110px minmax(160px, 1.6fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  transition: background 0.15s;
}
.agents-row.is-clickable { cursor: pointer; }
.agents-row.is-clickable:hover { background: var(--glass); }
.agents-row > div { overflow: hidden; text-overflow: ellipsis; }
.agents-row-h {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
  border-radius: 0;
}
.agents-row-h:hover { background: transparent; cursor: default; }
.agents-words { display: flex; flex-wrap: wrap; gap: 4px; }
.agents-word-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.30);
  color: #DDD6FE;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.agents-word-chip small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(221, 214, 254, 0.65);
}
.agents-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px dashed var(--glass-border);
  color: var(--muted);
}

@media (max-width: 900px) {
  .agents-row {
    grid-template-columns: 1fr 60px 70px;
    grid-template-rows: auto auto;
  }
  .agents-row > div:nth-child(4),
  .agents-row > div:nth-child(5),
  .agents-row > div:nth-child(6) {
    grid-column: 1 / -1;
  }
  .agents-row-h > div:nth-child(4),
  .agents-row-h > div:nth-child(5),
  .agents-row-h > div:nth-child(6) { display: none; }
}

/* ============================================
   F17 footnote in Sinyaller tab
   ============================================ */
.signal-footnote {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--glass-border);
  letter-spacing: 0.01em;
}
.signal-footnote .mono { color: var(--ink-soft); font-size: 10.5px; }

/* ============================================
   Upload busy hint (no fake steps)
   ============================================ */
.upload-hint {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  padding: 8px 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.30);
  border-radius: 10px;
}
.alert-banner {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.20), rgba(251, 113, 133, 0.05));
  border: 1px solid rgba(251, 113, 133, 0.40);
  box-shadow: 0 0 30px rgba(251, 113, 133, 0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-top: 14px;
}
.alert-banner-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 1px;
  animation: pulse-red 1.8s ease-in-out infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,113,133,0.40); }
  50%      { box-shadow: 0 0 0 8px rgba(251,113,133,0); }
}
.alert-banner-title { font-weight: 700; font-size: 13.5px; color: #FFE4E8; letter-spacing: -0.01em; }
.alert-banner-sub { font-size: 12px; margin-top: 4px; color: rgba(255, 228, 232, 0.8); display: flex; flex-wrap: wrap; gap: 4px; }
.alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(251, 113, 133, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.40);
  color: #FFC8D0;
  border-radius: 999px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.alert-chip-kw {
  font-family: var(--font);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 200, 208, 0.75);
  letter-spacing: 0;
  font-size: 11px;
}

/* ============================================
   AUDIO + TRANSCRIPT (bottom panel)
   ============================================ */
.detail {
  margin-top: 14px;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tab {
  background: none;
  border: none;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.tab:hover { color: var(--ink-soft); }
.tab.is-active {
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.10));
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.20) inset;
}
.tab-count {
  font-size: 10px;
  background: var(--violet);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.tab:not(.is-active) .tab-count { background: rgba(255,255,255,0.10); color: var(--ink-soft); }

/* audio card with waveform */
.audio-card {
  background: linear-gradient(135deg, rgba(11,11,20,0.65), rgba(20,20,36,0.55));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 12px;
}
.audio-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(36% 50% at 30% 30%, rgba(139, 92, 246, 0.35), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.audio-card > * { position: relative; z-index: 1; }
.audio-card-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.40);
}
.audio-card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.audio-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: rgba(255,255,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 700;
}
.audio-card-meta .live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.10);
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
}
.audio-card-meta .live-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}
.wave-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  border-radius: 99px;
  animation: wavebar 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.40);
}
@keyframes wavebar {
  0%, 100% { transform: scaleY(0.30); }
  50%      { transform: scaleY(1); }
}
.audio-card audio { width: 100%; height: 32px; filter: invert(0.92) hue-rotate(180deg); }

/* chat / transcript */
.chat { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; max-height: 360px; overflow-y: auto; }
.chat::-webkit-scrollbar { width: 6px; }
.chat::-webkit-scrollbar-track { background: transparent; }
.chat::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 3px; }
.empty { color: var(--muted); padding: 24px; text-align: center; font-size: 13px; }
.bubble {
  max-width: 76%;
  padding: 10px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.45;
  transition: all 0.15s;
  text-wrap: pretty;
  animation: fadeUp 0.32s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
.bubble.is-customer {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(10px);
}
.bubble.is-agent {
  background: linear-gradient(135deg, var(--kktc-red) 0%, #B30000 100%);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px rgba(255, 71, 71, 0.30);
}
.bubble:hover { transform: translateY(-1px); }
.bubble.is-active { box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35); }
.bubble.is-agent.is-active { box-shadow: 0 0 0 3px rgba(255, 71, 71, 0.45); }
.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 10.5px;
}
.bubble.is-customer .bubble-meta { color: var(--muted); }
.bubble.is-agent .bubble-meta { color: rgba(255,255,255,0.78); }
.bubble-role { font-weight: 700; letter-spacing: 0.02em; }
.bubble-time { font-family: var(--font-mono); }

/* METRICS / SIGNALS / CRM */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 800px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.metric-key {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 4px;
}
.metric-val {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.1;
}
.metric-val small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 4px; letter-spacing: 0; }

.signals { display: flex; flex-direction: column; gap: 10px; }
.signal {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.signal.is-neg { background: linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(255,255,255,0.04)); border-color: rgba(251, 113, 133, 0.30); }
.signal.is-pos { background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(255,255,255,0.04)); border-color: rgba(52, 211, 153, 0.30); }
.signal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.signal-label { font-weight: 600; font-size: 14px; color: var(--ink); }
.signal-evidence { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.signal-evidence li {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-left: 2px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  font-style: italic;
}
.signal.is-neg .signal-evidence li { border-left-color: var(--red); }
.signal.is-pos .signal-evidence li { border-left-color: var(--green); }
.signal-empty { color: var(--muted); font-size: 11.5px; font-style: italic; }

.crm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.crm-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.crm-json {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  background: rgba(0,0,0,0.40);
  color: #DCDCE7;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  overflow: auto;
  max-height: 360px;
  margin: 0;
}

/* LIVE upload */
.uploader { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.uploader-disabled {
  background: rgba(251,191,36,0.10);
  color: var(--amber);
  padding: 10px 12px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid rgba(251,191,36,0.30);
}
.drop {
  border: 1.5px dashed var(--glass-border-2);
  border-radius: var(--r-md);
  padding: 26px 16px;
  text-align: center;
  background: rgba(255,255,255,0.04);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.drop:hover { border-color: var(--violet); background: rgba(139, 92, 246, 0.10); color: var(--ink); }
.drop.is-drag { border-color: var(--violet); background: rgba(139, 92, 246, 0.15); border-style: solid; }
.drop.is-busy { opacity: 0.7; pointer-events: none; }
.drop-icon { color: var(--violet-2); margin-bottom: 8px; }
.drop-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.drop-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.drop-file-meta { margin-top: 8px; font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); }
.link { color: var(--cyan); cursor: pointer; padding: 0 0 0 8px; font-size: 12px; }
.link:hover { text-decoration: underline; }

.form-row { display: flex; gap: 8px; }
.form-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.form-row label span { color: var(--ink-soft); font-weight: 500; }
.form-row label em { color: var(--muted-2); font-style: normal; margin-left: 4px; font-size: 10px; }
.form-row input {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  font-size: 12.5px;
}
.form-row input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,92,246,0.20); }

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 20px rgba(139, 92, 246, 0.36);
  transition: transform 0.18s, box-shadow 0.18s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 12px 32px rgba(139, 92, 246, 0.50); }
.btn-primary:disabled { background: rgba(255,255,255,0.06); color: var(--muted-2); box-shadow: none; cursor: not-allowed; }
.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { color: var(--ink); background: rgba(255,255,255,0.10); }

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}
.step { display: flex; align-items: center; gap: 6px; flex: 1; opacity: 0.4; }
.step.is-active, .step.is-done { opacity: 1; }
.step-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}
.step.is-active .step-dot { border-color: var(--violet); color: var(--violet-2); }
.step.is-done .step-dot { background: var(--green); border-color: var(--green); color: #062018; }
.err {
  background: rgba(251, 113, 133, 0.10);
  color: #FFC8D0;
  border: 1px solid rgba(251, 113, 133, 0.30);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.20);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* loading / empty */
.center-loading, .center-error, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 100px 24px;
  min-height: 400px;
}
.center-loading-title { font-weight: 500; font-size: 18px; color: var(--ink); }
.center-loading-sub { color: var(--muted); font-size: 13px; }
.err-title { font-weight: 600; font-size: 18px; color: var(--red); }
.err-msg { color: var(--muted); font-size: 13px; max-width: 540px; }
.empty-mark img { animation: float 5s ease-in-out infinite; opacity: 0.85; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.empty-title { font-weight: 500; font-size: 20px; color: var(--ink); }
.empty-sub { color: var(--muted); font-size: 13px; max-width: 380px; }

/* ============================================
   ALL CALLS modal panel (slide-in)
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 24, 0.55);
  backdrop-filter: blur(8px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.modal-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-left: 1px solid var(--glass-border);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -40px 0 80px rgba(0,0,0,0.40);
}
.modal-panel.is-open { transform: translateX(0); }
.modal-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.modal-title { font-weight: 600; font-size: 18px; color: var(--ink); letter-spacing: -0.02em; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal-close {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-body { padding: 12px; overflow-y: auto; flex: 1; }

.call-list { display: flex; flex-direction: column; gap: 2px; }
.call-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  align-items: center;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  background: transparent;
  border: 1px solid transparent;
}
.call-item:hover { background: var(--glass); }
.call-item.is-active {
  background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(34,211,238,0.05));
  border-color: rgba(139,92,246,0.40);
}
.call-item-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 5px 0;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
}
.call-item.is-active .call-item-num { background: rgba(139,92,246,0.30); color: var(--violet-2); }
.call-item-title { font-size: 13px; color: var(--ink); font-weight: 500; }
.call-item-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }
.call-item-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--kktc-yellow);
  color: #3A2C00;
  padding: 3px 7px;
  border-radius: 5px;
}

/* sub-tabs in call-modal */
.modal-subtabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--glass-border);
}
.modal-subtab {
  background: none;
  border: none;
  padding: 7px 13px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.modal-subtab.is-active {
  background: rgba(255,255,255,0.10);
  color: var(--ink);
  font-weight: 600;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: #fff;
  border: none;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 14px 36px rgba(139,92,246,0.45);
  z-index: 40;
  letter-spacing: -0.01em;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 20px 44px rgba(139,92,246,0.60); }
.fab-count {
  background: var(--green-2);
  color: #062018;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fab-group { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 40; }

/* 24 feature matrix (slide-in panel) */
.matrix-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 24, 0.55);
  backdrop-filter: blur(8px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.matrix-overlay.is-open { opacity: 1; pointer-events: auto; }
.matrix-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 92vw;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-left: 1px solid var(--glass-border);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -40px 0 80px rgba(0,0,0,0.40);
}
.matrix-panel.is-open { transform: translateX(0); }
.matrix-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
}
.matrix-progress {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  overflow: hidden;
}
.matrix-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px var(--green);
}
.matrix-progress-num { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.feature-list { padding: 8px; overflow-y: auto; flex: 1; }
.feat {
  display: grid;
  grid-template-columns: 40px 1fr 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.feat:hover { background: var(--glass); }
.feat-id { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); font-weight: 700; }
.feat-label { color: var(--muted); }
.feat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--glass-border); }
.feat.is-on .feat-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.feat.is-on .feat-id { color: var(--ink-soft); }
.feat.is-on .feat-label { color: var(--ink); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .ambient::before, .ambient::after { animation: none; }
  .bubble, .status-dot, .alert-banner-icon, .fab, .feat.is-on .feat-dot, .empty-mark img, .wave-bar, .spark {
    animation: none !important;
  }
}
