/* ==========================================================================
   KEN - PERSONAL ASSISTANT DESIGN SYSTEM (MODERN GLASSMORPHISM)
   ========================================================================== */

:root {
  /* Fonts */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Theme Defaults (Glass Dark Cyber) */
  --bg-base: #090d16;
  --bg-gradient: radial-gradient(circle at top left, #121c2e, #070a10 70%);
  --glass-surface: rgba(22, 30, 49, 0.58);
  --glass-surface-hover: rgba(30, 42, 69, 0.72);
  --glass-surface-solid: #151d2f;
  --glass-card: rgba(18, 25, 41, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(6, 182, 212, 0.45);
  --glass-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.45), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset;
  --glass-dropdown: rgba(15, 23, 42, 0.92);

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Accent & Neo Vibrant Colors */
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-violet: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-wa: #25d366;
  --accent-tg: #229ed9;

  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --accent-glow: rgba(6, 182, 212, 0.28);

  /* Ambient Glow Spheres */
  --glow-1: rgba(59, 130, 246, 0.18);
  --glow-2: rgba(139, 92, 246, 0.15);
  --glow-3: rgba(6, 182, 212, 0.12);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --sidebar-width: 270px;
  --topbar-height: 74px;
}

/* Theme variations */
[data-theme="aurora"] {
  --bg-base: #061118;
  --bg-gradient: radial-gradient(circle at top left, #0e272b, #040d12 70%);
  --glass-surface: rgba(12, 33, 38, 0.6);
  --glass-card: rgba(9, 27, 31, 0.68);
  --accent-cyan: #14b8a6;
  --accent-gradient: linear-gradient(135deg, #14b8a6 0%, #06b6d4 50%, #6366f1 100%);
  --glow-1: rgba(20, 184, 166, 0.22);
  --glow-2: rgba(99, 102, 241, 0.18);
}

[data-theme="emerald"] {
  --bg-base: #06130d;
  --bg-gradient: radial-gradient(circle at top left, #0e2b1e, #040e09 70%);
  --glass-surface: rgba(13, 36, 26, 0.6);
  --glass-card: rgba(10, 30, 21, 0.68);
  --accent-cyan: #10b981;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  --glow-1: rgba(16, 185, 129, 0.25);
  --glow-2: rgba(6, 182, 212, 0.15);
}

[data-theme="light"] {
  --bg-base: #f0f4f8;
  --bg-gradient: radial-gradient(circle at top left, #e0e9f5, #f5f8fc 70%);
  --glass-surface: rgba(255, 255, 255, 0.65);
  --glass-surface-hover: rgba(255, 255, 255, 0.85);
  --glass-surface-solid: #ffffff;
  --glass-card: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-focus: rgba(37, 99, 235, 0.4);
  --glass-shadow: 0 10px 30px -6px rgba(15, 23, 42, 0.07), 0 0 1px 1px rgba(255, 255, 255, 0.9) inset;
  --glass-dropdown: rgba(255, 255, 255, 0.96);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --glow-1: rgba(59, 130, 246, 0.14);
  --glow-2: rgba(139, 92, 246, 0.12);
}

/* Theme: Royal Velvet Crimson (Sunset Ruby & Rose Gold) */
[data-theme="crimson"] {
  --bg-base: #160812;
  --bg-gradient: radial-gradient(circle at top left, #290d1f 10%, #10050c 80%);
  --glass-surface: rgba(45, 16, 36, 0.65);
  --glass-surface-hover: rgba(65, 24, 52, 0.78);
  --glass-surface-solid: #250d1e;
  --glass-card: rgba(38, 14, 30, 0.72);
  --glass-border: rgba(244, 63, 94, 0.22);
  --glass-border-focus: rgba(251, 113, 133, 0.55);
  --glass-shadow: 0 14px 40px -8px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08) inset;
  --glass-dropdown: rgba(32, 11, 25, 0.96);

  --text-primary: #fff1f2;
  --text-secondary: #fda4af;
  --text-muted: #f43f5e;
  --text-dim: #9f1239;

  --accent-cyan: #f43f5e;
  --accent-blue: #fb7185;
  --accent-purple: #e11d48;
  --accent-emerald: #10b981;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 50%, #e11d48 100%);
  --accent-glow: rgba(244, 63, 94, 0.35);

  --glow-1: rgba(244, 63, 94, 0.24);
  --glow-2: rgba(251, 146, 60, 0.2);
  --glow-3: rgba(225, 29, 72, 0.18);
}

[data-theme="crimson"] .theme-btn.active {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

[data-theme="crimson"] .hero-card {
  background: linear-gradient(135deg, rgba(45, 16, 36, 0.92), rgba(30, 10, 24, 0.96));
  border-color: rgba(244, 63, 94, 0.3);
  box-shadow: 0 12px 35px -8px rgba(244, 63, 94, 0.15);
}

[data-theme="crimson"] .login-overlay {
  background: radial-gradient(circle at 50% 30%, rgba(35, 12, 28, 0.95), rgba(16, 6, 13, 0.98));
}

[data-theme="crimson"] .login-card {
  background: rgba(45, 16, 36, 0.85);
  border-color: rgba(244, 63, 94, 0.3);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 45px rgba(244, 63, 94, 0.2);
}

/* Theme: Warm Roasted Mocha & Caramel (Espresso & Karamel Emas) */
[data-theme="coffee"] {
  --bg-base: #130d0a;
  --bg-gradient: radial-gradient(circle at top left, #271912 10%, #0d0806 80%);
  --glass-surface: rgba(45, 29, 21, 0.65);
  --glass-surface-hover: rgba(62, 40, 29, 0.78);
  --glass-surface-solid: #241711;
  --glass-card: rgba(36, 23, 17, 0.72);
  --glass-border: rgba(217, 119, 6, 0.22);
  --glass-border-focus: rgba(245, 158, 11, 0.55);
  --glass-shadow: 0 14px 40px -8px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08) inset;
  --glass-dropdown: rgba(30, 19, 14, 0.96);

  --text-primary: #fef3c7;
  --text-secondary: #fde68a;
  --text-muted: #d97706;
  --text-dim: #92400e;

  --accent-cyan: #f59e0b;
  --accent-blue: #d97706;
  --accent-purple: #b45309;
  --accent-emerald: #10b981;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #92400e 100%);
  --accent-glow: rgba(245, 158, 11, 0.35);

  --glow-1: rgba(245, 158, 11, 0.22);
  --glow-2: rgba(217, 119, 6, 0.18);
  --glow-3: rgba(180, 83, 9, 0.15);
}

[data-theme="coffee"] .theme-btn.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

[data-theme="coffee"] .hero-card {
  background: linear-gradient(135deg, rgba(45, 29, 21, 0.92), rgba(27, 17, 12, 0.96));
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 12px 35px -8px rgba(217, 119, 6, 0.15);
}

[data-theme="coffee"] .login-overlay {
  background: radial-gradient(circle at 50% 30%, rgba(35, 22, 16, 0.95), rgba(15, 9, 6, 0.98));
}

[data-theme="coffee"] .login-card {
  background: rgba(45, 29, 21, 0.85);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 45px rgba(245, 158, 11, 0.2);
}

/* Theme: Kertas Al-Qur'an (QPP / Shamwa Paper / Warm Parchment) */
[data-theme="qpp"] {
  --bg-base: #f6efe1;
  --bg-gradient: radial-gradient(circle at top left, #fdf8ee 10%, #eee3cb 85%);
  --glass-surface: rgba(254, 250, 241, 0.78);
  --glass-surface-hover: rgba(255, 253, 248, 0.94);
  --glass-surface-solid: #fdfaf3;
  --glass-card: rgba(253, 249, 239, 0.85);
  --glass-border: rgba(180, 142, 85, 0.22);
  --glass-border-focus: rgba(184, 134, 11, 0.55);
  --glass-shadow: 0 12px 32px -8px rgba(92, 69, 35, 0.08), 0 0 1px 1px rgba(255, 255, 255, 0.85) inset;
  --glass-dropdown: rgba(254, 250, 242, 0.98);

  /* Deep soothing espresso text for reading */
  --text-primary: #2d2115;
  --text-secondary: #5a4835;
  --text-muted: #857057;
  --text-dim: #ac977e;

  /* Islamic Gold & Deep Emerald Accents */
  --accent-cyan: #b8860b;
  --accent-blue: #1c6b50;
  --accent-purple: #8c5d2b;
  --accent-emerald: #1c6b50;
  --accent-gradient: linear-gradient(135deg, #c59b27 0%, #b8860b 45%, #1c6b50 100%);
  --accent-glow: rgba(184, 134, 11, 0.25);

  --glow-1: rgba(218, 165, 32, 0.16);
  --glow-2: rgba(28, 107, 80, 0.12);
  --glow-3: rgba(205, 133, 63, 0.1);
}

/* QPP Specific Component Refinements for Warm Paper Comfort */
[data-theme="qpp"] .hero-card {
  background: linear-gradient(135deg, rgba(254, 250, 241, 0.92), rgba(244, 236, 218, 0.96));
  border-color: rgba(197, 155, 39, 0.35);
  box-shadow: 0 12px 35px -8px rgba(92, 69, 35, 0.1);
}
[data-theme="qpp"] .hero-card::after {
  background: radial-gradient(circle, rgba(197, 155, 39, 0.16) 0%, transparent 70%);
}
[data-theme="qpp"] .hero-badge {
  background: rgba(184, 134, 11, 0.12);
  border-color: rgba(184, 134, 11, 0.3);
  color: #8c5d12;
}
[data-theme="qpp"] .modal-box {
  background: rgba(254, 250, 242, 0.98);
  border-color: rgba(180, 142, 85, 0.25);
  color: #2d2115;
}
[data-theme="qpp"] .form-input,
[data-theme="qpp"] .form-select-sm,
[data-theme="qpp"] .search-input-wrap input {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(180, 142, 85, 0.24);
  color: #2d2115;
}
[data-theme="qpp"] .form-input:focus,
[data-theme="qpp"] .search-input-wrap input:focus {
  background: #ffffff;
  border-color: #b8860b;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.18);
}
[data-theme="qpp"] select.form-input option {
  background: #fdfaf3;
  color: #2d2115;
}
[data-theme="qpp"] .pomo-ring-bg,
[data-theme="qpp"] .ring-bg {
  stroke: rgba(180, 142, 85, 0.15);
}
[data-theme="qpp"] .quick-reminder-box,
[data-theme="qpp"] .user-quick-profile,
[data-theme="qpp"] .integration-block,
[data-theme="qpp"] .stat-box {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(180, 142, 85, 0.2);
}
[data-theme="qpp"] .cal-day-cell {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(180, 142, 85, 0.18);
}
[data-theme="qpp"] .cal-day-cell:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(184, 134, 11, 0.45);
}
[data-theme="qpp"] .cal-day-cell.today {
  border-color: #b8860b;
  background: rgba(184, 134, 11, 0.12);
}
[data-theme="qpp"] .tag-category {
  background: rgba(180, 142, 85, 0.15);
  color: #5a4835;
}
[data-theme="qpp"] .toast {
  background: rgba(254, 250, 242, 0.98);
  border-color: rgba(180, 142, 85, 0.25);
  color: #2d2115;
  box-shadow: 0 12px 35px rgba(92, 69, 35, 0.15);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

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

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* Ambient glow backgrounds */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  animation: pulseAmbient 12s ease-in-out infinite alternate;
}

.glow-1 {
  width: 480px;
  height: 480px;
  background: var(--glow-1);
  top: -80px;
  left: 10%;
}

.glow-2 {
  width: 520px;
  height: 520px;
  background: var(--glow-2);
  bottom: 5%;
  right: 5%;
  animation-delay: -4s;
}

.glow-3 {
  width: 380px;
  height: 380px;
  background: var(--glow-3);
  top: 40%;
  left: 45%;
  animation-delay: -8s;
}

@keyframes pulseAmbient {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.15) translate(25px, -20px); opacity: 0.9; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   GLASSMORPHISM UTILITIES & CARDS
   ========================================================================== */

.glass-card {
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

/* Badges & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-glass {
  background: var(--glass-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn-glass:hover {
  background: var(--glass-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.btn-danger:hover {
  background: #f43f5e;
  color: #fff;
}

.btn-wa {
  background: rgba(37, 211, 102, 0.18);
  color: #4ade80;
  border: 1px solid rgba(37, 211, 102, 0.35);
}
.btn-wa:hover {
  background: #25d366;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

.btn-tg {
  background: rgba(34, 158, 217, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(34, 158, 217, 0.35);
}
.btn-tg:hover {
  background: #229ed9;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 158, 217, 0.35);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--trans-fast);
}
.icon-btn:hover {
  background: var(--glass-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.icon-btn i {
  pointer-events: none;
}

.icon-btn.btn-sm {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1rem;
  flex-shrink: 0;
}

.btn-delete-unit:hover,
.btn-delete-tx:hover,
.btn-delete-expense:hover {
  background: rgba(244, 63, 94, 0.18) !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--trans-fast);
}
.text-btn:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.badge-pulse {
  background: rgba(34, 158, 217, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(34, 158, 217, 0.35);
  animation: pulseGlow 2.5s infinite;
}

.badge-success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ==========================================================================
   APP LAYOUT SHELL
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* SIDEBAR */
.glass-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: var(--glass-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--glass-border);
  padding: 1.5rem 1.25rem;
  flex-shrink: 0;
  z-index: 50;
  transition: transform var(--trans-smooth);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mobile-close-btn {
  display: none;
}

/* Quick User Profile Card in Sidebar */
.user-quick-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.user-quick-profile:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.avatar-ring {
  position: relative;
}

.avatar-img, .avatar-sm, .avatar-large {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.avatar-large {
  width: 64px;
  height: 64px;
  font-size: 1.4rem;
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-base);
}
.status-indicator.online {
  background-color: var(--accent-emerald);
}

.user-meta {
  flex: 1;
  overflow: hidden;
}

.user-display-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chevron-icon {
  color: var(--text-muted);
}

/* Sidebar Nav Menu */
.nav-menu {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.25rem;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.8rem 0.75rem 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.68rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--trans-fast);
  position: relative;
}

.nav-item i {
  font-size: 1.15rem;
  transition: transform var(--trans-fast);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item:hover i {
  transform: scale(1.1);
  color: var(--accent-cyan);
}

.nav-item.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 18px var(--accent-glow);
  font-weight: 600;
}

.nav-item.active i {
  color: #fff;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.25);
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.system-time-box {
  display: flex;
  flex-direction: column;
}

.clock-display {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.date-display {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.quick-toggles {
  display: flex;
  gap: 0.4rem;
}

.quick-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* ==========================================================================
   MAIN CONTENT & HEADER
   ========================================================================== */

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* TOP NAVBAR */
.top-navbar {
  height: var(--topbar-height);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  z-index: 40;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mobile-menu-toggle {
  display: none;
}

.active-view-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quick-search-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
}
.quick-search-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.shortcut-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.weather-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.weather-icon {
  color: var(--accent-amber);
  font-size: 1.1rem;
}

.weather-temp {
  font-weight: 700;
  color: var(--text-primary);
}

/* SQLite Database Sync Indicator */
.db-sync-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.db-sync-pill:hover {
  background: rgba(16, 185, 129, 0.15);
  transform: translateY(-1px);
}

.db-sync-pill.offline {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.db-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

.db-sync-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: none;
}

.db-sync-dot.syncing {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulseDot 0.6s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.db-sync-text {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-primary);
}

/* Settings DB Info Box */
.db-sync-info-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.db-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.db-status-badge.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.db-status-badge .dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.db-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.db-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.db-detail-item strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* Dropdown & Notifications */
.dropdown-wrapper {
  position: relative;
}

.header-action-btn {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-rose);
  display: none;
}

.notif-dot.show {
  display: block;
}

.glass-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: var(--glass-dropdown);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  display: none;
  z-index: 100;
  animation: dropdownIn 0.25s var(--trans-fast);
}

.glass-dropdown.show {
  display: block;
}

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

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 0.75rem;
}

.dropdown-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.notif-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
}

.notif-item-icon {
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

.header-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ==========================================================================
   CONTENT VIEWPORT
   ========================================================================== */

.content-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.view-panel {
  display: none;
  animation: fadeInView 0.35s ease-out;
}

.view-panel.active {
  display: block;
}

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

/* ==========================================================================
   1. DASHBOARD STYLES
   ========================================================================== */

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(30, 41, 67, 0.6), rgba(15, 23, 42, 0.7));
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.hero-greeting {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}

.highlight-name {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-quote {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 1.5rem;
  font-style: italic;
}

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

/* Productivity Orb */
.productivity-orb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.circle-progress-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.ring-fill {
  stroke-dasharray: 339.29;
  stroke-dashoffset: 339.29;
  transition: stroke-dashoffset 0.8s ease;
}

.ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ring-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.ring-caption {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.orb-caption {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
}
.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
}

.metric-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.metric-icon-wrap.task-color {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.metric-icon-wrap.calendar-color {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.metric-icon-wrap.expense-color {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.metric-icon-wrap.pomo-color {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* Split Grid */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.section-card {
  display: flex;
  flex-direction: column;
}

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

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.title-with-icon i {
  font-size: 1.25rem;
}
.title-with-icon h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.dash-task-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
}

/* Quick Dispatch Box */
.quick-reminder-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 1.25rem;
}

.helper-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.dispatch-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.sub-section-divider {
  display: flex;
  align-items: center;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sub-section-divider::before, .sub-section-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}
.sub-section-divider span {
  padding: 0 0.75rem;
}

.dash-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ==========================================================================
   2. TASKS SECTION
   ========================================================================== */

.section-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filters-cluster {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-filter {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.pill-filter:hover {
  background: var(--glass-surface-hover);
  color: var(--text-primary);
}

.pill-filter.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.action-cluster {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap i {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
}

.search-input-wrap input {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--trans-fast);
  width: 220px;
}

.search-input-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
  width: 260px;
}

.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Individual Task Card */
.task-item-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--glass-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  transition: all var(--trans-fast);
}

.task-item-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.task-item-card.completed {
  opacity: 0.6;
}

.task-item-card.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-checkbox-wrap {
  position: relative;
  cursor: pointer;
}

.custom-chk {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.custom-chk.checked {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
}

.task-content-block {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.task-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tag-badge {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.tag-priority-high {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.tag-priority-medium {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.tag-priority-low {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.tag-category {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.task-actions .icon-btn.btn-delete:hover,
.task-actions .icon-btn:hover:has(.ri-delete-bin-line) {
  background: #f43f5e;
  border-color: #f43f5e;
}
.task-actions .icon-btn.btn-delete:hover i,
.task-actions .icon-btn:hover .ri-delete-bin-line {
  color: #ffffff !important;
}

/* ==========================================================================
   3. CALENDAR SECTION
   ========================================================================== */

.calendar-layout-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
}

.calendar-card {
  padding: 1.75rem;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.cal-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cal-current-label {
  font-size: 1.25rem;
  font-weight: 700;
}

.cal-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.cal-day-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--trans-fast);
}

.cal-day-cell:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

.cal-day-cell.other-month {
  opacity: 0.25;
}

.cal-day-cell.today {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
}

.cal-day-cell.selected {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.cal-day-num {
  font-size: 0.95rem;
  font-weight: 600;
}

.cal-event-dot-row {
  display: flex;
  gap: 3px;
  position: absolute;
  bottom: 6px;
}

.cal-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

/* Calendar Details Side Card */
.calendar-details-card {
  display: flex;
  flex-direction: column;
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1.25rem;
}

.details-date-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selected-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.event-item-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent-purple);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ==========================================================================
   4. NOTES SECTION
   ========================================================================== */

.notes-masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.note-card {
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--trans-normal);
}

.note-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.note-card.pinned {
  border-color: rgba(245, 158, 11, 0.4);
}

.note-card.color-blue { background: rgba(30, 58, 138, 0.35); border-color: rgba(59, 130, 246, 0.3); }
.note-card.color-purple { background: rgba(88, 28, 135, 0.35); border-color: rgba(139, 92, 246, 0.3); }
.note-card.color-emerald { background: rgba(6, 78, 59, 0.35); border-color: rgba(16, 185, 129, 0.3); }
.note-card.color-amber { background: rgba(120, 53, 15, 0.35); border-color: rgba(245, 158, 11, 0.3); }
.note-card.color-rose { background: rgba(136, 19, 55, 0.35); border-color: rgba(244, 63, 94, 0.3); }

.note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.note-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.note-pin-badge {
  color: var(--accent-amber);
  font-size: 1.1rem;
}

.note-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 1.25rem;
  flex: 1;
}

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

/* ==========================================================================
   5. EXPENSES SECTION
   ========================================================================== */

.expenses-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.exp-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.exp-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.exp-card.balance .exp-icon { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.exp-card.income .exp-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.exp-card.expense .exp-icon { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.exp-meta .label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.exp-meta .amount {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.exp-meta .trend {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.expenses-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 1.5rem;
}

.chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.chart-legend {
  margin-top: 1.25rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.glass-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--glass-border);
}

.glass-table td {
  padding: 0.95rem 1rem;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   REKAPAN BISNIS SECTION
   ========================================================================== */

.biz-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.biz-metric-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.35rem 1.25rem;
}

.biz-metric-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.biz-metric-card.revenue .biz-metric-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.biz-metric-card.expense .biz-metric-icon { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.biz-metric-card.profit .biz-metric-icon { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.biz-metric-card.units .biz-metric-icon { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.biz-metric-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.biz-metric-info .label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-metric-info .amount {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.biz-metric-info .sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.biz-unit-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  border-left: 4px solid var(--accent-blue);
  position: relative;
  transition: all var(--trans-normal);
}

.biz-unit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.biz-unit-card.border-accent-amber { border-left-color: var(--accent-amber); }
.biz-unit-card.border-accent-blue { border-left-color: var(--accent-blue); }
.biz-unit-card.border-accent-emerald { border-left-color: var(--accent-emerald); }
.biz-unit-card.border-accent-purple { border-left-color: var(--accent-purple); }
.biz-unit-card.border-accent-rose { border-left-color: var(--accent-rose); }

.unit-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.unit-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.unit-icon-badge.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.unit-icon-badge.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.unit-icon-badge.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.unit-icon-badge.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.unit-icon-badge.rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.unit-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.unit-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.unit-stat-item {
  display: flex;
  flex-direction: column;
}

.unit-stat-item .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.unit-stat-item .val {
  font-size: 1rem;
  font-family: var(--font-mono);
}

.unit-target-progress {
  display: flex;
  flex-direction: column;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  transition: width 0.5s ease;
}

.unit-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

.biz-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 1.5rem;
}

.justify-between {
  justify-content: space-between;
}

/* Specific styling for QPP theme on business elements */
[data-theme="qpp"] .unit-stats-grid {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(180, 142, 85, 0.2);
}
[data-theme="qpp"] .biz-unit-card {
  background: rgba(254, 250, 241, 0.88);
  border-color: rgba(180, 142, 85, 0.24);
}
[data-theme="qpp"] .progress-bar-track {
  background: rgba(180, 142, 85, 0.15);
}

/* ==========================================================================
   6. POMODORO SECTION
   ========================================================================== */

.pomodoro-stage {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pomodoro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem;
}

.pomo-modes {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  margin-bottom: 2rem;
}

.pomo-mode-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.pomo-mode-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.pomo-timer-display-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.pomo-svg-ring {
  transform: rotate(-90deg);
}

.pomo-ring-progress {
  stroke-dasharray: 816.81;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s linear;
}

.pomo-time-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pomo-time-numbers {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pomo-status-label {
  font-size: 0.88rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pomo-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.pomo-btn-ctrl {
  cursor: pointer;
  transition: all var(--trans-fast);
}

.pomo-btn-ctrl.primary {
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.pomo-btn-ctrl.primary:hover {
  transform: scale(1.05);
}

.pomo-btn-ctrl.secondary {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.pomo-btn-ctrl.secondary:hover {
  background: var(--glass-surface-hover);
  transform: scale(1.1);
}

.ambient-sound-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Side Stats */
.pomo-stats-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pomo-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.stat-box .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  display: block;
}

.stat-box .desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pomo-quote-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.duration-inputs {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.duration-inputs label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.duration-inputs input {
  width: 60px;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  margin-left: 0.35rem;
}

/* ==========================================================================
   7. BOOKMARKS SECTION
   ========================================================================== */

.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.bm-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.bm-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.bm-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.bm-info {
  flex: 1;
  min-width: 0;
}

.bm-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

/* ==========================================================================
   8. SETTINGS SECTION
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.profile-edit-avatar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.integration-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}

.theme-palette-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.color-dot.dark { background: #090d16; border: 1px solid #06b6d4; }
.color-dot.aurora { background: #0e272b; border: 1px solid #14b8a6; }
.color-dot.emerald { background: #0e2b1e; border: 1px solid #10b981; }
.color-dot.light { background: #f0f4f8; border: 1px solid #94a3b8; }
.color-dot.qpp { background: #f6efe1; border: 1px solid #c59b27; }
.color-dot.crimson { background: #160812; border: 1px solid #f43f5e; }
.color-dot.coffee { background: #130d0a; border: 1px solid #f59e0b; }

.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background: var(--accent-gradient);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.form-group {
  margin-bottom: 1.1rem;
}

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

label, .form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input, .form-select-sm {
  width: 100%;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--trans-fast);
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

textarea.form-input {
  resize: vertical;
}

select.form-input option {
  background: #0f172a;
  color: #fff;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-backdrop.show {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: 100%;
  max-width: 520px;
  background: var(--glass-dropdown);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  animation: modalSlideUp 0.3s var(--trans-fast);
}

@keyframes modalSlideUp {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.share-actions-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Universal Confirmation Dialog */
.confirm-modal-box {
  max-width: 440px;
  text-align: center;
  padding: 2.2rem 1.75rem 1.75rem;
  border: 1px solid rgba(244, 63, 94, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(244, 63, 94, 0.15);
}

.confirm-icon-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.confirm-icon-ring.danger {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 2px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.25);
}

.confirm-icon-ring.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 2px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.confirm-text-wrap h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.confirm-text-wrap p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.confirm-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 1.25rem;
}

.confirm-footer {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.confirm-footer .btn {
  flex: 1;
  padding: 0.7rem 1.25rem;
  justify-content: center;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 300;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  animation: toastSlideIn 0.35s var(--trans-fast);
  transition: all var(--trans-fast);
  max-width: 360px;
}

.toast.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast.toast-error { border-left: 4px solid var(--accent-rose); }
.toast.toast-info { border-left: 4px solid var(--accent-cyan); }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   HELPERS & COLORS
   ========================================================================== */

.text-accent { color: var(--accent-cyan); }
.text-emerald { color: var(--accent-emerald); }
.text-rose { color: var(--accent-rose); }
.text-wa { color: var(--accent-wa); }
.text-telegram { color: var(--accent-tg); }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 0.72rem; }
.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.flex-row { display: flex; align-items: center; }
.gap-2 { gap: 0.5rem; }

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-split-grid,
  .calendar-layout-grid,
  .expenses-main-grid,
  .pomodoro-stage,
  .settings-grid,
  .biz-detail-grid {
    grid-template-columns: 1fr;
  }

  .expenses-summary-cards,
  .biz-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-close-btn {
    display: inline-flex;
  }

  .glass-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.7);
  }

  .glass-sidebar.open {
    transform: translateX(0);
  }

  .top-navbar {
    padding: 0 1rem;
  }

  .quick-search-trigger span,
  .quick-search-trigger kbd {
    display: none;
  }

  .weather-pill {
    display: none;
  }

  .content-viewport {
    padding: 1rem;
  }

  .hero-card {
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
  }

  .hero-quick-actions {
    justify-content: center;
  }

  .hero-quote {
    margin: 0 auto 1.5rem;
  }

  .metrics-grid,
  .biz-summary-grid {
    grid-template-columns: 1fr;
  }

  .section-top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap input {
    width: 100%;
  }
  .search-input-wrap input:focus {
    width: 100%;
  }

  .action-cluster {
    flex-direction: column;
  }

  .action-cluster button {
    width: 100%;
  }

  .pomo-time-numbers {
    font-size: 2.8rem;
  }
}

/* ==========================================================================
   AUTHENTICATION & LOCK SCREEN STYLES
   ========================================================================== */

/* Locked state on main container */
body.app-locked {
  overflow: hidden !important;
}

body.app-locked .app-container {
  filter: blur(14px) brightness(0.65);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.4s ease;
}

[data-theme="qpp"] body.app-locked .app-container {
  filter: blur(14px) brightness(0.85);
}

/* Login full-screen fixed overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.94), rgba(7, 10, 19, 0.98));
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.login-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(1.02);
}

/* Ambient glow in login overlay */
.login-glow-ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.7;
}

.login-glow-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, transparent 70%);
  top: 15%;
  left: 20%;
  animation: pulseAmbient 10s infinite alternate;
}

.login-glow-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
  bottom: 15%;
  right: 20%;
  animation: pulseAmbient 12s infinite alternate-reverse;
}

/* Login Card */
.login-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2.25rem;
  border-radius: 24px;
  background: rgba(18, 25, 44, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 45px rgba(6, 182, 212, 0.12);
  position: relative;
  z-index: 5;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  animation: cardFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Login Card Header */
.login-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.login-logo-ring {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.45);
}

.login-brand-title h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand-title span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Welcome Box */
.login-welcome-box {
  margin-bottom: 1.75rem;
}

.login-welcome-box h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.login-welcome-box p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Inputs */
.login-input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.login-input-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon > i:first-child {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 2.85rem !important;
  padding-right: 2.85rem !important;
  height: 48px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.65);
  transition: all var(--trans-fast);
}

.input-with-icon input:focus {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.toggle-password-btn {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.45rem;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--trans-fast);
}

.toggle-password-btn:hover {
  color: var(--text-primary);
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Error feedback alert */
.login-error-alert {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-md);
  color: #fb7185;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}

.login-error-alert.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.btn-login {
  height: 48px;
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
  cursor: pointer;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.5);
}

/* Shake Animation on Wrong Password */
.shake {
  animation: loginShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes loginShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

/* Card Footer */
.login-card-footer {
  margin-top: 1.75rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.15rem;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Logout button in sidebar */
.nav-item.nav-logout {
  color: var(--accent-rose);
  margin-top: 0.25rem;
}
.nav-item.nav-logout:hover {
  background: rgba(244, 63, 94, 0.12);
  color: #ff4d6d;
}

/* Theme Support for QPP Mode */
[data-theme="qpp"] .login-overlay {
  background: radial-gradient(circle at 50% 30%, rgba(246, 239, 225, 0.96), rgba(235, 224, 203, 0.98));
}

[data-theme="qpp"] .login-glow-1 {
  background: radial-gradient(circle, rgba(180, 142, 85, 0.3) 0%, transparent 70%);
}

[data-theme="qpp"] .login-glow-2 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
}

[data-theme="qpp"] .login-card {
  background: rgba(254, 250, 242, 0.98);
  border: 1px solid rgba(180, 142, 85, 0.35);
  box-shadow: 0 25px 65px rgba(92, 69, 35, 0.22);
  color: #2d2115;
}

[data-theme="qpp"] .login-brand-title h2 {
  background: linear-gradient(135deg, #2d2115 30%, #5a4835 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="qpp"] .input-with-icon input {
  background: rgba(246, 239, 225, 0.85);
  border: 1px solid rgba(180, 142, 85, 0.3);
  color: #2d2115;
}

[data-theme="qpp"] .input-with-icon input:focus {
  border-color: #b48e55;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(180, 142, 85, 0.2);
}

[data-theme="qpp"] .login-card-footer {
  border-top-color: rgba(180, 142, 85, 0.2);
}
