/* =================================================================
   ABONELIK — Design System & Global Styles
   Following AGENTS.md specification exactly
   ================================================================= */

/* ---------------------------------------------------------------
   1. DESIGN TOKENS (Custom Properties)
   --------------------------------------------------------------- */
:root {
  /* ── Blue Trust Palette (Dark Mode Default) ── */
  --color-navy-950: #0c1222;
  --color-navy-900: #111827;
  --color-navy-800: #1e293b;
  --color-navy-700: #334155;
  --color-navy-600: #475569;
  --color-navy-500: #64748b;

  /* Accent — Royal Blue */
  --color-accent-400: #3b82f6;
  --color-accent-500: #2563eb;
  --color-accent-600: #1d4ed8;
  --color-accent-glow: rgba(37, 99, 235, 0.25);

  /* Semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger:  #ef4444;
  --color-info:    #6366f1;

  /* Text */
  --color-text-primary:   #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted:     #64748b;

  /* Borders */
  --color-border:       rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);

  /* Surfaces & Glass */
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-bg-strong: rgba(17, 24, 39, 0.9);
  --glass-bg-subtle: rgba(17, 24, 39, 0.5);
  --topbar-bg: rgba(12, 18, 34, 0.85);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --surface-active: rgba(37, 99, 235, 0.12);
  --modal-backdrop: rgba(0, 0, 0, 0.7);
  --table-even: rgba(17, 24, 39, 0.4);
  --table-odd: rgba(12, 18, 34, 0.3);
  --table-hover: rgba(30, 41, 59, 0.7);
  --table-header: rgba(12, 18, 34, 0.95);
  --toast-bg: rgba(17, 24, 39, 0.95);

  /* Shadows */
  --shadow-card:     0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.55);
  --shadow-glow:     0 0 32px rgba(37, 99, 235, 0.2);

  /* Border Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --sidebar-width:     260px;
  --sidebar-collapsed: 68px;
  --topbar-height:     64px;
  --content-padding:   2rem;
}

/* ── Light Mode ── */
[data-theme="light"] {
  --color-navy-950: #f8fafc;
  --color-navy-900: #ffffff;
  --color-navy-800: #f1f5f9;
  --color-navy-700: #e2e8f0;
  --color-navy-600: #cbd5e1;
  --color-navy-500: #94a3b8;

  --color-accent-400: #3b82f6;
  --color-accent-500: #2563eb;
  --color-accent-600: #1d4ed8;
  --color-accent-glow: rgba(37, 99, 235, 0.15);

  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger:  #dc2626;
  --color-info:    #4f46e5;

  --color-text-primary:   #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted:     #94a3b8;

  --color-border:       rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-bg-strong: rgba(255, 255, 255, 0.95);
  --glass-bg-subtle: rgba(255, 255, 255, 0.7);
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --surface-active: rgba(37, 99, 235, 0.08);
  --modal-backdrop: rgba(0, 0, 0, 0.4);
  --table-even: rgba(241, 245, 249, 0.5);
  --table-odd: rgba(248, 250, 252, 0.5);
  --table-hover: rgba(226, 232, 240, 0.6);
  --table-header: rgba(248, 250, 252, 0.98);
  --toast-bg: rgba(255, 255, 255, 0.98);

  --shadow-card:     0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 4px 24px rgba(0, 0, 0, 0.1);
  --shadow-glow:     0 0 24px rgba(37, 99, 235, 0.12);
}

/* ---------------------------------------------------------------
   2. CSS RESET & BASE
   --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin:  0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-navy-950);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img, svg { display: block; }

/* Focus styles — accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ensure [hidden] always wins over display:flex / display:grid rules */
[hidden] { display: none !important; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-navy-900); }
::-webkit-scrollbar-thumb {
  background: var(--color-navy-600);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-navy-500); }

/* ---------------------------------------------------------------
   3. BACKGROUND AMBIENT DECORATION
   --------------------------------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 20% 10%, rgba(37, 99, 235, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 80% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before { opacity: 0.4; }

/* ---------------------------------------------------------------
   4. APP SHELL LAYOUT
   --------------------------------------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------
   5. SIDEBAR
   --------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--color-navy-900);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  z-index: 100;
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
  min-height: 64px;
}

.logo-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.4));
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  flex: 1;
}

.logo-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.logo-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-accent-400);
  background: var(--surface-active);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-pill);
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-toggle {
  color: var(--color-text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  display: none; /* visible on mobile */
}
.sidebar-toggle:hover {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
}

/* Sidebar Profile */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-radius: 0;
}
.sidebar-profile:hover { background: var(--surface-hover); }

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-info));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--color-accent-glow);
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.profile-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-plan {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-accent-400);
}

.profile-status {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-success);
  flex-shrink: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 0.5rem;
  margin-bottom: 0.375rem;
  margin-top: 0.25rem;
}

.nav-list { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  text-align: left;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--color-text-primary);
}

.nav-item.active {
  background: var(--surface-active);
  color: var(--color-accent-400);
  border-left-color: var(--color-accent-500);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--color-accent-400);
}

.nav-icon {
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.nav-label { flex: 1; }

.nav-badge {
  background: var(--color-accent-500);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  line-height: 1.6;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

.storage-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.storage-val { color: var(--color-text-muted); }

.storage-bar {
  height: 4px;
  background: var(--color-navy-700);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent-500), var(--color-info));
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
}

.storage-hint {
  font-size: 0.6875rem;
  color: var(--color-accent-400);
  display: block;
}

/* ---------------------------------------------------------------
   6. MAIN CONTENT
   --------------------------------------------------------------- */
.main-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------
   7. TOPBAR
   --------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--content-padding);
  height: var(--topbar-height);
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.hamburger-btn {
  color: var(--color-text-secondary);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  display: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.hamburger-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-navy-800);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  max-width: 380px;
  width: 100%;
}
.topbar-search:focus-within {
  border-color: var(--color-accent-500);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.topbar-search svg { color: var(--color-text-muted); flex-shrink: 0; }

.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  flex: 1;
  min-width: 0;
}
.search-input::placeholder { color: var(--color-text-muted); }

.search-kbd {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  background: var(--color-navy-700);
  border-radius: 4px;
  padding: 1px 5px;
  border: 1px solid var(--color-border-hover);
  font-family: monospace;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}
.icon-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
}

.icon-btn-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-navy-950);
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-info));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 0 12px var(--color-accent-glow);
}
.topbar-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--color-accent-glow);
}

/* ---------------------------------------------------------------
   8. SCREEN / PAGE CONTENT
   --------------------------------------------------------------- */
.screen {
  padding: var(--content-padding);
  max-width: 1200px;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  animation: fadeSlideUp 0.3s ease both;
}

.screen.active { display: block; }

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

.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.screen-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.screen-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.screen-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------
   9. BUTTONS
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-accent-400));
  color: #fff;
  border: none;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-600), var(--color-accent-500));
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-hover);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--color-text-primary);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: none;
  color: var(--color-accent-400);
  border: none;
  padding: 0.375rem 0.75rem;
}
.btn-ghost:hover {
  background: var(--surface-active);
  color: var(--color-accent-400);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.3125rem 0.75rem;
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------------
   10. CARDS
   --------------------------------------------------------------- */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  animation: fadeSlideUp 0.35s ease both;
}
.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-top: 0.125rem;
}

/* ---------------------------------------------------------------
   11. STAT CARDS
   --------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  animation: fadeSlideUp 0.35s ease both;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-500), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.stat-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-3px);
}
.stat-card:hover::before { opacity: 1; }

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon--blue   { background: rgba(37,99,235,0.15);  color: var(--color-accent-400); }
.stat-icon--green  { background: rgba(34,211,164,0.15);  color: var(--color-success); }
.stat-icon--warning{ background: rgba(245,158,11,0.15);  color: var(--color-warning); }
.stat-icon--purple { background: rgba(129,140,248,0.15); color: var(--color-info); }
.stat-icon--danger { background: rgba(244,63,94,0.15);   color: var(--color-danger); }

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.stat-change--up      { color: var(--color-success); }
.stat-change--down    { color: var(--color-danger); }
.stat-change--warn    { color: var(--color-warning); }
.stat-change--neutral { color: var(--color-text-muted); }

/* ---------------------------------------------------------------
   12. DASHBOARD GRID
   --------------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------
   13. CHART
   --------------------------------------------------------------- */
.chart-card { overflow: visible; }

.chart-period-tabs {
  display: flex;
  gap: 2px;
  background: var(--color-navy-800);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.period-tab {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}
.period-tab.active {
  background: var(--color-accent-500);
  color: #fff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}
.period-tab:not(.active):hover {
  color: var(--color-text-secondary);
  background: var(--surface-hover);
}

.chart-area {
  display: flex;
  gap: 0.75rem;
  height: 200px;
  align-items: flex-end;
}

.chart-y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-bottom: 1.5rem;
  flex-shrink: 0;
}
.chart-y-labels span {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  text-align: right;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex: 1;
  height: 100%;
  padding-bottom: 0;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  height: 100%;
}

.chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, rgba(37,99,235,0.8) 0%, rgba(37,99,235,0.4) 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
}
.chart-bar:hover,
.chart-bar:focus-visible {
  background: linear-gradient(180deg, var(--color-accent-400) 0%, var(--color-accent-500) 100%);
  box-shadow: 0 0 16px rgba(37,99,235,0.5);
  transform: scaleX(1.1);
  outline: none;
}
.chart-bar.active {
  background: linear-gradient(180deg, var(--color-accent-400) 0%, var(--color-accent-600) 100%);
  box-shadow: 0 0 20px rgba(37,99,235,0.4);
}
.chart-bar:hover::after {
  content: attr(data-value);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-navy-800);
  color: var(--color-text-primary);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-hover);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-card);
}

.chart-label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ---------------------------------------------------------------
   14. RENEWAL LIST
   --------------------------------------------------------------- */
.renewal-list {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.renewal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
  border-radius: var(--radius-sm);
}
.renewal-item:last-child { border-bottom: none; }
.renewal-item:hover { background: var(--surface-hover); padding-left: 0.25rem; }

.renewal-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.renewal-logo--netflix { background: linear-gradient(135deg, #e50914, #b81313); }
.renewal-logo--spotify { background: linear-gradient(135deg, #1db954, #0f7a38); }
.renewal-logo--adobe   { background: linear-gradient(135deg, #ff0000, #cc0000); }
.renewal-logo--github  { background: linear-gradient(135deg, #333, #24292e); }
.renewal-logo--figma   { background: linear-gradient(135deg, #a259ff, #1abcfe); }

.renewal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.renewal-name { font-size: 0.875rem; font-weight: 600; color: var(--color-text-primary); }
.renewal-date { font-size: 0.75rem; color: var(--color-text-muted); }

.renewal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.renewal-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ---------------------------------------------------------------
   15. CATEGORY BREAKDOWN
   --------------------------------------------------------------- */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.category-name {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  min-width: 70px;
}
.category-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.category-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
}
.category-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 30px;
  text-align: right;
}

/* ---------------------------------------------------------------
   16. BADGES
   --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.badge--success {
  background: rgba(34, 211, 164, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(34, 211, 164, 0.2);
}
.badge--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge--danger {
  background: rgba(244, 63, 94, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.badge--info {
  background: rgba(129, 140, 248, 0.12);
  color: var(--color-info);
  border: 1px solid rgba(129, 140, 248, 0.2);
}
.badge--purple {
  background: rgba(129, 140, 248, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

/* ---------------------------------------------------------------
   17. DATA TABLES
   --------------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead tr {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  background: var(--table-header);
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}
.data-table tbody tr:nth-child(even)  { background: var(--table-even); }
.data-table tbody tr:nth-child(odd)   { background: var(--table-odd); }
.data-table tbody tr:hover            { background: var(--table-hover); }
.data-table tbody tr:last-child       { border-bottom: none; }

.data-table td {
  padding: 0.875rem 1rem;
  color: var(--color-text-secondary);
  vertical-align: middle;
}

.td-price {
  font-weight: 700;
  color: var(--color-text-primary) !important;
  font-feature-settings: 'tnum';
}
.td-muted { color: var(--color-text-muted) !important; }

.table-service {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.service-dot {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.service-dot--netflix { background: linear-gradient(135deg, #e50914, #b81313); }
.service-dot--spotify { background: linear-gradient(135deg, #1db954, #0f7a38); }
.service-dot--adobe   { background: linear-gradient(135deg, #ff0000, #cc0000); }
.service-dot--github  { background: linear-gradient(135deg, #444, #24292e); }
.service-dot--figma   { background: linear-gradient(135deg, #a259ff, #1abcfe); }
.service-dot--openai  { background: linear-gradient(135deg, #10a37f, #0e8a6b); }
.service-dot--youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }

.service-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
.service-url {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.table-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------
   18. CHECKBOX
   --------------------------------------------------------------- */
.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-border-hover);
  border-radius: 4px;
  background: var(--color-navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.checkbox-wrap input:checked + .checkmark {
  background: var(--color-accent-500);
  border-color: var(--color-accent-500);
}
.checkbox-wrap input:checked + .checkmark::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* ---------------------------------------------------------------
   19. ACTION BUTTONS (Table)
   --------------------------------------------------------------- */
.action-btns {
  display: flex;
  gap: 0.375rem;
}

.action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  background: var(--surface-hover);
  border: 1px solid var(--color-border);
}
.action-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
  border-color: var(--color-border-hover);
}
.action-btn--danger:hover {
  color: var(--color-danger);
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
}

/* ---------------------------------------------------------------
   20. PAGINATION
   --------------------------------------------------------------- */
.pagination {
  display: flex;
  gap: 4px;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover:not(:disabled) {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
  border-color: var(--color-border-hover);
}
.page-btn.active {
  background: var(--color-accent-500);
  color: #fff;
  border-color: transparent;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------
   21. FILTERS ROW
   --------------------------------------------------------------- */
.filters-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-navy-800);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
  flex: 1;
  min-width: 200px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.filter-search-wrap:focus-within {
  border-color: var(--color-accent-500);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.filter-search-wrap svg { color: var(--color-text-muted); flex-shrink: 0; }

.filter-input {
  background: none;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  flex: 1;
  min-width: 0;
}
.filter-input::placeholder { color: var(--color-text-muted); }

.filter-select {
  background: var(--color-navy-800);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  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='%234d6488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
}
.filter-select:focus {
  border-color: var(--color-accent-500);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
  color: var(--color-text-primary);
}

/* ---------------------------------------------------------------
   22. FORM ELEMENTS
   --------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

.required { color: var(--color-danger); }

.form-input {
  background: var(--color-navy-800);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.9375rem;
  padding: 0.625rem 0.875rem;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--color-text-muted); }
.form-input:focus {
  border-color: var(--color-accent-500);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.form-input:hover:not(:focus) { border-color: var(--color-border-hover); }

select.form-input {
  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='%234d6488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-error {
  font-size: 0.75rem;
  color: var(--color-danger);
  min-height: 1rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------------------------------------------------------------
   23. MODAL
   --------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated), var(--shadow-glow);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(16px);
  transition: transform var(--transition-base);
}
.modal-backdrop.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.modal-close {
  color: var(--color-text-muted);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.modal-close:hover {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ---------------------------------------------------------------
   24. NOTES GRID
   --------------------------------------------------------------- */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.note-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
  animation: fadeSlideUp 0.35s ease both;
  position: relative;
  overflow: hidden;
}
.note-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--color-accent-500);
  border-radius: var(--radius-pill);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.note-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}
.note-card:hover::before { opacity: 1; }

.note-card--warning::before { background: var(--color-warning); }
.note-card--success::before { background: var(--color-success); }
.note-card--danger::before  { background: var(--color-danger); }
.note-card--warning:hover { border-color: rgba(245,158,11,0.25); }
.note-card--success:hover { border-color: rgba(34,211,164,0.25); }
.note-card--danger:hover  { border-color: rgba(244,63,94,0.25); }

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.note-tag { margin: 0; }
.note-menu-btn {
  color: var(--color-text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.note-menu-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-navy-700);
}

.note-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.note-body {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  flex: 1;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}
.note-date { font-size: 0.75rem; color: var(--color-text-muted); }
.note-icon { font-size: 1rem; }

/* Add Note Card */
.note-card--add {
  border-style: dashed;
  border-color: var(--color-border-hover);
  cursor: pointer;
  background: rgba(37, 99, 235, 0.03);
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.note-card--add:hover {
  background: var(--surface-active);
  border-color: var(--color-accent-500);
}
.note-card--add::before { display: none; }

.add-note-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 500;
}
.note-card--add:hover .add-note-content { color: var(--color-accent-400); }

/* ---------------------------------------------------------------
   25. SETTINGS
   --------------------------------------------------------------- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.settings-card { hover-state: none; }

.settings-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.settings-section-title--danger { color: var(--color-danger); }
.settings-section-title svg { flex-shrink: 0; }

.settings-card--danger {
  border-color: rgba(244, 63, 94, 0.15);
  background: rgba(244, 63, 94, 0.03);
  grid-column: span 2;
}

.settings-danger-text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.danger-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border);
}
.toggle-row:last-child { border-bottom: none; }

.toggle-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.toggle-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.toggle-switch {
  flex-shrink: 0;
  cursor: pointer;
  display: block;
}
.toggle-switch input { display: none; }

.toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  background: var(--color-navy-700);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-hover);
  position: relative;
  transition: all var(--transition-base);
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--color-text-muted);
  border-radius: 50%;
  transition: all var(--transition-base);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-track {
  background: rgba(37, 99, 235, 0.25);
  border-color: var(--color-accent-500);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
  left: 23px;
  background: var(--color-accent-400);
  box-shadow: 0 0 8px rgba(37,99,235,0.5);
}

/* ---------------------------------------------------------------
   26. ANALYTICS PLACEHOLDER
   --------------------------------------------------------------- */
.analytics-placeholder {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-content {
  text-align: center;
  max-width: 360px;
}

/* ---------------------------------------------------------------
   27. TOAST NOTIFICATIONS
   --------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-hover);
  max-width: 360px;
  opacity: 0;
  transform: translateX(20px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}
.toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.toast--success { background: var(--toast-bg); border-color: rgba(34,211,164,0.3); }
.toast--info    { background: var(--toast-bg); border-color: rgba(129,140,248,0.3); }
.toast--error   { background: var(--toast-bg); border-color: rgba(244,63,94,0.3);   }

/* ---------------------------------------------------------------
   28. SIDEBAR MOBILE OVERLAY
   --------------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.sidebar-overlay.active { opacity: 1; }

/* ---------------------------------------------------------------
   29. FULL TABLE (Subscriptions Screen)
   --------------------------------------------------------------- */
.full-table th:first-child,
.full-table td:first-child {
  width: 40px;
  padding-right: 0;
}

/* ---------------------------------------------------------------
   30. RESPONSIVE — Tablet (≤ 1200px)
   --------------------------------------------------------------- */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid-3 .recent-subs-card { grid-column: auto; }
}

/* ---------------------------------------------------------------
   31. RESPONSIVE — Tablet (≤ 1024px)
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --content-padding: 1.25rem; }

  /* Sidebar becomes fixed drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    z-index: 100;
    box-shadow: var(--shadow-elevated);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; pointer-events: none; }
  .sidebar-overlay.active { pointer-events: all; }
  .sidebar-toggle { display: flex; }
  .hamburger-btn { display: flex; }

  .settings-grid { grid-template-columns: 1fr; }
  .settings-card--danger { grid-column: auto; }
}

/* ---------------------------------------------------------------
   32. RESPONSIVE — Mobile (≤ 768px)
   --------------------------------------------------------------- */
@media (max-width: 768px) {
  :root { --content-padding: 1rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .screen-header { flex-direction: column; align-items: flex-start; }
  .screen-header-actions { width: 100%; }
  .topbar-search { max-width: none; }
  .search-kbd { display: none; }
  .form-row { flex-direction: column; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; justify-content: center; }
  .notes-grid { grid-template-columns: 1fr; }
  .filters-row { flex-direction: column; }
  .filter-select { flex: 1; }
  .dashboard-grid { gap: 0.75rem; }

  /* -- Subscription table mobile card layout -- */
  .data-table { font-size: 0.8125rem; }
  .data-table th,
  .data-table td { padding: 0.625rem 0.5rem; }
  .data-table th { font-size: 0.625rem; }
  .service-dot { width: 26px; height: 26px; font-size: 0.6875rem; }
  .service-name { font-size: 0.8125rem; }
  .service-url { font-size: 0.6875rem; }
  .action-btn { width: 26px; height: 26px; }
  .table-wrapper { margin: 0 -0.25rem; }
  .screen-header h1 { font-size: 1.375rem; }
  .screen-header p { font-size: 0.8125rem; }
}

/* ---------------------------------------------------------------
   33. RESPONSIVE — Small Mobile (≤ 480px)
   --------------------------------------------------------------- */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
  .topbar-search { display: none; }
  .chart-area { height: 150px; }
  .chart-y-labels { display: none; }
  .stat-value { font-size: 1.5rem; }
}

/* ---------------------------------------------------------------
   34. PRINT STYLES
   --------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .modal-backdrop, .toast-container { display: none !important; }
  .main-content { margin: 0; }
  body { background: white; color: black; }
}

/* ---------------------------------------------------------------
   35. REDUCED MOTION PREFERENCE
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------
   36. TRIAL BANNER
   --------------------------------------------------------------- */
#trialBanner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.625rem 1.5rem;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(99,102,241,0.12));
  border-bottom: 1px solid rgba(37,99,235,0.2);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
  position: sticky;
  top: var(--topbar-height);
  z-index: 40;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#trialBanner strong { color: var(--color-text-primary); }
.trial-banner-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3125rem 0.875rem;
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-accent-400));
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  box-shadow: 0 0 12px rgba(37,99,235,0.3);
}
.trial-banner-btn:hover {
  box-shadow: 0 0 20px rgba(37,99,235,0.45);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------
   37. PAYMENT SYSTEM STYLES
   --------------------------------------------------------------- */

/* Security Notice */
.payment-security-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: rgba(34,211,164,0.07);
  border: 1px solid rgba(34,211,164,0.18);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}
.payment-security-notice svg { color: var(--color-success); flex-shrink: 0; }
.payment-security-notice strong { color: var(--color-text-primary); }

/* Payment Section */
.payment-section { margin-bottom: 2rem; }
.payment-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.payment-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}
.payment-section-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  background: var(--surface-hover);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
}

/* Saved Cards Grid */
.saved-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Add Card Placeholder */
.add-card-placeholder {
  height: 160px;
  border: 2px dashed var(--color-border-hover);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.875rem;
  font-weight: 500;
}
.add-card-placeholder:hover {
  border-color: var(--color-accent-500);
  color: var(--color-accent-400);
  background: var(--surface-active);
  box-shadow: 0 0 20px rgba(37,99,235,0.1);
}
.add-card-placeholder:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

/* Saved Card Item */
.saved-card-item { display: flex; flex-direction: column; gap: 0; }

.saved-card-visual {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.saved-card-item:hover .saved-card-visual {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.saved-card-item--default .saved-card-visual {
  box-shadow: 0 8px 32px rgba(37,99,235,0.3);
}

/* Shimmer overlay */
.saved-card-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.saved-card-chip {
  width: 36px;
  height: 26px;
  background: linear-gradient(135deg, #d4af37, #f5d060, #d4af37);
  border-radius: 4px;
  position: relative;
}
.saved-card-chip::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  border-radius: 2px;
}

.saved-card-brand {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
}

.saved-card-num {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.12em;
  margin-top: auto;
}

.saved-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

.saved-card-default-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(34,211,164,0.2);
  border: 1px solid rgba(34,211,164,0.4);
  color: var(--color-success);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.saved-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ---------------------------------------------------------------
   3D CARD PREVIEW (Add Card Modal)
   --------------------------------------------------------------- */
.add-card-modal-container { max-width: 560px; }

.card-preview-scene {
  perspective: 1000px;
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: center;
}

.card-preview {
  width: 320px;
  height: 190px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-preview.flipped { transform: rotateY(180deg); }

.card-preview-front,
.card-preview-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(37,99,235,0.15);
  background: linear-gradient(135deg, #1a3366, #0f2040);
  overflow: hidden;
}
.card-preview-front::before,
.card-preview-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.card-preview-back { transform: rotateY(180deg); }

.card-preview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #d4af37, #f5d060, #b8973a);
  border-radius: 4px;
  position: relative;
}
.card-chip::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: linear-gradient(90deg, rgba(255,255,255,0.25), rgba(255,255,255,0.08));
  border-radius: 2px;
}

.card-brand-logo {
  display: flex;
  align-items: center;
}

.card-number-display {
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.16em;
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.card-preview-bottom {
  display: flex;
  gap: 2rem;
  align-items: flex-end;
}

.card-label {
  font-size: 0.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.card-holder-display,
.card-expiry-display {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
}

/* Back of card */
.card-back-stripe {
  position: absolute;
  top: 2.5rem;
  left: 0; right: 0;
  height: 44px;
  background: rgba(0,0,0,0.6);
}
.card-cvv-wrap {
  position: absolute;
  top: 6.5rem;
  right: 1.5rem;
  left: 1.5rem;
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-cvv-wrap .card-label { color: #666; }
.card-cvv-display {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.2em;
}
.card-back-brand {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
}

/* Card brand inline in input */
.card-brand-inline {
  position: absolute;
  right: 0.75rem;
  display: none;
  align-items: center;
}

/* ---------------------------------------------------------------
   AUTOPAY TOGGLE (iOS-style switch)
   --------------------------------------------------------------- */
.autopay-card { padding: 1.25rem; }
.autopay-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.autopay-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 44px;
  height: 24px;
}
.autopay-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.autopay-slider {
  position: absolute;
  inset: 0;
  background: var(--color-navy-700);
  border-radius: var(--radius-pill);
  transition: background var(--transition-base);
  border: 1px solid var(--color-border);
}
.autopay-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.autopay-toggle input:checked + .autopay-slider {
  background: var(--color-success);
  border-color: var(--color-success);
  box-shadow: 0 0 10px rgba(34,211,164,0.35);
}
.autopay-toggle input:checked + .autopay-slider::before {
  transform: translateY(-50%) translateX(20px);
}
.autopay-toggle input:focus-visible + .autopay-slider {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------
   RESPONSIVE PAYMENT
   --------------------------------------------------------------- */
@media (max-width: 768px) {
  .saved-cards-grid { grid-template-columns: 1fr; }
  .card-preview-scene { display: none; }
  .add-card-modal-container { max-width: 100%; }
}

/* ---------------------------------------------------------------
   38. SUBSCRIPTION SMART DETECT / AUTOCOMPLETE
   --------------------------------------------------------------- */

/* Sub-search wrap: spans full form-row width */
.sub-search-wrap {
  grid-column: 1 / -1;
  position: relative;
}

/* Search field with icon + badge */
.sub-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.sub-detect-icon {
  position: absolute;
  left: 0.875rem;
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 1;
  transition: color var(--transition-fast);
}

.sub-search-input {
  padding-left: 2.5rem !important;
  padding-right: 5.5rem !important;
}

.sub-detect-badge {
  position: absolute;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(34, 211, 164, 0.15);
  border: 1px solid rgba(34, 211, 164, 0.3);
  color: var(--color-success);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  animation: fadeSlideUp 0.2s ease both;
}

/* Suggestions dropdown */
.sub-suggestions {
  list-style: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--color-navy-800);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
  animation: fadeSlideUp 0.18s ease both;
  padding: 0.375rem;
}
.sub-suggestions::-webkit-scrollbar { width: 4px; }
.sub-suggestions::-webkit-scrollbar-track { background: transparent; }
.sub-suggestions::-webkit-scrollbar-thumb { background: var(--color-navy-700); border-radius: 2px; }

.sub-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.sub-suggestion-item:hover,
.sub-suggestion-item.highlighted {
  background: var(--surface-active);
}

.sub-sug-dot {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.sub-sug-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sub-sug-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
.sub-sug-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub-sug-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-accent-400);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.sub-suggestion-item:hover .sub-sug-badge,
.sub-suggestion-item.highlighted .sub-sug-badge {
  opacity: 1;
}

/* Detected Preview Banner */
.sub-detected-preview {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: rgba(34, 211, 164, 0.06);
  border: 1px solid rgba(34, 211, 164, 0.18);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  animation: fadeSlideUp 0.25s ease both;
  grid-column: 1 / -1;
}

.sub-detected-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background var(--transition-base);
}

.sub-detected-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sub-detected-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
.sub-detected-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-detected-clear {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}
.sub-detected-clear:hover {
  color: var(--color-danger);
  background: rgba(244, 63, 94, 0.1);
}

/* Purple badge for software/productivity (missing from earlier) */
.badge--purple {
  background: rgba(129, 140, 248, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

/* service-url small line under service name */
.service-url {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* table-count text */
.table-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------
   39. REPORT MODULE
   --------------------------------------------------------------- */

/* Nav badge "Yeni" variant */
.nav-badge--new {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

/* ── Summary Bar ─────────────────────────────────────────────── */
.report-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fadeSlideUp 0.3s ease both;
}

.report-sum-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--transition-base), transform var(--transition-base);
}
.report-sum-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.report-sum-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-sum-icon--blue   { background: rgba(37,99,235,0.15); color: var(--color-accent-400); }
.report-sum-icon--green  { background: rgba(34,211,164,0.15); color: var(--color-success); }
.report-sum-icon--purple { background: rgba(129,140,248,0.15); color: var(--color-info); }
.report-sum-icon--orange { background: rgba(245,158,11,0.15); color: var(--color-warning); }

.report-sum-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.report-sum-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}
.report-sum-value--green { color: var(--color-success); }

/* ── Empty State ─────────────────────────────────────────────── */
.report-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 5rem 2rem;
  text-align: center;
}
.report-empty-icon {
  width: 100px;
  height: 100px;
  background: var(--glass-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-empty-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
.report-empty-desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 420px;
}

/* ── Loading State ───────────────────────────────────────────── */
.report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 5rem 2rem;
}
.report-loading-spinner {
  width: 52px;
  height: 52px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent-500);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.report-loading-text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  min-height: 1.5em;
}
.report-loading-bar {
  width: 320px;
  max-width: 100%;
  height: 6px;
  background: var(--color-navy-700);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.report-loading-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent-500), #a78bfa);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.6s ease;
}

/* ── Report Cards Container ──────────────────────────────────── */
.report-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Subscription Card (wrapper per sub) ─────────────────────── */
.report-sub-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  animation: fadeSlideUp 0.4s ease both;
  transition: border-color var(--transition-base);
}
.report-sub-card:hover {
  border-color: var(--color-border-hover);
}

.report-sub-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.report-sub-dot {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.report-sub-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-sub-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.report-sub-amount {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.report-sub-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

/* No-alternative message */
.report-no-alt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  padding: 1.5rem;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
}

/* ── Alt Cards Grid ──────────────────────────────────────────── */
.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

/* ── Individual Alternative Card ────────────────────────────── */
.alt-card {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}
.alt-card:hover {
  border-color: rgba(37,99,235,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.alt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.alt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Rank badges */
.alt-rank-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.alt-rank--gold   { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.alt-rank--silver { background: rgba(156,163,175,0.15); color: #9ca3af; border: 1px solid rgba(156,163,175,0.25); }
.alt-rank--bronze { background: rgba(180,120,80,0.15); color: #cd7c4a; border: 1px solid rgba(180,120,80,0.25); }

/* Saving badges */
.alt-saving-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.alt-saving-badge--save  { background: rgba(34,211,164,0.15); color: var(--color-success); border: 1px solid rgba(34,211,164,0.25); }
.alt-saving-badge--costly{ background: rgba(244,63,94,0.12); color: var(--color-danger); border: 1px solid rgba(244,63,94,0.2); }
.alt-saving-badge--same  { background: rgba(129,140,248,0.12); color: var(--color-info); border: 1px solid rgba(129,140,248,0.2); }

/* Alt card info row */
.alt-card-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alt-dot {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.alt-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}
.alt-url {
  display: block;
  font-size: 0.75rem;
  color: var(--color-accent-400);
  text-decoration: none;
  margin-top: 2px;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}
.alt-url:hover { opacity: 1; text-decoration: underline; }

.alt-price {
  margin-left: auto;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-text-primary);
  white-space: nowrap;
}
.alt-price span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* Pro / Con feature list */
.alt-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--color-border);
}
.alt-pro,
.alt-con {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.alt-pro { color: var(--color-text-secondary); }
.alt-con { color: var(--color-text-muted); }
.alt-pro svg,
.alt-con svg { flex-shrink: 0; margin-top: 2px; }

/* Responsive */
@media (max-width: 768px) {
  .alt-grid { grid-template-columns: 1fr; }
  .report-summary-bar { grid-template-columns: 1fr 1fr; }
  .report-sub-header { flex-direction: column; align-items: flex-start; }
  .report-sub-badges { margin-left: 0; }
}
@media (max-width: 480px) {
  .report-summary-bar { grid-template-columns: 1fr; }
  .alt-card-header { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------
   40. NEWS FEED
   --------------------------------------------------------------- */

/* ── Filter Bar ─────────────────────────────────────────────── */
.news-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.3s ease both;
}

.news-filter-chip {
  background: var(--glass-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}
.news-filter-chip:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
  background: var(--surface-hover);
}
.news-filter-chip.active {
  background: var(--surface-active);
  border-color: var(--color-accent-400);
  color: var(--color-accent-400);
  font-weight: 600;
}
.news-filter-chip .chip-count {
  font-size: 0.6875rem;
  background: var(--surface-active);
  color: var(--color-accent-400);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  line-height: 1.4;
}
.news-filter-chip.active .chip-count {
  background: var(--color-accent-400);
  color: #fff;
}

/* ── Feed Grid ──────────────────────────────────────────────── */
.news-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* ── News Card ──────────────────────────────────────────────── */
.news-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  animation: fadeSlideUp 0.4s ease both;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card);
}

/* Card Image / Gradient Header */
.news-card-visual {
  height: 110px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--glass-bg) 100%);
  pointer-events: none;
}
.news-card-visual-icon {
  font-size: 2.5rem;
  position: relative;
  z-index: 1;
  opacity: 0.5;
  filter: grayscale(0.2);
}

/* Category Badge */
.news-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}
.news-badge--feature  { background: rgba(37,99,235,0.25); color: #3b82f6; }
.news-badge--price    { background: rgba(245,158,11,0.25); color: #f59e0b; }
.news-badge--newapp   { background: rgba(99,102,241,0.25); color: #818cf8; }
.news-badge--trend    { background: rgba(16,185,129,0.25); color: #10b981; }
.news-badge--security { background: rgba(239,68,68,0.25); color: #ef4444; }
.news-badge--tip      { background: rgba(99,102,241,0.25); color: #6366f1; }

/* Source Badge (top-right) */
.news-source-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Card Body */
.news-card-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}

.news-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Expanded content (hidden by default) */
.news-card-full {
  display: none;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}
.news-card.expanded .news-card-excerpt { display: none; }
.news-card.expanded .news-card-full { display: block; }

/* Card Footer */
.news-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.news-card-meta svg {
  flex-shrink: 0;
}

.news-card-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.news-tag {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Empty State ────────────────────────────────────────────── */
.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 5rem 2rem;
  text-align: center;
}
.news-empty-icon {
  width: 100px;
  height: 100px;
  background: var(--glass-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-empty-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
.news-empty-desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 420px;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.news-stats-bar {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.25s ease both;
}
.news-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.news-stat-value {
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .news-feed-grid { grid-template-columns: 1fr; }
  .news-card-visual { height: 90px; }
}
@media (max-width: 480px) {
  .news-filter-bar { gap: 0.375rem; }
  .news-filter-chip { font-size: 0.75rem; padding: 0.3rem 0.75rem; }
}

/* ── Auth Screen & App Container ───────────────────────────────── */
.auth-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top left, var(--color-navy-800) 0%, var(--color-navy-950) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
  overflow: hidden;
}

/* Background floating shapes for premium feel */
.auth-screen::before, .auth-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  animation: float 10s ease-in-out infinite alternate;
}
.auth-screen::before {
  width: 300px; height: 300px;
  background: rgba(46, 134, 255, 0.15);
  top: -100px; left: -100px;
}
.auth-screen::after {
  width: 400px; height: 400px;
  background: rgba(129, 140, 248, 0.1);
  bottom: -150px; right: -150px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 30px); }
}

.auth-card {
  position: relative;
  z-index: 1;
  background: rgba(10, 22, 40, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 3rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
}
.auth-logo { 
  align-self: center; 
  margin-bottom: 1.25rem; 
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}
.auth-title { text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; color: #fff; letter-spacing: -0.02em; }
.auth-subtitle { text-align: center; font-size: 0.9375rem; color: var(--color-text-secondary); margin-bottom: 2.5rem; line-height: 1.5; }

.auth-card .form-input {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: #fff;
  transition: all 0.2s ease;
}
.auth-card .form-input:focus {
  background: rgba(0,0,0,0.3);
  border-color: var(--color-accent-400);
  box-shadow: 0 0 0 4px rgba(46, 134, 255, 0.15);
}
.auth-card .form-label {
  color: var(--color-text-primary);
  margin-left: 0.25rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.auth-card .btn {
  padding: 0.875rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.auth-card .btn-primary {
  background: linear-gradient(135deg, var(--color-accent-400), var(--color-accent-600));
  box-shadow: 0 4px 15px rgba(46, 134, 255, 0.3);
}
.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
