/*─────────────────────────────────────────────────────────────────────────────
  RESET & DESIGN TOKENS (Mockup Precision)
─────────────────────────────────────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Background & Surfaces */
  --bg-app: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-solid: #FFFFFF;
  --bg-surface: #F1F5F9;
  --bg-surface-hover: #E2E8F0;
  
  /* Borders & Shadows */
  --border: rgba(15, 23, 42, 0.06);
  --border-card: rgba(255, 255, 255, 0.9);
  --shadow-sidebar: 0 10px 40px -10px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 8px 30px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-btn: 0 10px 25px -5px rgba(11, 19, 43, 0.35);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  /* Typography Colors */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  /* Accent Colors */
  --primary: #F43F5E;
  --primary-soft: #FCE7F3;
  --primary-gradient: linear-gradient(135deg, #EC4899, #F43F5E);
  --navy-dark: #0B132B;
  --navy-card-bg: linear-gradient(145deg, #131524 0%, #1A132F 50%, #2A173B 100%);
  
  /* Category & Status Colors */
  --cat-streaming-bg: #FCE7F3; --cat-streaming-text: #F43F5E;
  --cat-music-bg: #D1FAE5;     --cat-music-text: #059669;
  --cat-gaming-bg: #DBEAFE;    --cat-gaming-text: #2563EB;
  --cat-cloud-bg: #E0E7FF;     --cat-cloud-text: #4F46E5;
  --cat-utilities-bg: #FEF3C7; --cat-utilities-text: #D97706;
  --cat-workspace-bg: #EDE9FE; --cat-workspace-text: #7C3AED;
  --cat-other-bg: #F3F4F6;     --cat-other-text: #6B7280;
  
  /* Decorative Blobs */
  --blob-pink: rgba(244, 63, 94, 0.12);
  --blob-blue: rgba(99, 102, 241, 0.10);
  
  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;
}

[data-theme="dark"] {
  --bg-app: #090D16;
  --bg-sidebar: #111827;
  --bg-card: rgba(17, 24, 39, 0.82);
  --bg-card-solid: #111827;
  --bg-surface: #1F2937;
  --bg-surface-hover: #374151;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --shadow-sidebar: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --navy-dark: #F43F5E;
  --navy-card-bg: linear-gradient(145deg, #18112C 0%, #25133B 50%, #3B1854 100%);
  
  --cat-streaming-bg: rgba(244, 63, 94, 0.18); --cat-streaming-text: #FB7185;
  --cat-music-bg: rgba(5, 150, 105, 0.18);     --cat-music-text: #34D399;
  --cat-gaming-bg: rgba(37, 99, 235, 0.18);    --cat-gaming-text: #60A5FA;
  --cat-cloud-bg: rgba(79, 70, 229, 0.18);     --cat-cloud-text: #818CF8;
  --cat-utilities-bg: rgba(217, 119, 6, 0.18); --cat-utilities-text: #FBBF24;
  --cat-workspace-bg: rgba(124, 58, 237, 0.18);--cat-workspace-text: #A78BFA;
  --cat-other-bg: rgba(107, 114, 128, 0.18);   --cat-other-text: #9CA3AF;
  
  --blob-pink: rgba(244, 63, 94, 0.08);
  --blob-blue: rgba(99, 102, 241, 0.07);
}

body {
  font-family: var(--font-main);
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

/*─────────────────────────────────────────────────────────────────────────────
  DECORATIVE BACKGROUND BLOBS
─────────────────────────────────────────────────────────────────────────────*/
.blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  transition: all 0.5s ease;
}
.blob-1 {
  width: 550px; height: 550px;
  background: var(--blob-pink);
  top: -100px; left: 250px;
}
.blob-2 {
  width: 600px; height: 600px;
  background: var(--blob-blue);
  top: 30%; right: -100px;
}
.blob-3 {
  width: 450px; height: 450px;
  background: var(--blob-pink);
  bottom: -150px; left: 20%;
}

/*─────────────────────────────────────────────────────────────────────────────
  LAYOUT STRUCTURE (FLOATING SIDEBAR + MAIN)
─────────────────────────────────────────────────────────────────────────────*/
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Floating Sidebar Card */
.sidebar {
  width: 265px;
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  background: var(--bg-sidebar);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sidebar);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: all 0.3s ease;
  overflow-y: auto;
  padding: 24px 16px 20px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-header {
  padding: 4px 8px 20px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.brand:hover {
  opacity: 0.95;
}
.brand-icon-box {
  height: 40px;
  width: auto;
  min-width: 65px;
  max-width: 85px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 !important;
  overflow: visible;
}
[data-theme="dark"] .brand-icon-box {
  background: transparent !important;
  border: none !important;
}
.brand-box-img {
  width: auto;
  height: 100%;
  max-height: 40px;
  object-fit: contain !important;
  display: block;
}

/* Sadece sol üst (sidebar) logosunu büyütmek için özel tanımlama */
.sidebar-header .brand-icon-box {
  height: 55px;
  min-width: 80px;
  max-width: 120px;
}
.sidebar-header .brand-box-img {
  max-height: 55px;
}
.brand:hover .brand-icon-box {
  transform: scale(1.05) rotate(-3deg);
}
.brand-typography {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-main-text {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  line-height: 1.05;
}
.brand-main-text span {
  background: linear-gradient(135deg, #F43F5E, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub-text {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.9px;
  margin-top: 3px;
}

/* Nav Menu */
.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}
.nav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0 12px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 4px;
}
.nav-item svg {
  width: 20px; height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
  transition: stroke 0.2s ease;
}
.nav-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--bg-card-solid);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}
[data-theme="dark"] .nav-item.active {
  background: #1E293B;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--primary);
}
.nav-item.active svg {
  stroke: var(--primary);
}

/* Button inside sidebar */
.sidebar-action-btn {
  background: var(--navy-dark);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-btn);
  margin: 16px 8px 24px;
  transition: all 0.25s ease;
}
.sidebar-action-btn svg { width: 18px; height: 18px; }
.sidebar-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(244, 63, 94, 0.45);
  background: var(--primary);
}

/* User Card at Bottom — Premium Profile */
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.user-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card-solid) 100%);
  border: 1px solid var(--border);
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.user-profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244,63,94,0.06), rgba(99,102,241,0.06));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.user-profile-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.08), 0 4px 16px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}
.user-profile-card:hover::before { opacity: 1; }

/* Avatar with animated gradient ring */
.user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.user-avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #F43F5E, #EC4899, #8B5CF6, #6366F1, #3B82F6, #EC4899, #F43F5E);
  animation: avatarRingSpin 4s linear infinite;
  opacity: 0.85;
}
@keyframes avatarRingSpin {
  to { transform: rotate(360deg); }
}
.user-avatar-ring::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--bg-surface);
}
.user-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

/* Online status dot */
.user-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22C55E;
  border: 2.5px solid var(--bg-surface);
  z-index: 2;
  animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.user-info { flex: 1; overflow: hidden; min-width: 0; }
.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.user-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.3;
}
.user-role {
  font-size: 10.5px;
  color: var(--text-light);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.user-role-badge svg {
  width: 10px;
  height: 10px;
}

/* Logout Button */
.profile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.profile-logout-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}
.profile-logout-btn:hover {
  background: #FEE2E2;
  color: #EF4444;
  border-color: #FECACA;
  transform: scale(1.08);
}
.profile-logout-btn:hover svg {
  transform: translateX(2px);
}
.profile-logout-btn:active {
  transform: scale(0.95);
}
[data-theme="dark"] .profile-logout-btn:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.25);
}

/*─────────────────────────────────────────────────────────────────────────────
  MAIN WORKSPACE AREA
─────────────────────────────────────────────────────────────────────────────*/
.main-content {
  margin-left: 295px;
  flex: 1;
  padding: 32px 40px 60px;
  min-height: 100vh;
  position: relative;
}

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.6px;
  line-height: 1.2;
}
.page-title p {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 6px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-box {
  position: relative;
  width: 240px;
}
.search-box input {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0 16px 0 42px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.theme-toggle-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}
.theme-toggle-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary);
}

/* Logo & Brand Enhancements */
.sidebar-logo-img {
  height: 46px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  margin: 2px 4px 2px 0;
  transition: transform 0.2s ease;
}
.sidebar-logo-img:hover {
  transform: scale(1.03);
}
.settings-banner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-card);
}
.settings-banner-logo {
  height: 60px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}
.mobile-top-brand {
  display: none;
}
.mobile-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/*─────────────────────────────────────────────────────────────────────────────
  PAGE WRAP & VIEWS
─────────────────────────────────────────────────────────────────────────────*/
.view-page { display: none; animation: fadeInView 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.view-page.active { display: block; }

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

/* Dashboard Split Grid (Left Column + Right Sidebar) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* Section Headings */
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
}
.section-title-icon svg { width: 22px; height: 22px; stroke-width: 2.2; }
.section-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.section-badge {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.filter-chip:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.filter-chip.active {
  background: var(--navy-dark);
  color: #fff;
  border-color: var(--navy-dark);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Subscription Cards Grid */
.subs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.sub-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.sub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary);
}

.sub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sub-card-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  overflow: hidden;
}
.sub-cat-icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.sub-card:hover .sub-cat-icon { transform: scale(1.06); }
.sub-cat-icon svg { width: 26px; height: 26px; stroke-width: 2; }

.sub-details {
  flex: 1;
  overflow: hidden;
}
.sub-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 3px;
}

.sub-pricing {
  text-align: right;
  flex-shrink: 0;
  margin-left: 10px;
}
.sub-price {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.sub-cycle {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 3px;
}

.sub-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.sub-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tag-pill {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.tag-trial {
  background: var(--cat-utilities-bg);
  color: var(--cat-utilities-text);
  border-color: transparent;
}

.sub-card-actions {
  display: flex;
  gap: 6px;
}
.card-btn {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}
.card-btn svg { width: 15px; height: 15px; }
.card-btn-edit { color: #3B82F6; }
.card-btn-edit:hover { background: #EFF6FF; border-color: #BFDBFE; transform: scale(1.08); }
.card-btn-delete { color: #EF4444; }
.card-btn-delete:hover { background: #FEF2F2; border-color: #FECACA; transform: scale(1.08); }
.card-btn-restore { color: #10B981; }
.card-btn-restore:hover { background: #ECFDF5; border-color: #A7F3D0; transform: scale(1.08); }

/*─────────────────────────────────────────────────────────────────────────────
  RIGHT SIDEBAR PANELS (Dark Card & Savings Tip)
─────────────────────────────────────────────────────────────────────────────*/
.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Total Monthly Expense Dark Card */
.dark-stat-card {
  background: var(--navy-card-bg);
  border-radius: var(--radius-xl);
  padding: 26px;
  color: #FFFFFF;
  box-shadow: 0 20px 40px -15px rgba(26, 19, 47, 0.5);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dark-stat-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.25) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}
.dark-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.wallet-icon-circle {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E2E8F0;
}
.wallet-icon-circle svg { width: 22px; height: 22px; stroke-width: 2; }

.currency-switcher-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.currency-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.dark-stat-middle {
  margin-bottom: 24px;
}
.dark-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dark-stat-value {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -1.5px;
  line-height: 1;
}

.dark-stat-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.6;
}

/* Saving Tip Card */
.tip-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.tip-icon-box {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: #FEF9C3;
  color: #EAB308;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .tip-icon-box { background: rgba(234, 179, 8, 0.18); }
.tip-icon-box svg { width: 22px; height: 22px; stroke-width: 2.2; }

.tip-content h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.tip-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Empty State */
.empty-box {
  text-align: center;
  padding: 70px 24px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
}
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.empty-icon svg { width: 28px; height: 28px; }
.empty-box h3 { font-family: var(--font-heading); font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.empty-box p { font-size: 13px; color: var(--text-muted); max-width: 320px; margin: 0 auto; line-height: 1.5; }

/*─────────────────────────────────────────────────────────────────────────────
  ANALYTICS PAGE
─────────────────────────────────────────────────────────────────────────────*/
.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.analytics-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.astat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.astat-val {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}
.astat-val.pink { color: var(--primary); }

.analytics-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.chart-box h3 { font-family: var(--font-heading); font-size: 18px; font-weight: 800; margin-bottom: 20px; }

.cat-bar-item { margin-bottom: 16px; }
.cat-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.cat-bar-bg { height: 10px; background: var(--bg-surface); border-radius: 6px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }

/*─────────────────────────────────────────────────────────────────────────────
  HISTORY & SETTINGS PAGES
─────────────────────────────────────────────────────────────────────────────*/
.history-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.custom-table { width: 100%; border-collapse: collapse; text-align: left; }
.custom-table th {
  padding: 14px 20px;
  background: var(--bg-surface);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.custom-table td {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

/* Settings Cards */
.settings-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.s-label-box h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.s-label-box p { font-size: 12px; color: var(--text-muted); }

/*─────────────────────────────────────────────────────────────────────────────
  MODALS & FORMS
─────────────────────────────────────────────────────────────────────────────*/
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-box {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  padding: 28px;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-box { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-family: var(--font-heading); font-size: 22px; font-weight: 800; }
.modal-close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.modal-close-btn:hover { background: #FEE2E2; color: #EF4444; }

/* Form Elements */
.presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.preset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s ease;
}
.preset-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.form-group { margin-bottom: 18px; }
.form-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}
.form-input, .form-select {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--bg-card-solid);
}

.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

/* Minimal Domain Fields Animation */
@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.seg-switcher {
  display: flex;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 4px;
  border: 1px solid var(--border);
}
.seg-opt {
  flex: 1;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.seg-opt.active {
  background: var(--navy-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cat-picker-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cat-picker-item svg { width: 15px; height: 15px; stroke-width: 2.2; }
.cat-picker-item:hover { transform: scale(1.03); }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn-primary {
  flex: 1; height: 48px; border-radius: var(--radius-sm);
  background: var(--navy-dark); color: #fff;
  font-family: var(--font-heading); font-size: 15px; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.2s ease;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); }
.btn-secondary {
  flex: 1; height: 48px; border-radius: var(--radius-sm);
  background: var(--bg-surface); color: var(--text-secondary);
  font-family: var(--font-heading); font-size: 15px; font-weight: 700;
  border: 1px solid var(--border); cursor: pointer; transition: all 0.2s ease;
}
.btn-secondary:hover { background: var(--bg-surface-hover); }

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  box-shadow: var(--shadow-modal);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast-msg.show { transform: translateY(0); opacity: 1; }
.toast-icon { color: #10B981; }

/* Responsive adjustments */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .analytics-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    height: 72px;
    border-radius: 24px 24px 0 0;
    flex-direction: row;
    padding: 8px 16px;
    align-items: center;
    justify-content: space-around;
  }
  .sidebar-header, .sidebar-action-btn, .sidebar-footer { display: none; }
  .sidebar-nav { flex-direction: row; padding: 0; width: 100%; justify-content: space-around; }
  .nav-label { display: none; }
  .nav-item { width: auto; padding: 10px; margin: 0; justify-content: center; }
  .nav-item span { display: none; }
  .main-content { margin-left: 0; padding: 20px 20px 90px; }
  .page-header { flex-direction: column; }
  .search-box { width: 100%; }
  .mobile-top-brand {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 14px;
  }
}
