/* ============================================
   ZYPPLY PORTAL — Design System
   Premium · Glass · Gradient — Matches Main Site
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Core Palette — synced with homepage */
  --white: #ffffff;
  --bg: #f6f5ff;
  --surface: rgba(255,255,255,0.72);
  --surface-solid: #ffffff;
  --border: rgba(124,58,237,0.10);
  --border-light: rgba(124,58,237,0.05);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #9aa0a6;

  /* Purple scale — matches homepage */
  --purple-50: #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --purple-800: #5b21b6;
  --purple-900: #4c1d95;
  --magenta-500: #e91e63;

  /* Accent — now matches homepage purple */
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: rgba(124,58,237,0.08);
  --accent-subtle: #f5f3ff;

  /* Gradients — from homepage */
  --gradient-primary: linear-gradient(135deg, #7c3aed, #a855f7);
  --gradient-hero: linear-gradient(135deg, #050014 0%, #1a0b2e 50%, #050014 100%);
  --gradient-surface: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,243,255,0.8));
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(124,58,237,0.15), transparent 65%);
  --gradient-text: linear-gradient(135deg, #a855f7, #c084fc, #7c3aed);

  /* Status */
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --info: #2563eb;
  --info-light: #eff6ff;

  /* Shadows — deeper with purple tint */
  --shadow-sm: 0 1px 3px rgba(124,58,237,0.04);
  --shadow-md: 0 4px 16px rgba(124,58,237,0.08);
  --shadow-lg: 0 12px 36px rgba(124,58,237,0.10);
  --shadow-xl: 0 24px 55px rgba(124,58,237,0.14);
  --shadow-glow: 0 0 40px rgba(124,58,237,0.18);

  /* Radii — larger, more modern */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Glass */
  --glass-bg: rgba(255,255,255,0.65);
  --glass-border: rgba(255,255,255,0.35);
  --glass-blur: blur(20px) saturate(180%);

  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 260px;
  --nav-height: 64px;
}

/* ---------- Dark Theme Overrides ---------- */
[data-theme="dark"] {
  --bg: #0e0e1a;
  --surface: rgba(30,30,48,0.80);
  --surface-solid: #1a1a2e;
  --white: #1a1a2e;
  --border: rgba(139,92,246,0.18);
  --border-light: rgba(139,92,246,0.08);
  --text-primary: #eeedf5;
  --text-secondary: #a8a8c0;
  --text-muted: #6b6b85;

  --purple-50: #1a1530;
  --purple-100: #221a3e;
  --purple-200: #2d2252;
  --purple-300: #3d2e70;
  --purple-400: #7c5ec9;
  --accent-light: rgba(139,92,246,0.14);
  --accent-subtle: #1a1530;

  --gradient-surface: linear-gradient(135deg, rgba(30,30,48,0.9), rgba(20,18,38,0.8));
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(139,92,246,0.20), transparent 65%);

  --success-light: #0a2920;
  --warning-light: #2a1f0a;
  --danger-light: #2a0f0f;
  --info-light: #0f1a2a;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.20);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.30);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.35);
  --shadow-xl: 0 24px 55px rgba(0,0,0,0.40);
  --shadow-glow: 0 0 40px rgba(139,92,246,0.22);

  --glass-bg: rgba(30,30,48,0.70);
  --glass-border: rgba(139,92,246,0.15);
}

[data-theme="dark"] body {
  background: var(--bg);
}
[data-theme="dark"] body::before {
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139,92,246,0.14), transparent);
}

/* Dark nav */
[data-theme="dark"] .dash-nav {
  background: rgba(20,20,36,0.85);
  border-bottom-color: rgba(139,92,246,0.12);
}
[data-theme="dark"] .dash-search-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(139,92,246,0.12);
  color: var(--text-primary);
}
[data-theme="dark"] .dash-search-input::placeholder { color: var(--text-muted); }

/* Dark sidebar */
[data-theme="dark"] .dash-sidebar {
  background: rgba(20,20,36,0.90);
  border-right-color: rgba(139,92,246,0.10);
}
[data-theme="dark"] .dash-sidebar-link:hover {
  background: rgba(139,92,246,0.10);
}
[data-theme="dark"] .dash-sidebar-link.active {
  background: rgba(139,92,246,0.14);
}

/* Dark cards & surfaces */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .card,
[data-theme="dark"] .order-card,
[data-theme="dark"] .payment-card,
[data-theme="dark"] .escrow-card,
[data-theme="dark"] .invoice-card,
[data-theme="dark"] .supplier-card,
[data-theme="dark"] .plan-card {
  background: var(--surface);
  border-color: var(--border);
}

/* Dark form inputs */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
  color: var(--text-primary);
}
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

/* Dark table */
[data-theme="dark"] .portal-table th {
  background: rgba(139,92,246,0.08);
  color: var(--text-secondary);
}
[data-theme="dark"] .portal-table td {
  border-bottom-color: var(--border);
}
[data-theme="dark"] .portal-table tr:hover td {
  background: rgba(139,92,246,0.05);
}

/* Dark tabs */
[data-theme="dark"] .settings-tabs {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .settings-tab {
  color: var(--text-secondary);
}
[data-theme="dark"] .settings-tab.active {
  background: rgba(139,92,246,0.14);
  color: var(--text-primary);
}
[data-theme="dark"] .settings-tab:hover:not(.active) {
  background: rgba(139,92,246,0.06);
}

/* Dark buttons */
[data-theme="dark"] .btn-secondary {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
  color: var(--text-primary);
}
[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255,255,255,0.10);
}

/* Dark connected accounts & toggle rows */
[data-theme="dark"] .connected-account {
  border-bottom-color: var(--border);
}
[data-theme="dark"] .toggle-row {
  border-bottom-color: var(--border);
}

/* Dark toast */
[data-theme="dark"] .toast {
  background: #1a1a2e;
  border-color: var(--border);
  color: var(--text-primary);
}

/* Dark misc */
[data-theme="dark"] .payment-method {
  border-color: var(--border);
}
[data-theme="dark"] .connected-account-icon {
  background: rgba(255,255,255,0.06) !important;
}
[data-theme="dark"] .profile-avatar {
  background: var(--gradient-primary);
}
[data-theme="dark"] .danger-zone {
  border-color: rgba(220,38,38,0.25);
}

/* Dark mode toggle-switch track */
[data-theme="dark"] .toggle-slider {
  background: rgba(255,255,255,0.12);
}
[data-theme="dark"] .toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

/* Dark mode logo swap */
.dash-logo .logo-white { display: none; }
[data-theme="dark"] .dash-logo .logo-default { display: none; }
[data-theme="dark"] .dash-logo .logo-white { display: block; }

/* Dark scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.25);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(139,92,246,0.40);
}

/* Dark badges */
[data-theme="dark"] .settings-card-badge {
  background: rgba(139,92,246,0.15);
  color: var(--purple-400);
}
[data-theme="dark"] .plan-badge {
  background: rgba(5,150,105,0.15);
}

/* ===== Appearance Settings Styles ===== */
.theme-selector {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.theme-option {
  flex: 1;
  padding: 20px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.theme-option:hover {
  border-color: rgba(124,58,237,0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.theme-option.active {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.theme-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-option-icon svg { width: 24px; height: 24px; }
.theme-option-icon.light-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
}
.theme-option-icon.dark-icon {
  background: linear-gradient(135deg, #4c1d95, #1a1a2e);
  color: #c4b5fd;
}
.theme-option-icon.system-icon {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
}
.theme-option-label {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.theme-option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.schedule-config {
  margin-top: 16px;
  padding: 20px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: none;
}
.schedule-config.visible {
  display: block;
}
.schedule-times {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  align-items: end;
}
.schedule-time-group {
  flex: 1;
}
.schedule-time-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.schedule-time-group input[type="time"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color var(--transition);
}
.schedule-time-group input[type="time"]:focus {
  outline: none;
  border-color: var(--accent);
}

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
}
/* Subtle background radial glow — like homepage */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 600px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,58,237,0.10), transparent);
  pointer-events: none;
  z-index: 0;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- Top Navigation ---------- */
.dash-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(124,58,237,0.08);
  z-index: 100;
  display: flex;
  align-items: center;
}
.dash-nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 24px;
  gap: 24px;
}
.dash-logo img {
  height: 28px;
  width: auto;
}
.dash-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.dash-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.dash-search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 42px;
  border: 1px solid rgba(124,58,237,0.10);
  border-radius: 12px;
  background: rgba(124,58,237,0.04);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}
.dash-search-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.10);
}
.dash-search-input::placeholder { color: var(--text-muted); }

.dash-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.dash-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}
.dash-nav-btn svg { width: 20px; height: 20px; stroke-width: 1.8; }
.dash-nav-btn:hover { background: var(--bg); color: var(--text-primary); }
.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}
.dash-nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 4px;
  box-shadow: 0 2px 10px rgba(124,58,237,0.25);
}

/* ---------- Layout ---------- */
.dash-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}

/* ---------- Sidebar ---------- */
.dash-sidebar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-right: 1px solid rgba(124,58,237,0.06);
  overflow-y: auto;
  padding: 20px 0;
  z-index: 90;
  transition: var(--transition);
}
.dash-sidebar.with-banner { top: calc(var(--nav-height) + 52px); }

.sidebar-section { padding: 0 16px; margin-bottom: 24px; }
.sidebar-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 6px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar-nav li a svg { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.8; }
.sidebar-nav li a:hover {
  background: rgba(124,58,237,0.05);
  color: var(--text-primary);
}
.sidebar-nav li a.active {
  background: rgba(124,58,237,0.10);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------- Main Content ---------- */
.dash-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px;
  min-height: calc(100vh - var(--nav-height));
  transition: var(--transition);
}
.dash-main.with-banner { padding-top: 84px; }

/* ---------- KYC Banner ---------- */
.kyc-banner {
  position: fixed;
  top: var(--nav-height);
  left: var(--sidebar-width);
  right: 0;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 89;
}
.kyc-banner.visible { display: flex; }
.kyc-banner-btn {
  padding: 6px 16px;
  background: rgba(255,255,255,0.2);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.kyc-banner-btn:hover { background: rgba(255,255,255,0.3); }
.kyc-banner-dismiss {
  position: absolute;
  right: 16px;
  color: rgba(255,255,255,0.7);
  width: 20px;
  height: 20px;
}
.kyc-banner-dismiss:hover { color: white; }

/* ---------- KYC Modal ---------- */
.kyc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.kyc-modal-overlay.visible { display: flex; }
.kyc-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.kyc-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.kyc-modal-icon svg { width: 28px; height: 28px; }
.kyc-modal h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.kyc-modal p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.6; }
.kyc-modal-actions { display: flex; gap: 12px; }
.kyc-modal-actions .btn-primary {
  flex: 1;
  padding: 12px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.kyc-modal-actions .btn-primary:hover { background: var(--accent-hover); }
.kyc-modal-actions .btn-secondary {
  flex: 1;
  padding: 12px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.kyc-modal-actions .btn-secondary:hover { background: var(--border); }

/* ---------- Sections ---------- */
.dash-section { margin-bottom: 36px; position: relative; z-index: 1; }
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.dash-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.dash-section-link {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-section-link:hover { color: var(--accent-hover); transform: translateX(2px); }

/* ---------- Hero Banner — Dark Container (matches homepage hero) ---------- */
.dash-hero {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  color: white;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
/* Morphing gradient blob — like homepage */
.dash-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, rgba(168,85,247,0.15) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: heroBlob 12s ease-in-out infinite;
}
.dash-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, rgba(233,30,99,0.08) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: heroBlob 15s ease-in-out infinite reverse;
}
@keyframes heroBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}
.dash-hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  letter-spacing: -0.02em;
}
.dash-hero p {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 24px;
  max-width: 500px;
  position: relative;
  line-height: 1.6;
}
.dash-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: rgba(255,255,255,0.95);
  color: var(--accent);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.dash-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  background: white;
}
.dash-hero-btn svg { width: 18px; height: 18px; }

/* ---------- Categories Grid ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.category-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124,58,237,0.08);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.category-card:hover {
  border-color: rgba(124,58,237,0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(168,85,247,0.06));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: var(--transition);
}
.category-card:hover .category-icon {
  background: var(--gradient-primary);
  color: white;
  transform: scale(1.05);
}
.category-icon svg { width: 22px; height: 22px; }
.category-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.category-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Supplier Widget Filters ---------- */
.supplier-widget-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.widget-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.widget-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.widget-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}
.widget-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.widget-filter-group { min-width: 140px; }
.widget-filter {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239aa0a6' stroke-width='2'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.widget-filter:focus { border-color: var(--accent); }

/* ---------- Suppliers Grid (Featured) ---------- */
.suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Interactive Supplier Card */
.supplier-card-interactive {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124,58,237,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.supplier-card-interactive:hover {
  border-color: rgba(124,58,237,0.25);
  box-shadow: 0 16px 40px rgba(124,58,237,0.12);
  transform: translateY(-6px);
}
.supplier-card-interactive .supplier-image {
  height: 120px;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(168,85,247,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.supplier-card-interactive .supplier-image > svg { width: 40px; height: 40px; color: var(--accent); opacity: 0.4; }
.supplier-card-interactive .supplier-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}
.supplier-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--accent);
  color: white;
}
.supplier-badge.top-rated { background: var(--warning); }
.supplier-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.supplier-favorite svg { width: 16px; height: 16px; }
.supplier-favorite:hover, .supplier-favorite.active { color: var(--danger); }
.supplier-favorite.active svg { fill: var(--danger); }

.supplier-card-interactive .supplier-info { padding: 16px; }
.supplier-category { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.supplier-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.supplier-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.supplier-location svg { width: 14px; height: 14px; flex-shrink: 0; }
.supplier-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}
.supplier-stat {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.supplier-stat strong { color: var(--text-primary); }
.supplier-actions { display: flex; gap: 8px; }
.supplier-actions .btn-view,
.supplier-actions .btn-contact {
  flex: 1;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
}
.supplier-actions .btn-view {
  background: var(--accent-light);
  color: var(--accent);
}
.supplier-actions .btn-view:hover { background: var(--accent); color: white; }
.supplier-actions .btn-contact {
  background: var(--bg);
  color: var(--text-secondary);
}
.supplier-actions .btn-contact:hover { background: var(--border); }

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124,58,237,0.08);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.feature-card:hover {
  box-shadow: 0 12px 32px rgba(124,58,237,0.10);
  transform: translateY(-4px);
  border-color: rgba(124,58,237,0.20);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(168,85,247,0.06));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: var(--transition);
}
.feature-card:hover .feature-icon {
  background: var(--gradient-primary);
  color: white;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-content h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.feature-content p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ---------- Orders Widget ---------- */
.orders-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.orders-widget-tabs { display: flex; gap: 4px; }
.orders-widget-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.orders-widget-tab:hover { background: var(--bg); }
.orders-widget-tab.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}
.orders-widget-search {
  position: relative;
  width: 220px;
}
.orders-widget-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.orders-widget-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}
.orders-widget-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.orders-widget-list { display: flex; flex-direction: column; gap: 8px; }
.order-widget-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.order-widget-card:hover {
  border-color: rgba(124,58,237,0.20);
  box-shadow: 0 8px 24px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.order-widget-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.order-widget-icon svg { width: 20px; height: 20px; }
.order-widget-info { flex: 1; min-width: 0; }
.order-widget-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.order-widget-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.order-widget-meta svg { width: 13px; height: 13px; flex-shrink: 0; }
.order-widget-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.order-widget-status.pending { background: var(--warning-light); color: var(--warning); }
.order-widget-status.escrow { background: var(--accent-light); color: var(--accent); }
.order-widget-status.shipped { background: var(--info-light); color: var(--info); }
.order-widget-status.completed { background: var(--success-light); color: var(--success); }
.order-widget-status.disputed { background: var(--danger-light); color: var(--danger); }

.order-widget-amount {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}
.order-widget-actions { display: flex; gap: 6px; }
.order-widget-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}
.order-widget-btn.btn-view {
  background: var(--bg);
  color: var(--text-secondary);
}
.order-widget-btn.btn-view:hover { background: var(--border); }
.order-widget-btn.btn-action {
  background: var(--accent-light);
  color: var(--accent);
}
.order-widget-btn.btn-action:hover { background: var(--accent); color: white; }

/* ---------- Escrow Widget ---------- */
.escrow-widget { display: flex; flex-direction: column; gap: 16px; }
.escrow-balance-card {
  background: var(--gradient-hero);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(5,0,20,0.25);
}
.escrow-balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.30), transparent 65%);
  border-radius: 50%;
  filter: blur(40px);
}
.escrow-balance-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 8px;
}
.escrow-balance-label svg { width: 18px; height: 18px; }
.escrow-balance-amount { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.escrow-balance-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  opacity: 0.8;
}
.escrow-balance-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.escrow-balance-meta svg { width: 15px; height: 15px; }

.escrow-tabs { display: flex; gap: 4px; }
.escrow-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.escrow-tab:hover { background: var(--bg); }
.escrow-tab.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

.escrow-list { display: flex; flex-direction: column; gap: 8px; }
.escrow-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.escrow-item:hover {
  border-color: rgba(124,58,237,0.20);
  box-shadow: 0 8px 24px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.escrow-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.escrow-item-icon svg { width: 20px; height: 20px; }
.escrow-item-icon.active { background: var(--accent-light); color: var(--accent); }
.escrow-item-icon.pending-release { background: var(--warning-light); color: var(--warning); }
.escrow-item-icon.released { background: var(--success-light); color: var(--success); }
.escrow-item-info { flex: 1; min-width: 0; }
.escrow-item-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.escrow-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.escrow-item-amount { text-align: right; font-weight: 700; font-size: 0.95rem; }
.escrow-item-status {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 2px;
}
.escrow-item-status.active { color: var(--accent); }
.escrow-item-status.pending-release { color: var(--warning); }
.escrow-item-status.released { color: var(--success); }
.escrow-item-actions { display: flex; gap: 6px; }
.escrow-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}
.escrow-btn.btn-release {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--success-light);
  color: var(--success);
}
.escrow-btn.btn-release svg { width: 14px; height: 14px; }
.escrow-btn.btn-release:hover { background: var(--success); color: white; }
.escrow-btn.btn-details {
  background: var(--bg);
  color: var(--text-secondary);
}
.escrow-btn.btn-details:hover { background: var(--border); }

.escrow-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.escrow-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; }
.escrow-empty p { font-size: 0.9rem; }

/* ---------- Payments Widget ---------- */
.payments-widget { display: flex; flex-direction: column; gap: 16px; }
.payments-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.payments-summary-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.payments-summary-card:hover {
  border-color: rgba(124,58,237,0.15);
  box-shadow: var(--shadow-md);
}
.payments-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.payments-summary-icon svg { width: 20px; height: 20px; }
.payments-summary-icon.incoming { background: var(--success-light); color: var(--success); }
.payments-summary-icon.outgoing { background: var(--danger-light); color: var(--danger); }
.payments-summary-icon.pending { background: var(--warning-light); color: var(--warning); }
.payments-summary-amount { font-size: 1.1rem; font-weight: 700; }
.payments-summary-label { font-size: 0.78rem; color: var(--text-muted); }

.payments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.payments-tabs { display: flex; gap: 4px; }
.payments-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.payments-tab:hover { background: var(--bg); }
.payments-tab.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

.payments-actions { display: flex; gap: 8px; }
.payments-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}
.payments-action-btn svg { width: 16px; height: 16px; }
.payments-action-btn.btn-request {
  background: var(--bg);
  color: var(--text-secondary);
}
.payments-action-btn.btn-request:hover { background: var(--border); }
.payments-action-btn.btn-send {
  background: var(--accent);
  color: white;
}
.payments-action-btn.btn-send:hover { background: var(--accent-hover); }

.payments-list { display: flex; flex-direction: column; gap: 6px; }
.payment-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.payment-item:hover {
  border-color: rgba(124,58,237,0.20);
  box-shadow: 0 8px 24px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.payment-item-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.payment-item-icon svg { width: 18px; height: 18px; }
.payment-item-icon.incoming { background: var(--success-light); color: var(--success); }
.payment-item-icon.outgoing { background: var(--accent-light); color: var(--accent); }
.payment-item-icon.pending { background: var(--warning-light); color: var(--warning); }
.payment-item-icon.failed { background: var(--danger-light); color: var(--danger); }
.payment-item-info { flex: 1; min-width: 0; }
.payment-item-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.payment-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.payment-item-amount { text-align: right; }
.payment-item-amount-value { font-weight: 700; font-size: 0.92rem; }
.payment-item-amount-value.incoming { color: var(--success); }
.payment-item-amount-value.outgoing { color: var(--text-primary); }
.payment-item-amount-value.pending { color: var(--warning); }
.payment-item-amount-value.failed { color: var(--danger); text-decoration: line-through; }
.payment-item-status {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 2px;
}
.payment-item-status.completed { color: var(--success); }
.payment-item-status.pending, .payment-item-status.processing { color: var(--warning); }
.payment-item-status.failed { color: var(--danger); }

.payments-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.payments-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; }

/* ---------- Invoices Widget ---------- */
.invoices-widget { display: flex; flex-direction: column; gap: 16px; }
.invoices-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.invoices-summary-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  transition: var(--transition);
}
.invoices-summary-card:hover {
  border-color: rgba(124,58,237,0.15);
  box-shadow: var(--shadow-md);
}
.invoices-summary-count {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.invoices-summary-count.draft { color: var(--text-muted); }
.invoices-summary-count.pending { color: var(--warning); }
.invoices-summary-count.paid { color: var(--success); }
.invoices-summary-count.overdue { color: var(--danger); }
.invoices-summary-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

.invoices-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.invoices-tabs { display: flex; gap: 4px; }
.invoices-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.invoices-tab:hover { background: var(--bg); }
.invoices-tab.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

.invoices-actions { display: flex; gap: 8px; }
.invoices-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}
.invoices-action-btn svg { width: 16px; height: 16px; }
.invoices-action-btn.btn-create {
  background: var(--accent);
  color: white;
}
.invoices-action-btn.btn-create:hover { background: var(--accent-hover); }

.invoices-list { display: flex; flex-direction: column; gap: 6px; }
.invoice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.invoice-item:hover {
  border-color: rgba(124,58,237,0.20);
  box-shadow: 0 8px 24px rgba(124,58,237,0.08);
  transform: translateY(-2px);
}
.invoice-item-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.invoice-item-icon svg { width: 18px; height: 18px; }
.invoice-item-icon.draft { background: var(--bg); color: var(--text-muted); }
.invoice-item-icon.pending { background: var(--warning-light); color: var(--warning); }
.invoice-item-icon.paid { background: var(--success-light); color: var(--success); }
.invoice-item-icon.overdue { background: var(--danger-light); color: var(--danger); }
.invoice-item-info { flex: 1; min-width: 0; }
.invoice-item-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.invoice-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.invoice-item-amount { text-align: right; }
.invoice-item-amount-value { font-weight: 700; font-size: 0.92rem; }
.invoice-item-status {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 2px;
}
.invoice-item-status.draft { color: var(--text-muted); }
.invoice-item-status.pending { color: var(--warning); }
.invoice-item-status.paid { color: var(--success); }
.invoice-item-status.overdue { color: var(--danger); }
.invoice-item-actions { display: flex; gap: 6px; align-items: center; }
.invoice-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}
.invoice-btn svg { width: 14px; height: 14px; }
.invoice-btn.btn-send { background: var(--accent-light); color: var(--accent); }
.invoice-btn.btn-send:hover { background: var(--accent); color: white; }
.invoice-btn.btn-view { background: var(--success-light); color: var(--success); }
.invoice-btn.btn-view:hover { background: var(--success); color: white; }
.invoice-btn.btn-download {
  background: var(--bg);
  color: var(--text-secondary);
  padding: 6px 8px;
}
.invoice-btn.btn-download:hover { background: var(--border); }

.invoices-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.invoices-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; }

/* ---------- Activity Feed ---------- */
.activity-list { display: flex; flex-direction: column; gap: 6px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.activity-item:hover {
  box-shadow: 0 8px 24px rgba(124,58,237,0.08);
  transform: translateY(-2px);
  border-color: rgba(124,58,237,0.15);
}
.activity-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-icon svg { width: 18px; height: 18px; }
.activity-icon.success { background: var(--success-light); color: var(--success); }
.activity-icon.pending { background: var(--warning-light); color: var(--warning); }
.activity-content { flex: 1; }
.activity-title { font-size: 0.88rem; font-weight: 500; margin-bottom: 2px; }
.activity-meta { font-size: 0.78rem; color: var(--text-muted); }
.activity-amount { font-weight: 700; font-size: 0.92rem; white-space: nowrap; }

/* ---------- Discover Page ---------- */
.discover-page {
  display: none;
}
.discover-page.active { display: block; }

.discover-header {
  margin-bottom: 24px;
}
.discover-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.discover-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.discover-search-bar {
  display: flex;
  gap: 10px;
  max-width: 600px;
}
.discover-search-wrapper {
  flex: 1;
  position: relative;
}
.discover-search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.discover-search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}
.discover-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.discover-search-btn {
  padding: 0 24px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.discover-search-btn:hover { background: var(--accent-hover); }

/* Discover Filters */
.discover-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-dropdown { position: relative; }
.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}
.filter-btn svg { width: 15px; height: 15px; }
.filter-btn:hover { border-color: var(--text-muted); }
.filter-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 50;
}
.filter-menu.show { display: block; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.filter-option:hover { background: var(--bg); }
.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.filter-tag:hover { background: var(--accent); color: white; }
.filter-tag svg { width: 12px; height: 12px; }
.clear-filters {
  padding: 5px 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}
.clear-filters:hover { color: var(--danger); }

.discover-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.results-count strong { color: var(--text-primary); }
.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-dropdown label { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.sort-dropdown select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239aa0a6' stroke-width='2'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Discover Supplier Card */
.supplier-card-discover {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124,58,237,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.supplier-card-discover:hover {
  border-color: rgba(124,58,237,0.25);
  box-shadow: 0 16px 40px rgba(124,58,237,0.12);
  transform: translateY(-6px);
}
.supplier-card-discover .supplier-image {
  height: 110px;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(168,85,247,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.supplier-card-discover .supplier-image > svg { width: 36px; height: 36px; color: var(--accent); opacity: 0.3; }
.supplier-card-discover .supplier-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}
.badge-verified {
  padding: 3px 10px;
  background: var(--accent);
  color: white;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-top {
  padding: 3px 10px;
  background: var(--warning);
  color: white;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-new {
  padding: 3px 10px;
  background: var(--success);
  color: white;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.supplier-card-discover .supplier-info { padding: 16px; }
.supplier-description {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.supplier-meta { display: flex; align-items: center; gap: 10px; }
.supplier-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}
.supplier-rating svg { width: 14px; height: 14px; fill: var(--warning); stroke: none; }
.supplier-reviews { font-size: 0.78rem; color: var(--text-muted); }

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results svg { width: 48px; height: 48px; margin: 0 auto 12px; }
.no-results h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary); }
.no-results p { font-size: 0.9rem; }

.discover-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
}
.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: var(--transition);
}
.pagination-btn svg { width: 16px; height: 16px; }
.pagination-btn:hover { border-color: var(--accent); color: var(--accent); }
.pagination-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ========== MODALS ========== */
.order-modal-overlay,
.supplier-modal-overlay,
.escrow-modal-overlay,
.payment-modal-overlay,
.invoice-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,0,20,0.45);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.order-modal-overlay.active,
.supplier-modal-overlay.active,
.escrow-modal-overlay.active,
.payment-modal-overlay.active,
.invoice-modal-overlay.active {
  display: flex;
}

.order-modal-close,
.supplier-modal-close,
.escrow-modal-close,
.payment-modal-close,
.invoice-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  z-index: 10;
}
.order-modal-close:hover,
.supplier-modal-close:hover,
.escrow-modal-close:hover,
.payment-modal-close:hover,
.invoice-modal-close:hover {
  background: var(--bg);
  color: var(--text-primary);
}
.order-modal-close svg,
.supplier-modal-close svg,
.escrow-modal-close svg,
.payment-modal-close svg,
.invoice-modal-close svg {
  width: 20px;
  height: 20px;
}

/* ---------- Order Modal ---------- */
.order-modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124,58,237,0.08);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.order-modal-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.order-modal-header h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.order-modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.order-modal-meta svg { width: 15px; height: 15px; }
.order-modal-meta span { display: flex; align-items: center; gap: 5px; }

.order-modal-timeline {
  display: flex;
  padding: 24px 28px;
  background: var(--bg);
  position: relative;
}
.order-modal-timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50px;
  right: 50px;
  height: 2px;
  background: var(--border);
  transform: translateY(-50%);
}
.order-modal-timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.order-modal-timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: var(--text-muted);
  transition: var(--transition);
}
.order-modal-timeline-dot svg { width: 16px; height: 16px; }
.order-modal-timeline-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.order-modal-timeline-step.completed .order-modal-timeline-dot {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.order-modal-timeline-step.completed .order-modal-timeline-label { color: var(--success); }
.order-modal-timeline-step.active .order-modal-timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.order-modal-timeline-step.active .order-modal-timeline-label { color: var(--accent); font-weight: 600; }

.order-modal-body { padding: 24px 28px; }
.order-modal-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.order-modal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.order-modal-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.order-modal-section h3 svg { width: 18px; height: 18px; }
.order-modal-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
}
.order-modal-label { color: var(--text-muted); }
.order-modal-value { font-weight: 500; }
.order-modal-value.highlight { color: var(--accent); }

.order-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.order-modal-total { font-size: 0.95rem; color: var(--text-secondary); }
.order-modal-total strong { color: var(--text-primary); font-size: 1.1rem; }
.order-modal-actions { display: flex; gap: 8px; }

/* Shared Buttons */
.btn-primary {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--border); }
.btn-cancel {
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-cancel:hover { background: var(--border); }

/* ---------- Supplier Modal ---------- */
.supplier-modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124,58,237,0.08);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.supplier-modal-header { padding: 28px 28px 0; }
.supplier-modal-header-top {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.supplier-modal-logo {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.supplier-modal-logo svg { width: 28px; height: 28px; }
.supplier-modal-title-group { flex: 1; }
.supplier-modal-badges { display: flex; gap: 6px; margin-bottom: 6px; }
.supplier-modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.supplier-modal-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.supplier-modal-location svg { width: 15px; height: 15px; }

.supplier-modal-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.supplier-modal-stat { text-align: center; }
.supplier-modal-stat-value { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.supplier-modal-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.supplier-modal-body { padding: 24px 28px; }
.supplier-modal-section { margin-bottom: 20px; }
.supplier-modal-section:last-child { margin-bottom: 0; }
.supplier-modal-section h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.supplier-modal-section p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.supplier-modal-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.supplier-modal-tag {
  padding: 5px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.supplier-modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}
.btn-message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-message:hover { background: var(--border); }
.btn-quote {
  flex: 1;
  padding: 12px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  text-align: center;
}
.btn-quote:hover { background: var(--accent-hover); }

/* ---------- Escrow Modal ---------- */
.escrow-modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124,58,237,0.08);
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.escrow-modal-header {
  text-align: center;
  padding: 28px 28px 0;
}
.escrow-modal-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.escrow-modal-icon svg { width: 26px; height: 26px; }
.escrow-modal-icon.release { background: var(--success-light); color: var(--success); }
.escrow-modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.escrow-modal-subtitle { font-size: 0.85rem; color: var(--text-muted); }

.escrow-modal-body { padding: 24px 28px; }
.escrow-modal-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
}
.escrow-modal-row:last-of-type { border-bottom: none; }
.escrow-modal-label { color: var(--text-muted); }
.escrow-modal-value { font-weight: 500; }
.escrow-modal-value.amount { color: var(--accent); font-weight: 700; font-size: 1rem; }

.escrow-modal-warning {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--warning-light);
  border-radius: var(--radius-sm);
  margin-top: 16px;
}
.escrow-modal-warning svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--warning); margin-top: 2px; }
.escrow-modal-warning p { font-size: 0.82rem; color: var(--warning); line-height: 1.5; }

.escrow-modal-success {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  margin-top: 16px;
}
.escrow-modal-success svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--success); margin-top: 2px; }
.escrow-modal-success p { font-size: 0.82rem; color: var(--success); line-height: 1.5; }

.escrow-modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}
.btn-confirm-release {
  flex: 1;
  padding: 12px;
  background: var(--success);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  text-align: center;
}
.btn-confirm-release:hover { background: #047857; }

/* ---------- Payment Modal ---------- */
.payment-modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124,58,237,0.08);
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.payment-modal-header {
  text-align: center;
  padding: 28px 28px 0;
}
.payment-modal-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.payment-modal-icon svg { width: 26px; height: 26px; }
.payment-modal-icon.success { background: var(--success-light); color: var(--success); }
.payment-modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.payment-modal-subtitle { font-size: 0.85rem; color: var(--text-muted); }

.payment-modal-body { padding: 24px 28px; }
.payment-modal-form-group { margin-bottom: 16px; }
.payment-modal-form-group:last-child { margin-bottom: 0; }
.payment-modal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.payment-modal-input,
.payment-modal-select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: var(--transition);
}
.payment-modal-input:focus,
.payment-modal-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.payment-modal-input-prefix {
  position: relative;
}
.payment-modal-input-prefix span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 500;
}
.payment-modal-input-prefix input { padding-left: 28px; }

.payment-modal-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
}
.payment-modal-row:last-of-type { border-bottom: none; }
.payment-modal-row-label { color: var(--text-muted); }
.payment-modal-row-value { font-weight: 500; }
.payment-modal-row-value.amount { color: var(--accent); font-weight: 700; }

.payment-modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}
.btn-send-payment {
  flex: 1;
  padding: 12px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  text-align: center;
}
.btn-send-payment:hover { background: var(--accent-hover); }

/* ---------- Invoice Modal ---------- */
.invoice-modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124,58,237,0.08);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}
.invoice-modal-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.invoice-modal-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.invoice-modal-title { font-size: 1.15rem; font-weight: 700; }
.invoice-modal-id { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.invoice-modal-status {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.invoice-modal-status.draft { background: var(--bg); color: var(--text-muted); }
.invoice-modal-status.pending { background: var(--warning-light); color: var(--warning); }
.invoice-modal-status.paid { background: var(--success-light); color: var(--success); }
.invoice-modal-status.overdue { background: var(--danger-light); color: var(--danger); }

.invoice-modal-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.invoice-modal-party h4 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.invoice-modal-party p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

.invoice-modal-body { padding: 24px 28px; }
.invoice-modal-dates {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}
.invoice-modal-date { font-size: 0.85rem; color: var(--text-secondary); }
.invoice-modal-date span { margin-right: 8px; }
.invoice-modal-date strong { color: var(--text-primary); }

.invoice-modal-items { margin-bottom: 20px; }
.invoice-modal-items h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.invoice-modal-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.invoice-modal-item:last-child { border-bottom: none; }
.invoice-modal-item-desc { font-size: 0.88rem; font-weight: 500; margin-bottom: 2px; }
.invoice-modal-item-qty { font-size: 0.78rem; color: var(--text-muted); }
.invoice-modal-item-amount { font-weight: 600; font-size: 0.88rem; }

.invoice-modal-totals {
  border-top: 2px solid var(--border);
  padding-top: 12px;
}
.invoice-modal-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.invoice-modal-total-row.grand-total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 12px;
  font-size: 1rem;
  color: var(--text-primary);
}
.invoice-modal-total-row.grand-total strong { color: var(--accent); }

.invoice-modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}
.btn-download {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-download svg { width: 18px; height: 18px; }
.btn-download:hover { background: var(--border); }
.btn-mark-paid {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--success);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-mark-paid svg { width: 18px; height: 18px; }
.btn-mark-paid:hover { background: #047857; }
.btn-send-invoice {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-send-invoice svg { width: 18px; height: 18px; }
.btn-send-invoice:hover { background: var(--accent-hover); }

/* Create Invoice Form */
.invoice-form-group { margin-bottom: 16px; }
.invoice-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.invoice-form-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: var(--transition);
}
.invoice-form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.invoice-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.invoice-line-items { display: flex; flex-direction: column; gap: 8px; }
.invoice-line-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.invoice-line-item input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  color: var(--text-primary);
  background: var(--surface);
  transition: var(--transition);
}
.invoice-line-item input:focus { border-color: var(--accent); }
.invoice-line-item-remove {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.invoice-line-item-remove:hover { background: var(--danger-light); color: var(--danger); }

.invoice-add-line { margin-top: 4px; }
.invoice-add-line button {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  padding: 6px 0;
}
.invoice-add-line button:hover { text-decoration: underline; }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Page Headers (Subpages) ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { font-size: 1.4rem; font-weight: 700; }
.page-header-actions { display: flex; gap: 8px; }
.page-header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.page-header-btn svg { width: 16px; height: 16px; }
.page-header-btn.btn-primary { background: var(--accent); color: white; }
.page-header-btn.btn-primary:hover { background: var(--accent-hover); }
.page-header-btn.btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.page-header-btn.btn-secondary:hover { background: var(--border); }

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: rgba(124,58,237,0.15);
  box-shadow: var(--shadow-md);
}
.stat-card-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.stat-card-value { font-size: 1.5rem; font-weight: 700; }
.stat-card-change { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.stat-card-change.positive { color: var(--success); }
.stat-card-change.negative { color: var(--danger); }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.tab:hover { background: var(--bg); }
.tab.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* Settings */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.settings-tab {
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}
.settings-tab:hover { color: var(--text-primary); }
.settings-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.settings-content { max-width: 640px; }
.settings-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}
.settings-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.settings-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }

.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 0.88rem; font-weight: 500; }
.toggle-desc { font-size: 0.78rem; color: var(--text-muted); }
.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.toggle-switch.active { background: var(--accent); }
.toggle-switch.active::after { left: 23px; }

/* Danger */
.danger-zone { border-color: var(--danger); }
.danger-zone h3 { color: var(--danger); }
.btn-danger {
  padding: 10px 20px;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-danger:hover { background: #b91c1c; }

/* Connected Accounts */
.connected-account {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.connected-account:last-child { border-bottom: none; }
.connected-account-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.connected-account-icon svg { width: 20px; height: 20px; }
.connected-account-info { flex: 1; }
.connected-account-name { font-weight: 600; font-size: 0.88rem; }
.connected-account-status { font-size: 0.78rem; color: var(--success); }
.connected-account-action {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-secondary);
  transition: var(--transition);
}
.connected-account-action:hover { background: var(--border); }

/* --- Settings Page (full) --- */
.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.settings-card-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px !important; }
.settings-card-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0 !important; }
.settings-card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(124,58,237,0.1);
  color: var(--accent);
  white-space: nowrap;
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.profile-avatar-edit svg { width: 14px; height: 14px; color: var(--text-secondary); }
.profile-avatar-edit:hover { border-color: var(--accent); }
.profile-avatar-edit:hover svg { color: var(--accent); }
.profile-info h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.profile-info p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0 !important; }

/* Form elements */
.form-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  resize: vertical;
  transition: var(--transition);
}
.form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; margin-bottom: 0 !important; }
.btn-row { display: flex; gap: 10px; margin-top: 20px; align-items: center; flex-wrap: wrap; }
.btn-row .btn { display: inline-flex; align-items: center; gap: 8px; }
.btn-row .btn svg { width: 16px; height: 16px; }

/* Toggle switch — checkbox pattern */
.toggle-info h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.toggle-info p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0 !important; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  transition: var(--transition);
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }

/* Connected account buttons */
.connected-account-info h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.connected-account-info p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0 !important; }
.connected-account-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.connected-account-btn:hover { border-color: var(--accent); color: var(--accent); }
.connected-account-btn.disconnect { color: var(--danger); }
.connected-account-btn.disconnect:hover { border-color: var(--danger); background: rgba(239,68,68,0.06); }
.connected-account-btn.connect { color: var(--accent); }
.connected-account-btn.connect:hover { background: rgba(124,58,237,0.06); border-color: var(--accent); }
.connected-account-status { font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.connected-account-status.connected { color: var(--success); background: rgba(16,185,129,0.1); }

/* Plan card */
.plan-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
}
.plan-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.plan-name { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.plan-title { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.plan-badge { font-size: 0.7rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; background: rgba(16,185,129,0.1); color: var(--success); }
.plan-price { font-size: 2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.plan-price span { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.plan-renewal { font-size: 0.82rem; color: var(--text-secondary); }

/* Payment method */
.payment-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.payment-method:last-child { border-bottom: none; }
.payment-method-icon {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a1f71, #2a3cad);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.payment-method-info { flex: 1; }
.payment-method-info h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.payment-method-info p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0 !important; }
.payment-method-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.payment-method-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  pointer-events: none;
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.show { transform: translateY(0); opacity: 1; }

/* Suppliers page */
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.supplier-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(124,58,237,0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}
.supplier-card:hover {
  border-color: rgba(124,58,237,0.20);
  box-shadow: 0 12px 32px rgba(124,58,237,0.10);
  transform: translateY(-4px);
}

.btn-save {
  padding: 10px 24px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-save:hover { background: var(--accent-hover); }

/* ---------- Responsive ---------- */
/* --- Premium Utility Classes (matches homepage) --- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Spotlight border glow on cards — mouse-tracked */
.spotlight-card {
  position: relative;
}
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(124,58,237,0.35),
    transparent 45%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 2;
}
.spotlight-card:hover::before {
  opacity: 1;
}

/* Eyebrow label — like homepage sections */
.eyebrow-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 6px 14px;
  background: rgba(124,58,237,0.08);
  border-radius: 100px;
  border: 1px solid rgba(124,58,237,0.12);
}
.eyebrow-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: eyebrowPulse 2s ease-in-out infinite;
}
@keyframes eyebrowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Metallic text effect — from homepage */
.metallic-text {
  background: linear-gradient(
    135deg,
    #e2e8f0 0%,
    #f8fafc 20%,
    #c084fc 40%,
    #a855f7 50%,
    #f8fafc 60%,
    #e2e8f0 80%,
    #c084fc 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: metallicShine 6s linear infinite;
}
@keyframes metallicShine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Smooth fade-in on scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse accent indicator */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(124,58,237,0.25);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.5); opacity: 0; }
}

/* Button gradient hover — like homepage CTA */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::before {
  opacity: 1;
}

/* KYC banner gradient update */
.kyc-banner {
  background: var(--gradient-hero) !important;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(124,58,237,0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.25); }

@media (max-width: 1024px) {
  .dash-sidebar { width: 220px; }
  :root { --sidebar-width: 220px; }
  .dash-main { padding: 24px; }
}

@media (max-width: 768px) {
  .dash-sidebar { 
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: min(280px, 80vw);
    height: 100dvh;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    overflow-y: auto;
  }
  .dash-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1099;
  }
  .sidebar-overlay.open {
    display: block;
  }
  .sidebar-toggle {
    display: flex;
  }
  :root { --sidebar-width: 0px; }
  .dash-main { margin-left: 0; padding: 16px; }
  .kyc-banner { left: 0; }
  .dash-search { display: none; }
  .order-widget-card { flex-wrap: wrap; }
  .order-widget-amount { min-width: auto; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .invoices-summary { grid-template-columns: repeat(2, 1fr); }
}

/* Sidebar toggle button — hidden on desktop */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  margin-right: 8px;
  flex-shrink: 0;
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .payments-summary { grid-template-columns: 1fr; }
  .invoices-summary { grid-template-columns: repeat(2, 1fr); }
  .dash-hero { padding: 28px 20px; }
  .dash-hero h1 { font-size: 1.3rem; }
}

/* ---------- Toast Notifications ---------- */
.zy-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text-primary);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease;
  max-width: 420px;
}
.zy-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.zy-toast-info { border-left: 4px solid var(--info); }
.zy-toast-success { border-left: 4px solid var(--success); }
.zy-toast-error { border-left: 4px solid var(--danger); }
.zy-toast-warning { border-left: 4px solid var(--warning); }
.zy-toast-msg { flex: 1; }
.zy-toast-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.zy-toast-close:hover { color: var(--text-primary); }

/* ---------- Loading Spinner ---------- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  gap: 10px;
}
.loading-spinner::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: zy-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes zy-spin { to { transform: rotate(360deg); } }
