/* ============================================
   LIFEOS — ULTRA PREMIUM CSS v4 — Cinematic Edition
   Font: Sora (display) + DM Sans (body) + JetBrains Mono
   Aesthetic: Dark luxury / Editorial / Depth-layered
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   DESIGN TOKENS
============================================================ */
[data-theme="dark"] {
  --bg-base:          #07080f;
  --bg-deep:          #050608;
  --bg-card:          rgba(255,255,255,0.038);
  --bg-card-solid:    #0d0f1a;
  --bg-card2:         rgba(255,255,255,0.025);
  --bg-input:         rgba(255,255,255,0.055);
  --bg-nav:           rgba(7,8,15,0.96);
  --bg-glass:         rgba(255,255,255,0.06);
  --bg-glass-strong:  rgba(255,255,255,0.10);

  --border:           rgba(255,255,255,0.06);
  --border-soft:      rgba(255,255,255,0.04);
  --border-focus:     rgba(123,104,255,0.65);
  --border-glow:      rgba(123,104,255,0.2);

  --text-primary:     #eceef8;
  --text-secondary:   #7880a0;
  --text-muted:       #3e4260;
  --text-hero:        #ffffff;

  --accent:           #7b68ff;
  --accent-mid:       #6c5fff;
  --accent-bright:    #9d8fff;
  --accent-soft:      rgba(123,104,255,0.12);
  --accent-glow:      rgba(123,104,255,0.35);
  --accent-glow-sm:   rgba(123,104,255,0.18);

  --accent2:          #00d4c8;
  --accent2-mid:      #00b8ad;
  --accent2-soft:     rgba(0,212,200,0.10);
  --accent2-glow:     rgba(0,212,200,0.28);

  --accent3:          #ffb340;
  --accent3-soft:     rgba(255,179,64,0.12);
  --accent3-glow:     rgba(255,179,64,0.28);

  --pink:             #ff6bab;
  --pink-soft:        rgba(255,107,171,0.12);
  --pink-glow:        rgba(255,107,171,0.25);

  --danger:           #ff4d6a;
  --danger-soft:      rgba(255,77,106,0.12);
  --danger-glow:      rgba(255,77,106,0.28);

  --success:          #00e07a;
  --success-mid:      #00c96e;
  --success-soft:     rgba(0,224,122,0.10);
  --success-glow:     rgba(0,224,122,0.28);

  --shadow-card:      0 8px 40px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-float:     0 20px 60px rgba(0,0,0,0.75), 0 4px 16px rgba(0,0,0,0.5);
  --shadow-glow-a:    0 0 40px rgba(123,104,255,0.15), 0 8px 40px rgba(0,0,0,0.5);
  --shadow-nav:       0 -1px 40px rgba(0,0,0,0.5);

  --nav-height:       76px;
  --topbar-height:    60px;
  --radius:           24px;
  --radius-sm:        16px;
  --radius-xs:        10px;
  --radius-pill:      999px;
  --transition:       0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --spring:           0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --hero-h:           280px;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");

  /* Note palette — richer, more editorial */
  --nc0: #0c0920;
  --nc1: #070f18;
  --nc2: #110d00;
  --nc3: #150610;
  --nc4: #060d1a;
  --nc0-accent: #7b68ff;
  --nc1-accent: #00d4c8;
  --nc2-accent: #ffb340;
  --nc3-accent: #ff6bab;
  --nc4-accent: #60aeff;
}

[data-theme="light"] {
  --bg-base:          #f0f1f7;
  --bg-deep:          #e8eaf2;
  --bg-card:          rgba(255,255,255,0.85);
  --bg-card-solid:    #ffffff;
  --bg-card2:         rgba(255,255,255,0.6);
  --bg-input:         rgba(240,241,247,0.9);
  --bg-nav:           rgba(255,255,255,0.97);
  --bg-glass:         rgba(255,255,255,0.65);
  --bg-glass-strong:  rgba(255,255,255,0.85);

  --border:           rgba(0,0,0,0.07);
  --border-soft:      rgba(0,0,0,0.04);
  --border-focus:     rgba(108,95,255,0.5);
  --border-glow:      rgba(108,95,255,0.15);

  --text-primary:     #111220;
  --text-secondary:   #505570;
  --text-muted:       #9098b8;
  --text-hero:        #ffffff;

  --accent:           #6c5fff;
  --accent-mid:       #5a4ef0;
  --accent-bright:    #8878ff;
  --accent-soft:      rgba(108,95,255,0.1);
  --accent-glow:      rgba(108,95,255,0.25);
  --accent-glow-sm:   rgba(108,95,255,0.15);

  --accent2:          #00a89f;
  --accent2-mid:      #009590;
  --accent2-soft:     rgba(0,168,159,0.1);
  --accent2-glow:     rgba(0,168,159,0.2);

  --accent3:          #e8940a;
  --accent3-soft:     rgba(232,148,10,0.1);
  --accent3-glow:     rgba(232,148,10,0.2);

  --pink:             #e8509a;
  --pink-soft:        rgba(232,80,154,0.1);
  --pink-glow:        rgba(232,80,154,0.2);

  --danger:           #e83050;
  --danger-soft:      rgba(232,48,80,0.1);
  --danger-glow:      rgba(232,48,80,0.2);

  --success:          #00b860;
  --success-mid:      #00a055;
  --success-soft:     rgba(0,184,96,0.1);
  --success-glow:     rgba(0,184,96,0.2);

  --shadow-card:      0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-float:     0 12px 48px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.07);
  --shadow-glow-a:    0 0 30px rgba(108,95,255,0.12), 0 4px 24px rgba(0,0,0,0.08);
  --shadow-nav:       0 -1px 20px rgba(0,0,0,0.07);

  --nav-height:       76px;
  --topbar-height:    60px;
  --radius:           24px;
  --radius-sm:        16px;
  --radius-xs:        10px;
  --radius-pill:      999px;
  --transition:       0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --spring:           0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --hero-h:           280px;

  --nc0: #f0eeff;
  --nc1: #e0f8f6;
  --nc2: #fff5e0;
  --nc3: #ffe6f3;
  --nc4: #e0eeff;
  --nc0-accent: #6c5fff;
  --nc1-accent: #00a89f;
  --nc2-accent: #e8940a;
  --nc3-accent: #e8509a;
  --nc4-accent: #2875d6;
}


/* * {
  transform: translateZ(0);
  backface-visibility: hidden;
} */

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

html, body { height: 100%; overflow: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
  will-change: transform;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

input, select, textarea, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   SPLASH SCREEN
============================================================ */
.splash {
  position: fixed; inset: 0;
  background: #050608;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, transform 0.8s ease;
  overflow: hidden;
}
.splash.hidden { opacity: 0; pointer-events: none; transform: scale(1.08); }

.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.splash-orb-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(123,104,255,0.4), rgba(123,104,255,0.05));
  top: -120px; left: -80px;
  animation: floatOrb 7s ease-in-out infinite;
}
.splash-orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,212,200,0.3), rgba(0,212,200,0.03));
  bottom: -80px; right: -60px;
  animation: floatOrb 9s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(25px,-20px) scale(1.05); }
  66% { transform: translate(-15px,15px) scale(0.96); }
}

.splash-inner { text-align: center; position: relative; z-index: 1; }

.splash-logo-wrap {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 16px;
}
.splash-hex {
  width: 58px; height: 58px;
  animation: hexPulse 2.2s ease infinite;
  filter: drop-shadow(0 0 20px rgba(123,104,255,0.5));
}
@keyframes hexPulse {
  0%,100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.85; transform: scale(0.93) rotate(3deg); }
}
.logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #7b68ff 0%, #00d4c8 60%, #9d8fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.splash-tagline {
  color: rgba(255,255,255,0.28);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 32px;
  font-family: 'DM Sans', sans-serif;
}
.splash-dots {
  display: flex; gap: 7px; justify-content: center;
}
.splash-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotBounce 1.4s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: 0.2s; background: var(--accent2); }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; background: var(--accent3); }
@keyframes dotBounce {
  0%,100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-8px) scale(1.15); opacity: 1; }
}

/* ============================================================
   APP SHELL
============================================================ */
.app {
  display: flex; flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg-base);
}

/* ============================================================
   TOPBAR
============================================================ */
.topbar {
  height: var(--topbar-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.topbar::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--bg-nav);
  z-index: -1;
}

.app-logo-wrap {
  display: flex; align-items: center; gap: 9px;
}
.app-logo {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--border-glow); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.92); }

/* ============================================================
   SCREENS
============================================================ */
.screens { flex: 1; overflow: hidden; position: relative; }
.screen {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transform: translateY(18px) scale(0.99);
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.screen.active {
  opacity: 1; pointer-events: all;
  transform: translateY(0) scale(1);
}
.screen-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* ============================================================
   SCREEN HEADER
============================================================ */
.screen-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 20px 14px;
  gap: 12px;
}
.screen-title {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  line-height: 1.1;
}
.screen-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.3px;
  font-weight: 400;
}

/* ============================================================
   HOME HERO — CINEMATIC SCENE
============================================================ */
.home-hero {
  position: relative;
  min-height: var(--hero-h);
  margin: 0;
  overflow: hidden;
  background: #070410;
}

/* Layered mesh background */
.hero-bg-mesh {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 15% -20%, rgba(123,104,255,0.38) 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 95% 110%, rgba(0,212,200,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 60% 40%, rgba(255,107,171,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 30% 80%, rgba(255,179,64,0.06) 0%, transparent 60%);
}

/* Animated orbs inside hero */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;

}
.hero-orb-1 {
  width: 240px; height: 240px;
  background: rgba(123,104,255,0.3);
  top: -100px; left: -60px;
  animation: heroFloat 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 180px; height: 180px;
  background: rgba(0,212,200,0.22);
  bottom: -80px; right: -40px;
  animation: heroFloat 11s ease-in-out infinite reverse;
}
.hero-orb-3 {
  width: 130px; height: 130px;
  background: rgba(255,107,171,0.14);
  top: 50%; left: 55%;
  animation: heroFloat 13s ease-in-out infinite 2s;
}
@keyframes heroFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(16px,-12px) scale(1.06); }
  66% { transform: translate(-10px,14px) scale(0.95); }
}

/* Noise texture overlay */
.hero-bg-mesh::after {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--noise);
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* Bottom gradient fade to merge with content */
.home-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg-base));
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative; z-index: 3;
  padding: 28px 22px 40px;
}
.hero-greeting-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px;
}
.hero-greeting {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.38);
  margin-bottom: 5px;
  font-family: 'DM Sans', sans-serif;
}
.hero-date {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-emoji-bubble {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* Stats row — floating glass pill */
.hero-stats-row {
  display: flex; align-items: center; gap: 14px;
}
.hero-ring-wrap {
  position: relative;
  width: 80px; height: 80px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 16px rgba(0,212,200,0.35));
}
.hero-ring-wrap canvas { display: block; }
.hero-ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero-ring-label span:first-child {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.hero-ring-sub {
  font-size: 8px;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.hero-mini-stats {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 18px;
  padding: 14px 18px;
  flex: 1;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}
.hms-item {
  flex: 1;
  display: flex; flex-direction: column; gap: 3px;
}
.hms-val {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.hms-val.accent2 { color: var(--accent2); }
.hms-label {
  font-size: 10px;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.hms-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  margin: 0 14px;
  flex-shrink: 0;
}


/* ============================================================
   QUICK ACTIONS
============================================================ */
.qa-section {
  padding: 20px 16px 0;
  margin-bottom: 14px;
}
.section-label-sm {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
  gap: 7px;
}
.qa-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px;
  padding: 16px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.qa-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.qa-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  pointer-events: none;
}
.qa-card:hover { transform: translateY(-3px) scale(1.03); border-color: rgba(123,104,255,0.3); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.qa-card:hover::before { opacity: 1; }
.qa-card:active { transform: scale(0.94); }

.qa-icon-wrap {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.qa-icon-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background: inherit;
  opacity: 0.4;
  filter: blur(12px);
  transform: scale(1.5);
}
.qa-purple { background: linear-gradient(135deg, rgba(123,104,255,0.25), rgba(123,104,255,0.12)); color: var(--accent-bright); }
.qa-orange { background: linear-gradient(135deg, rgba(255,140,50,0.25), rgba(255,140,50,0.1)); color: #ff9448; }
.qa-teal { background: linear-gradient(135deg, rgba(0,212,200,0.25), rgba(0,212,200,0.1)); color: var(--accent2); }
.qa-amber { background: linear-gradient(135deg, rgba(255,179,64,0.25), rgba(255,179,64,0.1)); color: var(--accent3); }

.qa-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

/* ============================================================
   SECTION CARDS — 4 distinct styles
============================================================ */

/* Base card */
.section-card {
  margin: 0 16px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}
.section-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  pointer-events: none;
}
.section-card:hover { box-shadow: var(--shadow-card); border-color: rgba(255,255,255,0.1); }

/* Gradient card variant */
.focus-card {
  background: linear-gradient(145deg, rgba(123,104,255,0.08) 0%, var(--bg-card) 50%, rgba(0,212,200,0.04) 100%);
  border-color: rgba(123,104,255,0.14);
}
.focus-card::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(123,104,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.focus-card:hover { box-shadow: var(--shadow-glow-a); }

/* Money widget card — soft dark */
.money-widget-card {
  background: linear-gradient(145deg, rgba(0,212,200,0.06) 0%, var(--bg-card) 60%);
  border-color: rgba(0,212,200,0.12);
}
.money-widget-card::before {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(0,212,200,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Debt/Notes card — amber highlight */
.amber-card {
  background: linear-gradient(145deg, rgba(255,179,64,0.05) 0%, var(--bg-card) 60%);
  border-color: rgba(255,179,64,0.12);
}
.amber-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(255,179,64,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title-wrap {
  display: flex; align-items: center; gap: 9px;
}
.card-icon-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card-icon-dot.purple { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.card-icon-dot.orange { background: #ff9448; box-shadow: 0 0 8px rgba(255,148,72,0.45); }
.card-icon-dot.teal { background: var(--accent2); box-shadow: 0 0 8px var(--accent2-glow); }
.card-icon-dot.amber { background: var(--accent3); box-shadow: 0 0 8px var(--accent3-glow); }
.card-icon-dot.purple2 { background: #b8a4ff; box-shadow: 0 0 8px rgba(184,164,255,0.45); }

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.1px;
  font-family: 'Sora', sans-serif;
}
.card-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  transition: all var(--transition);
  letter-spacing: 0.1px;
}
.card-link:hover { background: rgba(123,104,255,0.2); transform: translateX(2px); }

/* ============================================================
   HOME LISTS
============================================================ */
.home-list { display: flex; flex-direction: column; gap: 7px; }
.home-list-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.home-list-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background var(--transition);
  border-radius: 0 2px 2px 0;
}
.home-list-item:hover { border-color: rgba(123,104,255,0.2); background: var(--accent-soft); transform: translateX(3px); }
.home-list-item:hover::before { background: var(--accent); }
.home-list-item:active { transform: scale(0.98); }

.hli-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hli-dot.high { background: var(--danger); box-shadow: 0 0 6px var(--danger-glow); }
.hli-dot.medium { background: var(--accent3); box-shadow: 0 0 5px var(--accent3-glow); }
.hli-dot.low { background: var(--success); box-shadow: 0 0 5px var(--success-glow); }
.hli-dot.done { background: var(--success); opacity: 0.4; }
.hli-dot.habit { background: var(--accent); box-shadow: 0 0 5px var(--accent-glow-sm); }
.hli-dot.danger { background: var(--danger); box-shadow: 0 0 5px var(--danger-glow); }

.hli-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hli-text.done-text { text-decoration: line-through; color: var(--text-muted); }
.hli-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px 8px;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   EMPTY STATES — mini artwork
============================================================ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.empty-state::before {
  content: '';
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.empty-state-visual {
  position: relative;
  width: 100px; height: 100px;
  margin-bottom: 20px;
}

/* Floating blob shapes */
.esv-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(123,104,255,0.2);
  animation: esvSpin 14s linear infinite;
}
.esv-ring-2 {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(0,212,200,0.18);
  animation: esvSpin 9s linear infinite reverse;
}
/* Extra decorative dot */
.esv-ring::after {
  content: '';
  position: absolute;
  top: 20%; right: 5%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
@keyframes esvSpin { to { transform: rotate(360deg); } }
.esv-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.esv-icon-bg {
  width: 58px; height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent2-soft));
  border: 1px solid rgba(123,104,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--accent);
  box-shadow: 0 8px 30px rgba(123,104,255,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}
.empty-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 200px;
}

/* ============================================================
   MONEY WIDGET — HOME
============================================================ */
.money-widget-grid {
  display: flex; flex-direction: column; gap: 9px;
}
.mw-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition);
}
.mw-item:hover { border-color: var(--border); transform: translateX(2px); }

.mw-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: rgba(0,224,122,0.14);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mw-icon-wrap.exp { background: var(--danger-soft); color: var(--danger); }
.mw-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.mw-val {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-top: 2px;
}
.mw-net {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent2-soft));
  border: 1px solid rgba(123,104,255,0.18);
  position: relative;
  overflow: hidden;
}
.mw-net::before {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(123,104,255,0.15), transparent 70%);
}
.mw-net-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.mw-net-val {
  font-family: 'Sora', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--accent);
}

/* ============================================================
   DEBT MINI — HOME
============================================================ */
.debt-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.debt-mini-item {
  display: flex; align-items: center; gap: 11px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition);
}
.debt-mini-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

.dmi-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(0,224,122,0.12);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dmi-icon.owe { background: var(--danger-soft); color: var(--danger); }
.dmi-label { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.dmi-val {
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-top: 2px;
}

/* ============================================================
   QUOTE CARD
============================================================ */
.quote-card {
  margin: 0 16px 14px;
  padding: 24px 22px;
  background: linear-gradient(145deg, rgba(123,104,255,0.07) 0%, rgba(0,212,200,0.04) 100%);
  border: 1px solid rgba(123,104,255,0.14);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.quote-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,212,200,0.08) 0%, transparent 70%);
}
.quote-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(123,104,255,0.08) 0%, transparent 70%);
}
.quote-deco { margin-bottom: 14px; position: relative; z-index: 1; }
.quote-text {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  margin-bottom: 12px;
  position: relative; z-index: 1;
  font-family: 'DM Sans', sans-serif;
}
[data-theme="light"] .quote-text { color: var(--text-secondary); }
.quote-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.3px;
  position: relative; z-index: 1;
}

/* ============================================================
   BOTTOM SPACER
============================================================ */
.bottom-spacer { height: 24px; }

/* ============================================================
   BOTTOM NAV — frosted glass
============================================================ */
.bottomnav {
  height: var(--nav-height);
  display: flex; align-items: stretch;
  background: var(--bg-nav);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  padding: 0 6px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  margin: 8px 2px;
}
.nav-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 32px;
  border-radius: 12px;
  transition: all var(--transition);
}
.nav-item.active .nav-icon-wrap {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow-sm);
}
.nav-item.active { color: var(--accent); }
.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: 'DM Sans', sans-serif;
}
.nav-item:active { transform: scale(0.9); }
.nav-item:hover:not(.active) { color: var(--text-secondary); }

/* ============================================================
   FILTER TABS
============================================================ */
.filter-tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.ftab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
  letter-spacing: 0.2px;
}
.ftab.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow), 0 0 0 1px rgba(123,104,255,0.3);
}
.ftab:hover:not(.active) { border-color: rgba(123,104,255,0.3); color: var(--accent); background: var(--accent-soft); }

/* ============================================================
   SEARCH BAR
============================================================ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex: 1;
  transition: all var(--transition);
}
.search-bar:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary);
  font-size: 13px;
}
.search-bar input::placeholder { color: var(--text-muted); }

.search-sort-row {
  display: flex; gap: 10px;
  padding: 0 16px;
  margin-bottom: 14px;
  align-items: center;
}
.sort-select {
  padding: 11px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  outline: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
}
.sort-select:focus { border-color: var(--border-focus); }

.notes-search { margin: 0 16px 14px; }

/* ============================================================
   FAB INLINE
============================================================ */
.fab-inline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.2);
  transition: all var(--transition);
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}
.fab-inline::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}
.fab-inline:hover { background: var(--accent-bright); transform: translateY(-2px); box-shadow: 0 8px 28px var(--accent-glow); }
.fab-inline:active { transform: scale(0.96); }

/* ============================================================
   PLANNER STATS ROW
============================================================ */
.planner-stats-row {
  display: flex; gap: 10px; align-items: center;
  padding: 0 16px;
  margin-bottom: 16px;
}
.ps-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 4px;
  align-items: center;
  transition: all var(--transition);
}
.ps-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.ps-card.accent {
  border-color: rgba(0,224,122,0.2);
  background: linear-gradient(135deg, rgba(0,224,122,0.06), var(--bg-card));
}
.ps-num {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.ps-card.accent .ps-num { color: var(--success); }
.ps-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.ps-progress-wrap {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}
.ps-ring-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  font-family: 'Sora', sans-serif;
}

/* ============================================================
   TASK CARDS — premium
============================================================ */
.tasks-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.task-card::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.task-card.priority-high::before { background: linear-gradient(to bottom, var(--danger), rgba(255,77,106,0.3)); box-shadow: 2px 0 10px var(--danger-glow); }
.task-card.priority-medium::before { background: linear-gradient(to bottom, var(--accent3), rgba(255,179,64,0.3)); }
.task-card.priority-low::before { background: linear-gradient(to bottom, var(--success), rgba(0,224,122,0.3)); }
.task-card.completed { opacity: 0.5; }
.task-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: rgba(255,255,255,0.1); }
.task-card-inner { padding: 16px 16px 16px 20px; }
.task-top { display: flex; gap: 13px; align-items: flex-start; }
.task-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  font-size: 11px;
  color: #fff;
  transition: all var(--spring);
  background: transparent;
}
.task-check.checked {
  background: linear-gradient(135deg, var(--success), var(--success-mid));
  border-color: transparent;
  box-shadow: 0 0 16px var(--success-glow);
  transform: scale(1.1);
}
.task-check:hover:not(.checked) { border-color: var(--accent); transform: scale(1.05); }
.task-content { flex: 1; }
.task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
  line-height: 1.3;
  font-family: 'DM Sans', sans-serif;
}
.task-title.done { text-decoration: line-through; color: var(--text-muted); }
.task-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.task-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}
.task-tag.priority-high { background: var(--danger-soft); color: var(--danger); }
.task-tag.priority-medium { background: var(--accent3-soft); color: var(--accent3); }
.task-tag.priority-low { background: var(--success-soft); color: var(--success); }
.task-tag.cat { background: var(--accent-soft); color: var(--accent-bright); }
.task-tag.time { background: var(--bg-card2); color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 9px; }
.task-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 7px;
  line-height: 1.55;
}
.task-actions {
  display: flex;
  border-top: 1px solid var(--border-soft);
}
.task-action-btn {
  flex: 1;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
  letter-spacing: 0.2px;
}
.task-action-btn.edit { color: var(--accent); }
.task-action-btn.del { color: var(--danger); }
.task-action-btn:hover { background: var(--bg-card2); }

/* ============================================================
   HABITS — HERO STATS
============================================================ */
.habit-hero-stats {
  margin: 0 16px 16px;
  background: linear-gradient(145deg, rgba(255,148,72,0.08) 0%, var(--bg-card) 60%);
  border: 1px solid rgba(255,148,72,0.14);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; align-items: center; gap: 20px;
  position: relative;
  overflow: hidden;
  align-items: center;
  gap: 28px;
}

.habit-hero-stats::before {
  content: '';
  position: absolute; top: -30px; left: -30px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(255,148,72,0.12) 0%, transparent 70%);
}
.habit-hero-stats::after {
  content: '';
  position: absolute; bottom: -20px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(247,183,49,0.08) 0%, transparent 70%);
}
/* .habit-ring-feature {
  position: relative;
  width: 104px; height: 104px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 20px rgba(255,148,72,0.35));
  z-index: 1;
} */

.habit-ring-feature {
  position: relative;
  width: 190px;
  height: 190px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 20px rgba(255,148,72,0.22));
  z-index: 1;
}

.habit-ring-feature canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* .hrm-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hrm-pct {
  font-family: 'Sora', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.hrm-sub {
  font-size: 9px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 2px;
} */

.hrm-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

/* .hrm-pct {
  font-family: 'Sora', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
} */

.hrm-pct {
  font-family: 'Sora', sans-serif;
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
}

.hrm-pct span {
  font-size: 0.55em;
  opacity: 0.8;
}

.hrm-sub {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
}

.habit-stat-pills {
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 1;
}
.hsp-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card2);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  transition: all var(--transition);
}
.hsp-card:hover { border-color: var(--border); transform: translateX(2px); }
.hsp-card.accent { border-color: rgba(0,224,122,0.18); }
.hsp-card.amber { border-color: rgba(255,179,64,0.2); }
.hsp-val {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--text-primary);
}
.hsp-card.accent .hsp-val { color: var(--success); }
.hsp-card.amber .hsp-val { color: var(--accent3); }
.hsp-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   WEEK HEADER
============================================================ */
.week-header-card {
  margin: 0 16px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.week-days-header {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
}
.week-day-col {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.wdc-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wdc-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.wdc-dot.today {
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  color: #fff;
  box-shadow: 0 0 15px var(--accent-glow), 0 4px 10px rgba(123,104,255,0.3);
}
.wdc-dot.past { background: var(--bg-card2); }

/* ============================================================
   HABIT SECTION LABELS
============================================================ */
.habit-section-label {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px;
  margin-bottom: 10px;
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hsl-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.hsl-dot.incomplete { background: #ff9448; box-shadow: 0 0 6px rgba(255,148,72,0.4); }
.hsl-dot.complete { background: var(--success); box-shadow: 0 0 6px var(--success-glow); }

/* ============================================================
   HABIT CARDS
============================================================ */
.habits-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.habit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.habit-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: rgba(255,148,72,0.2); }
.habit-card-inner { padding: 16px; }
.habit-top { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; }
.habit-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--spring);
  background: var(--bg-card2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.habit-circle.done {
  background: linear-gradient(135deg, var(--success), var(--success-mid));
  border-color: transparent;
  box-shadow: 0 0 20px var(--success-glow), 0 4px 12px rgba(0,224,122,0.25);
}
.habit-circle.done::after { content: '✓'; color: #fff; font-size: 20px; font-weight: 800; }
.habit-circle:hover:not(.done) { border-color: #ff9448; transform: scale(1.1) rotate(5deg); box-shadow: 0 0 15px rgba(255,148,72,0.3); }
.habit-info { flex: 1; }
.habit-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; font-family: 'DM Sans', sans-serif; }
.habit-streak { font-size: 11px; color: var(--text-muted); }
.streak-fire { font-size: 12px; }
.habit-week-dots {
  display: flex; gap: 5px;
  margin-bottom: 11px;
}
.hwd {
  flex: 1; height: 6px;
  border-radius: 4px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  transition: all var(--transition);
}
.hwd.done-day {
  background: linear-gradient(90deg, var(--success), var(--success-mid));
  border-color: transparent;
  box-shadow: 0 0 8px var(--success-glow);
}
.hwd.today-day { border-color: var(--accent); }
.habit-progress { margin-top: 0; }
.hp-bar-bg {
  height: 4px;
  background: var(--bg-card2);
  border-radius: 3px;
  overflow: hidden;
}
.hp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px var(--accent-glow-sm);
}
.habit-actions {
  display: flex;
  border-top: 1px solid var(--border-soft);
}
.habit-action-btn {
  flex: 1;
  padding: 10px;
  font-size: 12px; font-weight: 700;
  text-align: center;
  transition: all var(--transition);
}
.habit-action-btn.edit { color: var(--accent); }
.habit-action-btn.del { color: var(--danger); }
.habit-action-btn:hover { background: var(--bg-card2); }

/* ============================================================
   FINANCE HERO — MONEY SECTION
============================================================ */
.finance-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 10px;
}
.finance-hero-card {
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.finance-hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.finance-hero-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  filter: blur(30px);
}
.income-hero {
  background: linear-gradient(145deg, rgba(0,224,122,0.1), rgba(0,224,122,0.02));
  border-color: rgba(0,224,122,0.18);
}
.income-hero::before { background: rgba(0,224,122,0.3); }
.expense-hero {
  background: linear-gradient(145deg, rgba(255,77,106,0.1), rgba(255,77,106,0.02));
  border-color: rgba(255,77,106,0.18);
}
.expense-hero::before { background: rgba(255,77,106,0.3); }
.fhc-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 11px;
}
.income-fhc { background: rgba(0,224,122,0.15); color: var(--success); }
.expense-fhc { background: var(--danger-soft); color: var(--danger); }
.fhc-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.fhc-val {
  font-family: 'Sora', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

/* Balance hero — bigger, central, premium */
.balance-hero-card {
  margin: 0 16px 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(123,104,255,0.22);
  background: linear-gradient(145deg, rgba(123,104,255,0.14) 0%, rgba(0,212,200,0.08) 60%, rgba(123,104,255,0.06) 100%);
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.balance-hero-card:hover { box-shadow: var(--shadow-glow-a); transform: translateY(-2px); }
.balance-hero-card::before {
  content: '';
  position: absolute; top: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(123,104,255,0.18) 0%, transparent 70%);
}
.balance-hero-card::after {
  content: '';
  position: absolute; bottom: -40px; right: -40px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(0,212,200,0.12) 0%, transparent 70%);
}
.bhc-left { position: relative; z-index: 1; }
.bhc-label { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.bhc-val {
  font-family: 'Sora', sans-serif;
  font-size: 32px; font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.bhc-right { position: relative; z-index: 1; }

/* ============================================================
   CATEGORY CHIPS
============================================================ */
.cat-chips-wrap {
  display: flex; gap: 8px;
  padding: 0 16px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-chips-wrap::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cat-chip:hover { border-color: var(--border-glow); transform: translateY(-1px); color: var(--accent); }
.cat-chip .chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.cat-chip .chip-pct { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 10px; }

/* ============================================================
   CHART CARD
============================================================ */
.chart-card {
  padding: 16px 18px !important;
}
.chart-card canvas { width: 100% !important; }

/* ============================================================
   EXPENSES LIST
============================================================ */
.expenses-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.expense-item {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.expense-item::before {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: all var(--transition);
}
.expense-item:hover { border-color: rgba(123,104,255,0.18); transform: translateX(-3px); box-shadow: var(--shadow-card); }
.expense-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform var(--spring);
}
.expense-item:hover .expense-icon { transform: scale(1.1) rotate(-3deg); }
.income-icon { background: rgba(0,224,122,0.12); box-shadow: 0 0 15px rgba(0,224,122,0.1); }
.expense-icon-bg { background: var(--bg-card2); }
.expense-details { flex: 1; overflow: hidden; }
.expense-note {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.expense-meta { display: flex; align-items: center; gap: 6px; }
.expense-cat, .expense-date {
  font-size: 11px; color: var(--text-muted);
  text-transform: capitalize;
}
.dot-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.4;
}
.expense-amount {
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 800;
  flex-shrink: 0;
}
.income-amt { color: var(--success); }
.expense-amt { color: var(--danger); }
.expense-actions { display: flex; gap: 5px; }
.expense-action-btn {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all var(--transition);
}
.expense-action-btn.edit { color: var(--accent); background: var(--accent-soft); }
.expense-action-btn.del { color: var(--danger); background: var(--danger-soft); }
.expense-action-btn:hover { transform: scale(1.1); opacity: 0.85; }

/* ============================================================
   DEBT HERO
============================================================ */
.debt-hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}
.debt-hero-card {
  border-radius: var(--radius);
  padding: 20px 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.debt-hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.receive-hero {
  background: linear-gradient(145deg, rgba(0,224,122,0.1), rgba(0,224,122,0.02));
  border-color: rgba(0,224,122,0.18);
}
.owe-hero {
  background: linear-gradient(145deg, rgba(255,77,106,0.1), rgba(255,77,106,0.02));
  border-color: rgba(255,77,106,0.18);
}
.dhc-orb {
  position: absolute; top: -25px; right: -25px;
  width: 90px; height: 90px;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
}
.receive-orb { background: rgba(0,224,122,0.35); }
.owe-orb { background: rgba(255,77,106,0.35); }
.dhc-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.receive-ic { background: rgba(0,224,122,0.15); color: var(--success); }
.owe-ic { background: var(--danger-soft); color: var(--danger); }
.dhc-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.dhc-val {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 800;
  color: var(--text-primary);
}

/* ============================================================
   DEBTS LIST
============================================================ */
.debts-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.debt-person-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.debt-person-group:hover { border-color: rgba(255,255,255,0.1); }
.debt-person-header {
  display: flex; align-items: center; gap: 13px;
  padding: 16px;
  cursor: pointer;
  transition: background var(--transition);
}
.debt-person-header:hover { background: var(--bg-card2); }
.debt-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow-sm);
}
.debt-person-info { flex: 1; }
.debt-person-name { font-size: 14px; font-weight: 700; color: var(--text-primary); font-family: 'DM Sans', sans-serif; }
.debt-person-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.debt-person-total { text-align: right; }
.dpt-label { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; }
.dpt-amount { font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 800; }
.dpt-amount.gave { color: var(--success); }
.dpt-amount.owe { color: var(--danger); }
.debt-chevron {
  font-size: 10px; color: var(--text-muted);
  transition: transform var(--transition);
  margin-left: 4px;
}
.debt-person-group.open .debt-chevron { transform: rotate(180deg); }
.debt-items { display: none; }
.debt-person-group.open .debt-items { display: block; }
.debt-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 8px;
}
.debt-item-type {
  font-size: 10px; font-weight: 800;
  padding: 4px 11px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.debt-item-type.gave { background: rgba(0,224,122,0.12); color: var(--success); }
.debt-item-type.owe { background: var(--danger-soft); color: var(--danger); }
.debt-item-type.paid { background: var(--bg-card2); color: var(--text-muted); }
.debt-item-info { flex: 1; min-width: 80px; }
.debt-item-note { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.debt-item-date { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.debt-item-amount { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.debt-item-amount.gave { color: var(--success); }
.debt-item-amount.owe { color: var(--danger); }
.debt-item-amount.paid { color: var(--text-muted); }
.debt-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.di-btn {
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 11px; font-weight: 700;
  transition: all var(--transition);
}
.di-btn.paid { background: rgba(0,224,122,0.12); color: var(--success); }
.di-btn.edit { background: var(--accent-soft); color: var(--accent); }
.di-btn.del { background: var(--danger-soft); color: var(--danger); }
.di-btn:hover { transform: scale(1.05); opacity: 0.85; }

/* ============================================================
   NOTES — premium sticky cards
============================================================ */
.notes-section { padding: 0 16px; }
.pinned-label {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent3);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 7px;
}
.pinned-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.note-card {
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  min-height: 140px;
}
.note-card:hover { transform: translateY(-4px) rotate(0.5deg); box-shadow: var(--shadow-card); }
.note-card:active { transform: scale(0.97); }

/* Pin highlight */
.note-card.pinned { border-color: rgba(255,179,64,0.35); box-shadow: 0 0 20px rgba(255,179,64,0.1); }

/* Color variants — richer, more editorial */
.note-card.color-0 {
  background: linear-gradient(145deg, var(--nc0), rgba(123,104,255,0.04));
  border-color: rgba(123,104,255,0.18);
}
.note-card.color-1 {
  background: linear-gradient(145deg, var(--nc1), rgba(0,212,200,0.04));
  border-color: rgba(0,212,200,0.18);
}
.note-card.color-2 {
  background: linear-gradient(145deg, var(--nc2), rgba(255,179,64,0.04));
  border-color: rgba(255,179,64,0.18);
}
.note-card.color-3 {
  background: linear-gradient(145deg, var(--nc3), rgba(255,107,171,0.04));
  border-color: rgba(255,107,171,0.18);
}
.note-card.color-4 {
  background: linear-gradient(145deg, var(--nc4), rgba(96,174,255,0.04));
  border-color: rgba(96,174,255,0.18);
}

/* Decorative glow orb */
.note-card::before {
  content: '';
  position: absolute; top: -25px; right: -25px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(20px);
}
.note-card.color-0::before { background: var(--nc0-accent); }
.note-card.color-1::before { background: var(--nc1-accent); }
.note-card.color-2::before { background: var(--nc2-accent); }
.note-card.color-3::before { background: var(--nc3-accent); }
.note-card.color-4::before { background: var(--nc4-accent); }

/* Top right fold effect */
.note-card::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent rgba(255,255,255,0.05) transparent transparent;
  transition: all var(--transition);
}
.note-card:hover::after { border-width: 0 24px 24px 0; }

.note-pin-icon {
  position: absolute; top: 11px; right: 11px;
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(255,179,64,0.5));
}
.note-cat {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 7px;
  opacity: 0.75;
  font-family: 'DM Sans', sans-serif;
}
.note-card.color-0 .note-cat { color: var(--nc0-accent); }
.note-card.color-1 .note-cat { color: var(--nc1-accent); }
.note-card.color-2 .note-cat { color: var(--nc2-accent); }
.note-card.color-3 .note-cat { color: var(--nc3-accent); }
.note-card.color-4 .note-cat { color: var(--nc4-accent); }

.note-title {
  font-size: 13px; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 7px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Sora', sans-serif;
}
.note-content-preview {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.note-footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
}

[data-theme="light"] .note-footer { border-top-color: rgba(0,0,0,0.05); }
.note-date { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.note-actions { display: flex; gap: 4px; }
.na-btn {
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 10px; font-weight: 700;
  transition: all var(--transition);
  letter-spacing: 0.2px;
}
.na-btn.pin { background: rgba(255,179,64,0.15); color: var(--accent3); }
.na-btn.edit { background: var(--accent-soft); color: var(--accent); }
.na-btn.del { background: var(--danger-soft); color: var(--danger); }
.na-btn:hover { transform: scale(1.08); opacity: 0.85; }

/* ============================================================
   MODALS — elevated, premium
============================================================ */
/* .modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
} */

.modal-overlay {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.25); /* light overlay */
  backdrop-filter: blur(8px);      /* soft blur */
  -webkit-backdrop-filter: blur(8px);

  display: flex;
  align-items: flex-end;
  justify-content: center;

  z-index: 1000;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  /* box-shadow: 0 -20px 80px rgba(0,0,0,0.6); */
  box-shadow: 
    0 -10px 40px rgba(0,0,0,0.6),
    0 0 20px rgba(123,104,255,0.15);
}

.modal-sm { max-height: 340px; }
.modal::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 16px auto 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); transform: scale(1.1); }
.modal-body { padding: 22px; }
.modal-footer {
  display: flex; gap: 10px;
  padding: 18px 22px;
  border-top: 1px solid var(--border-soft);
}

/* ============================================================
   FORM ELEMENTS — premium feel
============================================================ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: 'DM Sans', sans-serif;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-card2);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-primary {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all var(--transition);
  letter-spacing: 0.2px;
  font-family: 'DM Sans', sans-serif;
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--accent-glow); background: linear-gradient(135deg, var(--accent-bright), var(--accent)); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  flex: 0 0 auto;
  padding: 14px 20px;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.btn-secondary:hover { border-color: var(--border-focus); color: var(--text-primary); background: var(--bg-card2); }

.btn-danger {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, var(--danger), #e8354a);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 16px var(--danger-glow);
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.btn-danger:hover { transform: translateY(-1px); opacity: 0.9; }

/* ============================================================
   LIGHT THEME OVERRIDES
============================================================ */
[data-theme="light"] .home-hero {
  background: linear-gradient(145deg, #3d2fd4 0%, #0d9aaa 55%, #1a5fc4 100%);
}
[data-theme="light"] .hero-bg-mesh {
  background:
    radial-gradient(ellipse 100% 80% at 15% -20%, rgba(255,255,255,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 95% 110%, rgba(255,255,255,0.12) 0%, transparent 60%);
}
[data-theme="light"] .hero-date { color: #fff; }
[data-theme="light"] .hero-greeting { color: rgba(255,255,255,0.55); }
[data-theme="light"] .hms-val { color: #fff; }
[data-theme="light"] .hms-label { color: rgba(255,255,255,0.5); }
[data-theme="light"] .hms-divider { background: rgba(255,255,255,0.2); }
[data-theme="light"] .hero-mini-stats {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.22);
}
[data-theme="light"] .hero-emoji-bubble {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}
[data-theme="light"] .balance-hero-card {
  background: linear-gradient(135deg, rgba(108,95,255,0.12), rgba(0,168,159,0.08));
}
[data-theme="light"] .bhc-val { color: var(--text-primary); }
[data-theme="light"] .bhc-label { color: var(--text-secondary); }
[data-theme="light"] .home-hero::after {
  background: linear-gradient(to bottom, transparent, var(--bg-base));
}

/* ============================================================
   STAGGERED ANIMATIONS — cinematic entrance
============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.screen.active .home-hero { animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.screen.active .qa-section { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.07s backwards; }
.screen.active .section-card:nth-child(1) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards; }
.screen.active .section-card:nth-child(2) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards; }
.screen.active .section-card:nth-child(3) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards; }
.screen.active .section-card:nth-child(4) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.28s backwards; }
.screen.active .section-card:nth-child(5) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.34s backwards; }
.screen.active .quote-card { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards; }

/* Nav animation */
.nav-item { animation: fadeInUp 0.5s cubic-bezier(0.16,1,0.3,1) backwards; }
.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }

/* Task/habit card entrance */
.task-card { animation: slideInLeft 0.3s cubic-bezier(0.16,1,0.3,1) backwards; }
.habit-card { animation: fadeInUp 0.3s cubic-bezier(0.16,1,0.3,1) backwards; }
.expense-item { animation: fadeInUp 0.25s cubic-bezier(0.16,1,0.3,1) backwards; }
.note-card { animation: fadeInScale 0.3s cubic-bezier(0.16,1,0.3,1) backwards; }

/* Stagger children */
.task-card:nth-child(1) { animation-delay: 0.05s; }
.task-card:nth-child(2) { animation-delay: 0.1s; }
.task-card:nth-child(3) { animation-delay: 0.15s; }
.task-card:nth-child(4) { animation-delay: 0.2s; }
.task-card:nth-child(5) { animation-delay: 0.25s; }

.note-card:nth-child(1) { animation-delay: 0.05s; }
.note-card:nth-child(2) { animation-delay: 0.1s; }
.note-card:nth-child(3) { animation-delay: 0.15s; }
.note-card:nth-child(4) { animation-delay: 0.2s; }

/* ============================================================
   MICRO-INTERACTIONS — extra polish
============================================================ */
/* Ripple effect on active items */
.home-list-item:active,
.task-card:active,
.habit-card:active,
.note-card:active {
  transition: transform 0.08s ease;
}

/* Glow on section card hover */
.focus-card:hover { box-shadow: var(--shadow-glow-a); }
.money-widget-card:hover { box-shadow: 0 8px 40px rgba(0,212,200,0.1), var(--shadow-card); }

/* Smooth color transitions everywhere */
* { transition-property: background-color, border-color, color, box-shadow, transform, opacity; }

/* ============================================================
   MONEY TABS
============================================================ */
.money-tabs { margin-bottom: 16px; }

/* ============================================================
   NEW FEATURE STYLES — v4 Upgrade
============================================================ */

/* Habit Inner Tabs */
.habit-inner-tabs { margin: 0 16px 16px; }

/* Habit Date Strip */
.habit-date-strip-wrap {
  padding: 0 16px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.habit-date-strip-wrap::-webkit-scrollbar { display: none; }
.habit-date-strip {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  min-width: max-content;
}
.hds-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 48px;
  flex-shrink: 0;
}
.hds-day:hover { border-color: var(--accent); transform: translateY(-2px); }
.hds-day.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.hds-day.today:not(.selected) { border-color: rgba(255,148,72,0.5); }
.hds-day.future { opacity: 0.5; }
.hds-dow {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
}
.hds-day.selected .hds-dow { color: rgba(255,255,255,0.7); }
.hds-num {
  font-size: 16px; font-weight: 800;
  font-family: 'Sora', sans-serif;
  color: var(--text-primary);
}
.hds-day.selected .hds-num { color: #fff; }
.hds-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: transparent;
}
.hds-dot.has-done { background: var(--success); }
.hds-dot.has-missed { background: var(--danger); }
.hds-dot.has-future { background: var(--border); }

/* Habit card status for date view */
.habit-card.status-future { opacity: 0.6; }
.habit-card.status-future .habit-circle { border-style: dashed; }
.habit-card.status-missed { border-color: rgba(255,77,106,0.3); }

/* Habit action buttons extra */
.habit-action-btn.detail { color: var(--accent2); }
.hab-missed-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  margin-left: auto;
  flex-shrink: 0;
}
.hab-future-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-card2);
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* Challenges List */
.challenges-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.challenge-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.challenge-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.challenge-card.completed-challenge::before { background: linear-gradient(90deg, var(--success), var(--success-mid)); }
.challenge-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.challenge-habit-name {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
}
.challenge-type-badge {
  font-size: 10px; font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  flex-shrink: 0;
}
.challenge-type-badge.gold { background: rgba(255,179,64,0.15); color: var(--accent3); }
.challenge-type-badge.fire { background: rgba(255,100,50,0.12); color: #ff6432; }
.challenge-stats-row {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.cs-stat {
  flex: 1;
  background: var(--bg-card2);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}
.cs-stat-val {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.cs-stat-val.success { color: var(--success); }
.cs-stat-val.danger { color: var(--danger); }
.cs-stat-label { font-size: 9px; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.challenge-progress-wrap { margin-bottom: 10px; }
.challenge-progress-bar {
  height: 8px;
  background: var(--bg-card2);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 5px;
}
.challenge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 10px var(--accent-glow-sm);
}
.challenge-progress-text {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-muted);
}
.challenge-pct { color: var(--accent-bright); font-weight: 800; }
.challenge-actions {
  display: flex; gap: 6px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  margin-top: 4px;
}
.challenge-action-btn {
  flex: 1; padding: 8px;
  font-size: 11px; font-weight: 700;
  border-radius: 10px;
  text-align: center;
  transition: all var(--transition);
}
.challenge-action-btn.del { color: var(--danger); background: var(--danger-soft); }
.challenge-action-btn:hover { transform: scale(1.03); opacity: 0.85; }
.challenge-streak-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  color: var(--accent3);
  background: rgba(255,179,64,0.1);
  padding: 3px 10px;
  border-radius: 8px;
}
.challenge-complete-banner {
  text-align: center;
  font-size: 13px; font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  padding: 10px;
  border-radius: 10px;
  margin-top: 10px;
}

/* Habit Analytics */
.habit-heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 8px 0;
}
.hm-cell {
  width: 18px; height: 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  position: relative;
}
.hm-cell:hover { transform: scale(1.2); z-index: 1; }
.hm-cell.done { background: var(--success); border-color: transparent; box-shadow: 0 0 6px var(--success-glow); }
.hm-cell.missed { background: rgba(255,77,106,0.35); border-color: rgba(255,77,106,0.4); }
.hm-cell.future { background: var(--bg-card2); border-style: dashed; }
.habit-perf-list { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.hperf-item {
  display: flex; align-items: center; gap: 12px;
}
.hperf-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.hperf-bar-wrap { flex: 2; }
.hperf-bar-bg {
  height: 8px; background: var(--bg-card2);
  border-radius: 5px; overflow: hidden;
}
.hperf-bar-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.hperf-pct {
  font-size: 11px; font-weight: 800;
  color: var(--accent-bright);
  font-family: 'Sora', sans-serif;
  width: 36px; text-align: right;
}
.fab-inline-sm {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid rgba(123,104,255,0.3);
  font-size: 12px; font-weight: 700;
  transition: all var(--transition);
  letter-spacing: 0.2px;
  display: inline-flex; align-items: center; gap: 5px;
}
.fab-inline-sm:hover { background: var(--accent); color: #fff; border-color: transparent; transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }

/* ============================================================
   SHARED EXPENSES
============================================================ */
.shared-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; margin-bottom: 12px;
}
.member-chips-wrap {
  display: flex; gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.member-chips-wrap::-webkit-scrollbar { display: none; }
.member-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.member-chip:hover { border-color: var(--accent-glow); transform: translateY(-1px); }
.member-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.member-chip-del {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-left: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.member-chip:hover .member-chip-del { opacity: 1; }
.member-chip-edit {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.member-chip:hover .member-chip-edit { opacity: 1; }

/* Settlement Card */
.settlement-card {
  margin: 0 16px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,212,200,0.25);
  background: linear-gradient(145deg, rgba(0,212,200,0.08), rgba(123,104,255,0.04));
  overflow: hidden;
}
.settlement-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.settlement-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 800;
  color: var(--text-primary);
}
.settlement-total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
}
.settlement-total-label { font-size: 12px; color: var(--text-muted); }
.settlement-total-val {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 900;
  color: var(--accent2);
}
.settlement-per-head {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px;
}
.settlement-per-head span { color: var(--accent2-mid); font-weight: 700; }
.settlement-members { padding: 12px 18px; }
.settlement-member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.settlement-member-row:last-child { border-bottom: none; }
.settle-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settle-name { font-size: 13px; font-weight: 700; color: var(--text-primary); flex: 1; }
.settle-info { text-align: right; display: none; }
.settle-paid { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 800; color: var(--text-primary); }
.settle-balance {
  font-size: 11px; font-weight: 700; margin-top: 2px;
}
.settle-balance.pos { color: var(--success); }
.settle-balance.neg { color: var(--danger); }
.settle-balance.zero { color: var(--text-muted); }

/* Shared expense item — paidBy tag */
.expense-paidby {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(0,212,200,0.1);
  color: var(--accent2-mid);
  margin-top: 3px;
  display: inline-block;
}

/* Split checkboxes */
.split-checkboxes {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 4px;
}
.split-cb-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card2);
  cursor: pointer;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  user-select: none;
}
.split-cb-item input { display: none; }
.split-cb-item.checked {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-bright);
}
.split-cb-item:hover { border-color: var(--accent-glow); }

/* Shared category chips active state */
.cat-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* Habit Detail Modal */
.detail-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.detail-stat-card {
  background: var(--bg-card2);
  border-radius: 12px; padding: 12px 14px;
  border: 1px solid var(--border-soft);
}
.detail-stat-val {
  font-family: 'Sora', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--text-primary); line-height: 1;
}
.detail-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Habit missed section */
.habit-section-label.missed-label {
  margin-top: 22px;
}
.hsl-dot.missed { background: var(--danger); box-shadow: 0 0 6px var(--danger-glow); }

/* Empty state improvements */
.challenges-empty { padding: 0 16px; }

/* ============================================================
   PATCH v5 — Habit States, Custom Sections, Settlement
============================================================ */

/* Habit state action buttons */
.habit-state-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.hab-state-btn {
  flex: 1;
  min-width: 60px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.hab-state-btn.done-btn {
  background: var(--success-soft);
  border-color: rgba(0,224,122,0.25);
  color: var(--success);
}
.hab-state-btn.done-btn:hover { background: rgba(0,224,122,0.22); }
.hab-state-btn.miss-btn {
  background: var(--danger-soft);
  border-color: rgba(255,77,106,0.2);
  color: var(--danger);
}
.hab-state-btn.miss-btn:hover { background: rgba(255,77,106,0.2); }
.hab-state-btn.skip-btn {
  background: var(--bg-card2);
  border-color: var(--border);
  color: var(--text-secondary);
}
.hab-state-btn.skip-btn:hover { background: var(--bg-glass); color: var(--text-primary); }
.hab-state-btn.undo-btn {
  background: var(--accent-soft);
  border-color: var(--accent-glow-sm);
  color: var(--accent-bright);
}
.hab-state-btn.undo-btn:hover { background: rgba(123,104,255,0.2); }

/* Habit card states */
.habit-card.status-skipped {
  opacity: 0.75;
  border-color: rgba(255,255,255,0.04);
}
.habit-circle.missed-circle {
  background: var(--danger-soft) !important;
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}
.habit-circle.skipped-circle {
  background: var(--bg-card2) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}
.hab-skipped-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg-card2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.hsl-dot.skipped {
  background: var(--text-secondary);
  box-shadow: none;
}

/* Week dots extra states */
.hwd.missed-day { background: var(--danger); opacity: 0.7; }
.hwd.skipped-day { background: var(--text-muted); opacity: 0.5; }

/* Custom shared sections chips */
.shared-section-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 16px 12px;
}
.section-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: default;
}
.section-chip-edit,
.section-chip-del {
  cursor: pointer;
  font-size: 11px;
  padding: 1px 3px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1;
}
.section-chip-edit { color: var(--accent); }
.section-chip-edit:hover { background: var(--accent-soft); }
.section-chip-del { color: var(--danger); }
.section-chip-del:hover { background: var(--danger-soft); }

/* Settlement — who pays whom */
.settlement-transfers {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.settlement-transfers-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.settle-transfer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card2);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  border: 1px solid var(--border-soft);
}
.str-from { color: var(--danger); font-weight: 600; }
.str-arrow { color: var(--text-muted); }
.str-to { color: var(--success); font-weight: 600; flex: 1; }
.str-amount {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent3);
}
.settlement-settled-msg {
  font-size: 13px;
  color: var(--success);
  text-align: center;
  padding: 10px 0 4px;
  font-weight: 600;
}

/* Settlement member row updated layout */
.settlement-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.settlement-member-row:last-child { border-bottom: none; }
.settle-info-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settle-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.settle-paid-lbl { font-size: 11px; color: var(--text-muted); }
.settle-balance {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.settle-balance.pos { background: var(--success-soft); color: var(--success); }
.settle-balance.neg { background: var(--danger-soft); color: var(--danger); }
.settle-balance.zero { background: var(--bg-card2); color: var(--text-secondary); }

/* Habit analytics performance summary */
.habit-perf-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.hps-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}
.hps-item.best { background: var(--success-soft); border-color: rgba(0,224,122,0.15); }
.hps-item.weak { background: var(--accent-soft); border-color: var(--accent-glow-sm); }
.hps-emoji { font-size: 20px; }
.hps-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.hps-val { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-top: 1px; }

/* ============================================================
   PATCH v5b — Challenge Cards Polish, Misc Fixes
============================================================ */

/* Challenge card ended state */
.challenge-card.ended-challenge {
  opacity: 0.75;
  border-color: var(--border-soft);
}
.challenge-ended-banner {
  margin: 10px 0 4px;
  padding: 8px 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* Challenge habit wrap with date range */
.challenge-habit-wrap { display: flex; flex-direction: column; gap: 3px; }
.challenge-date-range {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cdr-ended {
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 6px;
  background: var(--bg-card2);
  color: var(--text-secondary);
}
.cdr-active {
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 6px;
  background: var(--success-soft);
  color: var(--success);
}

/* Challenge streak row */
.challenge-streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 6px;
}
.challenge-streak-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--bg-card2);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}
.challenge-streak-badge.best {
  background: var(--accent3-soft);
  color: var(--accent3);
  border-color: var(--accent3-glow);
}
.challenge-pct-badge {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 800;
  margin-left: auto;
}

/* cs-stat color variants */
.cs-stat-val.amber { color: var(--accent3); }

/* Detail stats grid 3-col on small screens fallback */
@media (max-width: 360px) {
  .detail-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Habit section label skipped */
.habit-section-label#sectionLabelSkipped {
  margin-top: 22px;
}

/* Skipped section label dot already added above, ensure display */
#missedSectionLabel, #sectionLabelSkipped, #sectionLabelInProgress {
  display: flex;
}

/* Settlement members container spacing */
.settlement-members { padding: 8px 18px 4px; }

/* Settlement transfers inside card */
.settlement-card .settlement-transfers { padding: 0 18px 14px; }

/* Fix: section-label-sm spacing */
.shared-section-header { padding: 12px 16px 8px; display: flex; justify-content: space-between; align-items: center; }


.hli-dot.skipped {
  background: var(--text-secondary);
  box-shadow: none;
  opacity: 0.8;
}
.prestart-day{
  opacity: 0.18;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.06);
}

.hero-emoji-bubble,
.esv-icon-bg,
.hps-emoji,
.habit-circle,
.section-chip span,
.cat-chip span,
.member-avatar,
button,
span {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
               'DM Sans', sans-serif;
}


.section-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.split-manage-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.mini-btn {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-bright);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.mini-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.mini-btn.danger {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.split-member-manager {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.split-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
}

.split-member-row span {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.split-member-row > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-pink {
  background: linear-gradient(135deg, rgba(255,107,171,0.25), rgba(255,107,171,0.1));
  color: var(--pink);
}

.mood-preview-card {
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
}

.mood-preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mood-emoji {
  font-size: 22px;
}

.mood-date {
  font-size: 12px;
  color: var(--text-muted);
}

.mood-note,
.mood-empty {
  font-size: 13px;
  color: var(--text-secondary);
}

.focus-timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px 0 4px;
}

.focus-time {
  font-family: 'Sora', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
}

.focus-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.focus-session-count {
  font-size: 12px;
  color: var(--text-muted);
}

.goal-bar {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
}

.goal-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.goal-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goal-complete {
  border-color: rgba(0, 224, 122, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 224, 122, 0.08);
}

.goal-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.goal-main {
  flex: 1;
}

.goal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.goal-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.goal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.goal-btn {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.goal-btn.add {
  color: var(--accent2);
  border-color: rgba(0,212,200,0.25);
}

.goal-btn.edit {
  color: var(--accent);
  border-color: rgba(123,104,255,0.25);
}

.goal-btn.del {
  color: var(--danger);
  border-color: rgba(255,77,106,0.25);
}

.goal-done-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
}

.mood-history-list {
  margin-top: 10px;
}

.mood-history-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.mood-day-card {
  padding: 10px 6px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-soft);
  background: var(--bg-card2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mood-day-card.filled {
  border-color: rgba(123,104,255,0.2);
}

.mood-day-card.empty {
  opacity: 0.65;
}

.mood-day-name {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.mood-day-emoji {
  font-size: 18px;
  line-height: 1;
}

.mood-history-empty {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.focus-adjust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.focus-time-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.focus-custom-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.focus-adjust-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
}

.focus-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.focus-preset-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.focus-custom-input-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.focus-custom-input-row input {
  flex: 1;
  max-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
}

.focus-set-btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(123,104,255,0.25);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.clickable-logo {
  cursor: pointer;
}

.user-panel-modal {
  max-width: 420px;
}

.user-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.user-avatar {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(145deg, rgba(123,104,255,0.16), rgba(0,212,200,0.08));
  border: 1px solid rgba(123,104,255,0.16);
  box-shadow: 0 10px 24px rgba(123,104,255,0.10);
  color: var(--accent);
  flex-shrink: 0;
}

.user-panel-header h4 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.user-panel-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.user-panel-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.user-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
}

.user-info-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.user-panel-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.ups-card {
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  text-align: center;
}

.ups-num {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.ups-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.user-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 1200;
}

.user-panel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.user-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.user-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.user-panel-head h3 {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.user-panel-head p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.user-panel-close {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

[data-theme="dark"] .user-panel-close {
  background: rgba(255,255,255,0.08);
}

.user-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.user-panel-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(86vw, 340px);
  height: 100dvh;
  background:
    linear-gradient(180deg, rgba(123,104,255,0.10) 0%, rgba(0,212,200,0.04) 22%, var(--bg-card-solid) 55%);
  border-right: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 1300;
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.user-panel-drawer.open {
  transform: translateX(0);
}

.premium-avatar {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent2-soft));
  border: 1px solid rgba(123,104,255,0.2);
  box-shadow: 0 10px 30px rgba(123,104,255,0.16);
}

.user-premium-banner {
  background:
    radial-gradient(circle at top right, rgba(123,104,255,0.14), transparent 32%),
    radial-gradient(circle at bottom left, rgba(0,212,200,0.08), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,0.50), rgba(255,255,255,0.22));
  border: 1px solid rgba(123,104,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

[data-theme="dark"] .user-premium-banner {
  background:
    radial-gradient(circle at top right, rgba(123,104,255,0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(0,212,200,0.10), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.user-banner-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  top: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,104,255,0.28), transparent 70%);
  filter: blur(10px);
}

.user-banner-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.user-banner-chip {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(123,104,255,0.14);
}

.user-edit-title-wrap {
  margin-bottom: 12px;
}

.premium-btn {
  box-shadow: 0 10px 24px rgba(123,104,255,0.18);
}

.user-panel-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(88vw, 360px);
  height: 100dvh;
  background:
    radial-gradient(circle at top right, rgba(123,104,255,0.10), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.92));
  border-right: 1px solid rgba(123,104,255,0.08);
  box-shadow: 0 24px 60px rgba(0,0,0,0.20);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 1300;
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

[data-theme="dark"] .user-panel-drawer {
  background:
    radial-gradient(circle at top right, rgba(123,104,255,0.14), transparent 30%),
    linear-gradient(180deg, rgba(18,20,30,0.96), rgba(12,14,22,0.98));
  border-right: 1px solid var(--border);
}

.user-panel-drawer.open {
  transform: translateX(0);
}


.user-header-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(145deg, rgba(123,104,255,0.18), rgba(0,212,200,0.08));
  border: 1px solid rgba(123,104,255,0.18);
  box-shadow: 0 12px 30px rgba(123,104,255,0.12);
  color: var(--accent);
  flex-shrink: 0;
}

.user-edit-icon-btn,
.top-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

[data-theme="dark"] .user-edit-icon-btn,
[data-theme="dark"] .top-close-btn {
  background: rgba(255,255,255,0.06);
}

.user-premium-banner {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(123,104,255,0.16), transparent 35%),
    radial-gradient(circle at bottom left, rgba(0,212,200,0.10), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,0.52), rgba(255,255,255,0.24));
  border: 1px solid rgba(123,104,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}

[data-theme="dark"] .user-premium-banner {
  background:
    radial-gradient(circle at top right, rgba(123,104,255,0.20), transparent 35%),
    radial-gradient(circle at bottom left, rgba(0,212,200,0.12), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.user-banner-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.user-banner-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

.user-panel-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ups-card {
  padding: 16px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(123,104,255,0.08);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

[data-theme="dark"] .ups-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.ups-num {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.ups-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.compact-actions {
  margin-top: 8px;
}

.user-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.premium-btn {
  box-shadow: 0 12px 28px rgba(123,104,255,0.18);
}

.user-edit-inline-head {
  margin-top: 4px;
  margin-bottom: 6px;
}

.user-edit-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.user-edit-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.user-panel-header-premium {
  margin-bottom: 16px;
}

.user-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.user-header-text {
  min-width: 0;
  flex: 1;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-name-row h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  white-space: normal;
  word-break: break-word;
}

.user-header-text p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.user-name-bio-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-name-bio-wrap h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: normal;
  word-break: break-word;
  letter-spacing: -0.2px;
}

.user-name-bio-wrap p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.user-edit-icon-btn,
.top-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(123,104,255,0.10);
  background: rgba(255,255,255,0.55);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

[data-theme="dark"] .user-edit-icon-btn,
[data-theme="dark"] .top-close-btn {
  background: rgba(255,255,255,0.06);
}

.compact-banner {
  padding: 14px 14px 16px;
  border-radius: 22px;
  margin-bottom: 14px;
}

.user-banner-topline {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.user-banner-chip {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(123,104,255,0.10);
}

.user-banner-label {
  margin: 0 0 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 700;
}

.user-banner-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.user-panel-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ups-card {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(123,104,255,0.07);
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.03);
}

[data-theme="dark"] .ups-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.inline-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
/* Notes card — soft violet */
.notes-card {
  background: linear-gradient(145deg, rgba(123,104,255,0.06) 0%, var(--bg-card) 60%);
  border-color: rgba(123,104,255,0.12);
}
.notes-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -25px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(123,104,255,0.10) 0%, transparent 70%);
  pointer-events: none;
}

/* Mood card — soft pink/violet */
.mood-card {
  background: linear-gradient(145deg, rgba(255,107,171,0.05) 0%, var(--bg-card) 60%);
  border-color: rgba(255,107,171,0.12);
}
.mood-card::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255,107,171,0.10) 0%, transparent 70%);
  pointer-events: none;
}

/* Goals card — green/teal premium */
.goals-card {
  background: linear-gradient(145deg, rgba(0,224,122,0.05) 0%, var(--bg-card) 60%);
  border-color: rgba(0,224,122,0.14);
}
.goals-card::before {
  content: '';
  position: absolute;
  bottom: -25px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0,224,122,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.timer-card::before {
  content: '';
  position: absolute;
  top: -35px;
  left: -30px;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(123,104,255,0.10) 0%, transparent 70%);
  pointer-events: none;
}

/* Habits card — orange glow */
.habits-card {
  background: linear-gradient(145deg, rgba(255,148,72,0.05) 0%, var(--bg-card) 60%);
  border-color: rgba(255,148,72,0.13);
}
.habits-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255,148,72,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.section-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card:active {
  transform: scale(0.98);
}

.btn-primary {
  box-shadow: 0 10px 25px rgba(123,104,255,0.25);
}

.section-card {
  margin-bottom: 14px;
}

.card-icon-dot {
  box-shadow: 0 0 10px currentColor;
}

.card-title {
  letter-spacing: -0.2px;
}


/* ===== TEST: SIDE ACTIONS (HABITS) ===== */

.habit-actions {
  display: flex;
  gap: 8px;
}

.habit-actions.side {
  flex-direction: column;
  align-items: center;
}

/* thoda compact look */
.habit-actions.side button {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.todo-note-progress {
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0 10px;
}

.todo-note-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.todo-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
}

.todo-check-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.todo-check-wrap input {
  accent-color: var(--accent);
}

.todo-done {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.7;
}

.todo-del-btn {
  color: var(--danger);
  font-size: 12px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--danger-soft);
}

.todo-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.todo-add-row input {
  flex: 1;
}

.todo-add-btn {
  padding: 0 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-glow);
  font-weight: 600;
}

.note-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.todo-summary-row {
  margin: 10px 0 12px;
}

.todo-summary-count {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.todo-summary-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-card2);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.todo-summary-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.todo-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.todo-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.todo-preview-item.done span:last-child {
  text-decoration: line-through;
  opacity: 0.65;
}

.todo-preview-dot {
  width: 18px;
  text-align: center;
  color: var(--accent);
}

.todo-preview-empty {
  font-size: 12px;
  color: var(--text-muted);
}


.note-detail-cat,
.note-detail-progress {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
}

.note-detail-todos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}


.todo-detail-add {
  display: flex;
  gap: 10px;
}

.todo-detail-add input {
  flex: 1;
}

.note-detail-text {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 14px;
}
.note-detail-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 18px;
}

.back-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card2));
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.note-detail-page-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-detail-topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.note-detail-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.note-detail-todos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.premium-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.premium-add-row input {
  flex: 1;
  height: 50px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--bg-input), var(--bg-card2));
  color: var(--text-primary);
  padding: 0 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.premium-add-row input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.premium-add-btn {
  height: 50px;
  min-width: 90px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 24px var(--accent-glow-sm);
}

.note-detail-text-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.note-detail-text {
  white-space: pre-wrap;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 14px;
}

.habit-date-strip-wrap {
  margin: 14px 16px 10px;
  overflow-x: auto;
}

.habit-date-strip {
  display: flex;
  gap: 10px;
  min-width: max-content;
}

.habit-date-pill {
  min-width: 74px;
  padding: 10px 8px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.habit-date-pill.active {
  border-color: var(--border-focus);
  background: var(--accent-soft);
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(123,104,255,0.12);
}

.hdp-day {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hdp-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.hdp-progress {
  font-size: 10px;
  color: var(--text-muted);
}

.note-detail-editor {
  width: 100%;
  min-height: 320px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.8;
  padding: 4px 2px;
  font-family: inherit;
}

.note-detail-editor::placeholder {
  color: var(--text-muted);
}

.note-detail-editor:focus {
  outline: none;
}

.modal,
.modal-body {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  display: none;
}

.habit-week-track {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 14px;
}

.habit-week-day-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.habit-week-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.habit-week-box {
  width: 100%;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-secondary);
  transition: all var(--transition);
  opacity: 0.9;
}

.habit-week-box.done-day {
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px var(--accent-glow-sm);
}

.habit-week-box.missed-day {
  background: var(--danger-soft);
  border-color: rgba(255, 77, 106, 0.25);
  color: var(--danger);
}

.habit-week-box.skipped-day {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
  color: var(--text-secondary);
}

.habit-week-box.today-day {
  outline: 2px solid #7b68ff;
  outline-offset: 3px;
  box-shadow: 0 0 18px rgba(123,104,255,0.25);
}

.habit-week-box.prestart-day {
  opacity: 0.7;
}

.habit-week-box.done-day {
  background: #6c63ff;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.28);
}

.hm-cell {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.hm-cell:hover {
  transform: scale(1.08);
}

.hm-cell.empty {
  background: var(--bg-card2);
  border-color: var(--border-soft);
}

.hm-cell.done {
  background: var(--success);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(0, 224, 122, 0.22);
}

.hm-cell.partial {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(123, 104, 255, 0.18);
}

.hm-cell.missed {
  background: var(--danger-soft);
  border-color: rgba(255, 77, 106, 0.35);
}

.hm-cell.skipped {
  background: rgba(255,255,255,0.08);
  border-color: var(--border);
}

.hm-cell.future {
  opacity: 0.32;
  background: transparent;
  border-style: dashed;
}

.hm-cell.today {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

#habitHeatmap {
  display: grid;
  grid-template-columns: repeat(30, 14px);
  gap: 6px;
  justify-content: start;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#habitHeatmap::-webkit-scrollbar {
  display: none;
}

.hm-cell {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.hm-cell.today {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  background: transparent;
}

.hm-cell.today {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  box-shadow: none;
}

.hm-cell.done-low {
  background: rgba(0, 224, 122, 0.22);
  border-color: rgba(0, 224, 122, 0.18);
}

.hm-cell.done-mid {
  background: rgba(0, 224, 122, 0.45);
  border-color: rgba(0, 224, 122, 0.28);
}

.hm-cell.done-high {
  background: rgba(0, 224, 122, 0.7);
  border-color: rgba(0, 224, 122, 0.4);
  box-shadow: 0 0 8px rgba(0, 224, 122, 0.18);
}

.hm-cell.done-full {
  background: var(--success);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(0, 224, 122, 0.26);
}


.planner-widget-card {
  margin: 0 16px 16px;
  padding: 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 38%),
    linear-gradient(145deg, var(--bg-card), var(--bg-card2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
}

.planner-widget-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  pointer-events: none;
}

.planner-widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.planner-widget-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.planner-widget-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.planner-widget-progress {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.08));
}

[data-theme="dark"] .planner-widget-progress {
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.10));
}

.planner-widget-progress canvas {
  width: 64px;
  height: 64px;
  display: block;
  border-radius: 50%;
}

.planner-widget-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  z-index: 2;
}

.planner-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.planner-widget-item {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  transition: all var(--transition);
  cursor: pointer;
}

.planner-widget-item:hover {
  transform: translateY(-1px);
  border-color: var(--border);
}

.planner-widget-item.completed {
  background: rgba(255,255,255,0.92);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(255,255,255,0.10);
}

[data-theme="light"] .planner-widget-item.completed {
  background: #ffffff;
}

.planner-widget-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.planner-widget-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 14px;
}

.planner-widget-item.completed .planner-widget-icon {
  background: #111;
  color: #fff;
}

[data-theme="light"] .planner-widget-item.completed .planner-widget-icon {
  background: #111;
  color: #fff;
}

.planner-widget-task {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-widget-item:not(.completed) .planner-widget-task {
  color: var(--text-secondary);
}

.planner-widget-check {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  color: transparent;
  transition: all var(--transition);
}

.planner-widget-item.completed .planner-widget-check {
  background: #fff;
  border-color: transparent;
  color: #111;
}

[data-theme="light"] .planner-widget-item.completed .planner-widget-check {
  background: #f5f5f5;
  color: #111;
}

.planner-widget-empty {
  grid-column: 1 / -1;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--bg-card2);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.planner-widget-item.completed .planner-widget-task {
  color: #111 !important;
}

.planner-widget-item.completed .planner-widget-left {
  color: #111;
}

.planner-widget-item.completed .planner-widget-icon {
  background: #111;
  color: #fff;
}

.planner-widget-item.completed .planner-widget-check {
  background: #f3f3f3;
  color: #111;
  border-color: transparent;
}

.planner-widget-item.completed * {
  opacity: 1;
}

/* ===============================
   FIX: HSP CARDS MOBILE ISSUE
=============================== */

/* 1. Prevent text wrapping */
.hsp-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hsp-val {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}

/* 2. Better spacing inside card */
.hsp-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 3. MOBILE FIX (MAIN ISSUE) */
@media (max-width: 480px) {

  /* reduce huge ring size */
  .habit-ring-feature {
    width: 140px;
    height: 140px;
  }

  /* reduce gap so right side gets space */
  .habit-hero-stats {
    gap: 12px;
    padding: 16px;
  }

  /* slightly compact cards */
  .hsp-card {
    padding: 10px 12px;
  }

  /* smaller text for mobile */
  .hsp-lbl {
    font-size: 10px;
  }

  .hsp-val {
    font-size: 16px;
  }
}


.habit-ring-feature {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hrm-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  pointer-events: none;
  padding: 8px;
}

.hrm-pct {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
}

.hrm-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 6px;
}

/* ===== Finance Premium Tone Upgrade ===== */

.income-hero,
.expense-hero,
.balance-hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.income-hero::before,
.expense-hero::before,
.balance-hero-card::before,
.balance-hero-card::after {
  opacity: 0.35;
  filter: blur(40px);
}

.income-hero {
  border-color: rgba(0,224,122,0.14);
}

.expense-hero {
  border-color: rgba(255,77,106,0.14);
}

.balance-hero-card {
  border-color: rgba(123,104,255,0.16);
  background:
    linear-gradient(135deg, rgba(123,104,255,0.08), rgba(0,212,200,0.04));
}


/* .fab-inline {
  height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7b68ff, #6a5af9);
  box-shadow: 0 10px 24px rgba(123,104,255,0.24);
}

.fab-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(123,104,255,0.28);
} */


/* =========================
   PREMIUM FINANCE UPGRADE
========================= */

.finance-actions-row {
  display: flex;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.finance-secondary-btn {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-weight: 700;
}

.fab-inline {
  height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(123,104,255,0.95), rgba(108,95,255,0.92));
  box-shadow: 0 10px 24px rgba(123,104,255,0.22);
}

.fab-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(123,104,255,0.26);
}

.money-tabs .ftab {
  min-width: 110px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.money-tabs .ftab.active {
  background: rgba(123,104,255,0.18);
  border-color: rgba(123,104,255,0.28);
  color: #fff;
  box-shadow: 0 8px 24px rgba(123,104,255,0.16);
}

.finance-premium-main {
  margin: 0 16px 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(123,104,255,0.12);
  background:
    linear-gradient(135deg, rgba(123,104,255,0.08), rgba(0,212,200,0.03));
  box-shadow: 0 10px 32px rgba(0,0,0,0.24);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.finance-main-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.finance-main-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 110px;
}

.fmm-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.fmm-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.fmm-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.premium-finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.premium-soft-card {
  padding: 18px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

.income-hero.premium-soft-card {
  border-color: rgba(0,224,122,0.12);
}

.expense-hero.premium-soft-card {
  border-color: rgba(255,77,106,0.12);
}

.income-hero::before,
.expense-hero::before {
  opacity: 0.22;
  filter: blur(44px);
}

.finance-card-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.finance-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.finance-insight-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}

.fic-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.fic-value {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.fic-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.active-chip {
  background: rgba(123,104,255,0.14);
  border-color: rgba(123,104,255,0.24);
  color: #fff;
}

.premium-expense-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
}

.premium-expense-item:hover {
  transform: translateY(-2px);
  border-color: rgba(123,104,255,0.16);
}

.finance-budget-card {
  margin: 0 16px 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

.budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.budget-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 4px;
}

.budget-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.budget-percent {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.budget-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* semantic colors only on icons / values */
.income-fhc {
  background: rgba(0,224,122,0.10);
  color: var(--success);
}

.expense-fhc {
  background: rgba(255,77,106,0.10);
  color: var(--danger);
}

/* mobile */
@media (max-width: 480px) {
  .finance-premium-main {
    flex-direction: column;
  }

  .finance-main-mini {
    width: 100%;
    flex-direction: row;
  }

  .fmm-item {
    flex: 1;
  }

  .premium-finance-grid,
  .finance-insights-grid {
    grid-template-columns: 1fr 1fr;
  }

  .finance-actions-row {
    flex-wrap: wrap;
  }

  .finance-actions-row .fab-inline,
  .finance-actions-row .finance-secondary-btn {
    flex: 1 1 calc(50% - 5px);
  }
}

.filter-tabs {
  display: flex;
  gap: 10px;
  padding: 0 16px 14px;
  margin: 0;
}

.filter-tabs .ftab {
  flex: 1;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.filter-tabs .ftab:hover {
  border-color: rgba(123,104,255,0.22);
  color: var(--text-primary);
  transform: translateY(1px);
}

.filter-tabs .ftab.active {
  background: linear-gradient(135deg, #7b68ff, #6c5fff);
  color: #fff;
  border-color: rgba(123,104,255,0.4);
  box-shadow:
    0 10px 24px rgba(123,104,255,0.24),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.expense-active-range {
  color: var(--text-primary);
  font-weight: 700;
  margin-left: 8px;
}


/* Expense filter modal fix */
.filter-option-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.filter-option-btn {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.filter-option-btn:hover {
  border-color: rgba(123,104,255,0.24);
  background: rgba(123,104,255,0.10);
  color: #fff;
  transform: translateY(-1px);
}

.filter-option-btn:active {
  transform: scale(0.98);
}

#expenseFilterModal .form-group {
  margin-bottom: 18px;
}

#expenseFilterModal .form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

#expenseFilterModal input[type="date"] {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  outline: none;
}

#expenseFilterModal input[type="date"] + input[type="date"] {
  margin-top: 10px;
}

#expenseFilterModal .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#expenseFilterModal .modal-footer .btn-secondary,
#expenseFilterModal .modal-footer .btn-primary {
  min-width: 110px;
  height: 46px;
  border-radius: 14px;
}

@media (max-width: 480px) {
  .filter-option-list {
    grid-template-columns: 1fr;
  }

  #expenseFilterModal .modal-footer {
    flex-direction: row;
  }

  #expenseFilterModal .modal-footer .btn-secondary,
  #expenseFilterModal .modal-footer .btn-primary {
    flex: 1;
  }
}

/* =========================
   LIGHT THEME FINANCE BOX FIX
========================= */

[data-theme="light"] .finance-premium-main {
  background: linear-gradient(135deg, rgba(108,95,255,0.08), rgba(0,168,159,0.04));
  border: 1px solid rgba(108,95,255,0.14);
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

[data-theme="light"] .finance-main-mini .fmm-item,
[data-theme="light"] .finance-insight-card,
[data-theme="light"] .finance-budget-card,
[data-theme="light"] .premium-soft-card,
[data-theme="light"] .money-tabs .ftab,
[data-theme="light"] .finance-secondary-btn {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(17,18,32,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

[data-theme="light"] .money-tabs .ftab.active {
  background: linear-gradient(135deg, #6c5fff, #7d70ff);
  color: #fff;
  border-color: rgba(108,95,255,0.28);
  box-shadow: 0 10px 24px rgba(108,95,255,0.18);
}

[data-theme="light"] .finance-budget-card .card-link {
  background: rgba(108,95,255,0.10);
  color: var(--accent);
  border: 1px solid rgba(108,95,255,0.10);
}

[data-theme="light"] .budget-bar {
  background: rgba(17,18,32,0.06);
}

[data-theme="light"] .budget-bar-fill {
  background: linear-gradient(90deg, #6c5fff, #8a7cff);
}

[data-theme="light"] .fmm-label,
[data-theme="light"] .fic-title,
[data-theme="light"] .budget-label,
[data-theme="light"] .bhc-label {
  color: #7d84a2;
}

[data-theme="light"] .fmm-value,
[data-theme="light"] .fic-value,
[data-theme="light"] .budget-percent,
[data-theme="light"] .budget-amount,
[data-theme="light"] .bhc-val {
  color: #111220;
}

/* =========================
   LIGHT THEME FILTER MODAL BOX FIX
========================= */

[data-theme="light"] .filter-option-btn {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(17,18,32,0.08);
  color: #111220;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

[data-theme="light"] .filter-option-btn:hover {
  background: rgba(108,95,255,0.10);
  border-color: rgba(108,95,255,0.22);
  color: #111220;
  box-shadow:
    0 10px 22px rgba(108,95,255,0.10),
    0 2px 8px rgba(0,0,0,0.05);
}

[data-theme="light"] #expenseFilterModal input[type="date"] {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(17,18,32,0.08);
  color: #111220;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

[data-theme="light"] #expenseFilterModal .modal {
  background: #f7f8fc;
  border: 1px solid rgba(17,18,32,0.06);
}

[data-theme="light"] #expenseFilterModal .modal-footer .btn-secondary {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(17,18,32,0.08);
  color: #111220;
}

[data-theme="light"] #expenseFilterModal .modal-footer .btn-primary {
  background: linear-gradient(135deg, #6c5fff, #7c6fff);
  color: #fff;
  border: 1px solid rgba(108,95,255,0.18);
}

#customExpenseCategoryWrap {
  margin-top: 10px;
}

#customExpenseCategoryWrap .form-group {
  width: 100%;
}

#customExpenseCategory {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  outline: none;
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

#customExpenseCategory:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

[data-theme="light"] #customExpenseCategory {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(17,18,32,0.08);
  color: #111220;
}

/* Expense modal layout fix */
.expense-category-row {
  align-items: end;
}

#customExpenseCategoryWrap,
#expenseDateWrap {
  flex: 1;
}

#customExpenseCategoryWrap {
  margin-top: 0 !important;
}

.note-group textarea,
#expenseNote {
  width: 100%;
  min-height: 88px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  outline: none;
  font-size: 16px;
  box-sizing: border-box;
  resize: none;
}

#customExpenseCategory {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  outline: none;
  font-size: 16px;
  box-sizing: border-box;
}

#customExpenseCategory:focus,
#expenseNote:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

[data-theme="light"] #customExpenseCategory,
[data-theme="light"] #expenseNote {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(17,18,32,0.08);
  color: #111220;
}

/* mobile */
@media (max-width: 640px) {
  .expense-category-row {
    flex-direction: column;
  }

  #customExpenseCategoryWrap,
  #expenseDateWrap {
    width: 100%;
  }
}



/* new */

.statement-group {
  margin-bottom: 16px;
}

.statement-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.statement-date {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.statement-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.statement-day-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
}

.sg-income {
  color: var(--success);
}

.sg-expense {
  color: var(--danger);
}

.statement-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-summary-card {
  margin: 0 16px 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.filter-summary-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.filter-summary-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.filter-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.fs-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.fs-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.fs-value {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
}

.finance-budget-card.budget-warning {
  border-color: rgba(255,179,64,0.30);
  box-shadow: 0 10px 28px rgba(255,179,64,0.12);
}

.finance-budget-card.budget-danger {
  border-color: rgba(255,77,106,0.30);
  box-shadow: 0 10px 28px rgba(255,77,106,0.14);
}

.finance-budget-card.budget-warning .budget-percent {
  color: var(--accent3);
}

.finance-budget-card.budget-danger .budget-percent {
  color: var(--danger);
}

.finance-budget-card.budget-danger .budget-bar-fill {
  background: linear-gradient(90deg, #ff5a6f, #ff7b8e);
}

.finance-ai-card {
  margin: 0 16px 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(123,104,255,0.08), rgba(0,212,200,0.04));
  border: 1px solid rgba(123,104,255,0.14);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.finance-ai-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.finance-ai-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 600;
}

.statement-group {
  margin-bottom: 16px;
}

.statement-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.statement-date {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.statement-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.statement-day-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
}

.sg-income { color: var(--success); }
.sg-expense { color: var(--danger); }

.statement-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-summary-card {
  margin: 0 16px 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.filter-summary-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.filter-summary-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.filter-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.fs-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.fs-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.fs-value {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
}

.finance-ai-card {
  margin: 0 16px 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(123,104,255,0.08), rgba(0,212,200,0.04));
  border: 1px solid rgba(123,104,255,0.14);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.finance-ai-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.finance-ai-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 600;
}

.finance-budget-card.budget-warning {
  border-color: rgba(255,179,64,0.30);
  box-shadow: 0 10px 28px rgba(255,179,64,0.12);
}

.finance-budget-card.budget-danger {
  border-color: rgba(255,77,106,0.30);
  box-shadow: 0 10px 28px rgba(255,77,106,0.14);
}

.finance-budget-card.budget-warning .budget-percent {
  color: var(--accent3);
}

.finance-budget-card.budget-danger .budget-percent {
  color: var(--danger);
}

.finance-budget-card.budget-danger .budget-bar-fill {
  background: linear-gradient(90deg, #ff5a6f, #ff7b8e);
}

.budget-alert-text {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
}

.expense-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}


.split-members-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.split-cb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.split-cb-item.checked {
  background: rgba(123,104,255,0.10);
  border-color: rgba(123,104,255,0.20);
  color: var(--accent);
}

.split-cb-item input {
  display: none;
}

[data-theme="light"] .split-cb-item {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(17,18,32,0.08);
  color: #111220;
}

[data-theme="light"] .split-cb-item.checked {
  background: rgba(108,95,255,0.10);
  border-color: rgba(108,95,255,0.18);
  color: var(--accent);
}

.expense-settlement-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.expense-settlement-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.expense-settlement-title.small {
  margin-top: 14px;
}

.expense-settlement-members {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expense-settlement-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.esm-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

.esm-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.esm-net {
  font-weight: 800;
  font-size: 13px;
}

.esm-net.receive {
  color: var(--success);
}

.esm-net.pay {
  color: var(--danger);
}

.expense-payments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expense-payment-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.pay-from {
  color: var(--danger);
  font-weight: 700;
}

.pay-arrow {
  color: var(--text-secondary);
  font-weight: 700;
}

.pay-to {
  color: var(--success);
  font-weight: 700;
}

.pay-amount {
  margin-left: auto;
  color: var(--accent3);
  font-weight: 800;
}

/* =========================
   SHARED TAB — FILTER POLISH
========================= */
.shared-filters-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 18px 16px 20px;
}

.shared-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.shared-cat-chips .shared-chip {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shared-time-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.shared-time-tabs .ftab,
.shared-time-tabs .shared-filter-btn {
  height: 64px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   SHARED EXPENSE CARD + DETAIL
========================= */
#sharedExpensesList {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 0 16px 20px;
}

.shared-expense-card {
  margin-bottom: 0;
  border-radius: 24px;
  overflow: visible;
  position: relative;
}

.shared-expense-main {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.shared-expense-detail {
  display: none;
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}

.shared-expense-detail.open {
  display: block;
}

.shared-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.shared-members-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* =========================
   SHARED TOP COMPACT BLOCKS
========================= */
.shared-top-block {
  margin: 0 16px 18px;
}

.shared-top-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shared-top-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.shared-mini-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  white-space: nowrap;
}

/* =========================
   CATEGORY COMPACT SCROLL
========================= */
.shared-compact-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.shared-compact-scroll::-webkit-scrollbar {
  display: none;
}

.shared-compact-scroll .shared-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

/* =========================
   MEMBERS COMPACT ROW
========================= */
.members-compact-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.members-compact-row::-webkit-scrollbar {
  display: none;
}

.member-mini-card {
  min-width: 150px;
  height: 64px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.member-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-mini-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.member-mini-more {
  min-width: 64px;
  justify-content: center;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mood-topbar-btn {
  min-width: 92px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(123,104,255,0.28);
  background: linear-gradient(135deg, rgba(123,104,255,0.18), rgba(123,104,255,0.08));
  color: #b8a4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.18);
  transition: all var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mood-topbar-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(123,104,255,0.42);
  box-shadow: 0 10px 28px rgba(123,104,255,0.16);
}

.mood-topbar-btn:active {
  transform: scale(0.96);
}

.mood-topbar-emoji {
  font-size: 18px;
  line-height: 1;
}
.money-today-premium {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(8,11,28,0.96) 0%, rgba(5,8,20,0.98) 100%);
  border: 1px solid rgba(77,102,255,0.12);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.money-header {
  margin-bottom: 16px;
}

.money-detail-link {
  background: transparent;
  border: none;
  padding: 0;
  color: #a88bff;
  font-size: 13px;
  font-weight: 700;
}

.money-today-box {
  border-radius: 28px;
  padding: 24px 26px 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.money-today-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.money-stat-col {
  text-align: center;
}

.money-stat-label {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.money-stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.money-stat-value.income {
  color: #66e0a3;
}

.money-stat-value.spent {
  color: #ff758b;
}

.money-stat-value.net {
  color: #66e0a3;
}

.money-stat-divider {
  width: 1px;
  height: 64px;
  background: rgba(255,255,255,0.08);
}

.money-budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.money-budget-label {
  font-size: 15px;
  color: var(--text-secondary);
}

.money-budget-amount {
  font-size: 14px;
  font-weight: 700;
  color: #ff758b;
}

.money-budget-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.money-budget-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d6a, #ff5e7b);
  transition: width 0.35s ease;
}

/* =========================
   LIGHT THEME — HOME MONEY WIDGET FIX
========================= */

[data-theme="light"] .money-today-premium {
  background: linear-gradient(180deg, #eef4f4 0%, #edf3f3 100%);
  border: 1px solid rgba(0,168,159,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

[data-theme="light"] .money-today-premium::before {
  background: radial-gradient(circle, rgba(0,168,159,0.08) 0%, transparent 70%);
}

[data-theme="light"] .money-today-box {
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(17,18,32,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

[data-theme="light"] .money-stat-label {
  color: #6b728c;
}

[data-theme="light"] .money-stat-divider {
  background: rgba(17,18,32,0.08);
}

[data-theme="light"] .money-budget-label {
  color: #6b728c;
}

[data-theme="light"] .money-budget-bar {
  background: rgba(17,18,32,0.06);
}

[data-theme="light"] .money-budget-fill {
  background: linear-gradient(90deg, #e85069, #f0627b);
}

[data-theme="light"] .money-detail-link {
  color: #6c5fff;
}

[data-theme="light"] .money-stat-value.net {
  color: #53c79a;
}

@media (max-width: 480px) {
  .money-today-box {
    padding: 18px 16px 18px;
    border-radius: 22px;
  }

  .money-today-stats {
    gap: 10px;
  }

  .money-stat-label {
    font-size: 13px;
  }

  .money-stat-value {
    font-size: 16px;
  }

  .money-stat-divider {
    height: 48px;
  }

  .money-budget-label,
  .money-budget-amount {
    font-size: 13px;
  }

  .money-budget-bar {
    height: 12px;
  }
}

/* ============================================
   SHARED TAB — RESTORE LAYOUT
============================================ */

.shared-top-block {
  margin: 0 16px 18px;
}

.shared-top-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shared-top-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.shared-mini-btn {
  flex-shrink: 0;
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 700;
}

.shared-compact-scroll,
.shared-cat-chips,
.members-compact-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.shared-compact-scroll::-webkit-scrollbar,
.shared-cat-chips::-webkit-scrollbar,
.members-compact-row::-webkit-scrollbar {
  display: none;
}

.shared-chip {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: all var(--transition);
}

.shared-chip.active {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(123,104,255,0.22);
}

.shared-filters-wrap {
  margin: 6px 0 18px;
}

#sharedExpensesList {
  padding: 0 16px 20px;
}

.expense-paidby {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent2);
  background: rgba(0, 212, 200, 0.10);
  border: 1px solid rgba(0, 212, 200, 0.16);
  padding: 6px 10px;
  border-radius: 10px;
}

.shared-expense-card {
  margin-bottom: 14px;
}

.shared-expense-main {
  border-radius: 22px;
}

.shared-expense-detail {
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
}

.shared-detail-grid {
  display: grid;
  gap: 10px;
}

.shared-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sdr-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.sdr-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
}

.shared-members-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.shared-member-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .shared-top-head {
    flex-direction: column;
    align-items: stretch;
  }

  .shared-mini-btn {
    width: 100%;
    justify-content: center;
  }
}



.shared-members-accordion {
  margin: 0 16px 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.shared-accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px;
  color: var(--text-primary);
}

.shared-accordion-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.shared-accordion-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
}

.shared-accordion-body {
  display: block;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border-soft);
}

.shared-top-head--inside {
  padding-top: 14px;
  margin-bottom: 14px;
}

.shared-fab {
  position: fixed;
  right: 18px;
  bottom: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 12px 24px rgba(123,104,255,0.24);
  z-index: 40;
}

.shared-fab:active {
  transform: scale(0.96);
}

#sharedTab {
  position: relative;
  padding-bottom: 120px;
}

.split-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.split-manager-actions .btn-secondary,
.split-manager-actions .btn-danger {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

#splitAmongCheckboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.split-cb-item {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--accent-bright);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.split-cb-item.checked {
  background: rgba(123,104,255,0.12);
  border-color: rgba(123,104,255,0.35);
  color: #9d8fff;
}

.shared-accordion-arrow {
  font-size: 20px;
  color: var(--text-secondary);
  min-width: 20px;
  text-align: center;
}

.shared-entry-block {
  padding: 18px 14px;
  border-top: 1px solid var(--border-soft);
}

.shared-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.shared-entry-meta {
  flex: 1;
  display: grid;
  gap: 12px;
}

.shared-detail-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
}

.sdr-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.sdr-value {
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.shared-entry-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.shared-split-wrap {
  margin-top: 14px;
}

.split-label {
  margin-bottom: 10px;
}

.shared-split-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shared-member-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(123,104,255,0.10);
  border: 1px solid rgba(123,104,255,0.22);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.shared-group-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.shared-group-actions {
  display: flex;
  gap: 8px;
}

.shared-group-actions .expense-action-btn {
  min-width: 58px;
}
.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.category-add-btn {
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 8px 20px rgba(123,104,255,0.25);
}

.shared-settlement-summary-top {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.ssst-title {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.ssst-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ssst-label {
  color: var(--text-secondary);
  font-size: 15px;
}

.ssst-value {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
}

.ssst-sub {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.shared-group-card {
  margin: 0 16px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.shared-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
}

.shared-group-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.shared-group-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.shared-group-body {
  display: none;
  padding: 0;
  border-top: 1px solid var(--border-soft);
}

.shared-group-card.expanded .shared-group-body {
  display: block;
}

.shared-settlement-summary-top {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.shared-settlement-block {
  padding: 18px 16px;
}

.shared-group-actions {
  display: flex;
  gap: 8px;
}

.shared-group-actions .expense-action-btn.del {
  min-width: 64px;
}

.expense-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}


.split-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.add-member-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(123,104,255,0.15);
  border: 1px solid rgba(123,104,255,0.3);
  color: #cbb4ff;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.add-member-btn:hover {
  transform: scale(1.1);
  background: rgba(123,104,255,0.25);
}

.split-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.split-head-row label {
  margin-bottom: 0;
}

.split-add-mini {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(123,104,255,0.28);
  background: rgba(123,104,255,0.10);
  color: var(--accent-bright);
  font-size: 22px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.split-add-mini:hover {
  transform: translateY(-1px);
  background: rgba(123,104,255,0.16);
  border-color: rgba(123,104,255,0.40);
}



/* =========================
   SHARED TOP COMPACT BLOCKS
========================= */

/* ===== Shared Members Accordion ===== */

.shared-members-accordion {
  margin: 14px 16px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.shared-accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px;
  background: transparent;
  border: none;
  color: var(--text-primary);
}

.shared-accordion-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shared-accordion-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: 16px;
  flex-shrink: 0;
}

.shared-accordion-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.shared-accordion-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-secondary);
}

.shared-accordion-arrow {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.shared-members-accordion.open .shared-accordion-arrow {
  transform: rotate(180deg);
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-color: rgba(123,104,255,0.22);
}

.shared-accordion-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border-soft);
}

.shared-members-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.shared-members-note {
  font-size: 13px;
  color: var(--text-secondary);
}

.shared-add-member-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(123,104,255,0.28);
  color: var(--text-primary);
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
}

.shared-add-member-btn:hover {
  background: rgba(123,104,255,0.18);
  border-color: rgba(123,104,255,0.42);
  transform: translateY(-1px);
}

.shared-add-member-btn.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.members-compact-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.members-compact-row::-webkit-scrollbar {
  width: 6px;
}

.members-compact-row::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

.member-chip.compact.clean {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  min-width: 0;
}

.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(123,104,255,0.35), rgba(0,212,200,0.25));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.member-chip-main {
  flex: 1;
  min-width: 0;
}

.member-chip-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-chip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.member-chip-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.member-chip-icon-btn:hover {
  color: var(--accent-bright);
  border-color: rgba(123,104,255,0.25);
  background: var(--accent-soft);
}

.member-chip-icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(255,77,106,0.22);
  background: var(--danger-soft);
}

.members-empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

@media (max-width: 520px) {
  .shared-members-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .shared-add-member-btn {
    width: 100%;
    justify-content: center;
  }
}

.shared-members-inline-add {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.shared-inline-input-wrap {
  flex: 1;
  min-width: 0;
}

.shared-inline-member-input {
  width: 100%;
  height: 64px;
  padding: 0 22px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all var(--transition);
}

.shared-inline-member-input::placeholder {
  color: var(--text-secondary);
}

.shared-inline-member-input:focus {
  border-color: rgba(123,104,255,0.45);
  box-shadow: 0 0 0 4px rgba(123,104,255,0.10);
  background: rgba(255,255,255,0.07);
}

.shared-inline-add-btn {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(123,104,255,0.16);
  border: 1px solid rgba(123,104,255,0.34);
  color: var(--accent-bright);
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(123,104,255,0.18);
}

.shared-inline-add-btn:hover {
  transform: translateY(-1px);
  background: rgba(123,104,255,0.22);
  border-color: rgba(123,104,255,0.46);
}

.shared-inline-edit-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(123,104,255,0.08);
  border: 1px solid rgba(123,104,255,0.18);
  color: var(--text-secondary);
  font-size: 13px;
}

.shared-inline-cancel-edit {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 520px) {
  .shared-members-inline-add {
    gap: 10px;
  }

  .shared-inline-member-input {
    height: 58px;
    border-radius: 18px;
    padding: 0 18px;
  }

  .shared-inline-add-btn {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
}

.shared-members-inline-add {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.shared-inline-member-input {
  width: 100%;
  height: 52px; /* 👈 reduced from 64 */
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.shared-inline-member-input:focus {
  border-color: rgba(123,104,255,0.5);
  box-shadow: 0 0 0 3px rgba(123,104,255,0.12);
  background: rgba(255,255,255,0.06);
}

/* 🔥 Add button compact */
.shared-inline-add-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(123,104,255,0.18);
  border: 1px solid rgba(123,104,255,0.35);
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.shared-inline-add-btn:hover {
  transform: scale(1.05);
  background: rgba(123,104,255,0.25);
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px; /* 👈 reduced */
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.member-item:hover {
  background: rgba(255,255,255,0.06);
}

.member-avatar {
  width: 38px;   /* 👈 reduced */
  height: 38px;
  border-radius: 12px;
  font-size: 14px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
}

.member-actions button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.member-actions button:hover {
  background: rgba(123,104,255,0.15);
  color: var(--accent);
}

.members-compact-row {
  display: flex;
  flex-direction: column;
  gap: 8px; /* 👈 tighter */
}

.shared-members-accordion {
  margin: 10px 14px;           /* 👈 reduce outer space */
  border-radius: 20px;
}

.shared-accordion-head {
  padding: 14px 14px;          /* 👈 reduced from 18 */
}

.shared-accordion-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
}

.shared-accordion-title {
  font-size: 14px;
}

.shared-accordion-sub {
  font-size: 11px;
}

.shared-inline-member-input {
  height: 46px;                 /* 👈 compact */
  border-radius: 14px;
  font-size: 13px;
  padding: 0 16px;
}

.shared-inline-add-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.member-item {
  padding: 6px 10px;      /* 👈 aur compact */
  border-radius: 12px;
  min-height: 52px;       /* 👈 control height */
}

.member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 11px;
}

.member-name {
  font-size: 13px;
  font-weight: 600;
}

.member-actions button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.member-item {
  gap: 10px;   /* 👈 tighter */
}
.member-item {
  background: rgba(255,255,255,0.025);  /* 👈 softer */
}
.members-compact-row {
  gap: 6px;   /* 👈 less spacing */
}

.members-compact-row {
  max-height: 180px;  /* 👈 small scrollable */
  overflow-y: auto;
}

.shared-members-accordion.open {
  box-shadow: 0 8px 30px rgba(123,104,255,0.15);
}

/* =========================
   FLOATING ACTION BUTTONS FIX
========================= */
.debt-fab {
  position: fixed;
  right: 18px;
  bottom: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 12px 24px rgba(123,104,255,0.24);
  z-index: 40;
}

.shared-fab:hover,
.expense-fab:hover,
.debt-fab:hover {
  transform: scale(1.08);
}

@media (max-width: 520px) {
  .shared-fab,
  .expense-fab,
  .debt-fab {
    right: 18px;
  }
}

.expense-fab {
  position: fixed;
  right: 18px;
  bottom: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 12px 24px rgba(123,104,255,0.24);
  z-index: 40;
}

/* Expense type toggle */
.expense-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.expense-type-pill {
  height: 68px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 800;
  transition: all 0.22s ease;
}

.expense-type-pill:hover {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.expense-type-pill.active {
  background: rgba(123,104,255,0.16);
  border-color: rgba(123,104,255,0.34);
  color: #b7a8ff;
  box-shadow: 0 0 0 1px rgba(123,104,255,0.08) inset;
}

/* income active state */
#expenseTypeIncomeBtn.active {
  background: rgba(0,224,122,0.12);
  border-color: rgba(0,224,122,0.34);
  color: #7ce8b0;
  box-shadow: 0 0 0 1px rgba(0,224,122,0.08) inset;
}

@media (max-width: 520px) {
  .expense-type-pill {
    height: 62px;
    border-radius: 18px;
    font-size: 15px;
  }

  .expense-type-toggle {
    gap: 10px;
  }
}

.expense-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.expense-type-pill {
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 800;
  transition: all 0.22s ease;
}

.expense-type-pill.active {
  background: rgba(123,104,255,0.16);
  border-color: rgba(123,104,255,0.34);
  color: #b7a8ff;
}

#expenseTypeIncomeBtn.active {
  background: rgba(0,224,122,0.12);
  border-color: rgba(0,224,122,0.34);
  color: #7ce8b0;
}

/* Expense modal footer fix */
#expenseModal .modal-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

#expenseModal .modal-footer .btn-secondary {
  flex: 0 0 120px;
  width: 120px;
  min-width: 120px;
}

#expenseModal .modal-footer .btn-primary {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

@media (max-width: 520px) {
  #expenseModal .modal-footer {
    flex-direction: row;
  }

  #expenseModal .modal-footer .btn-secondary,
  #expenseModal .modal-footer .btn-primary {
    height: 56px;
  }

  #expenseModal .modal-footer .btn-secondary {
    flex: 0 0 110px;
    width: 110px;
    min-width: 110px;
  }

  #expenseModal .modal-footer .btn-primary {
    flex: 1 1 auto;
    width: auto;
  }
}
#expenseModal .btn-primary,
#expenseModal .btn-secondary {
  max-width: 100%;
}

#expenseModal .modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
}

#expenseModal .btn-secondary {
  width: 120px;
}

#expenseModal .btn-primary {
  flex: 1;
}


/* =========================
   DEBTS — SIMPLE CLEAN PREMIUM
========================= */

/* top summary cards */
.debt-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 18px;
}

.debt-hero-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.debt-hero-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255,255,255,0.10);
}

/* remove over-animated glow blobs */
.dhc-orb,
.receive-orb,
.owe-orb {
  display: none !important;
}

/* keep cards subtle */
.receive-hero {
  background: linear-gradient(180deg, rgba(0,224,122,0.05), rgba(255,255,255,0.02));
  border-color: rgba(0,224,122,0.14);
}

.owe-hero {
  background: linear-gradient(180deg, rgba(255,77,106,0.05), rgba(255,255,255,0.02));
  border-color: rgba(255,77,106,0.14);
}

.dhc-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.receive-ic {
  background: rgba(0,224,122,0.10);
  color: var(--success);
}

.owe-ic {
  background: rgba(255,77,106,0.10);
  color: var(--danger);
}

.dhc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dhc-val {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

/* debt list cleaner */
.debts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

.debt-person-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.debt-person-group:hover {
  border-color: rgba(255,255,255,0.10);
}

.debt-person-header {
  padding: 14px 16px;
}

.debt-avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
  box-shadow: none;
}

.debt-person-name {
  font-size: 14px;
  font-weight: 700;
}

.debt-person-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.dpt-amount {
  font-size: 15px;
}

/* item rows more minimal */
.debt-item {
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
}

.debt-item-type {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.debt-item-note {
  font-size: 12px;
}

.debt-item-date {
  font-size: 10px;
}

.debt-item-amount {
  font-size: 13px;
  font-weight: 800;
}

.di-btn {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10px;
  transform: none !important;
}

.di-btn:hover {
  opacity: 0.92;
}

/* empty state less animated */
#debtsTab .empty-state::before {
  display: none;
}

#debtsTab .empty-state-visual {
  width: 74px;
  height: 74px;
  margin-bottom: 16px;
}

#debtsTab .esv-ring,
#debtsTab .esv-ring-2 {
  animation: none !important;
  border-style: solid;
  opacity: 0.45;
}

#debtsTab .esv-icon-bg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: none;
}

#debtsTab .empty-title {
  font-size: 14px;
}

#debtsTab .empty-desc {
  font-size: 12px;
  max-width: 220px;
}

/* floating add button slightly calmer */
.debt-fab {
  box-shadow: 0 10px 24px rgba(123,104,255,0.22);
}

.debt-fab:hover {
  transform: scale(1.04);
}


/* =========================
   NOTES PHASE 1 — CLEAN LIST + MASONRY
========================= */

.notes-screen-clean {
  padding-bottom: 110px;
}

.notes-clean-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px 16px 8px;
  gap: 12px;
}

.notes-clean-title {
  font-family: 'Sora', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1.05;
}

.notes-clean-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.notes-clean-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-clean-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notes-clean-search-wrap {
  padding: 0 16px 12px;
}

.notes-clean-search {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border);
}

.notes-filter-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 14px;
  scrollbar-width: none;
}

.notes-filter-row::-webkit-scrollbar {
  display: none;
}

.notes-filter-chip {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.notes-filter-chip.active {
  background: rgba(255,255,255,0.10);
}

.notes-pinned-wrap {
  padding: 0 16px 14px;
}

.notes-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.notes-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.notes-section-count {
  font-size: 11px;
  color: var(--text-secondary);
}

.notes-pinned-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.notes-pinned-row::-webkit-scrollbar {
  display: none;
}

.notes-masonry-grid {
  column-count: 2;
  column-gap: 12px;
  padding: 0 16px 20px;
}

.notes-masonry-grid.empty {
  column-count: 1;
}

.note-card-clean {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.note-card-clean:hover {
  transform: translateY(-2px);
  border-color: rgba(123,104,255,0.20);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.note-card-clean.pinned {
  min-width: 250px;
  max-width: 250px;
  margin-bottom: 0;
}

.note-card-clean-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.note-card-clean-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.note-clean-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.note-clean-chip.todo {
  color: var(--success);
  background: rgba(0,224,122,0.08);
  border-color: rgba(0,224,122,0.16);
}

.note-clean-chip.muted {
  color: var(--text-muted);
}

.note-card-clean-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.note-clean-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.note-clean-icon.active {
  background: rgba(255,179,64,0.10);
}

.note-clean-icon.danger {
  color: var(--danger);
}

.note-card-clean-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 10px;
  word-break: break-word;
}

.note-card-clean-body {
  margin-bottom: 12px;
}

.note-card-text-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

.note-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-preview-list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.note-preview-list-item.done span:last-child {
  text-decoration: line-through;
  opacity: 0.65;
}

.note-preview-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.note-card-clean-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}

.note-card-clean-date {
  font-size: 11px;
  color: var(--text-muted);
}

.note-card-clean-pin {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent3);
}

/* floating add button */
.notes-fab {
  position: fixed;
  right: max(18px, calc((100vw - 480px) / 2 + 18px));
  bottom: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(123,104,255,0.22);
  z-index: 120;
}

@media (max-width: 520px) {
  .notes-clean-title {
    font-size: 30px;
  }

  .notes-masonry-grid {
    column-gap: 10px;
    padding: 0 14px 18px;
  }

  .note-card-clean {
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 10px;
  }

  .note-card-clean.pinned {
    min-width: 220px;
    max-width: 220px;
  }

  .note-card-clean-title {
    font-size: 15px;
  }

  .note-card-text-preview,
  .note-preview-list-item {
    font-size: 12px;
  }

  .notes-fab {
    right: 18px;
    width: 60px;
    height: 60px;
    font-size: 32px;
  }
}

/* =========================
   NOTES FAB — DESKTOP FIX
========================= */

.notes-fab {
  position: absolute;
  right: 18px;
  bottom: 10px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(123,104,255,0.22);
  z-index: 120;
}

[data-theme="light"] .notes-fab {
  background: #f6b800;
  color: #fff;
  box-shadow: 0 10px 24px rgba(246,184,0,0.24);
}

.notes-screen-clean {
  position: relative;
  min-height: 100%;
  padding-bottom: 120px;
}

@media (max-width: 520px) {
  .notes-fab {
    right: 18px;
    bottom: calc(var(--nav-height) + 18px);
    width: 60px;
    height: 60px;
    font-size: 32px;
  }
}

/* light theme — Samsung Notes style */
[data-theme="light"] .notes-screen-clean {
  background: #f3f3f4;
}

[data-theme="light"] .notes-clean-title {
  color: #111111;
}

[data-theme="light"] .notes-clean-sub {
  color: #7a7a7a;
}

[data-theme="light"] .notes-filter-chip,
[data-theme="light"] .notes-clean-search,
[data-theme="light"] .note-card-clean {
  background: #fbfbfb;
  border-color: rgba(0,0,0,0.05);
  box-shadow: none;
}

[data-theme="light"] .notes-filter-chip.active {
  background: #ececec;
}

[data-theme="light"] .note-card-clean-title {
  color: #161616;
}

[data-theme="light"] .note-card-text-preview,
[data-theme="light"] .note-preview-list-item {
  color: #666666;
}

[data-theme="light"] .note-clean-chip {
  background: #f1f1f1;
  border-color: rgba(0,0,0,0.04);
  color: #666;
}

[data-theme="light"] .note-card-clean-footer {
  border-top-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .notes-fab {
  background: #f6b800;
  color: #fff;
  box-shadow: 0 10px 24px rgba(246,184,0,0.24);
}

/* =========================
   NOTES PHASE 2 — DETAIL / EDITOR
========================= */

.note-detail-page {
  min-height: 100%;
  padding-bottom: 110px;
}

.note-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 10px;
}

.note-detail-header-left,
.note-detail-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-detail-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.note-detail-nav-btn.strong {
  font-weight: 800;
}

.note-detail-meta {
  padding: 0 20px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
}

.note-detail-inner {
  padding: 18px 20px 20px;
}

.note-detail-page-title {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
  opacity: 0.92;
}

.note-detail-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.note-detail-mini-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.note-detail-editor-wrap {
  min-height: 55vh;
}

.note-detail-editor-clean {
  width: 100%;
  min-height: 56vh;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.9;
  padding: 0;
}

.note-detail-editor-clean::placeholder {
  color: var(--text-muted);
}

.note-detail-todo-list-clean {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 18px;
  border-top: 1px solid var(--border-soft);
}

.note-detail-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  border-bottom: 1px solid var(--border-soft);
}

.note-detail-todo-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  color: var(--text-primary);
  font-size: 16px;
}

.note-detail-todo-main input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.note-detail-todo-item.done .note-detail-todo-main span {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.note-detail-todo-del {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
}

.note-detail-add-row-clean {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.note-detail-add-row-clean input {
  flex: 1;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0 14px;
  outline: none;
}

.note-detail-add-btn-clean {
  height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  font-weight: 700;
}

/* Light theme notes detail */
[data-theme="light"] .note-detail-page {
  background: #f3f3f4;
}

[data-theme="light"] .note-detail-meta {
  color: #7a7a7a;
  border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .note-detail-page-title {
  color: #b7b7b7;
  font-size: 20px;
  font-weight: 700;
}

[data-theme="light"] .note-detail-editor-clean {
  color: #1a1a1a;
  background: transparent;
}

[data-theme="light"] .note-detail-editor-clean::placeholder {
  color: #b8b8b8;
}

[data-theme="light"] .note-detail-mini-chip {
  background: #f6f6f6;
  color: #666;
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .note-detail-todo-list-clean,
[data-theme="light"] .note-detail-todo-item {
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .note-detail-todo-main {
  color: #1a1a1a;
}

[data-theme="light"] .note-detail-add-row-clean input {
  background: #fbfbfb;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] .note-detail-add-btn-clean {
  background: #f6b800;
  color: #fff;
}

/* Dark theme detail */
[data-theme="dark"] .note-detail-page {
  background: var(--bg-base);
}

[data-theme="dark"] .note-detail-page-title {
  color: rgba(255,255,255,0.55);
}

[data-theme="dark"] .note-detail-editor-clean {
  color: var(--text-primary);
}

@media (max-width: 520px) {
  .note-detail-header {
    padding: 14px 14px 8px;
  }

  .note-detail-meta {
    padding: 0 16px 12px;
    font-size: 12px;
  }

  .note-detail-inner {
    padding: 16px;
  }

  .note-detail-page-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .note-detail-editor-clean {
    min-height: 52vh;
    font-size: 16px;
    line-height: 1.85;
  }

  .note-detail-todo-main {
    font-size: 15px;
  }

  .note-detail-add-row-clean {
    flex-direction: column;
    align-items: stretch;
  }

  .note-detail-add-btn-clean {
    width: 100%;
  }
}

/* =========================
   NOTES PHASE 3 — ADD / EDIT SHEET
========================= */

#noteModal.modal-overlay {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0,0,0,0.18);
}

.note-sheet-modal {
  width: 100%;
  max-width: 480px;
  border-radius: 28px 28px 0 0;
  margin: 0 auto;
  max-height: 88dvh;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
  animation: noteSheetUp 0.22s ease;
}

@keyframes noteSheetUp {
  from {
    transform: translateY(18px);
    opacity: 0.88;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.note-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  margin: 10px auto 6px;
}

.note-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 12px;
}

.note-sheet-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.note-sheet-top-btn {
  min-width: 72px;
  height: 36px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
}

.note-sheet-top-btn.right.strong {
  color: var(--accent);
  font-weight: 700;
}

.note-sheet-body {
  padding: 8px 18px 24px;
  overflow-y: auto;
  max-height: calc(88dvh - 70px);
}

.note-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.note-type-switch-btn {
  height: 52px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
}

.note-type-switch-btn.active {
  background: rgba(123,104,255,0.12);
  border-color: rgba(123,104,255,0.24);
  color: var(--accent);
}

#noteTypeTodoBtn.active {
  background: rgba(0,224,122,0.08);
  border-color: rgba(0,224,122,0.18);
  color: var(--success);
}

.note-sheet-field {
  margin-bottom: 14px;
}

.note-sheet-title-input,
.note-sheet-category-input,
.note-sheet-editor,
.note-sheet-add-todo-row input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
}

.note-sheet-title-input {
  height: 58px;
  border-radius: 18px;
  padding: 0 16px;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}

.note-sheet-title-input::placeholder {
  color: var(--text-muted);
}

.note-sheet-category-input {
  height: 50px;
  border-radius: 16px;
  padding: 0 14px;
  font-size: 14px;
}

.note-sheet-editor-wrap {
  margin-top: 4px;
}

.note-sheet-editor {
  min-height: 240px;
  border-radius: 18px;
  padding: 16px;
  resize: none;
  font-size: 16px;
  line-height: 1.85;
}

.note-sheet-todo-wrap {
  margin-top: 4px;
}

.note-sheet-add-todo-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.note-sheet-add-todo-row input {
  flex: 1;
  height: 52px;
  border-radius: 16px;
  padding: 0 14px;
}

.note-sheet-add-todo-btn {
  height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.note-sheet-todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-sheet-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
}

.note-sheet-todo-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.note-sheet-todo-left input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.note-sheet-todo-left span {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-word;
}

.note-sheet-todo-item.done .note-sheet-todo-left span {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.note-sheet-todo-del {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--danger);
  background: transparent;
}

/* Light theme */
[data-theme="light"] #noteModal.modal-overlay {
  background: rgba(0,0,0,0.08);
}

[data-theme="light"] .note-sheet-modal {
  background: #f4f4f5;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] .note-sheet-handle {
  background: rgba(0,0,0,0.12);
}

[data-theme="light"] .note-sheet-title {
  color: #111;
}

[data-theme="light"] .note-sheet-top-btn {
  color: #c39200;
}

[data-theme="light"] .note-sheet-top-btn.right.strong {
  color: #111;
  opacity: 0.45;
}

[data-theme="light"] .note-type-switch-btn,
[data-theme="light"] .note-sheet-title-input,
[data-theme="light"] .note-sheet-category-input,
[data-theme="light"] .note-sheet-editor,
[data-theme="light"] .note-sheet-add-todo-row input,
[data-theme="light"] .note-sheet-todo-item {
  background: #fbfbfb;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] .note-type-switch-btn.active {
  background: #ececec;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] #noteTypeTodoBtn.active {
  background: #ececec;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] .note-sheet-title-input::placeholder,
[data-theme="light"] .note-sheet-editor::placeholder,
[data-theme="light"] .note-sheet-category-input::placeholder,
[data-theme="light"] .note-sheet-add-todo-row input::placeholder {
  color: #b8b8b8;
}

[data-theme="light"] .note-sheet-add-todo-btn {
  background: #f6b800;
  color: #fff;
}

/* Mobile polish */
@media (max-width: 520px) {
  .note-sheet-modal {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
  }

  .note-sheet-header {
    padding: 8px 14px 10px;
  }

  .note-sheet-body {
    padding: 8px 14px 20px;
  }

  .note-sheet-title-input {
    font-size: 20px;
    height: 54px;
  }

  .note-sheet-editor {
    min-height: 220px;
    font-size: 15px;
  }

  .note-sheet-add-todo-row {
    flex-direction: column;
  }

  .note-sheet-add-todo-btn {
    width: 100%;
  }
}

/* =========================
   NOTES PHASE 4 — POLISH
========================= */

.notes-clean-header {
  padding-top: 22px;
  padding-bottom: 6px;
}

.notes-clean-title {
  letter-spacing: -1.2px;
}

.notes-clean-search {
  border-radius: 20px;
}

.notes-filter-row {
  padding-bottom: 16px;
}

.notes-filter-chip {
  border-radius: 16px;
  padding: 11px 15px;
  font-size: 13px;
}

.note-card-clean {
  border-radius: 20px;
  padding: 13px;
}

.note-card-clean-title {
  font-size: 15px;
  margin-bottom: 8px;
}

.note-card-text-preview,
.note-preview-list-item {
  font-size: 12px;
  line-height: 1.55;
}

.note-card-clean-footer {
  padding-top: 8px;
  margin-top: 10px;
}

.note-clean-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  font-size: 11px;
}

.note-clean-chip {
  padding: 4px 9px;
  font-size: 10px;
}

/* light theme softer */
[data-theme="light"] .note-card-clean {
  background: #fafafa;
  border-color: rgba(0,0,0,0.05);
}

[data-theme="light"] .note-card-clean:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

[data-theme="light"] .notes-clean-search,
[data-theme="light"] .notes-filter-chip {
  background: #fafafa;
  border-color: rgba(0,0,0,0.05);
}


.note-sheet-header {
  padding-top: 10px;
  padding-bottom: 10px;
}

.note-sheet-title {
  font-size: 15px;
  font-weight: 700;
}

.note-sheet-top-btn {
  min-width: 68px;
  font-size: 14px;
}

[data-theme="light"] .note-sheet-top-btn.left {
  color: #c39200;
}

[data-theme="light"] .note-sheet-top-btn.right.strong {
  color: #b7b7b7;
}

.note-detail-page-title {
  margin-bottom: 14px;
}

.note-detail-editor-clean {
  line-height: 1.95;
}

[data-theme="light"] .note-detail-page-title {
  color: #b8b8b8;
}

[data-theme="light"] .note-detail-editor-clean {
  color: #1d1d1d;
}

/* =========================
   NOTES PHASE 4 — FINAL POLISH
========================= */

/* overall spacing */
.notes-screen-clean {
  padding-bottom: 118px;
}

.notes-clean-header {
  padding: 24px 18px 8px;
}

.notes-clean-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.3px;
  line-height: 1;
}

.notes-clean-sub {
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-secondary);
}

.notes-clean-actions {
  gap: 8px;
}

.notes-clean-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.18s ease, transform 0.18s ease;
}

.notes-clean-icon-btn:hover {
  transform: scale(1.04);
  background: rgba(255,255,255,0.04);
}

.notes-clean-search-wrap {
  padding: 0 18px 12px;
}

.notes-clean-search {
  min-height: 46px;
  border-radius: 18px;
}

.notes-filter-row {
  padding: 0 18px 16px;
  gap: 10px;
}

.notes-filter-chip {
  padding: 11px 16px;
  border-radius: 17px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.notes-filter-chip:hover {
  transform: translateY(-1px);
}

.notes-pinned-wrap {
  padding: 0 18px 14px;
}

.notes-masonry-grid {
  column-gap: 14px;
  padding: 0 18px 20px;
}

/* cards */
.note-card-clean {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.note-card-clean:hover {
  transform: translateY(-2px);
}

.note-card-clean.pinned {
  min-width: 250px;
  max-width: 250px;
}

.note-card-clean-top {
  margin-bottom: 12px;
}

.note-card-clean-chips {
  gap: 7px;
}

.note-clean-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.note-card-clean-actions {
  gap: 6px;
}

.note-clean-icon {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  font-size: 11px;
  transition: all 0.18s ease;
}

.note-clean-icon:hover {
  transform: scale(1.05);
}

.note-card-clean-title {
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.note-card-clean-body {
  margin-bottom: 12px;
}

.note-card-text-preview {
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-secondary);

  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* todo preview cleaner */
.note-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-preview-list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.note-preview-list-item.done span:last-child {
  text-decoration: line-through;
  opacity: 0.6;
}

.note-preview-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(123,104,255,0.35);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 1px;
}

.note-preview-list-item.done .note-preview-check {
  background: rgba(123,104,255,0.10);
}

.note-card-clean-footer {
  padding-top: 9px;
  margin-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.note-card-clean-date {
  font-size: 11px;
  color: var(--text-muted);
}

.note-card-clean-pin {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent3);
}

/* FAB */
.notes-fab {
  width: 62px;
  height: 62px;
  font-size: 32px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.notes-fab:hover {
  transform: scale(1.05);
}

/* DETAIL PAGE */
.note-detail-header {
  padding: 16px 18px 10px;
}

.note-detail-nav-btn {
  width: 40px;
  height: 40px;
  font-size: 21px;
  border-radius: 50%;
}

.note-detail-meta {
  padding: 0 20px 13px;
  font-size: 12px;
  color: var(--text-secondary);
}

.note-detail-inner {
  padding: 18px 20px 22px;
}

.note-detail-page-title {
  font-size: 20px;
  margin-bottom: 14px;
  opacity: 0.55;
}

.note-detail-editor-clean {
  font-size: 17px;
  line-height: 1.95;
}

.note-detail-todo-list-clean {
  margin-top: 8px;
  margin-bottom: 18px;
}

.note-detail-todo-item {
  min-height: 50px;
}

.note-detail-todo-main {
  font-size: 15px;
}

.note-detail-add-row-clean input {
  height: 50px;
  border-radius: 15px;
}

.note-detail-add-btn-clean {
  height: 50px;
  border-radius: 15px;
}

/* ADD / EDIT SHEET */
.note-sheet-modal {
  border-radius: 26px 26px 0 0;
}

.note-sheet-handle {
  width: 48px;
  height: 5px;
  margin: 10px auto 8px;
}

.note-sheet-header {
  padding: 8px 18px 12px;
}

.note-sheet-title {
  font-size: 15px;
  font-weight: 700;
}

.note-sheet-top-btn {
  min-width: 68px;
  height: 34px;
  font-size: 14px;
}

.note-sheet-body {
  padding: 8px 18px 22px;
}

.note-type-switch {
  gap: 10px;
  margin-bottom: 15px;
}

.note-type-switch-btn {
  height: 50px;
  border-radius: 17px;
  font-size: 15px;
}

.note-sheet-title-input {
  height: 56px;
  border-radius: 17px;
  font-size: 20px;
}

.note-sheet-category-input {
  height: 48px;
  border-radius: 15px;
  font-size: 14px;
}

.note-sheet-editor {
  min-height: 220px;
  border-radius: 17px;
  font-size: 15px;
  line-height: 1.85;
}

.note-sheet-add-todo-row input,
.note-sheet-add-todo-btn {
  height: 50px;
  border-radius: 15px;
}

.note-sheet-todo-item {
  border-radius: 15px;
  padding: 11px 13px;
}

.note-sheet-todo-left span {
  font-size: 14px;
}

/* LIGHT THEME — closer to Samsung Notes */
[data-theme="light"] .notes-screen-clean {
  background: #f3f3f4;
}

[data-theme="light"] .notes-clean-icon-btn {
  color: #111;
}

[data-theme="light"] .notes-clean-icon-btn:hover {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .notes-clean-search,
[data-theme="light"] .notes-filter-chip,
[data-theme="light"] .note-card-clean {
  background: #fafafa;
  border-color: rgba(0,0,0,0.05);
  box-shadow: none;
}

[data-theme="light"] .notes-filter-chip.active {
  background: #ececec;
}

[data-theme="light"] .note-card-clean:hover {
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
}

[data-theme="light"] .note-card-clean-title {
  color: #161616;
}

[data-theme="light"] .note-card-text-preview,
[data-theme="light"] .note-preview-list-item,
[data-theme="light"] .note-card-clean-date,
[data-theme="light"] .notes-clean-sub,
[data-theme="light"] .note-detail-meta {
  color: #747474;
}

[data-theme="light"] .note-clean-chip {
  background: #f1f1f1;
  border-color: rgba(0,0,0,0.05);
  color: #666;
}

[data-theme="light"] .note-clean-icon {
  background: #f5f5f5;
  border-color: rgba(0,0,0,0.05);
}

[data-theme="light"] .note-preview-check {
  border-color: rgba(0,0,0,0.10);
  color: #7b68ff;
}

[data-theme="light"] .note-card-clean-footer {
  border-top-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .note-detail-page {
  background: #f3f3f4;
}

[data-theme="light"] .note-detail-page-title {
  color: #b8b8b8;
}

[data-theme="light"] .note-detail-editor-clean {
  color: #1d1d1d;
}

[data-theme="light"] .note-detail-todo-list-clean,
[data-theme="light"] .note-detail-todo-item {
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .note-detail-add-row-clean input {
  background: #fbfbfb;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] .note-detail-add-btn-clean {
  background: #f6b800;
  color: white;
}

[data-theme="light"] .note-sheet-modal {
  background: #f4f4f5;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 -8px 22px rgba(0,0,0,0.08);
}

[data-theme="light"] .note-sheet-handle {
  background: rgba(0,0,0,0.12);
}

[data-theme="light"] .note-sheet-title {
  color: #111;
}

[data-theme="light"] .note-sheet-top-btn.left {
  color: #c39200;
}

[data-theme="light"] .note-sheet-top-btn.right.strong {
  color: #b7b7b7;
}

[data-theme="light"] .note-type-switch-btn,
[data-theme="light"] .note-sheet-title-input,
[data-theme="light"] .note-sheet-category-input,
[data-theme="light"] .note-sheet-editor,
[data-theme="light"] .note-sheet-add-todo-row input,
[data-theme="light"] .note-sheet-todo-item {
  background: #fbfbfb;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] .note-type-switch-btn.active {
  background: #ececec;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] #noteTypeTodoBtn.active {
  background: #ececec;
  border-color: rgba(0,0,0,0.06);
  color: #111;
}

[data-theme="light"] .note-sheet-title-input::placeholder,
[data-theme="light"] .note-sheet-editor::placeholder,
[data-theme="light"] .note-sheet-category-input::placeholder,
[data-theme="light"] .note-sheet-add-todo-row input::placeholder {
  color: #b9b9b9;
}

/* DARK THEME — calm premium */
[data-theme="dark"] .note-card-clean {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.025));
}

[data-theme="dark"] .note-card-clean:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

[data-theme="dark"] .notes-clean-search,
[data-theme="dark"] .notes-filter-chip {
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .note-detail-page-title {
  color: rgba(255,255,255,0.5);
}

@media (max-width: 520px) {
  .notes-clean-header {
    padding: 22px 14px 8px;
  }

  .notes-clean-title {
    font-size: 32px;
  }

  .notes-clean-search-wrap,
  .notes-filter-row,
  .notes-pinned-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .notes-masonry-grid {
    padding: 0 14px 18px;
    column-gap: 10px;
  }

  .note-card-clean {
    padding: 12px;
    border-radius: 18px;
    margin-bottom: 10px;
  }

  .note-card-clean.pinned {
    min-width: 220px;
    max-width: 220px;
  }

  .note-card-clean-title {
    font-size: 14px;
  }

  .notes-fab {
    width: 60px;
    height: 60px;
    font-size: 31px;
  }

  .note-detail-inner {
    padding: 16px;
  }

  .note-detail-page-title {
    font-size: 18px;
  }

  .note-detail-editor-clean {
    font-size: 16px;
    min-height: 52vh;
  }

  .note-sheet-modal {
    border-radius: 24px 24px 0 0;
  }

  .note-sheet-body {
    padding: 8px 14px 20px;
  }

  .note-sheet-title-input {
    font-size: 18px;
  }

  .note-sheet-editor {
    min-height: 200px;
  }
}

/* =========================
   NOTES SIMPLE MODE
========================= */

.notes-type-tabs {
  display: flex;
  gap: 10px;
  padding: 0 18px 14px;
}

.notes-type-tab {
  flex: 1;
  height: 46px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.notes-type-tab.active {
  background: rgba(255,255,255,0.10);
}

.simple-note-card {
  cursor: pointer;
}

.simple-note-preview-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.simple-note-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.simple-note-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.simple-note-preview-item.done span:last-child {
  text-decoration: line-through;
  opacity: 0.6;
}

.simple-note-bullet {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}

.note-detail-title-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  padding: 0;
}

.note-detail-title-input::placeholder {
  color: var(--text-muted);
}

#noteDetailBottomBar {
  display: none !important;
}

/* light theme */
[data-theme="light"] .notes-type-tab {
  background: #fafafa;
  border-color: rgba(0,0,0,0.05);
  color: #111;
}

[data-theme="light"] .notes-type-tab.active {
  background: #ececec;
}

[data-theme="light"] .note-detail-title-input {
  color: #111;
}

[data-theme="light"] .note-detail-title-input::placeholder {
  color: #b8b8b8;
}

[data-theme="light"] .simple-note-preview-text,
[data-theme="light"] .simple-note-preview-item {
  color: #6d6d6d;
}

.note-detail-page {
  animation: slideUp 0.25s ease;
}

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

.note-detail-nav-btn.danger {
  color: var(--danger);
}

[data-theme="light"] .note-detail-nav-btn.danger {
  color: #d95b5b;
}


.notes-filter-chip.active,
.notes-type-tab.active {
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

[data-theme="dark"] .notes-filter-chip.active,
[data-theme="dark"] .notes-type-tab.active {
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.notes-clean-header {
  position: relative;
}

.notes-more-menu {
  position: absolute;
  top: 78px;
  right: 18px;
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
  overflow: hidden;
  z-index: 50;
}

.notes-more-menu button {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
}

.notes-more-menu button:last-child {
  border-bottom: none;
}

.notes-more-menu button:hover {
  background: rgba(255,255,255,0.05);
}

[data-theme="light"] .notes-more-menu {
  background: #fafafa;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

[data-theme="light"] .notes-more-menu button:hover {
  background: rgba(0,0,0,0.04);
}

/* =========================
   SETTINGS STYLE USER PANEL
========================= */

.settings-panel-head {
  margin-bottom: 18px;
}

.settings-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-panel-avatar,
.settings-profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  box-shadow: 0 10px 28px rgba(123,104,255,0.28);
  flex-shrink: 0;
}

.settings-profile-avatar {
  width: 54px;
  height: 54px;
  font-size: 22px;
}

.settings-panel-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.settings-panel-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text-primary);
}

.settings-card-block {
  margin-bottom: 14px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.settings-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px;
  cursor: pointer;
}

.settings-row-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.settings-row-icon.purple { background: rgba(123,104,255,0.14); }
.settings-row-icon.blue { background: rgba(96,174,255,0.14); }
.settings-row-icon.amber { background: rgba(255,179,64,0.14); }

.settings-chevron {
  font-size: 18px;
  color: var(--text-secondary);
  transition: transform .2s ease;
}

.settings-row-head.open .settings-chevron {
  transform: rotate(180deg);
}

.settings-profile-card {
  margin: 0 18px 18px;
  padding: 18px;
  border-radius: 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.settings-profile-copy h4 {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.settings-profile-copy p {
  color: var(--text-secondary);
  font-size: 13px;
}

.settings-edit-btn {
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(123,104,255,0.18);
  color: var(--accent-bright);
  font-weight: 700;
  flex-shrink: 0;
}

.settings-expand {
  padding: 0 18px 18px;
}

.settings-action-row {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.settings-action-row.danger {
  border-color: rgba(255,77,106,0.16);
  background: rgba(255,77,106,0.06);
}

.settings-action-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.settings-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  font-size: 18px;
  flex-shrink: 0;
}

.settings-action-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.settings-action-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.settings-arrow {
  font-size: 22px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.file-import-row {
  position: relative;
  cursor: pointer;
}

.file-import-row input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.settings-storage-note {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.settings-storage-note strong {
  color: var(--accent-bright);
  font-family: 'JetBrains Mono', monospace;
}

.settings-about-card {
  margin-top: 12px;
  padding: 18px;
  border-radius: 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
}

.settings-about-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-about-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #d66bff);
}

.settings-about-brand h4 {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  margin-bottom: 4px;
}

.settings-about-brand p {
  color: var(--text-secondary);
  font-size: 13px;
}

.settings-about-list {
  display: grid;
  gap: 12px;
}

.settings-about-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.settings-about-item span {
  color: var(--text-secondary);
}

.settings-about-item strong {
  color: var(--text-primary);
  text-align: right;
}

.settings-about-foot {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.premium-about-card{
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.settings-about-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-about-brand{
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.settings-about-logo{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(255,179,64,0.18), rgba(108,95,255,0.14));
  border: 1px solid rgba(255,179,64,0.18);
  flex-shrink: 0;
}

.settings-about-brand-text h4{
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.settings-about-brand-text p{
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.settings-about-meta{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-about-meta-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.settings-about-meta-row span{
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-about-meta-row strong{
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.settings-about-actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-about-action{
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
}

.settings-about-action:hover{
  transform: translateY(-1px);
  border-color: rgba(108,95,255,0.25);
  background: var(--accent-soft);
}

.settings-about-action:active{
  transform: scale(0.98);
}
