:root {
  --bg-page: #f6f8fc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Category Colors */
  --cat-urgent-bg: #fef2f2;
  --cat-urgent-text: #e11d48;
  --cat-urgent-border: #fecaca;

  --cat-touch-bg: #fffbeb;
  --cat-touch-text: #d97706;
  --cat-touch-border: #fde68a;

  --cat-upsell-bg: #ecfdf5;
  --cat-upsell-text: #059669;
  --cat-upsell-border: #a7f3d0;

  /* Theme Accents */
  --primary-navy: #0f172a;
  --accent-pink: #ec4899;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-blue: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12);
  --shadow-pink: 0 4px 14px rgba(236, 72, 153, 0.25);
  --shadow-emerald: 0 4px 14px rgba(16, 185, 129, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  padding: 16px 24px;
  background-image: 
    radial-gradient(at 0% 0%, rgba(236, 72, 153, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
}

.app-layout {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   1. TOP NAVIGATION HEADER (DAILY FOCUS TRACKER BAR)
   ========================================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 14px 24px;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  gap: 20px;
}

.top-nav::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.pulse-dot-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-pink);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-pink);
}

.pulse-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-pink);
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  opacity: 0.75;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}

/* Daily Progress Header Visual */
.daily-progress-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  min-width: 320px;
  z-index: 1;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lbl-progress {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.txt-progress-count {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
}

.progress-bar-visual {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  display: flex;
  gap: 4px;
  flex: 1;
}

.p-block {
  flex: 1;
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.p-block.filled {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.progress-percent {
  font-size: 12px;
  font-weight: 800;
  color: #34d399;
  min-width: 36px;
  text-align: right;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-switch-staff {
  background: linear-gradient(135deg, var(--accent-pink) 0%, #db2777 100%);
  border: none;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-pink);
  transition: all 0.2s;
}

.btn-switch-staff:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.35);
}

/* ==========================================================================
   2. FOCUS ALLOCATION BAR (3 KHẨN CẤP / 4 ĐỊNH KỲ / 3 UP-SELL)
   ========================================================================== */
.focus-allocation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.alloc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.alloc-urgent {
  background: var(--cat-urgent-bg);
  border: 1px solid var(--cat-urgent-border);
  color: var(--cat-urgent-text);
}

.alloc-touch {
  background: var(--cat-touch-bg);
  border: 1px solid var(--cat-touch-border);
  color: var(--cat-touch-text);
}

.alloc-upsell {
  background: var(--cat-upsell-bg);
  border: 1px solid var(--cat-upsell-border);
  color: var(--cat-upsell-text);
}

.alloc-badge {
  font-weight: 800;
  font-size: 12px;
}

.alloc-desc {
  font-size: 11.5px;
  opacity: 0.85;
}

.alloc-cycle-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: auto;
}

.btn-next-day {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-next-day:hover {
  background: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

/* ==========================================================================
   3. MAIN WORKSPACE CONTAINER (2-COLUMN CARD UI)
   ========================================================================== */
.daily-workspace-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .daily-workspace-container {
    grid-template-columns: 1fr;
  }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 12px;
}

.panel-header h2 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: 0.3px;
}

.badge-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: var(--surface-green-soft);
  border: 1px solid var(--border-green);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* CỘT TRÁI - DANH SÁCH 10 KHÁCH */
.workspace-left-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.focus-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.focus-card-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.focus-card-item:hover {
  border-color: var(--accent-pink);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}

.focus-card-item.active {
  border-color: var(--accent-pink);
  background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2), var(--shadow-sm);
}

.focus-card-item.is-done {
  background: #f8fafc;
  opacity: 0.75;
}

.focus-card-item.is-done::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent-emerald);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.card-num-col {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.focus-card-item.active .card-num-col {
  color: var(--accent-pink);
}

.card-main-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.card-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-cust-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.category-tag.cat-urgent {
  background: var(--cat-urgent-bg);
  color: var(--cat-urgent-text);
  border: 1px solid var(--cat-urgent-border);
}

.category-tag.cat-touch {
  background: var(--cat-touch-bg);
  color: var(--cat-touch-text);
  border: 1px solid var(--cat-touch-border);
}

.category-tag.cat-upsell {
  background: var(--cat-upsell-bg);
  color: var(--cat-upsell-text);
  border: 1px solid var(--cat-upsell-border);
}

.card-mid-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.card-domain {
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
}

.card-reason-short {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-light);
}

/* Card Status Badges */
.card-status-col {
  display: flex;
  justify-content: flex-end;
}

.badge-status {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.st-pending {
  background: #f1f5f9;
  color: #64748b;
}

.st-sent {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.st-scheduled {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.st-closed {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}


/* CỘT PHẢI - THAO TÁC 1 CHẠM WORKSPACE */
.workspace-right-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-indicator {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.st-pending-bg { background: #f1f5f9; color: #475569; }
.st-sent-bg { background: #e0f2fe; color: #0369a1; }
.st-sched-bg { background: #fef3c7; color: #b45309; }
.st-closed-bg { background: #d1fae5; color: #047857; }

/* Customer Active Header */
.active-customer-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.ac-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.ac-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ac-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-name-row h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.ac-cid {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
}

.ac-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ac-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
}

.ac-link:hover { text-decoration: underline; }
.ac-link.phone-link { color: #059669; }

/* 💡 Reason Card Box */
.reason-card-box {
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
  border: 1px solid var(--border-amber);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reason-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reason-icon { font-size: 16px; }

.reason-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #92400e;
  letter-spacing: 0.5px;
}

.category-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-left: auto;
}

.cat-pill-urgent { background: var(--cat-urgent-bg); color: var(--cat-urgent-text); border: 1px solid var(--cat-urgent-border); }
.cat-pill-touchpoint { background: var(--cat-touch-bg); color: var(--cat-touch-text); border: 1px solid var(--cat-touch-border); }
.cat-pill-upsell { background: var(--cat-upsell-bg); color: var(--cat-upsell-text); border: 1px solid var(--cat-upsell-border); }

.reason-card-content {
  font-size: 13.5px;
  font-weight: 700;
  color: #78350f;
  line-height: 1.4;
}

.deal-suggestion-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border-amber);
  font-size: 12.5px;
  color: #451a03;
}

.deal-price-tag {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.1);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* 💬 Script Box & Copy Zalo */
.script-card-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.script-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
}

.strategy-switcher-mini {
  display: flex;
  gap: 3px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-sm);
}

.strategy-switcher-mini .strat-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.strategy-switcher-mini .strat-btn.active {
  background: var(--primary-navy);
  color: #ffffff;
}

.script-text-editor {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100px;
  outline: none;
  transition: border 0.2s;
}

.script-text-editor:focus {
  border-color: var(--accent-pink);
  background: #ffffff;
}

.copy-zalo-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-copy-zalo {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-copy-zalo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.copy-hint {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}

/* ⚡ Quick Status Buttons Grid */
.quick-status-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.status-sec-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.status-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 10px;
}

.btn-status {
  border: none;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-status:hover {
  transform: translateY(-2px);
}

.btn-sent {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.btn-sent:hover {
  background: #0284c7;
  color: #ffffff;
}

.btn-schedule {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.btn-schedule:hover {
  background: #d97706;
  color: #ffffff;
}

.btn-closed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: var(--shadow-emerald);
}
.btn-closed:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}


/* ==========================================================================
   4. MODALS & GATE OVERLAY
   ========================================================================== */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.gate-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.gate-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 520px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gate-logo {
  font-size: 24px;
}

.gate-brand h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-navy);
}

.gate-brand span {
  font-size: 12px;
  color: var(--text-muted);
}

.gate-step-head h4 {
  font-size: 15px;
  font-weight: 700;
}

.gate-step-head p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.staff-card-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.staff-select-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.staff-select-card:hover {
  border-color: var(--accent-pink);
}

.staff-select-card.active {
  border-color: var(--accent-pink);
  background: var(--surface-pink-soft);
}

.staff-select-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.staff-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.staff-name { font-size: 13.5px; font-weight: 700; }
.staff-role { font-size: 11px; color: var(--text-muted); }
.staff-kpi-preview { font-size: 11.5px; font-weight: 700; color: var(--accent-pink); }
.badge-select { font-size: 14px; font-weight: 800; color: var(--accent-pink); }

.simple-kpi-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simple-kpi-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.txt-urgent { color: var(--accent-rose); }

.progress-bar-bg {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899 0%, #3b82f6 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.btn-gate-enter {
  width: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.btn-gate-enter:hover {
  background: var(--accent-pink);
  box-shadow: var(--shadow-pink);
}

/* Leaderboard Modal */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-backdrop.active { opacity: 1; pointer-events: auto; }

.leaderboard-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.95);
  width: 780px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.modal-head h3 { font-size: 16px; font-weight: 800; }
.btn-close { background: #f1f5f9; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-weight: 700; }

.leaderboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.ranking-item.highlight-user {
  background: var(--surface-pink-soft);
  border: 1px solid var(--border-pink);
  font-weight: 700;
}

.rank-badge { font-weight: 800; min-width: 60px; }
.rank-info { display: flex; flex-direction: column; flex: 1; }
.rank-name { font-weight: 700; }
.rank-role { font-size: 10.5px; color: var(--text-muted); }
.rank-rev { font-weight: 800; color: var(--accent-pink); }

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}
