/* ==========================================================================
   RAJ LIFESTYLE OS - MINIMALIST LIGHT DESIGN SYSTEM (WHITE / BLACK / ACCENTS)
   Clean, Professional, Apple/Stripe-grade Light Mode with Soft Tactile Depth
   ========================================================================== */

:root {
  --bg-base: #f2f4f7;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #eaecf0;
  --bg-surface-card: #ffffff;
  --bg-surface-glass: rgba(242, 244, 247, 0.88);
  --bg-dark-card: #111418;

  --border-subtle: #e5e7eb;
  --border-strong: #d1d5db;
  --border-active: #111418;

  --text-main: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;

  --accent-primary: #ef4444; /* BeHisabi Coral Red */
  --accent-primary-hover: #dc2626;
  --accent-emerald: #10b981;
  --accent-emerald-bg: #ecfdf5;
  --accent-blue: #0284c7;
  --accent-blue-bg: #f0f9ff;
  --accent-indigo: #4f46e5;
  --accent-amber: #f59e0b;
  --accent-amber-bg: #fffbeb;
  --accent-rose: #ef4444;
  --accent-rose-bg: #fee2e2;
  --accent-purple: #7c3aed;

  /* Modern Card Shadows */
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 10px 25px -4px rgba(0, 0, 0, 0.08);
  --shadow-dock: 0 14px 36px rgba(0, 0, 0, 0.35);

  --font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14.5px;
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, textarea, [contenteditable="true"], .selectable {
  user-select: text;
}

/* Master Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  background: var(--bg-base);
}

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

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-surface-glass);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(var(--safe-top) + 10px) 20px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: contain;
  background: #000000;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid #000;
  flex-shrink: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-size: 9.5px;
  text-transform: uppercase;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: #0f172a;
  color: #ffffff;
  letter-spacing: 0.5px;
}

/* Toggle & Header Buttons */
.btn-sidebar-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--neu-button);
  transition: all 0.2s;
}

.btn-sidebar-toggle:active {
  background: var(--bg-surface-elevated);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 13px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--neu-button);
  transition: all 0.2s;
}

.btn-header:active {
  background: var(--bg-surface-elevated);
}

.sync-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
}

.sync-status-indicator.synced {
  background: var(--accent-emerald);
}

.sync-status-indicator.syncing {
  background: var(--accent-amber);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* ==========================================================================
   SIDEBAR COMPONENT (Light Mode)
   ========================================================================== */

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 270px;
  z-index: 100;
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (min-width: 1024px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: translateX(0);
    box-shadow: none;
    z-index: 30;
    flex-shrink: 0;
  }
  .sidebar-backdrop { display: none !important; }
  .btn-sidebar-toggle { display: none !important; }
  .bottom-dock { display: none !important; }
  .main-content { padding-bottom: 30px !important; }
}

.sidebar-header {
  padding: calc(var(--safe-top) + 14px) 16px 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: contain;
  background: #000;
  padding: 2px;
  border: 1px solid #000;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.sidebar-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-sidebar-close {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
}

@media (min-width: 1024px) {
  .btn-sidebar-close { display: none; }
}

.sidebar-scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
}

.sidebar-nav-section {
  margin-bottom: 16px;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  padding: 0 10px 6px 10px;
  text-transform: uppercase;
}

.sidebar-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 3px;
  transition: all 0.15s ease;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

.sidebar-nav-item.active {
  background: #0f172a;
  color: #ffffff;
}

.sidebar-nav-item.active .nav-item-icon svg {
  stroke: #ffffff;
}

.nav-item-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-main);
  stroke-width: 2;
  fill: none;
}

.nav-item-label {
  flex: 1;
}

.nav-badge-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 12px 14px calc(var(--safe-bottom) + 12px) 14px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-sync-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

/* ==========================================================================
   BEHISABI FLOATING CAPSULE DOCK & RED ACTION BUTTON
   ========================================================================== */

.btn-header-bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-header-bell:active {
  transform: scale(0.92);
  background: var(--bg-surface-elevated);
}

.bell-badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #ffffff;
}

/* Header Month Selector Badge */
.header-month-badge {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.header-month-badge:hover {
  background: var(--bg-surface-elevated);
}

.header-month-badge:active {
  transform: scale(0.96);
}

/* Dashboard Filter Bar (Minimal top bar above Hero card) */
.dashboard-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.month-selector-pill {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.month-selector-pill:active {
  transform: scale(0.96);
}

.month-pill-text {
  letter-spacing: -0.2px;
}

.btn-filter-icon {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.btn-filter-icon:active {
  transform: scale(0.95);
  background: var(--bg-surface-elevated);
}

/* Sidebar Footer Install Box (Native Widget Style) */
.sidebar-install-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.sidebar-install-box:hover {
  background: #f1f5f9;
}

.sidebar-install-box:active {
  transform: scale(0.97);
}

.install-box-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #111418;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-box-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.install-box-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

.install-action-pill {
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* Month Picker Modal */
.month-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0;
}

.month-picker-item {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.month-picker-item:hover {
  background: var(--bg-surface-elevated);
}

.month-picker-item.active {
  background: #f8fafc;
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

.item-month-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.item-month-badge {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

/* Floating Bottom Navigation Wrapper (100% Mobile Responsive & Safe) */
.bottom-dock-wrapper {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 12px);
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  pointer-events: none;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.bottom-dock-capsule {
  pointer-events: auto;
  background: #111418;
  border-radius: 9999px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: calc(100vw - 72px);
}

.dock-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 7px 11px;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dock-item svg {
  width: 17px;
  height: 17px;
  stroke: #94a3b8;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
  transition: stroke 0.2s;
}

/* Smart responsiveness: on mobile, inactive items show icon only, active shows icon + text! */
@media (max-width: 540px) {
  .dock-item:not(.active) span {
    display: none;
  }
  .dock-item:not(.active) {
    padding: 7px 9px;
  }
}

.dock-item.active {
  background: #ffffff;
  color: #111418;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 7px 13px;
}

.dock-item.active span {
  display: inline-block !important;
}

.dock-item.active svg {
  stroke: #111418;
}

.dock-fab-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.dock-fab-btn:active {
  transform: scale(0.92);
  background: #dc2626;
}

@media (min-width: 1024px) {
  .bottom-dock-wrapper { display: none !important; }
}

/* ==========================================================================
   BEHISABI DESIGN SYSTEM COMPONENTS
   ========================================================================== */

/* Dark Hero Card with Radial Watermark */
.hero-card-behisabi {
  background: radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 55%), #111418;
  border-radius: 26px;
  padding: 22px 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -4px rgba(17, 20, 24, 0.25);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.hero-bal-title {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.hero-greeting {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  text-align: right;
  letter-spacing: 0.5px;
}

.hero-user-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
}

.hero-main-amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #ffffff;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-bottom-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.hero-stat-val {
  font-size: 15px;
  font-weight: 800;
}

.hero-stat-val.income { color: #10b981; }
.hero-stat-val.expense { color: #ef4444; }

/* Wallets Horizontal Scroll */
.wallets-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 16px 2px;
  scrollbar-width: none;
}
.wallets-scroll-row::-webkit-scrollbar { display: none; }

.wallet-pill-card {
  min-width: 170px;
  background: #111418;
  color: #ffffff;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transition: transform 0.15s ease;
}

.wallet-pill-card.light-card {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.wallet-pill-card:active {
  transform: scale(0.96);
}

/* Category Squircles Grid (BeHisabi style) */
.category-squircle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

@media (min-width: 640px) {
  .category-squircle-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.category-squircle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.category-squircle-box {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.category-squircle-box.tint-red { background: #fee2e2; color: #ef4444; }
.category-squircle-box.tint-blue { background: #e0f2fe; color: #0284c7; }
.category-squircle-box.tint-green { background: #d1fae5; color: #10b981; }
.category-squircle-box.tint-purple { background: #ede9fe; color: #7c3aed; }
.category-squircle-box.tint-amber { background: #fef3c7; color: #d97706; }

.category-squircle-item:active .category-squircle-box {
  transform: scale(0.92);
}

.category-squircle-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  white-space: nowrap;
}

/* Grey Trend Card (BeHisabi Spend Trend) */
.trend-card-grey {
  background: #eaecf0;
  border-radius: 24px;
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(0,0,0,0.03);
}

.trend-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.trend-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.segmented-pill-bar {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 9999px;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.segmented-pill-btn {
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segmented-pill-btn.active {
  background: #111418;
  color: #ffffff;
}

.segmented-pill-btn.active-red {
  background: #ef4444;
  color: #ffffff;
}

/* Quick Action Popup Grid (BeHisabi style) */
.quick-action-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 10px;
  padding: 10px 0;
}

.quick-action-modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.quick-action-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.15s ease;
}

.quick-action-circle.circle-green { background: #d1fae5; color: #10b981; }
.quick-action-circle.circle-red { background: #fee2e2; color: #ef4444; }
.quick-action-circle.circle-blue { background: #e0f2fe; color: #0284c7; }
.quick-action-circle.circle-amber { background: #fef3c7; color: #d97706; }
.quick-action-circle.circle-purple { background: #ede9fe; color: #7c3aed; }
.quick-action-circle.circle-pink { background: #fce7f3; color: #ec4899; }

.quick-action-modal-item:active .quick-action-circle {
  transform: scale(0.9);
}

.quick-action-modal-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

/* ==========================================================================
   MAIN CONTENT & CARDS (Light Mode)
   ========================================================================== */

.main-content {
  flex: 1;
  padding: 20px 20px calc(var(--safe-bottom) + 80px) 20px;
  max-width: 1350px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .main-content {
    padding: 14px 14px calc(var(--safe-bottom) + 82px) 14px;
  }
  .hero-card-behisabi {
    padding: 18px 18px;
    border-radius: 22px;
    margin-bottom: 16px;
  }
  .hero-main-amount {
    font-size: 32px;
  }
  .hero-bottom-stats {
    gap: 10px;
    justify-content: space-between;
  }
  .category-squircle-grid {
    gap: 8px;
    margin-bottom: 18px;
  }
  .category-squircle-box {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    font-size: 22px;
  }
}

.date-header-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .date-header-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.date-title-group h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.date-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Month Filter Controls Toolbar */
.month-filter-toolbar {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 5px;
  gap: 3px;
  box-shadow: var(--neu-card);
}

.btn-month-nav {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
}

.btn-month-nav:hover { background: var(--bg-surface-elevated); }

.month-label-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  min-width: 120px;
  text-align: center;
}

.month-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.month-quick-chips::-webkit-scrollbar { display: none; }

.month-chip {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--neu-card);
  transition: all 0.15s;
  white-space: nowrap;
}

.month-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .bento-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .bento-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .bento-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .bento-span-2 { grid-column: span 2; }
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--neu-card);
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Net Worth Hero Card */
.hero-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.hero-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.hero-amount {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-currency {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.hero-substats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .hero-substats { grid-template-columns: repeat(4, 1fr); }
}

.substat-label {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.substat-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.substat-value.danger { color: var(--accent-rose); }
.substat-value.vault { color: var(--accent-blue); }
.substat-value.success { color: var(--accent-emerald); }

/* Loan EMI Card */
.emi-status-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--neu-card);
}

.emi-status-card.paid {
  background: var(--accent-emerald-bg);
  border-color: #a7f3d0;
}

/* Quick Expense Presets Chips */
.quick-chips-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.quick-chips-wrapper::-webkit-scrollbar { display: none; }

.chip-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--neu-card);
  transition: all 0.15s;
}

.chip-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

.chip-btn:active {
  background: #e2e8f0;
}

.chip-badge {
  background: #e2e8f0;
  color: var(--text-main);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
}

/* Progress Bars */
.progress-container {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: #0f172a;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
}

.btn-primary:hover { background: #1e293b; }

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover { background: var(--bg-surface-elevated); }

.btn-danger {
  background: var(--accent-rose);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

/* List Items */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.list-item:last-child { border-bottom: none; }

.item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.item-amount {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.amount-income { color: var(--accent-emerald); }
.amount-expense { color: var(--accent-rose); }
.amount-pending { color: var(--accent-amber); }

/* Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
}

.status-paid {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
}

.status-pending {
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
}

.status-alert {
  background: var(--accent-rose-bg);
  color: var(--accent-rose);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  padding: 16px 20px calc(var(--safe-bottom) + 20px) 20px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.1);
}

.modal-backdrop.open .modal-sheet { transform: translateY(0); }

@media (min-width: 768px) {
  .modal-backdrop { align-items: center; }
  .modal-sheet {
    border-radius: 16px;
    transform: scale(0.96);
  }
  .modal-backdrop.open .modal-sheet { transform: scale(1); }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  margin: 0 auto 14px auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close {
  background: var(--bg-surface-elevated);
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

/* Forms */
.form-group { margin-bottom: 12px; }
.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #0f172a;
}

/* Toast */
#toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 60px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

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

/* Bank Accounts Grid */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.account-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--neu-card);
}

.account-card.vault { border-left: 4px solid var(--accent-blue); }
.account-card.emi-linked { border-left: 4px solid var(--accent-amber); }
.account-card.primary { border-left: 4px solid var(--accent-emerald); }

.account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.account-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.account-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
}

.account-balance {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.account-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-dim);
}

/* Sticky Notes */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.note-card {
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--neu-card);
}

.note-yellow { background: #fefce8; border-color: #fef08a; }
.note-blue { background: #f0f9ff; border-color: #bae6fd; }
.note-green { background: #f0fdf4; border-color: #bbf7d0; }
.note-purple { background: #faf5ff; border-color: #e9d5ff; }
.note-red { background: #fff1f2; border-color: #fecdd3; }

.note-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.note-content {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
}

/* Water Grid & Glasses */
.water-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.water-glass {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.water-glass.filled {
  background: var(--accent-blue-bg);
  border-color: #7dd3fc;
}

.water-glass svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-dim);
}

.water-glass.filled svg {
  stroke: var(--accent-blue);
  fill: #bae6fd;
}

/* Exercise Cards */
.exercise-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--neu-card);
}

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

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

/* Habits */
.habit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
}

.habit-item.done {
  background: var(--accent-emerald-bg);
  border-color: #a7f3d0;
}

.habit-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.habit-item.done .habit-checkbox {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.habit-item.done .habit-checkbox::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* ==========================================================================
   FITNESS & WORKOUT STYLING (Image 1 & Image 3 Inspired)
   ========================================================================== */

/* Calendar Date Selector Strip */
.calendar-date-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #ffffff;
  border-radius: 22px;
  padding: 10px 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.calendar-date-strip::-webkit-scrollbar { display: none; }

.date-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 38px;
  padding: 8px 6px;
  border-radius: 14px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
}

.date-strip-day {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.date-strip-num {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-strip-item.active {
  background: #111418;
}
.date-strip-item.active .date-strip-day {
  color: #94a3b8;
}
.date-strip-item.active .date-strip-num {
  background: #ef4444;
  color: #ffffff;
}

/* Workout Analytics Bento (Image 3) */
.workout-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (min-width: 768px) {
  .workout-bento-grid { grid-template-columns: repeat(4, 1fr); }
}

.workout-bento-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.workout-bento-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.workout-bento-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 0 8px 0;
}
.mini-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}
.mini-bar {
  flex: 1;
  border-radius: 3px;
  background: #e2e8f0;
}
.mini-bar.filled-green { background: #10b981; }
.mini-bar.filled-orange { background: #f59e0b; }
.mini-bar.filled-blue { background: #0284c7; }
.mini-bar.filled-lime { background: #84cc16; }

/* Exercise Modern Cards */
.exercise-card-modern {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}
.exercise-card-modern.done {
  background: #f8fafc;
  border-color: #cbd5e1;
  opacity: 0.7;
}

/* ==========================================================================
   NUTRITION & MACROS STYLING (Image 2 Inspired)
   ========================================================================== */

.macro-grid-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.macro-stat-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.macro-icon-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.macro-num-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.macro-sub-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
}
.macro-accent-bar {
  height: 4px;
  border-radius: 9999px;
  width: 100%;
  margin-top: 6px;
}

.food-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: all 0.15s ease;
}
.food-list-item.done {
  opacity: 0.65;
  background: #f8fafc;
}

/* ==========================================================================
   REMINDERS & STICKY NOTES DARK/NEON STYLING (Image 4 Inspired)
   ========================================================================== */

.neon-stats-banner {
  background: #111418;
  border-radius: 26px;
  padding: 22px;
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.neon-yellow-card {
  background: #facc15;
  color: #111418;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(250, 204, 21, 0.35);
}

.time-pill-badge {
  background: #facc15;
  color: #111418;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reminder-dark-item {
  background: #181b22;
  color: #ffffff;
  border-radius: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.reminder-dark-item.done {
  opacity: 0.55;
}

.sticky-note-dark {
  background: #181b22;
  color: #ffffff;
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sticky-note-dark.accent-yellow {
  border-top: 3px solid #facc15;
}
.sticky-note-dark.accent-blue {
  border-top: 3px solid #38bdf8;
}
.sticky-note-dark.accent-green {
  border-top: 3px solid #10b981;
}
.sticky-note-dark.accent-rose {
  border-top: 3px solid #f43f5e;
}
