﻿/* ═══════════════════════════════════════════════════════════════════════════
   D-DEY PMS — OVERRIDES & INLINE STYLE FIXES v4.0
   Phase 4: Remove rainbow profile cards, improve plan cards, fix inline styles
   This file overrides specific bad patterns without touching original JS
═══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════
   PROFILE PAGE — Remove rainbow card backgrounds
   Override inline styles with unified neutral surface
══════════════════════════════════════════════════════ */

/* ALL profile cards — unified neutral surface */
#btn-open-gst,
#btn-open-qr,
#btn-install-app,
#btn-open-subscription,
#btn-open-usage,
#btn-open-staff,
#btn-open-import,
#btn-open-settings,
#btn-open-about,
#btn-open-support {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
}

/* Override inline background colors on icons — unified teal */
#btn-open-gst .p-card-icon {
  background: rgba(13,148,136,0.10) !important;
  color: var(--primary) !important;
}

#btn-open-qr .p-card-icon {
  background: rgba(13,148,136,0.10) !important;
  color: var(--primary) !important;
}

#btn-install-app .p-card-icon {
  background: rgba(13,148,136,0.10) !important;
  color: var(--primary) !important;
}

#btn-open-subscription .p-card-icon {
  background: rgba(13,148,136,0.10) !important;
  color: var(--primary) !important;
}

#btn-open-usage .p-card-icon {
  background: rgba(245,158,11,0.10) !important;
  color: var(--warning) !important;
}

#btn-open-staff .p-card-icon {
  background: rgba(16,185,129,0.10) !important;
  color: var(--success) !important;
}

#btn-open-import .p-card-icon {
  background: rgba(14,165,233,0.10) !important;
  color: var(--brand-sky) !important;
}

#btn-open-settings .p-card-icon {
  background: rgba(13,148,136,0.10) !important;
  color: var(--primary) !important;
}

#btn-open-about .p-card-icon {
  background: rgba(148,163,184,0.12) !important;
  color: var(--text-secondary) !important;
}

#btn-open-support .p-card-icon {
  background: rgba(245,158,11,0.10) !important;
  color: var(--warning) !important;
}

/* Profile card h3 text — remove inline color overrides */
#btn-open-gst .p-card-text h3,
#btn-open-qr .p-card-text h3,
#btn-open-support .p-card-text h3 {
  color: var(--text-main) !important;
}

/* Arrow — consistent */
.profile-card .arrow {
  color: var(--text-light) !important;
  opacity: 0.35 !important;
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease !important;
}
.profile-card:hover .arrow {
  transform: translateX(3px) !important;
  opacity: 0.6 !important;
}

/* ══════════════════════════════════════════════════════
   HEADER — Remove inline styles
══════════════════════════════════════════════════════ */

/* Header company name — override inline color */
#header-company-name {
  color: var(--text-main) !important;
}

/* User name — override inline */
#user-name {
  font-size: 0.72rem !important;
  color: var(--text-secondary) !important;
}

/* header voice btn */
#header-voice-btn {
  color: var(--brand-sky) !important;
}

/* Notif badge */
#notif-badge {
  background: var(--danger) !important;
  border: 1.5px solid var(--surface) !important;
}

/* ══════════════════════════════════════════════════════
   ANALYTICS PAGE — Override inline styles
══════════════════════════════════════════════════════ */

/* Analytics heading — use DM Serif */
.analytics-scroll-container h2 {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
}

/* KPI cards — override inline styles for dark mode compat */
/* Revenue KPI card (the teal gradient one) - keep as is, it's good */
/* Bills KPI card - make border consistent */

/* Section labels in analytics */
.analytics-scroll-container > div > div[style*="text-transform:uppercase"] {
  font-family: 'DM Sans', sans-serif !important;
}

/* Analytics filter pills — override inline styles */
.an-filter-pill {
  background: var(--card-bg) !important;
  color: var(--text-secondary) !important;
  border: 1.5px solid var(--border) !important;
}

.an-filter-pill.active {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

/* Inline styled search field — override with system */
#analytics-search {
  font-family: 'DM Sans', sans-serif !important;
}

/* ══════════════════════════════════════════════════════
   BILLING PAGE — Inventory inline style fixes
══════════════════════════════════════════════════════ */

/* Stock filter emojis look out of place, add consistent styling */
#filter-expiry {
  color: var(--danger) !important;
}

#filter-low {
  color: var(--warning) !important;
}

/* Payment mode label */
#payment-mode + * label,
.summary-actions label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.75rem !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
}

/* Developer credit */
.developer-credit {
  grid-column: 1 / -1;
}

/* ══════════════════════════════════════════════════════
   ONBOARDING WIZARD — Plan cards upgrade
══════════════════════════════════════════════════════ */

/* Wizard overlay */
.wiz-overlay {
  background: var(--bg-gradient) !important;
}

/* Wizard step title */
.wiz-step-title {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
  color: var(--text-main) !important;
}

.wiz-step-subtitle {
  font-family: 'DM Sans', sans-serif !important;
  color: var(--text-secondary) !important;
}

/* Plan cards — upgrade design */
.wiz-plans {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.wiz-plan-card {
  flex: 1;
  background: var(--card-bg) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 16px 10px !important;
  cursor: pointer;
  transition: all var(--t-base) var(--ease-spring) !important;
  position: relative;
  text-align: center;
}

.wiz-plan-card:hover {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-primary) !important;
  transform: translateY(-2px);
}

.wiz-plan-card:active { transform: scale(0.97) !important; }

.wiz-plan-selected {
  border-color: var(--primary) !important;
  background: rgba(13,148,136,0.06) !important;
  box-shadow: var(--shadow-primary), 0 0 0 3px rgba(13,148,136,0.12) !important;
}

.wiz-plan-popular {
  border-color: rgba(13,148,136,0.35) !important;
}

.wiz-plan-name {
  font-family: 'DM Serif Display', serif !important;
  font-size: 1.1rem !important;
  font-weight: 400 !important;
  color: var(--text-main) !important;
  margin-bottom: 6px;
}

.wiz-plan-price {
  font-family: 'DM Serif Display', serif !important;
  font-size: 1.4rem !important;
  font-weight: 400 !important;
  color: var(--primary) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.1;
}

.wiz-plan-price small {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.65rem !important;
  color: var(--text-light) !important;
  font-weight: 400 !important;
}

.wiz-plan-badge {
  background: linear-gradient(135deg, var(--primary), var(--brand-sky)) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.07em !important;
}

.wiz-plan-features {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wiz-plan-features li {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.70rem !important;
  color: var(--text-secondary) !important;
  font-weight: 400 !important;
}

/* Wizard buttons */
.wiz-btn-primary {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md) !important;
  background: var(--primary) !important;
  box-shadow: var(--shadow-primary) !important;
  letter-spacing: 0.01em !important;
  transition: all var(--t-base) var(--ease-spring) !important;
}

.wiz-btn-primary:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px) !important;
}

.wiz-btn-secondary {
  font-family: 'DM Sans', sans-serif !important;
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-secondary) !important;
  transition: all var(--t-base) var(--ease-out) !important;
}

.wiz-btn-secondary:hover {
  background: var(--input-bg) !important;
  color: var(--text-main) !important;
}

/* Wizard inputs */
.wiz-input {
  font-family: 'DM Sans', sans-serif !important;
  color: var(--text-main) !important;
}

.wiz-label {
  font-family: 'DM Sans', sans-serif !important;
  color: var(--text-light) !important;
}

/* Wizard input group */
.wiz-input-group {
  border-radius: var(--radius-md) !important;
  background: var(--card-bg) !important;
  border: 1.5px solid var(--border) !important;
  transition: border-color var(--t-base) !important;
}

.wiz-input-group:focus-within {
  border-color: var(--primary) !important;
  box-shadow: var(--glow-teal) !important;
}

/* ══════════════════════════════════════════════════════
   EXPIRY SCREEN — Refined
══════════════════════════════════════════════════════ */
.expiry-overlay {
  background: var(--bg-gradient) !important;
}

.expiry-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
  max-width: 340px;
  width: 100%;
  padding: 32px 24px;
  text-align: center;
}

.expiry-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(13,148,136,0.10);
  color: var(--primary);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Expiry renew button */
.expiry-renew-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--primary);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: all var(--t-base) var(--ease-spring);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.expiry-renew-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(13,148,136,0.38);
}

.expiry-renew-btn:active { transform: scale(0.97); }

/* ══════════════════════════════════════════════════════
   STATUS SCREEN — Approval pending
══════════════════════════════════════════════════════ */
#status-screen {
  background: var(--bg-gradient) !important;
  font-family: 'DM Sans', sans-serif !important;
}

#status-title {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
  color: var(--text-main) !important;
}

/* ══════════════════════════════════════════════════════
   SUBSCRIPTION MODAL — Billing tab
══════════════════════════════════════════════════════ */
.sub-plan-card {
  position: relative;
}

/* Plan header */
#fs-plan-card {
  overflow: visible;
}

/* ══════════════════════════════════════════════════════
   GLOBAL FONT OVERRIDE
   Force all text to DM Sans (body) except headings
══════════════════════════════════════════════════════ */

/* Override Outfit font globally */
body, input, select, button, textarea {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important;
}

/* But keep heading elements with DM Serif */
h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif !important;
}

/* Mono numbers */
.mono-num,
#cart-total,
#cart-subtotal,
#cart-base-total,
#cart-tax-total,
#total-sales-amount,
#total-orders-count {
  font-family: 'JetBrains Mono', 'SF Mono', monospace !important;
}

/* ══════════════════════════════════════════════════════
   DARK MODE FIXES — Ensure surfaces look right
══════════════════════════════════════════════════════ */

body.dark-mode .profile-card:hover {
  background: rgba(255,255,255,0.04) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}

body.dark-mode .wiz-plan-card {
  background: var(--card-bg) !important;
}

body.dark-mode .filter-btn,
body.dark-mode .an-filter-pill {
  background: var(--card-bg) !important;
}

/* ══════════════════════════════════════════════════════
   SUPPORT MODAL — Remove Cormorant Garamond
══════════════════════════════════════════════════════ */
/* Any modal headings using old font */
[style*="Cormorant Garamond"],
[style*="cormorant"] {
  font-family: 'DM Serif Display', serif !important;
}

/* ══════════════════════════════════════════════════════
   BOTTOM NAV LABEL VISIBILITY
══════════════════════════════════════════════════════ */

/* Ensure nav labels exist (JS adds them) */
#nav-billing .nav-label,
#nav-inventory .nav-label,
#nav-analytics .nav-label,
#nav-profile .nav-label {
  font-size: 0.60rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: 'DM Sans', sans-serif;
}

/* ══════════════════════════════════════════════════════
   GST MODAL — Tab styling
══════════════════════════════════════════════════════ */
.gst-tab {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600 !important;
  border-radius: var(--radius-full) !important;
  transition: all var(--t-base) var(--ease-out) !important;
}

.gst-tab.active {
  background: var(--primary) !important;
  color: white !important;
}

/* ══════════════════════════════════════════════════════
   NOTIFICATION DROPDOWN
══════════════════════════════════════════════════════ */
#notif-dropdown {
  font-family: 'DM Sans', sans-serif !important;
}

#notif-dropdown > div:first-child {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  font-size: 1rem !important;
}

/* ══════════════════════════════════════════════════════
   STOCK PAGE INLINE FIXES
══════════════════════════════════════════════════════ */

/* Stock search override */
#stock-search {
  max-width: 150px !important;
  font-family: 'DM Sans', sans-serif !important;
  padding: 8px 12px !important;
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--border) !important;
  background: var(--input-bg) !important;
  color: var(--text-main) !important;
  outline: none !important;
}

/* ══════════════════════════════════════════════════════
   EXIT TEST MODE BUTTON
══════════════════════════════════════════════════════ */
#exit-test-mode-btn {
  background: rgba(234,179,8,0.12) !important;
  color: var(--warning) !important;
  border: 1px solid rgba(234,179,8,0.25) !important;
  border-radius: var(--radius-md) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 6px 12px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all var(--t-base) !important;
}

#exit-test-mode-btn:hover {
  background: rgba(234,179,8,0.20) !important;
}


/* ═══════════════════════════════════════════════════
   HOTFIXES — v4.1 (from screenshot review)
═══════════════════════════════════════════════════ */

/* ── FIX 1: Mobile billing — Invoice Items card visible ──────────────── */
/* Root cause: overflow:hidden on parent + no explicit height collapses left card */
@media (max-width: 1023px) {
  .billing-main-layout {
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    gap: 10px !important;
    padding-bottom: 12px;
  }

  .billing-left-card {
    flex: none !important;
    min-height: 52vh !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .billing-right-card {
    flex: none !important;
    width: 100% !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  /* Make scrollable-list fill available space inside left card */
  .scrollable-list {
    min-height: 140px;
    max-height: 35vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── FIX 2: nav-item overflow ─────────────────────────────────────────── */
/* overflow:visible needed so desktop left-bar accent (::before) isn't clipped */
.nav-item {
  overflow: visible !important;
}
/* Desktop active::before = left accent bar (set in index.html media query).
   Mobile has no ::before active state — only color change. No override needed. */

/* ── FIX 3: "Main" (exit test mode) button — style only when JS shows it ── */
/* Button already has class="hidden" in HTML, JS removes it when in test mode */
/* We just improve the styling - DO NOT add display:none here */
#exit-test-mode-btn:not(.hidden) {
  background: rgba(234,179,8,0.12) !important;
  color: #92400e !important;
  border: 1px solid rgba(234,179,8,0.3) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  padding: 6px 12px !important;
  box-shadow: none !important;
}




/* ══════════════════════════════════════════════════════════════
   VOICE AGENT — Compact Professional Floating Bar  v5.0
   Non-blocking: sits above bottom nav, app fully usable beneath
   GPU-only animations: transform + opacity only (no height/width)
══════════════════════════════════════════════════════════════ */

/* ── Container: slim floating pill ─────────────────────────── */
.va-bar {
  position: fixed;
  bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 10px);
  left: 12px;
  right: 12px;
  z-index: 4500;
  border-radius: 20px;
  /* Glassmorphism */
  background: rgba(13, 17, 27, 0.82);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(14, 165, 233, 0.22);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 0 0 1px rgba(14,165,233,0.10),
    inset 0 1px 0 rgba(255,255,255,0.06);
  /* Top sky glow line */
  overflow: hidden;
  /* Slide-up entrance */
  animation: vaBarIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
  contain: layout style;
}

.va-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(14,165,233,0.9) 30%,
    rgba(52,168,83,0.6) 60%,
    rgba(66,133,244,0.5) 80%,
    transparent 100%);
  z-index: 1;
}

.va-bar.hidden {
  display: none !important;
}

/* Light mode tweak */
body:not(.dark-mode) .va-bar {
  background: rgba(240, 248, 255, 0.90);
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.14),
    0 0 0 1px rgba(14,165,233,0.12),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

/* ── Slide-up animation ─────────────────────────────────────── */
@keyframes vaBarIn {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Drag handle ────────────────────────────────────────────── */
.va-drag-handle {
  width: 32px;
  height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 99px;
  margin: 8px auto 0;
  flex-shrink: 0;
}
body:not(.dark-mode) .va-drag-handle {
  background: rgba(0,0,0,0.12);
}

/* ── Inner row ──────────────────────────────────────────────── */
.va-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 14px;
}

/* ── LEFT: Avatar + pulse ring ──────────────────────────────── */
.va-avatar-zone {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.va-avatar-icon {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14,165,233,0.20) 0%, rgba(66,133,244,0.14) 100%);
  border: 1.5px solid rgba(14,165,233,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.va-avatar-icon .material-icons-outlined {
  font-size: 1.2rem;
  color: #0ea5e9;
  transition: color 0.3s ease;
}

/* Pulse ring — pure CSS, GPU transform */
.va-pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(14,165,233,0.5);
  opacity: 0;
  will-change: transform, opacity;
  animation: vaRingIdle 2.8s ease-in-out infinite;
  z-index: 1;
}

@keyframes vaRingIdle {
  0%   { transform: scale(0.85); opacity: 0.6; }
  50%  { transform: scale(1.18); opacity: 0;   }
  100% { transform: scale(0.85); opacity: 0;   }
}

/* Listening state — faster, brighter pulse */
.va-bar.va-listening .va-pulse-ring {
  border-color: rgba(14,165,233,0.8);
  animation: vaRingListen 1.1s ease-out infinite;
}
@keyframes vaRingListen {
  0%   { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.30); opacity: 0;   }
}

/* AI speaking state — green pulse */
.va-bar.va-speaking .va-pulse-ring {
  border-color: rgba(52,168,83,0.8);
  animation: vaRingSpeak 1.4s ease-out infinite;
}
@keyframes vaRingSpeak {
  0%   { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0;   }
}

/* Avatar icon states */
.va-bar.va-listening .va-avatar-icon {
  background: linear-gradient(135deg, rgba(14,165,233,0.28) 0%, rgba(14,165,233,0.12) 100%);
  border-color: rgba(14,165,233,0.55);
}
.va-bar.va-speaking .va-avatar-icon {
  background: linear-gradient(135deg, rgba(52,168,83,0.22) 0%, rgba(66,133,244,0.14) 100%);
  border-color: rgba(52,168,83,0.45);
}
.va-bar.va-speaking .va-avatar-icon .material-icons-outlined {
  color: #34A853;
}
.va-bar.va-error .va-avatar-icon {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
}
.va-bar.va-error .va-avatar-icon .material-icons-outlined {
  color: #ef4444;
}

/* ── CENTER: Name + status + wave canvas ────────────────────── */
.va-center-zone {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.va-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Name stack: title + powered-by badge stacked vertically */
.va-name-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.va-agent-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}
body:not(.dark-mode) .va-agent-name {
  color: rgba(15,23,42,0.90);
}

/* Tiny "✦ Gemini" powered-by badge */
.va-powered-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.60rem;
  font-weight: 500;
  color: rgba(14,165,233,0.70);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}
body:not(.dark-mode) .va-powered-badge {
  color: rgba(2,132,199,0.65);
}

/* Status pill */
.va-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.22);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.va-bar.va-speaking .va-status-pill {
  background: rgba(52,168,83,0.12);
  border-color: rgba(52,168,83,0.28);
  color: #4ade80;
}
.va-bar.va-error .va-status-pill {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.28);
  color: #f87171;
}
body:not(.dark-mode) .va-status-pill {
  background: rgba(14,165,233,0.10);
  color: #0284c7;
}

/* Status dot */
.va-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  will-change: opacity;
  animation: vaDotBlink 1.8s ease-in-out infinite;
}
.va-bar.va-speaking .va-status-dot {
  background: #4ade80;
  animation: vaDotBlink 1.0s ease-in-out infinite;
}
.va-bar.va-error .va-status-dot {
  background: #f87171;
  animation: none;
}
.va-bar.va-idle .va-status-dot {
  animation: none;
  opacity: 0.4;
}
@keyframes vaDotBlink {
  0%, 100% { opacity: 1;   }
  50%       { opacity: 0.2; }
}

/* Wave canvas */
.va-wave-canvas {
  width: 100%;
  height: 32px;
  display: block;
  border-radius: 4px;
}

/* ── RIGHT: End call button ─────────────────────────────────── */
.va-end-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(239,68,68,0.30);
  background: rgba(239,68,68,0.10);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  will-change: transform;
}
.va-end-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 4px 16px rgba(239,68,68,0.45);
  transform: scale(1.06);
}
.va-end-btn:active {
  transform: scale(0.90);
}
.va-end-btn .material-icons-outlined {
  font-size: 1.15rem;
}

/* ── Desktop: slightly wider, on right side ─────────────────── */
@media (min-width: 1024px) {
  .va-bar {
    left: auto;
    right: 20px;
    width: 380px;
    bottom: 20px;
    border-radius: 22px;
  }
}

/* ── Accessibility: reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .va-pulse-ring,
  .va-status-dot {
    animation: none !important;
  }
  .va-bar {
    animation: none !important;
  }
}

/* ── Ensure app-container is unaffected ─────────────────────── */
#app-container {
  height: 100dvh !important;
  overflow: hidden !important;
}

#main-content {
  background: var(--bg-gradient) !important;
}

/* On mobile, billing page scrolls naturally */
@media (max-width: 1023px) {
  #billing-page {
    height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .billing-main-layout {
    flex-direction: column !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    flex: none !important;
  }
  .billing-left-card {
    flex: none !important;
    min-height: 55vh !important;
    width: 100% !important;
  }
  .billing-right-card {
    flex: none !important;
    width: 100% !important;
    min-height: auto !important;
    overflow: visible !important;
    /* Extra clearance when voice bar active */
    padding-bottom: 12px;
  }
}



/* ══════════════════════════════════════════════════
   GLOBAL SMOOTH POLISH LAYER
══════════════════════════════════════════════════ */

/* Profile cards — smooth hover lift */
.profile-card {
  transition:
    transform 0.28s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.28s cubic-bezier(0.22,1,0.36,1),
    background 0.2s ease !important;
  will-change: transform;
  backface-visibility: hidden;
}
.profile-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}
.profile-card:active {
  transform: scale(0.98) !important;
}
body.dark-mode .profile-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
}

/* Smoother modal overlay appearance */
.modal-overlay {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Smooth select dropdown */
select.full-input {
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
  cursor: pointer !important;
}
select.full-input:hover {
  border-color: var(--primary) !important;
}

/* Filter buttons — smoother transitions */
.filter-btn,
.an-filter-pill {
  transition:
    background 0.22s cubic-bezier(0.22,1,0.36,1),
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.22s ease,
    transform 0.12s cubic-bezier(0.22,1,0.36,1) !important;
  backface-visibility: hidden;
}

/* Table rows — smooth hover */
tbody tr {
  transition: background 0.18s ease !important;
}
tbody tr:hover {
  background: rgba(13,148,136,0.03) !important;
}
body.dark-mode tbody tr:hover {
  background: rgba(45,212,191,0.04) !important;
}

/* GPU acceleration for animated elements */
.nav-item,
.dash-card,
.dm-mini,
.dash-qa-btn,
.wiz-plan-card,
.filter-btn,
.an-filter-pill {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}


/* ══════════════════════════════════════════════════════
   LOGIN — Mobile trust row & Made in India badge
══════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .ls-trust-row {
    display: flex !important;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 0;
    border-top: none;
    flex-wrap: wrap;
  }
  .ls-trust-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    color: rgba(248,250,252,0.28);
  }
  .ls-trust-icon {
    font-size: 0.75rem !important;
    color: rgba(248,250,252,0.2) !important;
  }
  .ls-made-in {
    display: flex !important;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    color: rgba(248,250,252,0.2);
    letter-spacing: 0.05em;
  }
  /* Hide desktop-only elements on mobile */
  .ls-descriptor, .ls-right-heading, .ls-right-sub { display: none !important; }
}


/* ══════════════════════════════════════════════════════
   WIZARD — Tabler Icon Step Icons
══════════════════════════════════════════════════════ */
.wiz-step-icon .ti {
  font-size: 1.8rem;
  color: var(--primary);
  line-height: 1;
}


/* ══════════════════════════════════════════════════════
   WIZARD — Plan Cards Grid (replacing 20-row table)
══════════════════════════════════════════════════════ */
.wiz-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 12px;
}

.wiz-plan-card {
  background: rgba(255,255,255,0.04) !important;
  border: 1.5px solid rgba(255,255,255,0.08) !important;
  border-radius: 16px !important;
  padding: 16px 14px 14px !important;
  cursor: pointer;
  position: relative;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex;
  flex-direction: column;
}

.wiz-plan-card:hover {
  border-color: rgba(13,148,136,0.4) !important;
  transform: translateY(-2px);
}

.wiz-plan-card:active { transform: scale(0.97) !important; }

.wiz-plan-card.wiz-plan-selected,
.wiz-plan-card.wiz-pt-selected {
  border-color: var(--primary) !important;
  background: rgba(13,148,136,0.08) !important;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15) !important;
}

.wiz-plan-card.wiz-plan-selected .wiz-pc-select,
.wiz-plan-card.wiz-pt-selected .wiz-pc-select {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.wiz-pc-badge {
  position: absolute;
  top: -9px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.wiz-pc-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 2px;
}

.wiz-pc-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.wiz-pc-price span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-light);
}

.wiz-pc-features {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.wiz-pc-features li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.3;
}
.wiz-pc-features li .material-icons-outlined {
  font-size: 0.8rem;
  color: var(--primary);
  flex-shrink: 0;
}

.wiz-pc-select {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wiz-pc-popular {
  border-color: rgba(13,148,136,0.3) !important;
}

.wiz-compare-link {
  display: block;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  margin: 6px 0 16px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.wiz-compare-link:hover { opacity: 1; }


/* ══════════════════════════════════════════════════════
   PENDING SCREEN — Redesigned
══════════════════════════════════════════════════════ */
.pending-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #060608;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pending-overlay.hidden { display: none !important; }

.pending-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 32px 24px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 24px 48px rgba(0,0,0,0.5);
  animation: pendingEnter 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes pendingEnter {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pending-pharmacy-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248,250,252,0.35);
  margin-bottom: 20px;
}

/* Orbit animation */
.pending-progress {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pending-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pendingOrbitSpin 3s linear infinite;
  will-change: transform;
}

.pending-orbit-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eab308;
}
.pending-orbit-dot:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); opacity: 1; }
.pending-orbit-dot:nth-child(2) { bottom: 10%; right: 8%; opacity: 0.5; }
.pending-orbit-dot:nth-child(3) { bottom: 10%; left: 8%; opacity: 0.25; }

@keyframes pendingOrbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.pending-title {
  font-family: 'DM Serif Display', serif !important;
  font-size: 1.35rem;
  font-weight: 400;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.pending-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: rgba(248,250,252,0.45);
  line-height: 1.6;
  margin-bottom: 0;
}

.pending-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 20px 0;
}

.pending-contact {
  text-align: center;
}

.pending-contact-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: rgba(248,250,252,0.3);
  margin-bottom: 10px;
}

.pending-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(248,250,252,0.7);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.pending-contact-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
}

.pending-signout {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: none;
  background: transparent;
  color: rgba(248,250,252,0.25);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}
.pending-signout:hover { color: rgba(248,250,252,0.5); }


/* ══════════════════════════════════════════════════════
   SUCCESS ANIMATION OVERLAY
══════════════════════════════════════════════════════ */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #060608;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: successFadeIn 0.3s ease both;
}
.success-overlay.hidden { display: none !important; }

@keyframes successFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.success-card {
  text-align: center;
  animation: successCardIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}

@keyframes successCardIn {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.success-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
}

.success-check-svg {
  width: 72px;
  height: 72px;
}

.success-check-circle {
  stroke: #22c55e;
  stroke-width: 2;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: successCircle 0.6s cubic-bezier(0.65,0,0.45,1) 0.3s forwards;
}

.success-check-path {
  stroke: #22c55e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: successPath 0.4s cubic-bezier(0.65,0,0.45,1) 0.7s forwards;
}

@keyframes successCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes successPath {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.success-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(248,250,252,0.4);
}


/* ══════════════════════════════════════════════════════
   WELCOME TOAST
══════════════════════════════════════════════════════ */
.welcome-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 8000;
  background: rgba(13,17,27,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(45,212,191,0.2);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: 92%;
  width: max-content;
  animation: toastSlideUp 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
  will-change: transform;
}

@keyframes toastSlideUp {
  to { transform: translateX(-50%) translateY(0); }
}

.welcome-toast.toast-out {
  animation: toastSlideDown 0.4s cubic-bezier(0.4,0,1,1) forwards;
}

@keyframes toastSlideDown {
  to { transform: translateX(-50%) translateY(100px); }
}

.welcome-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(45,212,191,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #2dd4bf;
}

.welcome-toast-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.4;
}
.welcome-toast-text span {
  color: #2dd4bf;
  font-weight: 600;
}


/* ══════════════════════════════════════════════════════
   DASHBOARD — Empty State / Get Started Checklist
══════════════════════════════════════════════════════ */
.dash-empty-state {
  padding: 20px 0;
  animation: dashEmptyIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes dashEmptyIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dash-empty-header {
  text-align: center;
  margin-bottom: 20px;
}

.dash-empty-header h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dash-empty-header p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--text-light);
}

.dash-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dash-checklist-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.dash-checklist-item:active { transform: scale(0.98); }

.dash-checklist-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(13,148,136,0.1);
  border: 1.5px solid rgba(13,148,136,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.dash-checklist-info {
  flex: 1;
  min-width: 0;
}

.dash-checklist-info h4 {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.dash-checklist-info p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: var(--text-light);
}

.dash-checklist-arrow {
  font-size: 1rem !important;
  color: var(--text-light);
  opacity: 0.4;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════════════
   PROFILE PAGE v4.0 — Clean rewrite
   Key rule: NEVER override display on #profile-page itself.
   .hidden { display:none!important } in style.css must always win.
   ══════════════════════════════════════════════════════════════════ */

/* 1. Strip page-view padding on profile-page only */
#profile-page.page-view {
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* 2. Hero header card — override style.css .profile-header-card */
#profile-page > .profile-header-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
#profile-page > .profile-header-card::before {
  display: none !important;
}

/* 3. Hero bg mesh gradient */
#profile-page .profile-hero-bg {
  width: 100%;
  padding: 40px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 15% -10%, rgba(13,148,136,0.28) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 85% 5%, rgba(99,102,241,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(14,165,233,0.10) 0%, transparent 55%),
    var(--surface) !important;
  border-bottom: 1px solid var(--border);
}
body:not(.dark-mode) #profile-page .profile-hero-bg {
  background:
    radial-gradient(ellipse 90% 70% at 15% -10%, rgba(13,148,136,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 85% 5%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(14,165,233,0.06) 0%, transparent 55%),
    #f0f4f8 !important;
}

/* 4. Hero inner centering wrapper */
#profile-page .profile-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* 5. Avatar ring */
#profile-page .profile-avatar-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #0d9488 0%, #6366f1 60%, #0ea5e9 100%);
  margin-bottom: 16px;
  flex-shrink: 0;
  position: relative;
}
#profile-page .profile-avatar-ring::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(13,148,136,0.22);
  animation: profAvatarPulse 3s ease-in-out infinite;
}
@keyframes profAvatarPulse {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.07); opacity: 0; }
}
#profile-page .profile-avatar-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  background: var(--input-bg);
  display: block;
}

/* 6. Name / email */
#profile-page #profile-name {
  font-size: 1.50rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  letter-spacing: -0.03em !important;
  margin-bottom: 3px !important;
}
#profile-page #profile-email {
  font-size: 0.80rem !important;
  color: var(--text-secondary) !important;
  margin-bottom: 14px !important;
}

/* 7. Badges */
#profile-page .profile-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
#profile-page .role-badge {
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  padding: 4px 12px !important;
  border-radius: 99px !important;
  background: rgba(13,148,136,0.16) !important;
  color: #0d9488 !important;
  border: 1px solid rgba(13,148,136,0.30) !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  align-self: unset !important;
}
body.dark-mode #profile-page .role-badge {
  background: rgba(45,212,191,0.14) !important;
  color: #2dd4bf !important;
  border-color: rgba(45,212,191,0.25) !important;
}
#profile-page .role-badge.role-admin {
  background: rgba(234,179,8,0.18) !important;
  color: #ca8a04 !important;
  border-color: rgba(234,179,8,0.30) !important;
}
#profile-page #profile-plan-badge {
  border-radius: 99px !important;
  letter-spacing: 0.07em !important;
  font-size: 0.60rem !important;
  padding: 4px 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

/* 8. Stats strip */
#profile-page .profile-stats-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 380px;
  background: rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
body.dark-mode #profile-page .profile-stats-row {
  background: rgba(255,255,255,0.04);
}
#profile-page .profile-stat-cell {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.55);
  border-right: 1px solid var(--border);
}
body.dark-mode #profile-page .profile-stat-cell {
  background: rgba(255,255,255,0.04);
}
#profile-page .profile-stat-cell:last-child {
  border-right: none;
}
#profile-page .profile-stat-value {
  font-size: 1.20rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
}
#profile-page .profile-stat-label {
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: center;
}

/* 9. Profile body */
#profile-page .profile-body {
  padding: 6px 14px 100px;
  display: flex;
  flex-direction: column;
}

/* 10. Section header with accent bar */
#profile-page .profile-section-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.61rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--text-secondary) !important;
  padding: 18px 2px 8px !important;
  margin: 0 !important;
}
#profile-page .profile-section-header::before {
  content: '';
  width: 3px; height: 13px;
  background: linear-gradient(180deg, #0d9488, #0ea5e9);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   11. CARD GROUP — Apple Settings grouped list
   This is the KEY section. Cards inside groups must
   render as flat rows with dividers, NOT as individual
   cards with their own borders/shadows.
   ═══════════════════════════════════════════════════════ */
#profile-page .profile-card-group {
  display: flex !important;
  flex-direction: column !important;
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  background: var(--card-bg) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
  overflow: visible !important;
  margin-bottom: 0 !important;
}
body.dark-mode #profile-page .profile-card-group {
  box-shadow: 0 2px 12px rgba(0,0,0,0.25) !important;
}

/* 12. Cards INSIDE groups — flat rows */
#profile-page .profile-card-group > .profile-card {
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  padding: 13px 14px !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: background 0.12s ease !important;
  transform: none !important;
}
#profile-page .profile-card-group > .profile-card:last-child {
  border-bottom: none !important;
}
#profile-page .profile-card-group > .profile-card:hover {
  background: rgba(13,148,136,0.04) !important;
  transform: none !important;
}
#profile-page .profile-card-group > .profile-card:active {
  background: rgba(13,148,136,0.08) !important;
  transform: none !important;
}

/* Cards inside <a> tags (external links) */
#profile-page .profile-card-group > a {
  text-decoration: none !important;
  color: inherit !important;
  display: block !important;
}
#profile-page .profile-card-group > a > .profile-card {
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  padding: 13px 14px !important;
  display: flex !important;
  align-items: center !important;
  transform: none !important;
}
#profile-page .profile-card-group > a:last-child > .profile-card {
  border-bottom: none !important;
}

/* 13. Icon box inside profile page */
#profile-page .p-card-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  margin-right: 13px !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 14. Text inside profile page */
#profile-page .p-card-text {
  flex: 1 !important;
  min-width: 0 !important;
}
#profile-page .p-card-text h3 {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  margin: 0 0 2px !important;
}
#profile-page .p-card-text p {
  font-size: 0.70rem !important;
  color: var(--text-light) !important;
  margin: 0 !important;
}

/* 15. Arrow */
#profile-page .arrow {
  color: var(--text-light) !important;
  opacity: 0.30 !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
  margin-left: 6px !important;
}
#profile-page .profile-card:hover .arrow {
  opacity: 0.55 !important;
  transform: translateX(2px);
}

/* 16. Logout card — standalone (not in group) */
#profile-page .logout-card {
  margin-top: 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(239,68,68,0.20) !important;
  background: rgba(239,68,68,0.04) !important;
  box-shadow: none !important;
}
#profile-page .logout-card:hover {
  background: rgba(239,68,68,0.09) !important;
}
#profile-page .logout-card h3 {
  color: #ef4444 !important;
}
#profile-page .logout-card .p-card-icon {
  background: rgba(239,68,68,0.12) !important;
  color: #ef4444 !important;
}
#profile-page .logout-card .arrow {
  color: rgba(239,68,68,0.50) !important;
  opacity: 1 !important;
}

/* 17. Footer */
#profile-page .profile-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px 8px;
}
#profile-page .profile-footer-brand {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-light);
  opacity: 0.40;
}
#profile-page .profile-footer-version {
  font-size: 0.58rem;
  color: var(--text-light);
  opacity: 0.30;
  background: var(--input-bg);
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* 18. Desktop */
@media (min-width: 1024px) {
  #profile-page.page-view {
    padding: 0 !important;
  }
  #profile-page .profile-hero-bg {
    padding: 48px 32px 36px;
  }
  #profile-page .profile-hero-inner {
    max-width: 500px;
  }
  #profile-page .profile-body {
    max-width: 640px;
    width: 100%;
    align-self: center;
  }
}

/* 19. Full-screen modal polish */
.fs-header {
  padding: 13px 16px !important;
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  backdrop-filter: blur(16px) !important;
}
.fs-back-btn {
  width: 34px !important; height: 34px !important;
  border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  background: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
}
.fs-back-btn .material-icons-outlined { font-size: 1.15rem !important; }
.fs-header h2 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}
.fs-content { padding: 16px !important; }
.fs-section-title {
  font-size: 0.60rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.11em !important;
  text-transform: uppercase !important;
  color: var(--text-secondary) !important;
  margin: 22px 0 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}
.fs-section-title::before {
  content: '';
  width: 3px; height: 12px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* 20. Subscription card */
.sub-plan-card {
  background: linear-gradient(135deg, #0d9488, #0f766e 50%, #065f46) !important;
  border-radius: 16px !important;
  padding: 22px !important;
  box-shadow: 0 8px 26px rgba(13,148,136,0.30) !important;
  position: relative;
  overflow: hidden;
}
.sub-plan-card::after {
  content: '';
  position: absolute;
  top: -25px; right: -25px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}
.plan-name { font-size: 2rem !important; font-weight: 800 !important; }
.progress-bar-container { background: rgba(255,255,255,0.18) !important; border-radius: 99px !important; height: 6px !important; }
.progress-bar { border-radius: 99px !important; background: linear-gradient(90deg, #fff, rgba(255,255,255,0.50)) !important; }

/* 21. Usage card, staff, inputs */
.usage-card { border-radius: 13px !important; border: 1px solid var(--border) !important; background: var(--card-bg) !important; padding: 15px !important; margin-bottom: 10px !important; }
.usage-icon-box { border-radius: 11px !important; width: 42px !important; height: 42px !important; }
.staff-row { border-radius: 13px !important; border: 1px solid var(--border) !important; background: var(--card-bg) !important; padding: 13px 15px !important; margin-bottom: 8px !important; }
.full-input { height: 44px !important; border-radius: 11px !important; font-size: 0.92rem !important; padding: 0 14px !important; border: 1.5px solid var(--border) !important; }
.full-input:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(13,148,136,0.14) !important; outline: none !important; }

/* 22. Modal overlay/box */
.modal-overlay { backdrop-filter: blur(12px) !important; background: rgba(0,0,0,0.55) !important; }
.modal-box { border-radius: 20px !important; border: 1px solid var(--border) !important; box-shadow: 0 20px 56px rgba(0,0,0,0.28) !important; max-width: 430px !important; }
.modal-header { margin-bottom: 14px !important; padding-bottom: 14px !important; border-bottom: 1px solid var(--border) !important; }
.modal-header h2, .modal-header h3 { font-size: 1.05rem !important; font-weight: 700 !important; }
.close-icon { width: 30px !important; height: 30px !important; border-radius: 50% !important; background: var(--input-bg) !important; border: 1px solid var(--border) !important; display: flex !important; align-items: center !important; justify-content: center !important; }


/* ═══════════════════════════════════════════════════════════
   USAGE MODAL V2 — Professional Redesign
   ═══════════════════════════════════════════════════════════ */

/* ── Plan Header ─────────────────────── */
.uv2-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(99,102,241,0.06));
    border: 1px solid rgba(13,148,136,0.2);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 16px;
    gap: 10px;
}

.uv2-plan-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uv2-plan-icon-wrap {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(13,148,136,0.12);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
}

.uv2-plan-label {
    font-size: 0.62rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: 0 0 2px;
}

.uv2-plan-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.uv2-reset-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(13,148,136,0.08);
    border: 1px solid rgba(13,148,136,0.18);
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.uv2-reset-chip .material-icons-outlined { font-size: 0.85rem; }

/* ── Usage Card ──────────────────────── */
.uv2-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 14px;
    opacity: 0;
    animation: uv2FadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transition: box-shadow 0.2s, transform 0.15s;
    overflow: hidden;
}

@keyframes uv2FadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.uv2-card:active { transform: scale(0.985); }

/* Card header row */
.uv2-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

/* Icon boxes */
.uv2-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.uv2-icon-indigo { background: rgba(99,102,241,0.12); color: #818cf8; }
.uv2-icon-teal   { background: rgba(13,148,136,0.12); color: var(--primary); }
.uv2-icon-sky    { background: rgba(14,165,233,0.12); color: #38bdf8; }

.uv2-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.uv2-title { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.uv2-sub   { font-size: 0.67rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.07em; }

/* Right count + pct */
.uv2-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.uv2-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.uv2-pct {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    transition: background 0.4s, color 0.4s;
}
.uv2-pct-green  { background: rgba(16,185,129,0.12);  color: #10b981; }
.uv2-pct-yellow { background: rgba(245,158,11,0.12);  color: #f59e0b; }
.uv2-pct-orange { background: rgba(249,115,22,0.13);  color: #f97316; }
.uv2-pct-red    { background: rgba(239,68,68,0.12);   color: #ef4444; }

/* ── Progress Track ──────────────────── */
.uv2-track {
    height: 10px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.uv2-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.85s cubic-bezier(0.34, 1.4, 0.64, 1),
                background 0.45s ease,
                box-shadow 0.45s ease;
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep */
.uv2-bar::after {
    content: '';
    position: absolute;
    top: 0; left: -70%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: uv2Shimmer 2.2s ease-in-out infinite;
}
@keyframes uv2Shimmer {
    0%   { left: -70%; }
    100% { left: 120%; }
}

/* Bar color states */
.uv2-bar-green  { background: linear-gradient(90deg, #0d9488, #34d399); }
.uv2-bar-yellow { background: linear-gradient(90deg, #d97706, #fbbf24); }
.uv2-bar-orange { background: linear-gradient(90deg, #ea580c, #fb923c); }
.uv2-bar-red    {
    background: linear-gradient(90deg, #dc2626, #f87171);
    box-shadow: 0 0 10px rgba(220,38,38,0.45);
}
/* Red bar pulse glow */
.uv2-bar-red::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #dc2626, #f87171);
    animation: uv2RedPulse 1.4s ease-in-out infinite;
    border-radius: 99px;
}
@keyframes uv2RedPulse {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.75; }
}

/* ── Footer Row ──────────────────────── */
.uv2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 22px;
}

.uv2-reset-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-light);
}
.uv2-reset-pill .material-icons-outlined { font-size: 0.85rem; }
.uv2-reset-pill b { color: var(--text-main); font-weight: 700; }

/* Warning badge */
.uv2-warn {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.25);
    animation: uv2WarnPulse 1.6s ease-in-out infinite;
    white-space: nowrap;
}
.uv2-warn.uv2-warn-red {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border-color: rgba(239,68,68,0.28);
}
@keyframes uv2WarnPulse {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.55; }
}

/* ── Upgrade Banner ──────────────────── */
.uv2-upgrade-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(220,38,38,0.07), rgba(234,88,12,0.07));
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 13px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 0.82rem;
    color: #ef4444;
    animation: uv2BannerIn 0.35s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes uv2BannerIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.uv2-upgrade-banner .material-icons-outlined { font-size: 1rem; flex-shrink: 0; }
.uv2-upgrade-banner span:nth-child(2) { flex: 1; font-weight: 600; }
.uv2-upgrade-banner button {
    background: linear-gradient(135deg, #dc2626, #f97316);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: opacity 0.18s, transform 0.15s;
    box-shadow: 0 3px 10px rgba(220,38,38,0.3);
}
.uv2-upgrade-banner button:active { opacity: 0.85; transform: scale(0.96); }

/* ── Import note ─────────────────────── */
.uv2-import-note {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
    margin-top: 4px;
}

/* Dark mode tweaks */
body.dark-mode .uv2-plan-header {
    background: linear-gradient(135deg, rgba(45,212,191,0.07), rgba(99,102,241,0.06));
    border-color: rgba(45,212,191,0.15);
}
body.dark-mode .uv2-reset-chip {
    background: rgba(45,212,191,0.07);
    border-color: rgba(45,212,191,0.15);
}
body.dark-mode .uv2-plan-icon-wrap {
    background: rgba(45,212,191,0.1);
}
body.dark-mode .uv2-upgrade-banner {
    background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(234,88,12,0.09));
    border-color: rgba(220,38,38,0.25);
}

/* ═══════════════════════════════════════════════════════════
   IMPORT MODAL — Polished v3
═══════════════════════════════════════════════════════════ */

/* ── Modal shell ── */
.imp-modal-box {
    max-width: 680px !important;
    max-height: 92vh !important;
    border-radius: 24px !important;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: impModalIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes impModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* ── Header ── */
.imp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--card-bg);
}
.imp-header-left { display: flex; align-items: center; gap: 12px; }
.imp-header-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(13,148,136,0.3);
}
.imp-header-icon .material-icons-outlined { font-size: 1.25rem; }
.imp-title { font-size: 1rem; font-weight: 700; color: var(--text-main); margin: 0; }
.imp-subtitle { font-size: 0.75rem; color: var(--text-light); margin: 0; }
.imp-close-btn {
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-light);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.imp-close-btn:hover { background: var(--danger); color: white; border-color: var(--danger); transform: rotate(90deg); }
.imp-close-btn .material-icons-outlined { font-size: 1.1rem; }

/* ── Step Indicator ── */
.imp-steps {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: var(--input-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 0;
}
.imp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.imp-step-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--card-bg);
    color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.imp-step-circle .material-icons-outlined { font-size: 0.95rem; }
.imp-step-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s ease;
    white-space: nowrap;
}
.imp-step.active .imp-step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(13,148,136,0.15);
    transform: scale(1.1);
}
.imp-step.active .imp-step-label { color: var(--primary); font-weight: 700; }
.imp-step.done .imp-step-circle {
    border-color: var(--primary);
    background: rgba(13,148,136,0.1);
    color: var(--primary);
}
.imp-step.done .imp-step-label { color: var(--primary); }
.imp-step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 6px;
    margin-bottom: 20px;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.imp-step-line::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.imp-step-line.filled::after { transform: scaleX(1); }

/* ── Step content area ── */
.imp-step-content {
    padding: 22px 24px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: impStepIn 0.28s ease both;
}
@keyframes impStepIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Privacy card ── */
.imp-privacy-card {
    background: linear-gradient(135deg, rgba(13,148,136,0.05), rgba(99,102,241,0.04));
    border: 1px solid rgba(13,148,136,0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}
.imp-privacy-icon-wrap {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    color: white;
    box-shadow: 0 6px 20px rgba(13,148,136,0.35);
}
.imp-privacy-icon-wrap .material-icons-outlined { font-size: 1.6rem; }
.imp-privacy-title { font-size: 1rem; font-weight: 700; color: var(--text-main); margin: 0 0 10px; }
.imp-privacy-body { font-size: 0.85rem; color: var(--text-light); line-height: 1.65; margin: 0 0 16px; }
.imp-privacy-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.imp-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.72rem; font-weight: 600;
    background: rgba(13,148,136,0.1);
    color: var(--primary);
    border: 1px solid rgba(13,148,136,0.2);
    padding: 4px 10px; border-radius: 20px;
}

/* ── Template banner ── */
.imp-template-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(13,148,136,0.05));
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.imp-template-left { display: flex; align-items: center; gap: 12px; }
.imp-template-left .material-icons-outlined {
    font-size: 1.5rem;
    color: #6366f1;
}
.imp-template-title { font-size: 0.82rem; font-weight: 600; color: var(--text-main); margin: 0 0 2px; }
.imp-template-sub { font-size: 0.72rem; color: var(--text-light); margin: 0; }

/* ── Dropzone ── */
.imp-dropzone {
    border: 2px dashed var(--border);
    border-radius: 18px;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    background: var(--input-bg);
    flex-shrink: 0;
}
.imp-dropzone:hover, .imp-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(13,148,136,0.04);
}
.imp-dropzone.dragover {
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(13,148,136,0.12), inset 0 0 30px rgba(13,148,136,0.04);
    transform: scale(1.01);
}
.imp-dropzone-inner {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 20px;
    gap: 6px;
    pointer-events: none;
}
.imp-dropzone-icon-wrap {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}
.imp-dropzone:hover .imp-dropzone-icon-wrap,
.imp-dropzone.dragover .imp-dropzone-icon-wrap {
    border-color: var(--primary);
    background: rgba(13,148,136,0.08);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13,148,136,0.2);
}
.imp-dropzone-icon {
    font-size: 2rem !important;
    color: var(--text-light);
    transition: color 0.25s ease;
}
.imp-dropzone:hover .imp-dropzone-icon,
.imp-dropzone.dragover .imp-dropzone-icon { color: var(--primary); }
.imp-dropzone-title { font-size: 0.95rem; font-weight: 600; color: var(--text-main); margin: 0; }
.imp-dropzone-sub { font-size: 0.82rem; color: var(--text-light); margin: 0; }
.imp-link { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.imp-format-chips { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.imp-chip {
    font-size: 0.68rem; font-weight: 700;
    padding: 3px 9px; border-radius: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-light);
    letter-spacing: 0.03em;
}

/* ── Loading ── */
.imp-loading {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; padding: 28px 0;
}
.imp-loading-spinner {
    width: 44px; height: 44px;
}
.imp-spinner-svg {
    width: 100%; height: 100%;
    animation: impSpinRotate 1.5s linear infinite;
}
@keyframes impSpinRotate { to { transform: rotate(360deg); } }
.imp-spinner-track { stroke: var(--border); }
.imp-spinner-arc {
    stroke: var(--primary);
    stroke-dasharray: 80, 200;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: impSpinDash 1.5s ease-in-out infinite;
}
@keyframes impSpinDash {
    0%   { stroke-dasharray: 1,200; stroke-dashoffset: 0; }
    50%  { stroke-dasharray: 89,200; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 89,200; stroke-dashoffset: -124; }
}
.imp-loading-title { font-size: 0.9rem; font-weight: 600; color: var(--text-main); margin: 0; }
.imp-loading-sub { font-size: 0.78rem; color: var(--text-light); margin: 0; }

/* ── Preview ── */
.imp-preview-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; flex-shrink: 0;
}
.imp-preview-summary {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.imp-stat-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 600;
    padding: 4px 10px; border-radius: 20px;
}
.imp-stat-badge.ok   { background: rgba(13,148,136,0.1);  color: var(--primary);  border:1px solid rgba(13,148,136,0.2); }
.imp-stat-badge.warn { background: rgba(251,191,36,0.12); color: #d97706; border:1px solid rgba(251,191,36,0.3); }
.imp-stat-badge.err  { background: rgba(239,68,68,0.1);   color: var(--danger); border:1px solid rgba(239,68,68,0.2); }
.imp-table-wrap {
    overflow: auto;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 14px;
}
.imp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.imp-table thead { position: sticky; top: 0; background: var(--input-bg); z-index: 1; }
.imp-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.imp-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    transition: background 0.15s ease;
}
.imp-table tbody tr:last-child td { border-bottom: none; }
.imp-table tbody tr:hover td { background: rgba(13,148,136,0.03); }
.imp-row-dup td { opacity: 0.5; background: rgba(251,191,36,0.04) !important; }
.imp-row-err td { background: rgba(239,68,68,0.04) !important; }
.imp-row-err td:first-child { border-left: 3px solid var(--danger); }
.imp-badge-dup {
    display: inline-block;
    font-size: 0.62rem; font-weight: 700;
    padding: 1px 5px; border-radius: 4px;
    background: #fbbf24; color: #000;
    margin-right: 5px; vertical-align: middle;
    letter-spacing: 0.02em;
}
.imp-badge-err {
    display: inline-block;
    font-size: 0.62rem; font-weight: 700;
    padding: 1px 5px; border-radius: 4px;
    background: var(--danger); color: white;
    margin-right: 5px; vertical-align: middle;
}

/* ── Success animation ── */
.imp-success-anim {
    width: 80px; height: 80px;
    margin: 0 auto 18px;
}
.imp-checkmark {
    width: 80px; height: 80px;
    border-radius: 50%;
}
.imp-checkmark-circle {
    stroke: var(--primary);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: impCircleDraw 0.6s cubic-bezier(0.65,0,0.45,1) 0.1s forwards;
}
.imp-checkmark-tick {
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: impTickDraw 0.4s cubic-bezier(0.65,0,0.45,1) 0.65s forwards;
}
@keyframes impCircleDraw { to { stroke-dashoffset: 0; } }
@keyframes impTickDraw   { to { stroke-dashoffset: 0; } }
.imp-success-title {
    font-size: 1.2rem; font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px;
    animation: impFadeUp 0.4s 0.9s both;
}
.imp-success-stats {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
    animation: impFadeUp 0.4s 1.05s both;
}
.imp-success-stat {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 20px;
    min-width: 90px;
}
.imp-success-stat-num {
    font-size: 1.5rem; font-weight: 800;
    color: var(--primary);
    display: block; line-height: 1;
    margin-bottom: 4px;
}
.imp-success-stat-lbl {
    font-size: 0.7rem; font-weight: 500;
    color: var(--text-light);
}
@keyframes impFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Error state ── */
.imp-error-icon-wrap {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(239,68,68,0.1);
    border: 2px solid rgba(239,68,68,0.2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: var(--danger);
}
.imp-error-icon-wrap .material-icons-outlined { font-size: 2rem; }
.imp-error-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin: 0 0 8px; }
.imp-error-body { font-size: 0.85rem; color: var(--text-light); margin: 0; }

/* ── Buttons ── */
.imp-action-row {
    display: flex; gap: 10px; align-items: center;
    flex-shrink: 0;
}
.imp-btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none; border-radius: 12px;
    font-weight: 600; font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(13,148,136,0.3);
}
.imp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13,148,136,0.4);
}
.imp-btn-primary:active { transform: translateY(0); box-shadow: none; }
.imp-btn-primary .material-icons-outlined { font-size: 1rem; }
.imp-btn-primary:disabled {
    opacity: 0.6; cursor: not-allowed;
    transform: none; box-shadow: none;
}
.imp-btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 22px;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 600; font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}
.imp-btn-ghost:hover { border-color: var(--text-light); background: var(--card-bg); }
.imp-btn-ghost.imp-btn-danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.06); }
.imp-btn-ghost .material-icons-outlined { font-size: 1rem; }
.imp-btn-outline {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px;
    background: transparent;
    color: #6366f1;
    border: 1.5px solid rgba(99,102,241,0.35);
    border-radius: 10px;
    font-weight: 600; font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.imp-btn-outline:hover { background: rgba(99,102,241,0.08); transform: translateY(-1px); }
.imp-btn-outline .material-icons-outlined { font-size: 0.95rem; }
.imp-btn-text {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: none;
    color: var(--text-light);
    font-size: 0.78rem; font-weight: 500;
    cursor: pointer;
    padding: 4px 8px; border-radius: 8px;
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.imp-btn-text:hover { color: var(--primary); background: rgba(13,148,136,0.07); }

/* ── Dark mode tweaks ── */
body.dark-mode .imp-privacy-card {
    background: linear-gradient(135deg, rgba(45,212,191,0.06), rgba(99,102,241,0.05));
    border-color: rgba(45,212,191,0.15);
}
body.dark-mode .imp-template-banner {
    background: linear-gradient(135deg, rgba(99,102,241,0.09), rgba(45,212,191,0.06));
    border-color: rgba(99,102,241,0.2);
}
body.dark-mode .imp-dropzone { background: rgba(255,255,255,0.02); }
body.dark-mode .imp-dropzone:hover,
body.dark-mode .imp-dropzone.dragover { background: rgba(45,212,191,0.05); }
body.dark-mode .imp-checkmark-circle,
body.dark-mode .imp-checkmark-tick { stroke: var(--primary); }

/* ── Responsive ── */
@media (max-width: 480px) {
    .imp-modal-box { border-radius: 20px !important; }
    .imp-header { padding: 16px 18px 14px; }
    .imp-steps { padding: 12px 16px; }
    .imp-step-label { display: none; }
    .imp-step-content { padding: 18px; }
    .imp-success-stats { flex-direction: column; align-items: center; }
}

/* ══════════════════════════════════════════════════════════════
   AI IMPORT — Mode Toggle + AI-specific styles
   ══════════════════════════════════════════════════════════════ */

/* Mode toggle pill */
.imp-mode-toggle {
    display: flex;
    gap: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 12px;
}
.imp-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}
.imp-mode-btn .material-icons-outlined { font-size: 0.95rem; }
.imp-mode-btn:hover { color: var(--text-main); background: rgba(13,148,136,0.06); }
.imp-mode-btn.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
}

/* AI banner style */
.imp-ai-banner-style {
    background: linear-gradient(135deg, rgba(13,148,136,0.06) 0%, rgba(99,102,241,0.06) 100%);
    border-color: rgba(13,148,136,0.25);
}
.imp-ai-banner-style .imp-template-title { color: var(--primary); }

/* AI quota badge */
.imp-ai-quota-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(13,148,136,0.1);
    border: 1px solid rgba(13,148,136,0.2);
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* AI chip style */
.imp-chip-ai {
    background: linear-gradient(135deg, rgba(13,148,136,0.1), rgba(99,102,241,0.1));
    border-color: rgba(13,148,136,0.25);
    color: var(--primary);
}

/* Dark mode additions */
body.dark-mode .imp-mode-toggle { background: rgba(255,255,255,0.04); }
body.dark-mode .imp-mode-btn.active { background: rgba(255,255,255,0.07); }
body.dark-mode .imp-ai-banner-style { background: linear-gradient(135deg, rgba(13,148,136,0.08) 0%, rgba(99,102,241,0.08) 100%); }
