/* =============================================================
   CamSight Partner Portal — Clean, Bright Modern Light Design System
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables (Light Theme) ----------------------------- */
:root {
  --brand-1: #4f46e5;       /* Indigo 600 */
  --brand-2: #6366f1;       /* Indigo 500 */
  --brand-3: #818cf8;       /* Indigo 400 */
  --accent:  #0284c7;       /* Sky 600 */
  --success: #16a34a;       /* Emerald 600 */
  --warning: #d97706;       /* Amber 600 */
  --danger:  #dc2626;       /* Red 600 */

  --bg-base:       #f8fafc; /* Slate 50 - clean & bright */
  --bg-surface:    #ffffff; /* Pure White */
  --bg-card:       #ffffff;
  --bg-card-hover: #f1f5f9;
  --border:        #e2e8f0; /* Slate 200 */
  --border-strong: #cbd5e1; /* Slate 300 */
  --border-glow:   rgba(79, 70, 229, 0.2);

  --text-primary:   #0f172a; /* Slate 900 - clear & sharp */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted:     #94a3b8; /* Slate 400 */

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm:   0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 8px 25px -4px rgba(79, 70, 229, 0.18);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, sans-serif;
}

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

html { font-size: 15.5px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Subtle Light Background ambient ----------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(79, 70, 229, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(2, 132, 199, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout ------------------------------------------------- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
}

/* ---- Cards -------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { border-color: var(--border-strong); }
.card-glow  { box-shadow: var(--shadow-glow); border-color: var(--border-glow); }

/* ---- Balance Cards ------------------------------------------ */
.balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.balance-card {
  padding: 18px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.balance-card.pending  { background: #fffbeb; border-color: #fde68a; }
.balance-card.available { background: #f0fdf4; border-color: #bbf7d0; }

.balance-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.balance-card.pending   .balance-label { color: #b45309; }
.balance-card.available .balance-label { color: #15803d; }

.balance-amount {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}
.balance-card.pending   .balance-amount { color: #d97706; }
.balance-card.available .balance-amount { color: #16a34a; }
.balance-unit { font-size: 11.5px; font-weight: 500; color: var(--text-secondary); margin-top: 4px; }

/* ---- Modern Hero Income Card ----------------------------- */
.income-card {
  margin: 12px 16px 14px;
  padding: 22px 20px 18px;
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #6366f1 100%);
  border-radius: var(--radius-xl);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.35), 0 4px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}
.income-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.income-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.income-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.income-badge-trend {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
}
.income-amount {
  font-size: 36px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 4px 0 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.income-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}
.income-footer-btn {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.income-footer-btn:hover { background: rgba(255, 255, 255, 0.35); }

/* ---- Quick Action Circular Buttons ------------------------ */
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 16px 16px;
}
.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.quick-action-item:hover {
  transform: translateY(-2px);
  border-color: var(--brand-1);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}
.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.quick-action-icon.payout  { background: #ede9fe; color: #6d28d9; }
.quick-action-icon.add-cus { background: #e0f2fe; color: #0284c7; }
.quick-action-icon.qr-ref  { background: #dcfce7; color: #16a34a; }
.quick-action-icon.support { background: #fef3c7; color: #d97706; }
.quick-action-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

/* ---- KPI Stats Row ----------------------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 16px 16px;
}
.kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.kpi-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-1);
  margin-bottom: 2px;
}
.kpi-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---- Tier Progress Card ------------------------------------ */
.tier-card {
  margin: 0 16px 16px;
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.tier-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tier-name { font-weight: 800; font-size: 14px; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.tier-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-radius: 999px;
  color: white;
}
.progress-bar-bg {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-1), #818cf8);
  border-radius: 999px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--text-secondary); margin-top: 6px; font-weight: 500;
}

/* ---- Home Recent Card -------------------------------------- */
.home-recent-card {
  margin: 0 16px 20px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.home-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.home-recent-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-recent-link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-1);
  text-decoration: none;
  cursor: pointer;
}
.home-mini-tx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.home-mini-tx:last-child { border-bottom: none; }
.home-mini-tx-info { display: flex; align-items: center; gap: 8px; }
.home-mini-tx-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.home-mini-tx-name { font-weight: 700; color: var(--text-primary); font-size: 12px; }
.home-mini-tx-time { font-size: 10.5px; color: var(--text-muted); }
.home-mini-tx-amount { font-weight: 800; font-size: 13px; color: var(--success); }

/* ---- App Bar ------------------------------------------------ */
.app-bar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-bar-title { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.app-bar-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* ---- Alert Banner ------------------------------------------ */
.alert-banner {
  margin: 0 16px 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600;
}
.alert-banner.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* ---- Form Controls ----------------------------------------- */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  padding: 11px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus {
  background: #ffffff;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.form-input::placeholder { color: var(--text-muted); }

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover { opacity: 0.95; transform: translateY(-1px); }
.btn-secondary {
  background: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #e2e8f0; }
.btn-success { background: var(--success); color: white; }
.btn-danger  { background: var(--danger);  color: white; }
.btn-full    { width: 100%; justify-content: center; padding: 13px; font-size: 15px; border-radius: var(--radius-md); }
.btn-sm      { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Bottom Navigation ------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
}
.nav-item svg { width: 22px; height: 22px; transition: var(--transition); }
.nav-item.active { color: var(--brand-1); }
.nav-item.active svg { transform: translateY(-2px); stroke: var(--brand-1); }

/* ---- Badges & Chips ---------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-purple  { background: #ede9fe; color: #6d28d9; }
.badge-muted   { background: #f1f5f9; color: var(--text-secondary); }

/* ---- Customer Cards ---------------------------------------- */
.customer-card {
  margin: 0 16px 10px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.customer-card:hover { border-color: var(--border-strong); }
.customer-card.expiring { border-color: #fde68a; background: #fffdf5; }
.customer-name  { font-weight: 700; font-size: 15px; color: var(--text-primary); margin-bottom: 3px; }
.customer-phone { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.customer-meta  { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.customer-actions { display: flex; gap: 8px; }

/* ---- Wallet Transactions ------------------------------------ */
.tx-list { padding: 0 16px; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tx-icon.green  { background: #dcfce7; }
.tx-icon.yellow { background: #fef3c7; }
.tx-icon.red    { background: #fee2e2; }
.tx-info { flex: 1; min-width: 0; }
.tx-desc { font-weight: 600; font-size: 13.5px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-weight: 800; font-size: 15px; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }

/* ---- Payout CTA & Floating Action Button ------------------- */
.payout-cta-card {
  margin: 0 16px 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.payout-cta-btn {
  width: 100%;
  padding: 13px 18px;
  font-family: var(--font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
  transition: all 0.2s;
}
.payout-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38);
}
.payout-cta-note {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.fab {
  position: fixed;
  bottom: 76px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  z-index: 50;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}
.fab svg { width: 22px; height: 22px; stroke: white; }

.badge-seats {
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
  border: 1px solid #bae6fd;
}

/* ---- Referral & Policy Page Styles ------------------------- */
.qr-container {
  margin: 16px;
  padding: 24px 18px;
  background: linear-gradient(145deg, #ffffff, #f8faff);
  border: 1px solid #e0e7ff;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.08);
}

.qr-frame {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  padding: 10px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ref-qr-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ref-qr-box canvas,
#ref-qr-box img,
.qr-code {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.referral-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-1);
  background: #f5f3ff;
  padding: 8px 24px;
  border-radius: 999px;
  border: 2px solid #ddd6fe;
  margin-bottom: 6px;
}

.referral-url-box {
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0 16px;
  word-break: break-all;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid #e2e8f0;
}

.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.share-buttons .btn {
  font-size: 11.5px;
  padding: 8px 6px;
  justify-content: center;
  white-space: nowrap;
}

/* Policy Card Styles */
.policy-card {
  margin: 0 16px 16px;
  padding: 20px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.policy-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.policy-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  transition: transform 0.15s ease;
}
.policy-item:hover { transform: translateY(-2px); }

.policy-item-rate {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-1);
  margin-bottom: 2px;
}
.policy-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.policy-item-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.policy-note-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: #92400e;
  line-height: 1.45;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ---- Modals ------------------------------------------------ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal-sheet {
  width: 100%; max-width: 440px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-handle {
  width: 40px; height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 0 auto 20px;
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--text-primary); margin-bottom: 16px; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* ---- Toast -------------------------------------------------- */
.toast-container {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 400px;
  z-index: 200; pointer-events: none;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  animation: slideDown 0.3s ease;
}
.toast.success { background: #16a34a; color: white; }
.toast.error   { background: #dc2626; color: white; }
.toast.info    { background: #4f46e5; color: white; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---- Sections visibility ----------------------------------- */
.screen { display: none; flex: 1; overflow-y: auto; padding-bottom: 74px; }
.screen.active { display: flex; flex-direction: column; }

/* ---- Filter Tabs / Chips ----------------------------------- */
.filter-tabs {
  display: flex; gap: 8px; padding: 8px 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
  font-family: var(--font);
}
.filter-tab.active {
  background: var(--brand-1);
  border-color: var(--brand-1);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* ---- Empty state ------------------------------------------ */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-icon  { font-size: 44px; margin-bottom: 10px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.empty-desc  { font-size: 13px; color: var(--text-muted); }

/* ---- Auth Screen (Light) ----------------------------------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  z-index: 10;
  background: #f8fafc;
}
.auth-container {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-card), 0 10px 30px rgba(0, 0, 0, 0.04);
  animation: slideDown 0.35s ease;
}
.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo-img {
  height: 52px;
  max-width: 180px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}
.auth-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Auth Tabs (Segmented control) ------------------------- */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}
.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.auth-tab.active {
  background: #ffffff;
  color: var(--brand-1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ---- Auth Demo Box ----------------------------------------- */
.auth-demo-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px dashed #86efac;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.auth-demo-box:hover {
  background: #dcfce7;
  border-color: #22c55e;
}
.auth-demo-title {
  font-size: 12px;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 2px;
}
.auth-demo-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.auth-demo-desc code {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}
