﻿/* =============================================================================
   FORTUNE — Premium Personal Finance App
   Design System & Component Library
   Dark-only — light mode removed in v2 redesign.
   ============================================================================= */

/* =============================================================================
   1. DESIGN TOKENS — CSS Custom Properties (legacy fallbacks)
   The full v2 token set is defined in design-system.css (loaded after this file).
   We keep these here so ANY rule below can reference them safely even if
   design-system.css fails to load.
   ============================================================================= */

#fortune-app {
  /* Backgrounds */
  --bg-primary:       #06060E;
  --bg-secondary:     #0A0A18;
  --bg-card:          #0F0F1E;
  --bg-card-hover:    #151528;
  --bg-elevated:      #141428;
  --bg-input:         #10101E;
  --bg-sidebar:       #07070F;

  /* Glass */
  --glass-bg:         rgba(15, 15, 30, 0.75);
  --glass-border:     rgba(255, 255, 255, 0.055);
  --glass-shine:      inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Borders */
  --border-color:     rgba(255, 255, 255, 0.06);
  --border-hover:     rgba(255, 255, 255, 0.11);

  /* Text */
  --text-primary:     #EEEEF5;
  --text-secondary:   #8484A8;
  --text-muted:       #44445A;
  --text-inverse:     #06060E;

  /* Accent */
  --accent:           #00E5C3;
  --accent-hover:     #00C9AB;
  --accent-dim:       #00A88F;
  --accent-glow:      rgba(0, 229, 195, 0.13);
  --accent-glow-lg:   rgba(0, 229, 195, 0.06);

  /* Semantic */
  --danger:           #FF6B6B;
  --danger-hover:     #FF5252;
  --danger-glow:      rgba(255, 107, 107, 0.13);
  --warning:          #F5A623;
  --warning-glow:     rgba(245, 166, 35, 0.13);
  --info:             #4C8EF7;
  --info-glow:        rgba(76, 142, 247, 0.13);
  --purple:           #9B6DFF;
  --purple-glow:      rgba(155, 109, 255, 0.13);
  --amber:            #F5A623;
  --amber-glow:       rgba(245, 166, 35, 0.13);

  /* Shadows */
  --shadow-sm:        0 1px 4px rgba(0, 0, 0, 0.5);
  --shadow-md:        0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-lg:        0 12px 32px rgba(0, 0, 0, 0.65);
  --shadow-glow:      0 0 32px rgba(0, 229, 195, 0.08);
  --shadow-card:      0 2px 12px rgba(0, 0, 0, 0.4), var(--glass-shine);

  /* Border Radius */
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        24px;
  --radius-2xl:       32px;
  --radius-full:      9999px;

  /* Motion */
  --transition:       180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  380ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring:320ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-sans:        'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading:     'Syne', var(--font-sans);
  --font-mono:        'DM Mono', 'SF Mono', SFMono-Regular, Consolas, monospace;
  --font-numeric:     'Syne', var(--font-sans);
  --numeric-features: "tnum" 1, "lnum" 1;

  /* Spacing Scale — CRITICAL */
  --space-1:          4px;
  --space-2:          8px;
  --space-3:          12px;
  --space-4:          16px;
  --space-5:          20px;
  --space-6:          24px;
  --space-8:          32px;
  --space-10:         40px;
  --space-12:         48px;

  /* Layout — CRITICAL */
  --sidebar-width:    256px;
  --bottom-nav-height:64px;
  --header-height:    72px;
}

/* =============================================================================
   2. RESET & BASE
   ============================================================================= */

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* WordPress admin bar â€” Fortune hides it entirely, kill residual padding */
body.admin-bar #fortune-app {
  padding-top: 0 !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar #fortune-app {
    padding-top: 0 !important;
  }
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

ul,
ol {
  list-style: none;
}

/* =============================================================================
   2b. ENTRY ANIMATIONS
   ============================================================================= */

@keyframes fortune-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fortune-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fortune-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fortune-glow-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* =============================================================================
   3. ROOT APP CONTAINER
   ============================================================================= */

#fortune-app {
  min-height: 100dvh;
  height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Safe area for mobile notches */
  padding-top: env(safe-area-inset-top, 0);
}

/* Scoped scrollbar styling */
#fortune-app ::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

#fortune-app ::-webkit-scrollbar-track {
  background: transparent;
}

#fortune-app ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

#fortune-app ::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* =============================================================================
   4. LAYOUT â€” Main Grid
   ============================================================================= */

.fortune-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .fortune-layout {
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr;
  }
}

/* =============================================================================
   5. SIDEBAR
   ============================================================================= */

.fortune-sidebar {
  display: none;
  width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--glass-border);
  padding: var(--space-5) var(--space-3);
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
}

@media (min-width: 768px) {
  .fortune-sidebar {
    display: flex;
  }
}

.fortune-sidebar-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: var(--space-3) var(--space-3) var(--space-5);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.fortune-sidebar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.fortune-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex-grow: 1;
}

.fortune-sidebar-section {
  margin-bottom: var(--space-4);
}

.fortune-sidebar-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.fortune-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 9px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.005em;
}

.fortune-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.fortune-nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.fortune-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

/* Builder nav item â€” special accent highlight */
.fortune-nav-link--accent {
  color: var(--accent) !important;
}

.fortune-nav-link--accent:not(.active) {
  background: rgba(0, 229, 195, 0.04);
}

.fortune-nav-link--accent.active {
  background: var(--accent-glow);
}

/* Nav section label (group header) */
.fortune-nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 14px var(--space-3) 4px;
}

/* âŒ˜K search hint in sidebar */
.fortune-sidebar-search-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: var(--space-2);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
}

.fortune-sidebar-search-hint:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border-color: var(--border-hover);
}

.fortune-nav-link.active .fortune-nav-icon {
  color: var(--accent);
}

.fortune-nav-link .fortune-nav-badge {
  margin-left: auto;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.fortune-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.fortune-nav-link:hover .fortune-nav-icon,
.fortune-nav-link.active .fortune-nav-icon {
  opacity: 1;
}

.fortune-sidebar-footer {
  padding-top: var(--space-5);
  margin-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex-shrink: 0;
}

.fortune-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.fortune-sidebar-user:hover {
  background: var(--bg-card-hover);
}

.fortune-sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.fortune-sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

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

.fortune-sidebar-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =============================================================================
   6. MAIN CONTENT AREA
   ============================================================================= */

.fortune-main {
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - var(--bottom-nav-height));
  padding: var(--space-4);
  position: relative;
  flex: 1;
  min-width: 0;
  background-image: radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 28px 28px;
}

@media (min-width: 768px) {
  .fortune-main {
    height: 100vh;
    padding: var(--space-6) var(--space-8);
  }
}

/* Builder mode â€” zero padding so the canvas is truly flush */
.fortune-main.fortune-main--builder {
  padding: 0 !important;
  overflow: hidden !important;
  background-image: none;
}

/* Fade dots in light mode */
.fortune-main-inner {
  width: 100%;
}

/* =============================================================================
   7. BOTTOM NAVIGATION (Mobile)
   ============================================================================= */

.fortune-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .fortune-bottom-nav {
    display: none;
  }
}

.fortune-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  color: var(--text-muted);
  font-size: 0.625rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
  min-width: 60px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.fortune-bottom-nav-item.active {
  color: var(--accent);
}

.fortune-bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.fortune-bottom-nav-item svg,
.fortune-bottom-nav-item .fortune-nav-icon {
  width: 22px;
  height: 22px;
}

/* =============================================================================
   8. PAGE HEADER
   ============================================================================= */

.fortune-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.fortune-header-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.fortune-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.fortune-page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.15;
}

.fortune-page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
  letter-spacing: 0.01em;
}

/* =============================================================================
   9. CARDS
   ============================================================================= */

.fortune-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  animation: fortune-fade-up 0.35s ease both;
}

.fortune-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, transparent 60%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .fortune-card {
    padding: var(--space-6);
  }
}

@media (hover: hover) {
  .fortune-card-hover:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), var(--glass-shine);
    transform: translateY(-2px);
  }
}

.fortune-card-accent {
  border-left: 3px solid var(--accent);
}

.fortune-card-danger {
  border-left: 3px solid var(--danger);
}

.fortune-card-warning {
  border-left: 3px solid var(--warning);
}

.fortune-card-info {
  border-left: 3px solid var(--info);
}

.fortune-card-purple {
  border-left: 3px solid var(--purple);
}

.fortune-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}

.fortune-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

.fortune-card-body {
  flex: 1;
}

.fortune-card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

/* Clickable cards */
.fortune-card-link {
  cursor: pointer;
  user-select: none;
}

.fortune-card-link:active {
  transform: scale(0.99);
}

/* Flat / borderless variant */
.fortune-card-flat {
  border: none;
  box-shadow: none;
  background: var(--bg-secondary);
}

/* Glass variant */
.fortune-card-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* =============================================================================
   10. TYPOGRAPHY
   ============================================================================= */

.fortune-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.1;
}

/* Shared view header â€” used by all views */
.fortune-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
  animation: fortune-fade-up 0.3s ease both;
}

.fortune-view-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

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

/* View wrapper with entry animation */
.fortune-view {
  animation: fortune-fade-in 0.25s ease both;
  padding-bottom: var(--space-8);
}

.fortune-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.fortune-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.fortune-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
}

/* Financial amounts */
.fortune-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  font-feature-settings: "tnum";
}

.fortune-amount-positive {
  color: var(--accent);
}

.fortune-amount-negative {
  color: var(--danger);
}

.fortune-amount-neutral {
  color: var(--text-secondary);
}

.fortune-amount-lg {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

.fortune-amount-md {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.fortune-amount-sm {
  font-size: 0.875rem;
  font-weight: 500;
}

.fortune-amount-xs {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Trend indicator */
.fortune-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.fortune-trend.up {
  background: var(--accent-glow);
  color: var(--accent);
}

.fortune-trend.down {
  background: var(--danger-glow);
  color: var(--danger);
}

.fortune-trend.flat {
  background: var(--bg-input);
  color: var(--text-muted);
}

/* =============================================================================
   11. BUTTONS
   ============================================================================= */

.fortune-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

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

.fortune-btn:disabled,
.fortune-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.fortune-btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.fortune-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Secondary */
.fortune-btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.fortune-btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* Danger */
.fortune-btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.fortune-btn-danger:hover {
  background: var(--danger-hover);
  box-shadow: 0 4px 12px var(--danger-glow);
}

/* Ghost */
.fortune-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.fortune-btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Outline accent */
.fortune-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.fortune-btn-outline:hover {
  background: var(--accent-glow);
}

/* Subtle / light */
.fortune-btn-subtle {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.fortune-btn-subtle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Sizes */
.fortune-btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.fortune-btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Icon-only button */
.fortune-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.fortune-btn-icon.fortune-btn-sm {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}

.fortune-btn-icon.fortune-btn-lg {
  width: 44px;
  height: 44px;
}

/* Loading state */
.fortune-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.fortune-btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: currentColor;
  animation: fortune-spin 600ms linear infinite;
  flex-shrink: 0;
}

/* Button group */
.fortune-btn-group {
  display: inline-flex;
}

.fortune-btn-group .fortune-btn {
  border-radius: 0;
}

.fortune-btn-group .fortune-btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.fortune-btn-group .fortune-btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* =============================================================================
   12. FORMS
   ============================================================================= */

.fortune-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-5);
}

.fortune-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .fortune-form-row {
    grid-template-columns: 1fr;
  }
}

.fortune-form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  user-select: none;
}

.fortune-form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.fortune-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.fortune-input::placeholder {
  color: var(--text-muted);
}

.fortune-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.fortune-input:hover:not(:focus) {
  border-color: var(--border-hover);
}

.fortune-input-error {
  border-color: var(--danger) !important;
}

.fortune-input-error:focus {
  box-shadow: 0 0 0 3px var(--danger-glow) !important;
}

/* Select */
.fortune-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  /* Chevron down SVG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8ba8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.fortune-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.fortune-select:hover:not(:focus) {
  border-color: var(--border-hover);
}

/* Textarea */
.fortune-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  outline: none;
  resize: vertical;
  min-height: 80px;
}

.fortune-textarea::placeholder {
  color: var(--text-muted);
}

.fortune-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Input group â€” with prefix/suffix */
.fortune-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.fortune-input-group .fortune-input,
.fortune-input-group .fortune-select {
  flex: 1;
}

.fortune-input-group.has-prefix .fortune-input,
.fortune-input-group.has-prefix .fortune-select {
  padding-left: 40px;
}

.fortune-input-group.has-suffix .fortune-input,
.fortune-input-group.has-suffix .fortune-select {
  padding-right: 40px;
}

.fortune-input-prefix,
.fortune-input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1;
}

.fortune-input-prefix {
  left: 14px;
}

.fortune-input-suffix {
  right: 14px;
}

.fortune-input-suffix.clickable,
.fortune-input-prefix.clickable {
  pointer-events: all;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.fortune-input-suffix.clickable:hover,
.fortune-input-prefix.clickable:hover {
  color: var(--text-primary);
}

/* Error text */
.fortune-error-text {
  font-size: 0.75rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Checkbox / Radio */
.fortune-checkbox-group,
.fortune-radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.fortune-checkbox,
.fortune-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  background: var(--bg-input);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}

.fortune-radio {
  border-radius: 50%;
}

.fortune-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.fortune-checkbox:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a0a0f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.fortune-radio:checked {
  border-color: var(--accent);
}

.fortune-radio:checked::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fortune-checkbox:focus,
.fortune-radio:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* =============================================================================
   13. MODALS
   ============================================================================= */

.fortune-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 14, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 768px) {
  .fortune-modal-overlay {
    align-items: center;
    padding: var(--space-4);
  }
}

.fortune-modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  padding: var(--space-6);
  position: relative;
}

@media (min-width: 768px) {
  .fortune-modal {
    border-radius: var(--radius-xl);
    border-bottom: 1px solid var(--border-color);
    width: min(480px, 90vw);
    max-height: 85dvh;
  }
}

.fortune-modal-lg {
  width: min(640px, 90vw);
}

.fortune-modal-xl {
  width: min(800px, 95vw);
}

.fortune-modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-hover);
  margin: 0 auto var(--space-4);
  border-radius: 2px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .fortune-modal-handle {
    display: none;
  }
}

.fortune-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: var(--space-3);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.fortune-modal-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

.fortune-modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.fortune-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.fortune-modal-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.fortune-modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: 70vh;
}

.fortune-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.fortune-modal-footer.space-between {
  justify-content: space-between;
}

/* =============================================================================
   14. BADGES & TAGS
   ============================================================================= */

.fortune-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.fortune-badge-income {
  background: var(--accent-glow);
  color: var(--accent);
}

.fortune-badge-expense {
  background: var(--danger-glow);
  color: var(--danger);
}

.fortune-badge-transfer {
  background: var(--info-glow);
  color: var(--info);
}

.fortune-badge-warning {
  background: var(--warning-glow);
  color: var(--warning);
}

.fortune-badge-neutral {
  background: var(--bg-input);
  color: var(--text-secondary);
}

.fortune-badge-purple {
  background: var(--purple-glow);
  color: var(--purple);
}

.fortune-badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* =============================================================================
   15. PROGRESS BARS
   ============================================================================= */

.fortune-progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  width: 100%;
}

.fortune-progress-bar-thick {
  height: 10px;
}

.fortune-progress-bar-thin {
  height: 3px;
}

.fortune-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent);
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

.fortune-progress-fill.warning {
  background: var(--warning);
}

.fortune-progress-fill.danger {
  background: var(--danger);
}

.fortune-progress-fill.info {
  background: var(--info);
}

.fortune-progress-fill.purple {
  background: var(--purple);
}

.fortune-progress-fill.gradient {
  background: linear-gradient(90deg, var(--accent), #00f5c3);
}

/* =============================================================================
   16. ACCOUNT / ASSET CARDS
   ============================================================================= */

.fortune-account-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: var(--space-3);
  row-gap: 6px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

.fortune-account-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent-glow);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.fortune-account-card.danger-card::before {
  background: var(--danger-glow);
}

@media (hover: hover) {
  .fortune-account-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }

  .fortune-account-card:hover::before {
    opacity: 1;
  }
}

.fortune-account-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  grid-row: 1 / 3;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.fortune-account-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  align-self: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fortune-account-type {
  align-self: start;
  grid-column: 2;
}

.fortune-account-balance {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  grid-row: 1 / 3;
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

.fortune-account-balance.positive {
  color: var(--accent);
}

.fortune-account-balance.negative {
  color: var(--danger);
}

/* =============================================================================
   17. STATISTICS GRID
   ============================================================================= */

.fortune-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .fortune-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

.fortune-stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: fortune-fade-up 0.35s ease both;
}

.fortune-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, transparent 60%);
  pointer-events: none;
}

@media (hover: hover) {
  .fortune-stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}

.fortune-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.fortune-stat-value {
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.fortune-stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-2);
}

/* =============================================================================
   18. LOADING STATES
   ============================================================================= */

/* Skeleton shimmer */
.fortune-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: fortune-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.fortune-skeleton-text {
  height: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}

.fortune-skeleton-text-sm {
  height: 12px;
}

.fortune-skeleton-text-lg {
  height: 20px;
}

.fortune-skeleton-circle {
  border-radius: 50%;
}

.fortune-skeleton-title {
  height: 28px;
  width: 60%;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
}

/* Spinner */
.fortune-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  animation: fortune-spin 600ms linear infinite;
  flex-shrink: 0;
}

.fortune-spinner-sm {
  width: 16px;
  height: 16px;
}

.fortune-spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

/* Full-page loading */
.fortune-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--space-4);
  color: var(--text-secondary);
}

/* Empty state */
.fortune-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
  text-align: center;
  gap: var(--space-3);
  color: var(--text-secondary);
}

.fortune-empty-state-icon {
  font-size: 2.5rem;
  opacity: 0.4;
  margin-bottom: var(--space-2);
}

.fortune-empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fortune-empty-state-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.5;
}

/* =============================================================================
   19. TOAST NOTIFICATIONS
   ============================================================================= */

.fortune-toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 300;
  max-width: 320px;
  width: calc(100vw - 32px);
  pointer-events: none;
}

@media (min-width: 768px) {
  .fortune-toast-container {
    bottom: var(--space-6);
    width: 320px;
  }
}

.fortune-toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: slideInRight 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: all;
  position: relative;
  overflow: hidden;
}

.fortune-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.fortune-toast.success::before {
  background: var(--accent);
}

.fortune-toast.error::before {
  background: var(--danger);
}

.fortune-toast.warning::before {
  background: var(--warning);
}

.fortune-toast.info::before {
  background: var(--info);
}

.fortune-toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.fortune-toast.success .fortune-toast-icon { color: var(--accent); }
.fortune-toast.error .fortune-toast-icon   { color: var(--danger); }
.fortune-toast.warning .fortune-toast-icon { color: var(--warning); }
.fortune-toast.info .fortune-toast-icon    { color: var(--info); }

.fortune-toast-content {
  flex: 1;
  min-width: 0;
}

.fortune-toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.fortune-toast-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fortune-toast-close {
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
}

.fortune-toast-close:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.fortune-toast-leaving {
  animation: slideOutRight 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =============================================================================
   20. LOCK SCREEN
   ============================================================================= */

.fortune-lock-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--space-6);
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.fortune-lock-screen::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.fortune-lock-screen::after {
  content: '';
  position: absolute;
  bottom: -200px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.fortune-lock-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
}

.fortune-lock-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.fortune-lock-logo-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--accent-glow);
  border: 1px solid rgba(0, 212, 170, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 40px var(--accent-glow);
}

.fortune-lock-logo-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.fortune-lock-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.fortune-lock-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  text-align: center;
  letter-spacing: -0.02em;
}

.fortune-lock-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

/* PIN pad */
.fortune-pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.fortune-pin-key {
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fortune-pin-key:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.fortune-pin-key:active {
  transform: scale(0.95);
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.fortune-pin-display {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.fortune-pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-hover);
  transition: background var(--transition);
}

.fortune-pin-dot.filled {
  background: var(--accent);
}

/* =============================================================================
   21. DASHBOARD HERO
   ============================================================================= */

.fortune-dashboard-hero {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.fortune-dashboard-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.fortune-hero-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fortune-hero-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.fortune-hero-amount.positive {
  color: var(--accent);
}

.fortune-hero-amount.negative {
  color: var(--danger);
}

.fortune-hero-footer {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

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

.fortune-hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fortune-hero-stat-value {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fortune-hero-stat-value.positive {
  color: var(--accent);
}

.fortune-hero-stat-value.negative {
  color: var(--danger);
}

/* =============================================================================
   22. TRANSACTION LIST
   ============================================================================= */

.fortune-transaction-list {
  display: flex;
  flex-direction: column;
}

.fortune-transaction-group {
  margin-bottom: var(--space-4);
}

.fortune-transaction-date-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-3) 0 var(--space-2);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
  margin-bottom: 0;
}

/* Inside a card, use card background */
.fortune-card .fortune-transaction-date-header {
  background: var(--bg-card);
}

.fortune-transaction-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  padding: var(--space-3) 0;
  gap: var(--space-3);
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
  cursor: pointer;
  border-radius: 0;
}

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

@media (hover: hover) {
  .fortune-transaction-item:hover {
    background: var(--bg-card-hover);
    margin: 0 calc(-1 * var(--space-3));
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    border-radius: var(--radius-sm);
    border-bottom-color: transparent;
  }

  .fortune-transaction-item:hover + .fortune-transaction-item {
    border-top-color: transparent;
  }
}

.fortune-transaction-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.fortune-transaction-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fortune-transaction-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fortune-transaction-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fortune-transaction-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.fortune-transaction-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.fortune-transaction-value.income {
  color: var(--accent);
}

.fortune-transaction-value.expense {
  color: var(--text-primary);
}

.fortune-transaction-value.transfer {
  color: var(--info);
}

/* =============================================================================
   23. CHART CONTAINER
   ============================================================================= */

.fortune-chart-container {
  position: relative;
  height: 240px;
}

@media (min-width: 768px) {
  .fortune-chart-container {
    height: 320px;
  }
}

.fortune-chart-container.tall {
  height: 300px;
}

@media (min-width: 768px) {
  .fortune-chart-container.tall {
    height: 400px;
  }
}

.fortune-chart-container canvas {
  max-width: 100%;
}

/* Chart legend */
.fortune-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.fortune-chart-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.fortune-chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* =============================================================================
   24. GOAL CARDS
   ============================================================================= */

.fortune-goal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--transition);
}

@media (hover: hover) {
  .fortune-goal-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
  }
}

.fortune-goal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.fortune-goal-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--accent-glow);
  flex-shrink: 0;
}

.fortune-goal-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.fortune-goal-target {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.fortune-goal-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.fortune-goal-current {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.fortune-goal-percentage {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* =============================================================================
   25. LOAN CARDS
   ============================================================================= */

.fortune-loan-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--transition);
}

.fortune-loan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.fortune-loan-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fortune-loan-institution {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.fortune-loan-balance {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: -0.03em;
}

.fortune-loan-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.fortune-loan-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fortune-loan-detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fortune-loan-detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* =============================================================================
   26. COMPANY BADGE
   ============================================================================= */

.fortune-company-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.fortune-company-icon {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  flex-shrink: 0;
}

/* =============================================================================
   27. THEME TOGGLE â€” modern pill switch
   ============================================================================= */

/* Footer row: user avatar + name + toggle in one line */
.fortune-footer-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.fortune-footer-row:hover {
  background: var(--bg-card-hover);
}

.fortune-theme-toggle {
  /* pill track */
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  padding: 0;
  outline: none;
  transition: background var(--transition-slow), border-color var(--transition-slow);
  display: flex;
  align-items: center;
}

.fortune-theme-toggle.is-light {
  background: var(--accent);
  border-color: var(--accent);
}

.fortune-theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* sliding knob */
.fortune-toggle-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-secondary);
  top: 2px;
  left: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-spring), background var(--transition-slow);
  pointer-events: none;
}

.fortune-theme-toggle.is-light .fortune-toggle-thumb {
  background: #ffffff;
  transform: translateX(20px);
}

/* icons inside knob */
.fortune-toggle-thumb svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* =============================================================================
   28. COLOR PICKER
   ============================================================================= */

.fortune-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.fortune-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition);
  position: relative;
  flex-shrink: 0;
  border: none;
  padding: 0;
}

.fortune-color-swatch:hover {
  transform: scale(1.15);
}

.fortune-color-swatch.selected {
  outline: 2px solid white;
  outline-offset: 2px;
}

.fortune-color-swatch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =============================================================================
   29. DIVIDERS & SEPARATORS
   ============================================================================= */

.fortune-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-4) 0;
  border: none;
}

.fortune-divider-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.fortune-divider-label::before,
.fortune-divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* =============================================================================
   30. TABS
   ============================================================================= */

.fortune-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 2px;
}

.fortune-tab {
  flex: 1;
  padding: 8px var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: transparent;
  text-align: center;
  white-space: nowrap;
}

.fortune-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.fortune-tab:hover:not(.active) {
  color: var(--text-primary);
}

/* Underline tabs variant */
.fortune-tabs-underline {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-1);
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.fortune-tabs-underline .fortune-tab {
  flex: none;
  border-radius: 0;
  padding: var(--space-3) var(--space-4);
  position: relative;
  background: transparent;
  box-shadow: none;
}

.fortune-tabs-underline .fortune-tab.active {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.fortune-tabs-underline .fortune-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* =============================================================================
   31. DROPDOWN MENU
   ============================================================================= */

.fortune-dropdown {
  position: relative;
  display: inline-block;
}

.fortune-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  overflow: hidden;
  padding: 4px;
}

.fortune-dropdown-menu.left {
  right: auto;
  left: 0;
}

.fortune-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.fortune-dropdown-item:hover {
  background: var(--bg-card-hover);
}

.fortune-dropdown-item.danger {
  color: var(--danger);
}

.fortune-dropdown-item.danger:hover {
  background: var(--danger-glow);
}

.fortune-dropdown-separator {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* =============================================================================
   32. SETTINGS / PROFILE
   ============================================================================= */

.fortune-settings-section {
  margin-bottom: var(--space-8);
}

.fortune-settings-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.fortune-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.fortune-settings-item-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.fortune-settings-item-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.fortune-settings-item-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* =============================================================================
   33. DATA TABLE
   ============================================================================= */

.fortune-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

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

.fortune-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.fortune-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.fortune-table tr:last-child td {
  border-bottom: none;
}

.fortune-table tbody tr {
  transition: background var(--transition);
}

@media (hover: hover) {
  .fortune-table tbody tr:hover {
    background: var(--bg-card-hover);
  }
}

.fortune-table .amount-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 600;
  text-align: right;
}

/* =============================================================================
   34. ONBOARDING / SETUP STEPS
   ============================================================================= */

.fortune-steps {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.fortune-step-indicator {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  transition: background var(--transition-slow);
}

.fortune-step-indicator.active {
  background: var(--accent);
}

.fortune-step-indicator.completed {
  background: var(--accent);
  opacity: 0.5;
}

/* =============================================================================
   35. TOOLTIP
   ============================================================================= */

.fortune-tooltip {
  position: relative;
  display: inline-flex;
}

.fortune-tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  z-index: 250;
  opacity: 0;
  transition: opacity var(--transition);
}

.fortune-tooltip:hover .fortune-tooltip-content {
  opacity: 1;
}

/* =============================================================================
   36. ALERTS / INLINE NOTICES
   ============================================================================= */

.fortune-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  border: 1px solid transparent;
  line-height: 1.5;
}

.fortune-alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.fortune-alert-info {
  background: var(--info-glow);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

.fortune-alert-success {
  background: var(--accent-glow);
  border-color: rgba(0, 212, 170, 0.2);
  color: var(--accent);
}

.fortune-alert-warning {
  background: var(--warning-glow);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.fortune-alert-danger {
  background: var(--danger-glow);
  border-color: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

.fortune-alert-text {
  color: var(--text-primary);
}

/* =============================================================================
   37. CURRENCY & PERIOD SELECTOR
   ============================================================================= */

.fortune-period-selector {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.fortune-period-option {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: transparent;
  white-space: nowrap;
}

.fortune-period-option.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* =============================================================================
   38. SEARCH INPUT
   ============================================================================= */

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

.fortune-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fortune-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.fortune-search-input::placeholder {
  color: var(--text-muted);
}

.fortune-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* =============================================================================
   39. AVATAR
   ============================================================================= */

.fortune-avatar {
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  overflow: hidden;
}

.fortune-avatar-sm  { width: 28px; height: 28px; font-size: 0.75rem; }
.fortune-avatar-md  { width: 36px; height: 36px; font-size: 0.875rem; }
.fortune-avatar-lg  { width: 48px; height: 48px; font-size: 1rem; }
.fortune-avatar-xl  { width: 64px; height: 64px; font-size: 1.25rem; }

.fortune-avatar-round {
  border-radius: 50%;
}

/* =============================================================================
   40. VUE TRANSITIONS & ANIMATIONS
   ============================================================================= */

/* Page view transitions */
.fortune-view-enter-active,
.fortune-view-leave-active {
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fortune-view-enter-from {
  opacity: 0;
  transform: translateY(8px);
}

.fortune-view-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}

/* Slide up (modal / bottom sheet) */
.fortune-slide-up-enter-active,
.fortune-slide-up-leave-active {
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fortune-slide-up-enter-from,
.fortune-slide-up-leave-to {
  opacity: 0;
  transform: translateY(100%);
}

/* Fade overlay */
.fortune-fade-enter-active,
.fortune-fade-leave-active {
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fortune-fade-enter-from,
.fortune-fade-leave-to {
  opacity: 0;
}

/* Scale pop */
.fortune-scale-enter-active {
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fortune-scale-leave-active {
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fortune-scale-enter-from {
  opacity: 0;
  transform: scale(0.9);
}

.fortune-scale-leave-to {
  opacity: 0;
  transform: scale(0.95);
}

/* List item transitions */
.fortune-list-enter-active,
.fortune-list-leave-active {
  transition: opacity 200ms ease, transform 200ms ease;
}

.fortune-list-enter-from {
  opacity: 0;
  transform: translateX(-8px);
}

.fortune-list-leave-to {
  opacity: 0;
  transform: translateX(8px);
}

.fortune-list-move {
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================================
   41. KEYFRAME ANIMATIONS
   ============================================================================= */

@keyframes fortune-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fortune-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

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

@keyframes fortune-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes fortune-bounce-in {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.05); }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fortune-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Pulse dot (live indicator) */
.fortune-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}

.fortune-live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: fortune-pulse 1.5s ease infinite;
}

/* =============================================================================
   42. MOBILE RESPONSIVE
   ============================================================================= */

@media (max-width: 767px) {
  .fortune-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .fortune-stat-card {
    padding: var(--space-4);
  }

  .fortune-stat-value {
    font-size: 1.25rem;
  }

  .fortune-account-card {
    padding: var(--space-4);
  }

  .fortune-dashboard-hero {
    padding: var(--space-5);
    margin-bottom: var(--space-4);
  }

  .fortune-modal-footer {
    flex-direction: column-reverse;
  }

  .fortune-modal-footer .fortune-btn {
    width: 100%;
    justify-content: center;
  }

  .fortune-header {
    padding: 0 0 var(--space-4);
  }

  .fortune-loan-details {
    grid-template-columns: 1fr;
  }

  .fortune-tabs-underline .fortune-tab {
    padding: var(--space-3) var(--space-3);
    font-size: 0.8125rem;
  }
}

/* =============================================================================
   43. DESKTOP ENHANCEMENTS
   ============================================================================= */

@media (min-width: 768px) {
  .fortune-stat-card {
    padding: var(--space-6);
  }

  .fortune-stat-value {
    font-size: 1.75rem;
  }

  .fortune-dashboard-hero {
    padding: var(--space-8);
  }

  .fortune-transaction-item {
    grid-template-columns: 44px 1fr auto;
  }

  .fortune-goal-card {
    padding: var(--space-6);
  }

  .fortune-loan-card {
    padding: var(--space-6);
  }

  .fortune-account-card {
    padding: var(--space-6);
  }
}

/* Wide screen layout */
@media (min-width: 1280px) {
  .fortune-main {
    padding: var(--space-10) var(--space-10);
  }

  .fortune-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =============================================================================
   44. PRINT STYLES
   ============================================================================= */

@media print {
  .fortune-sidebar,
  .fortune-bottom-nav,
  .fortune-header-actions,
  .fortune-toast-container,
  .fortune-modal-overlay {
    display: none !important;
  }

  #fortune-app {
    background: white;
    color: black;
  }

  .fortune-card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* =============================================================================
   45. REDUCED MOTION
   ============================================================================= */

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

  .fortune-skeleton {
    animation: none;
    background: var(--bg-card-hover);
  }
}

/* =============================================================================
   46. UTILITY CLASSES
   ============================================================================= */

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Display */
.hidden       { display: none !important; }
.block        { display: block !important; }
.inline-block { display: inline-block !important; }
.flex         { display: flex !important; }
.inline-flex  { display: inline-flex !important; }
.grid         { display: grid !important; }

/* Visibility */
.invisible   { visibility: hidden; }
.opacity-0   { opacity: 0; }
.opacity-50  { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Responsive visibility */
.mobile-only {
  display: block;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .desktop-only {
    display: block !important;
  }
}

.desktop-flex {
  display: none;
}

@media (min-width: 768px) {
  .desktop-flex {
    display: flex !important;
  }
}

/* Flexbox */
.flex-col       { flex-direction: column !important; }
.flex-row       { flex-direction: row !important; }
.flex-wrap      { flex-wrap: wrap !important; }
.flex-nowrap    { flex-wrap: nowrap !important; }
.items-start    { align-items: flex-start !important; }
.items-center   { align-items: center !important; }
.items-end      { align-items: flex-end !important; }
.justify-start  { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end    { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-around  { justify-content: space-around !important; }
.flex-1         { flex: 1 1 0% !important; }
.flex-auto      { flex: 1 1 auto !important; }
.flex-none      { flex: none !important; }
.flex-shrink-0  { flex-shrink: 0 !important; }
.self-start     { align-self: flex-start !important; }
.self-end       { align-self: flex-end !important; }
.self-center    { align-self: center !important; }

/* Grid */
.grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
}

.grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 767px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Gap */
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-5 { gap: var(--space-5) !important; }
.gap-6 { gap: var(--space-6) !important; }

/* Margin */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding */
.p-0  { padding: 0 !important; }
.p-2  { padding: var(--space-2) !important; }
.p-3  { padding: var(--space-3) !important; }
.p-4  { padding: var(--space-4) !important; }
.p-5  { padding: var(--space-5) !important; }
.p-6  { padding: var(--space-6) !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }

/* Width & Height */
.w-full  { width: 100% !important; }
.h-full  { height: 100% !important; }
.min-w-0 { min-width: 0 !important; }

/* Text */
.text-xs   { font-size: 0.75rem !important; }
.text-sm   { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg   { font-size: 1.125rem !important; }
.text-xl   { font-size: 1.25rem !important; }

.text-left    { text-align: left !important; }
.text-center  { text-align: center !important; }
.text-right   { text-align: right !important; }

.font-normal  { font-weight: 400 !important; }
.font-medium  { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold    { font-weight: 700 !important; }

.truncate {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.break-words {
  overflow-wrap: break-word;
  word-break: break-word;
}

.uppercase   { text-transform: uppercase !important; }
.lowercase   { text-transform: lowercase !important; }
.capitalize  { text-transform: capitalize !important; }
.leading-tight { line-height: 1.25 !important; }
.leading-normal { line-height: 1.5 !important; }

/* Color utilities */
.text-accent    { color: var(--accent) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-info      { color: var(--info) !important; }
.text-purple    { color: var(--purple) !important; }
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }

.bg-accent   { background: var(--accent) !important; }
.bg-danger   { background: var(--danger) !important; }
.bg-warning  { background: var(--warning) !important; }
.bg-card     { background: var(--bg-card) !important; }
.bg-primary  { background: var(--bg-primary) !important; }
.bg-input    { background: var(--bg-input) !important; }

/* Border radius */
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded    { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Overflow */
.overflow-hidden  { overflow: hidden !important; }
.overflow-auto    { overflow: auto !important; }
.overflow-x-auto  { overflow-x: auto !important; }

/* Position */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.sticky   { position: sticky !important; }

/* Cursor */
.cursor-pointer  { cursor: pointer !important; }
.cursor-default  { cursor: default !important; }
.pointer-events-none { pointer-events: none !important; }

/* Border */
.border-0 { border: none !important; }
.border   { border: 1px solid var(--border-color) !important; }
.border-t { border-top: 1px solid var(--border-color) !important; }
.border-b { border-bottom: 1px solid var(--border-color) !important; }

/* Mono font */
.font-mono {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* =============================================================================
   47. WORDPRESS RESET â€” Ensure WP doesn't bleed into the app
   ============================================================================= */

#fortune-app a,
#fortune-app a:hover,
#fortune-app a:visited,
#fortune-app a:focus {
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}

#fortune-app button:focus,
#fortune-app input:focus,
#fortune-app select:focus,
#fortune-app textarea:focus {
  outline: none;
}

#fortune-app img {
  max-width: none;
  height: auto;
}

#fortune-app * {
  box-sizing: border-box;
}

/* Strip default WP paragraph margins */
#fortune-app p {
  margin: 0;
}

/* Prevent WP block styles bleeding in */
#fortune-app .wp-block,
#fortune-app .alignleft,
#fortune-app .alignright,
#fortune-app .aligncenter {
  all: unset;
}

/* =============================================================================
   48. SPECIAL EFFECTS
   ============================================================================= */

/* Glassmorphism overlay */
.fortune-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Gradient text */
.fortune-gradient-text {
  background: linear-gradient(135deg, var(--accent), #00f5c3, var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow effect */
.fortune-glow {
  box-shadow: var(--shadow-glow);
}

/* Dotted pattern background */
.fortune-pattern-bg {
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Gradient border */
.fortune-gradient-border {
  position: relative;
  border: none !important;
}

.fortune-gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent, var(--info));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Number counter animation */
.fortune-counter {
  display: inline-block;
  transition: all var(--transition-slow);
}

/* Highlight on value change */
@keyframes fortune-highlight {
  0%   { background-color: var(--accent-glow); }
  100% { background-color: transparent; }
}

.fortune-value-updated {
  animation: fortune-highlight 800ms ease forwards;
  border-radius: var(--radius-sm);
}

.fortune-value-decreased {
  animation: fortune-highlight 800ms ease forwards;
  --accent-glow: var(--danger-glow);
  border-radius: var(--radius-sm);
}

/* =============================================================================
   49. SWIPE ACTIONS (Mobile)
   ============================================================================= */

.fortune-swipe-container {
  position: relative;
  overflow: hidden;
}

.fortune-swipe-actions {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  transform: translateX(100%);
  transition: transform var(--transition);
}

.fortune-swipe-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  border: none;
}

.fortune-swipe-action-btn.delete {
  background: var(--danger);
}

.fortune-swipe-action-btn.edit {
  background: var(--info);
}

/* =============================================================================
   50. SCROLLABLE CHIP LIST
   ============================================================================= */

.fortune-chip-list {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.fortune-chip-list::-webkit-scrollbar {
  display: none;
}

.fortune-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}

.fortune-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.fortune-chip.active {
  background: var(--accent-glow);
  border-color: rgba(0, 212, 170, 0.3);
  color: var(--accent);
}

/* =============================================================================
   51. SECTION GRID LAYOUT
   ============================================================================= */

.fortune-section {
  margin-bottom: var(--space-8);
}

.fortune-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}

.fortune-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.fortune-section-action {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
}

.fortune-section-action:hover {
  opacity: 0.8;
}

.fortune-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .fortune-card-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   52. INLINE EDITING STATE
   ============================================================================= */

.fortune-editable {
  position: relative;
  cursor: text;
}

.fortune-editable:hover::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-hover);
  border-radius: var(--radius-full);
}

.fortune-editable:focus-within::after {
  background: var(--accent);
  height: 2px;
}

/* =============================================================================
   53. DATE RANGE PICKER WRAPPER
   ============================================================================= */

.fortune-date-range {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.fortune-date-input {
  flex: 1;
  min-width: 140px;
}

.fortune-date-separator {
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* =============================================================================
   54. KEYBOARD SHORTCUT BADGE
   ============================================================================= */

.fortune-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =============================================================================
   55. FLOATING ACTION BUTTON (Mobile)
   ============================================================================= */

.fortune-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: var(--space-4);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow), var(--shadow-lg);
  transition: all var(--transition);
  z-index: 90;
  border: none;
}

.fortune-fab:hover {
  transform: scale(1.08);
  background: var(--accent-hover);
}

.fortune-fab:active {
  transform: scale(0.95);
}

@media (min-width: 768px) {
  .fortune-fab {
    display: none;
  }
}

/* =============================================================================
   34. MISSING VIEW CLASSES â€” Added to match all JS templates
   ============================================================================= */

/* â”€â”€ Generic utilities â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-view { padding-bottom: 40px; }
.fortune-view-header { margin-bottom: 28px; }
.fortune-view-title-block { display: flex; align-items: center; gap: 12px; }
.fortune-view-title {
  font-size: 1.6rem; font-weight: 700; color: var(--text-primary);
  font-family: var(--font-heading); margin: 0; display: flex; align-items: center; gap: 10px;
}
.fortune-title-icon { color: var(--accent); display: flex; align-items: center; }
.fortune-text-accent { color: var(--accent); }
.fortune-text-danger { color: var(--danger); }
.fortune-text-right { text-align: right; }
.fortune-required { color: var(--danger); }
.fortune-error-msg { color: var(--danger); font-size: 0.82rem; margin: 6px 0 0; }
.fortune-stat-unit { font-size: 0.75rem; color: var(--text-muted); margin-left: 2px; }
.fortune-stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.fortune-stat-pct { font-size: 0.8rem; color: var(--text-muted); margin-left: 4px; }
.fortune-stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }

/* â”€â”€ Form components â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-form { display: flex; flex-direction: column; gap: 16px; }
.fortune-form-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px;
  padding-top: 16px; border-top: 1px solid var(--border-color);
}
.fortune-form-group--inline { display: flex; align-items: center; justify-content: space-between; }
.fortune-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fortune-input-wrap { position: relative; display: flex; align-items: center; }
.fortune-input-wrap .fortune-input { width: 100%; padding-right: 44px; }
.fortune-input-eye {
  position: absolute; right: 12px; background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; display: flex; align-items: center;
  transition: color var(--transition);
}
.fortune-input-eye:hover { color: var(--text-secondary); }
.fortune-input-amount { font-variant-numeric: tabular-nums; }
.fortune-input-pw { padding-right: 44px; }
.fortune-input-error-msg { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }
.fortune-input-sm { padding: 6px 10px; font-size: 0.82rem; }
.fortune-color-row { display: flex; align-items: center; gap: 10px; }
.fortune-color-value { font-size: 0.85rem; color: var(--text-secondary); font-family: var(--font-mono); }
.fortune-color-native {
  width: 40px; height: 32px; border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  background: var(--bg-input); cursor: pointer; padding: 2px;
}

/* â”€â”€ Icon button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: none; background: none;
  cursor: pointer; color: var(--text-secondary); transition: all var(--transition);
}
.fortune-icon-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.fortune-icon-btn-danger:hover { background: var(--danger-glow); color: var(--danger); }
.fortune-icon-btn-muted { color: var(--text-muted); }
.fortune-color-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  transition: all var(--transition);
}
.fortune-color-btn.active { border-color: white; transform: scale(1.2); }

/* â”€â”€ Toggle switch â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-toggle-btn {
  position: relative; width: 44px; height: 24px;
  background: var(--border-color); border: none; border-radius: 12px;
  cursor: pointer; transition: background var(--transition);
}
.fortune-toggle-btn.active { background: var(--accent); }
.fortune-toggle-knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: white; border-radius: 50%; transition: transform var(--transition);
  pointer-events: none;
}
.fortune-toggle-btn.active .fortune-toggle-knob { transform: translateX(20px); }
.fortune-toggle { /* alias */ }
.fortune-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }

/* â”€â”€ Warning / alert boxes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-warning-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warning-glow); border: 1px solid rgba(245,158,11,.25);
  border-radius: var(--radius-md); padding: 12px 14px; font-size: 0.85rem; color: var(--text-primary);
}
.fortune-warning-icon { color: var(--warning); flex-shrink: 0; margin-top: 1px; }
.fortune-danger-warning {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--danger-glow); border: 1px solid rgba(255,107,107,.25);
  border-radius: var(--radius-md); padding: 16px; font-size: 0.875rem;
}
.fortune-danger-icon { color: var(--danger); flex-shrink: 0; }
.fortune-lock-warning { background: var(--warning-glow); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; }

/* â”€â”€ Item / list rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-items-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.fortune-item-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-elevated); border-radius: var(--radius-md);
  border: 1px solid var(--border-color); transition: border-color var(--transition);
}
.fortune-item-row:hover { border-color: var(--border-hover); }
.fortune-item-name { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fortune-item-icon-label { font-size: 1.2rem; }
.fortune-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fortune-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fortune-cat-dot, .fortune-tag-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.fortune-tags-list { gap: 8px; }
.fortune-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 500;
  background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-color);
}

/* â”€â”€ Settings specific â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-settings-view { max-width: 840px; padding-bottom: 40px; }
.fortune-settings-body { display: flex; flex-direction: column; gap: 8px; }
.fortune-settings-section--danger { }
.fortune-settings-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; cursor: pointer; border-radius: var(--radius-md);
  border: 1px solid var(--border-color); background: var(--bg-card);
  transition: all var(--transition); user-select: none;
}
.fortune-settings-section-header:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.fortune-settings-section-body {
  padding: 16px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: flex; flex-direction: column; gap: 14px;
}
.fortune-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fortune-setting-label { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }
.fortune-setting-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.fortune-export-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.fortune-export-row:last-child { border-bottom: none; }
.fortune-import-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fortune-import-progress { margin-top: 8px; }
.fortune-about-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 0.875rem; }
.fortune-about-row:last-child { border-bottom: none; }

/* â”€â”€ Profile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-profile-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.fortune-profile-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.fortune-profile-avatar-placeholder {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-glow);
  color: var(--accent); font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(0,212,170,.25);
}
.fortune-profile-info { display: flex; flex-direction: column; gap: 2px; }
.fortune-profile-name { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.fortune-profile-email { font-size: 0.85rem; color: var(--text-muted); }

/* â”€â”€ Password / strength â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-strength-bar { height: 4px; background: var(--bg-elevated); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.fortune-strength-fill { height: 100%; border-radius: 2px; transition: width .3s, background .3s; }
.fortune-strength-label { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.fortune-pw-progress { padding: 16px 0; text-align: center; }
.fortune-pw-progress-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

/* â”€â”€ File input â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-file-label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); cursor: pointer; font-size: 0.85rem; color: var(--text-secondary);
  transition: all var(--transition);
}
.fortune-file-label:hover { border-color: var(--border-hover); color: var(--text-primary); }
.fortune-file-input { position: absolute; opacity: 0; width: 0; height: 0; }
.fortune-progress-bar-wrap { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.fortune-progress-bar-accent { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s ease; }
.fortune-import-result { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-md); font-size: 0.85rem; margin-top: 8px; }
.fortune-import-result--ok { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(0,212,170,.2); }
.fortune-import-result--error { background: var(--danger-glow); color: var(--danger); border: 1px solid rgba(255,107,107,.2); }

/* â”€â”€ Recurring row â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-recurring-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fortune-recurring-meta { font-size: 0.78rem; color: var(--text-muted); }
.fortune-recurring-row--inactive { opacity: 0.5; }

/* â”€â”€ Transactions view â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-transactions { }
.fortune-tx-view-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.fortune-tx-view-actions { display: flex; gap: 8px; align-items: center; }
.fortune-totals-bar {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
}
.fortune-total-chip { display: flex; align-items: center; gap: 6px; }
.fortune-total-chip-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.fortune-total-income { font-size: 0.95rem; font-weight: 700; color: var(--accent); }
.fortune-total-expense { font-size: 0.95rem; font-weight: 700; color: var(--danger); }
.fortune-total-balance { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.fortune-filter-panel {
  padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); margin-bottom: 16px;
}
.fortune-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.fortune-tx-groups { display: flex; flex-direction: column; gap: 16px; }
.fortune-tx-group { }
.fortune-tx-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; margin-bottom: 6px; border-bottom: 1px solid var(--border-color);
}
.fortune-tx-group-date { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.fortune-tx-group-total { font-size: 0.82rem; font-weight: 600; }
.fortune-tx-group-list { display: flex; flex-direction: column; gap: 2px; }
.fortune-tx-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-md); cursor: pointer; transition: background var(--transition);
}
.fortune-tx-row:hover { background: var(--bg-elevated); }
.fortune-tx-row-info { flex: 1; min-width: 0; }
.fortune-tx-row-label { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fortune-tx-row-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.fortune-tx-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.fortune-tx-meta-tag { font-size: 0.72rem; color: var(--text-muted); background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; }
.fortune-tx-note { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.fortune-tx-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.fortune-tx-cat-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.fortune-tx-inline-actions { display: flex; gap: 4px; }
.fortune-tx-empty { padding: 60px 24px; text-align: center; color: var(--text-muted); }
.fortune-tx-type-toggle { display: flex; gap: 8px; margin-bottom: 4px; }
.fortune-tx-type-btn {
  flex: 1; padding: 8px; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  background: var(--bg-input); color: var(--text-secondary); cursor: pointer;
  font-size: 0.85rem; font-weight: 500; transition: all var(--transition);
}
.fortune-tx-type-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.fortune-tx-type-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.fortune-tag-select-btn {
  padding: 4px 10px; border-radius: var(--radius-full); border: 1px solid var(--border-color);
  background: var(--bg-elevated); color: var(--text-secondary); cursor: pointer; font-size: 0.78rem;
}
.fortune-tag-select-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.fortune-tags-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.fortune-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.fortune-cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px;
  border: 1px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer;
  background: var(--bg-input); transition: all var(--transition);
}
.fortune-cat-item.active { border-color: var(--accent); background: var(--accent-glow); }
.fortune-cat-icon { font-size: 1.2rem; line-height: 1; }
.fortune-cat-name { font-size: 0.72rem; color: var(--text-secondary); text-align: center; }
.fortune-btn-danger-ghost { background: none; border-color: var(--danger); color: var(--danger); }
.fortune-btn-danger-ghost:hover { background: var(--danger-glow); }
.fortune-btn-xs { padding: 4px 8px; font-size: 0.75rem; height: auto; }
.fortune-skeleton-tx-item { height: 54px; border-radius: var(--radius-md); background: var(--bg-elevated); }

/* â”€â”€ Accounts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-accounts { }
.fortune-accounts-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.fortune-accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.fortune-acc-card {
  position: relative; overflow: hidden; cursor: pointer;
  transition: all var(--transition);
}
.fortune-acc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.fortune-acc-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.fortune-acc-card-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.fortune-acc-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.fortune-acc-name { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fortune-acc-balance { font-size: 1.4rem; font-weight: 700; line-height: 1.1; margin-bottom: 4px; }
.fortune-acc-actions-sheet { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-color); margin-top: 12px; }
.fortune-acc-action-btn { flex: 1; }
.fortune-acc-action-danger { color: var(--danger); border-color: var(--danger); }
.fortune-acc-edit-btn { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity var(--transition); }
.fortune-acc-card:hover .fortune-acc-edit-btn { opacity: 1; }
.fortune-accounts-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 24px; text-align: center; }
.fortune-accounts-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }
.fortune-skeleton-acc-card { height: 140px; border-radius: var(--radius-lg); background: var(--bg-elevated); }
.fortune-lock-warning { background: var(--warning-glow); border: 1px solid rgba(245,158,11,.2); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; }
.fortune-icon-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.fortune-spin { animation: fortune-spin .7s linear infinite; }
.fortune-tab-count { font-size: 0.72rem; background: var(--bg-elevated); padding: 1px 6px; border-radius: 10px; color: var(--text-muted); margin-left: 4px; }

/* â”€â”€ Loans â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-loans-view { }
.fortune-loans-list { display: flex; flex-direction: column; gap: 16px; }
.fortune-header-debt { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.fortune-debt-total { font-size: 1.6rem; font-weight: 700; color: var(--danger); }
.fortune-debt-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.fortune-stat-progress-wrap { margin-top: 8px; }
.fortune-loan-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fortune-loan-name { font-size: 1rem; font-weight: 600; color: var(--text-primary); flex: 1; }
.fortune-loan-lender { font-size: 0.82rem; color: var(--text-muted); }
.fortune-loan-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fortune-loan-balance-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.fortune-loan-balance-block { }
.fortune-loan-balance-block--right { text-align: right; }
.fortune-loan-balance-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.fortune-loan-original { font-size: 0.85rem; color: var(--text-secondary); }
.fortune-loan-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.fortune-loan-detail { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 8px 10px; }
.fortune-loan-progress-wrap { margin-bottom: 8px; }
.fortune-loan-progress-bar-bg { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.fortune-loan-progress-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.fortune-loan-progress-pct { font-size: 0.78rem; color: var(--text-muted); text-align: right; margin-top: 4px; }
.fortune-loan-amort-toggle { width: 100%; margin-top: 12px; }
.fortune-amort-table-wrap { overflow-x: auto; margin-top: 12px; }
.fortune-amort-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.fortune-amort-table th, .fortune-amort-table td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--border-color); }
.fortune-amort-table th { color: var(--text-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; }
.fortune-amort-table td:first-child, .fortune-amort-table th:first-child { text-align: left; }
.fortune-amort-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }
.fortune-loan-card--archived { opacity: 0.6; }
.fortune-archived-section { margin-top: 24px; }
.fortune-archived-list { display: flex; flex-direction: column; gap: 10px; }
.fortune-collapsed-toggle { margin-bottom: 12px; }
.fortune-modal-sheet--wide { max-width: 640px; }
.fortune-skeleton-card { height: 160px; border-radius: var(--radius-lg); background: var(--bg-elevated); }
.fortune-skeleton-list { display: flex; flex-direction: column; gap: 10px; }

/* â”€â”€ Reports â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-reports-view { }
.fortune-tab-panel { display: flex; flex-direction: column; gap: 20px; }
.fortune-custom-range { display: flex; align-items: center; gap: 8px; }
.fortune-range-sep { color: var(--text-muted); }
.fortune-table-wrap { overflow-x: auto; }
.fortune-chart-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; height: 180px; color: var(--text-muted); }
.fortune-chart-skeleton { height: 200px; border-radius: var(--radius-md); background: var(--bg-elevated); }
.fortune-skeleton-block { height: 80px; border-radius: var(--radius-md); background: var(--bg-elevated); }
.fortune-skeleton-block--chart { height: 200px; }
.fortune-skeleton-card--sm { height: 80px; border-radius: var(--radius-md); background: var(--bg-elevated); }
.fortune-empty-state--sm { padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.fortune-empty-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.fortune-insights-list { display: flex; flex-direction: column; gap: 10px; }
.fortune-insight-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.fortune-insight-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fortune-insight-label { font-size: 0.82rem; color: var(--text-muted); }
.fortune-insight-value { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.fortune-cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; flex-shrink: 0; }
.fortune-progress-bar-wrap--table { width: 80px; height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; }

/* â”€â”€ Tab buttons (fortune-tab-btn / fortune-period-btn) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-tab-btn {
  padding: 8px 18px; border-radius: var(--radius-md);
  border: 1px solid var(--border-color); background: var(--bg-input);
  color: var(--text-secondary); cursor: pointer; font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition); white-space: nowrap;
}
.fortune-tab-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.fortune-tab-btn.active {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent); font-weight: 600;
}
/* Inside a fortune-tabs pill container: no border, segment style */
.fortune-tabs .fortune-tab-btn {
  border: none; background: transparent; border-radius: var(--radius-sm); flex: 1; text-align: center;
}
.fortune-tabs .fortune-tab-btn.active {
  background: var(--bg-card); color: var(--text-primary); border: none;
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.fortune-tabs .fortune-tab-btn:hover:not(.active) { background: rgba(255,255,255,.04); }
.fortune-period-btn {
  padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-color); background: var(--bg-input);
  color: var(--text-muted); cursor: pointer; font-size: 0.8rem; font-weight: 500;
  transition: all var(--transition); white-space: nowrap;
}
.fortune-period-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.fortune-period-btn.active {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent);
}

/* â”€â”€ App shell â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-init-screen { display: flex; align-items: center; justify-content: center; height: 100%; background: var(--bg-primary); }
.fortune-loading-overlay { position: fixed; inset: 0; background: var(--bg-primary); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.fortune-loading-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.fortune-loading-message { font-size: 0.875rem; color: var(--text-muted); }
.fortune-logo-mark { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.fortune-logo-text { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.fortune-nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.fortune-nav-item { }
.fortune-nav-label { font-size: 0.875rem; font-weight: 500; }
.fortune-sidebar-spacer { flex: 1; }
.fortune-nav-dropdown-trigger {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  display: flex !important;
  align-items: center;
  gap: var(--space-3);
  padding: 9px var(--space-3);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  font-size: 0.875rem;
}
.fortune-nav-dropdown-trigger:hover {
  background: rgba(255,255,255,0.04) !important;
  color: var(--text-primary);
}
.fortune-nav-dropdown-trigger.active {
  background: var(--accent-glow) !important;
  color: var(--accent);
  font-weight: 600;
}
.fortune-nav-dropdown-trigger--tools:not(.active) {
  color: var(--accent);
}
.fortune-nav-chevron {
  margin-left: auto;
  display: flex;
  transition: transform var(--transition);
}
.fortune-nav-chevron.open {
  transform: rotate(90deg);
}
.fortune-nav-list--nested {
  margin: 2px 0 6px 14px;
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
}
.fortune-nav-list--nested .fortune-nav-link {
  padding-top: 7px;
  padding-bottom: 7px;
}
.fortune-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-glow); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; }
.fortune-user-info { display: flex; flex-direction: column; gap: 1px; }
.fortune-user-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.fortune-toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* For modals without a title â€” only show the close button */
.fortune-modal-close-only {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
/* â”€â”€ Modal dialog (desktop centered) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-modal-dialog {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), var(--glass-shine);
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 480px;
  position: relative;
  overflow: hidden;
  animation: fortune-scale-in 0.2s ease both;
}

.fortune-modal-dialog::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* â”€â”€ Modal sheet (mobile bottom drawer) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-modal-sheet {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  padding: 8px 24px 28px;
  width: 100%;
  position: relative;
}

.fortune-modal-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--border-hover);
  border-radius: 2px;
  margin: 0 auto 20px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   AppPanel â€” Side drawer (slides in from the right)
   Used for all create/edit forms across the app.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.fp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: flex-end;
}

.fp-drawer {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

@media (max-width: 640px) {
  .fp-drawer { max-width: 100%; }
}

.fp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-card);
}

.fp-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  font-family: var(--font-heading);
}

.fp-close {
  padding: 6px !important;
  color: var(--text-muted) !important;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.fp-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.fp-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: var(--bg-card);
}

/* Transition: overlay fades, drawer slides from right */
.fp-enter-active { transition: opacity 0.22s ease; }
.fp-leave-active { transition: opacity 0.18s ease; }
.fp-enter-from,
.fp-leave-to     { opacity: 0; }

.fp-enter-active .fp-drawer { transition: transform 0.24s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.fp-leave-active .fp-drawer { transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.fp-enter-from .fp-drawer,
.fp-leave-to   .fp-drawer   { transform: translateX(100%); }

/* Light mode overrides */
/* â”€â”€ Lock screen â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-lock-wrap { width: 100%; padding: 24px 16px; }
.fortune-lock-card { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 40px 36px; }
.fortune-lock-glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px); opacity: .35; }
.fortune-lock-glow-1 { width: 400px; height: 400px; background: radial-gradient(circle,rgba(0,212,170,.4) 0%,transparent 70%); top: -100px; left: -100px; }
.fortune-lock-glow-2 { width: 350px; height: 350px; background: radial-gradient(circle,rgba(139,92,246,.3) 0%,transparent 70%); bottom: -80px; right: -80px; }
.fortune-lock-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.fortune-lock-logo-text { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--text-primary); }
.fortune-lock-input-wrap { position: relative; display: flex; align-items: center; }
.fortune-lock-input-wrap .fortune-input { width: 100%; padding-right: 44px; }
.fortune-lock-eye { position: absolute; right: 12px; background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; display: flex; align-items: center; }
.fortune-lock-error { color: var(--danger); font-size: 13px; text-align: center; margin: 0 0 16px; padding: 10px 14px; background: var(--danger-glow); border-radius: var(--radius-sm); }
.fortune-lock-forgot { display: block; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 13px; text-align: center; margin-top: 18px; padding: 4px; text-decoration: none; }
.fortune-lock-forgot:hover { color: var(--accent); }
.fortune-lock-submit { width: 100%; height: 48px; font-size: 15px; font-weight: 600; margin-top: 8px; }
.fortune-lock-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: fortune-spin .7s linear infinite; display: inline-block; }
.fortune-auth-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: fortune-spin .7s linear infinite; }
@keyframes fortune-lock-shake { 0%,100%{transform:translateX(0)} 15%{transform:translateX(-6px)} 30%{transform:translateX(6px)} 45%{transform:translateX(-4px)} 60%{transform:translateX(4px)} 75%{transform:translateX(-2px)} 90%{transform:translateX(2px)} }
.fortune-lock-shake { animation: fortune-lock-shake .55s ease; }

/* â”€â”€ Theme switch (settings) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-theme-switch {
  position: relative; display: flex; align-items: center;
  width: 64px; height: 32px; border-radius: 16px; border: none; cursor: pointer;
  background: var(--bg-elevated); transition: background var(--transition);
  justify-content: space-between; padding: 0 8px;
}
.fortune-theme-switch.active { background: var(--accent); }
.fortune-theme-switch-icon { display: flex; align-items: center; color: var(--text-muted); z-index: 1; }
.fortune-theme-switch.active .fortune-theme-switch-icon { color: white; }
.fortune-theme-switch-knob {
  position: absolute; left: 4px; width: 24px; height: 24px;
  background: white; border-radius: 50%; transition: transform var(--transition);
  pointer-events: none; box-shadow: var(--shadow-sm);
}
.fortune-theme-switch.active .fortune-theme-switch-knob { transform: translateX(32px); }

/* â”€â”€ Icon (generic svg wrapper) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-icon { display: inline-flex; align-items: center; vertical-align: middle; }
.fortune-form-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }

/* =============================================================================
   GLOBAL SEARCH  âŒ˜K
   ============================================================================= */

.gs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 14, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.gs-dialog {
  width: 100%;
  max-width: 560px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  animation: fortune-scale-in 0.18s ease both;
}

.gs-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.gs-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  caret-color: var(--accent);
}

.gs-input::placeholder { color: var(--text-muted); }

.gs-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.gs-kbd-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.gs-results {
  list-style: none;
  padding: 6px;
  margin: 0;
  max-height: 360px;
  overflow-y: auto;
}

.gs-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.gs-result.active,
.gs-result:hover {
  background: var(--accent-glow);
}

.gs-result-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border-radius: 7px;
}

.gs-result-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gs-result-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gs-result-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.gs-result-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.gs-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.gs-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--glass-border);
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* =============================================================================
   SKELETON LOADERS
   ============================================================================= */

@keyframes fortune-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.fortune-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 800px 100%;
  animation: fortune-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.fortune-skeleton-text {
  height: 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.fortune-skeleton-text--sm  { height: 11px; width: 60%; }
.fortune-skeleton-text--lg  { height: 28px; width: 45%; }
.fortune-skeleton-text--xl  { height: 48px; width: 55%; }
.fortune-skeleton-card {
  border-radius: var(--radius-xl);
  height: 120px;
}
.fortune-skeleton-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Light mode skeleton */
/* =============================================================================
   IBAN COPY BUTTON
   ============================================================================= */

.fortune-iban-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fortune-iban-masked {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.fortune-iban-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid var(--glass-border);
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.fortune-iban-copy:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

/* â”€â”€ Section "Outils" mise en Ã©vidence â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-nav-section-label--tools {
  color: var(--accent) !important;
  display: flex; align-items: center; gap: 6px;
}
.fortune-nav-tools-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: ai-pulse 2s ease-in-out infinite;
}
.fortune-nav-list--tools {
  background: rgba(0,212,170,.03);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid rgba(0,212,170,.08);
  margin-bottom: 6px;
}
.fortune-nav-link--tools { border-radius: var(--radius-sm); }
.fortune-nav-link--tools:hover { background: rgba(0,212,170,.06); }
.fortune-nav-link--tools.active { background: rgba(0,212,170,.12); color: var(--accent); }

/* â”€â”€ Badge nav â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  color: var(--accent); background: var(--accent-glow);
  padding: 1px 5px; border-radius: 4px;
}

/* â”€â”€ User dropdown â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-user-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-lg); z-index: 100;
  animation: fortune-fade-in .15s ease;
}
@keyframes fortune-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================================================
   ITEM CARD â€” Composant partagÃ© (comptes, actifs, sociÃ©tÃ©s)
   Supporte dark/light mode via les variables CSS existantes.
   ============================================================================= */

.fortune-item-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.fortune-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}
.fortune-item-card__bar { height: 3px; flex-shrink: 0; }
.fortune-item-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fortune-item-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* Grid container shared */
.fortune-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 560px) { .fortune-items-grid { grid-template-columns: repeat(2, 1fr); } }

/* â”€â”€ Body helpers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fic-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.fic-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.fic-icon-lg {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 700; flex-shrink: 0;
}
.fic-meta {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 4px;
  flex: 1; min-width: 0;
}
.fic-badge {
  font-size: 0.675rem; font-weight: 600;
  padding: 2px 7px; border-radius: var(--radius-full);
  letter-spacing: 0.03em; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.fic-currency {
  font-size: 0.7rem; color: var(--text-muted);
  font-weight: 600; letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.fic-title {
  font-size: 0.9375rem; font-weight: 600;
  color: var(--text-primary); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fic-subtitle {
  font-size: 0.775rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.fic-value {
  font-size: 1.2rem; font-weight: 700;
  font-family: var(--font-heading); letter-spacing: -0.025em;
  margin-top: 8px; line-height: 1.1;
}
.fic-detail {
  font-size: 0.775rem; color: var(--text-secondary); margin-top: 3px;
}
.fic-gain {
  font-size: 0.8rem; font-weight: 600; margin-top: 2px;
}
.fic-note {
  font-size: 0.75rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 4px;
}
.fic-excluded {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.675rem; color: var(--text-muted); margin-top: 6px;
}
.fic-iban-row {
  display: flex; align-items: center; gap: 5px; margin-top: 4px;
}
.fic-iban {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); letter-spacing: 0.03em;
}
.fic-iban-copy {
  appearance: none; -webkit-appearance: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  padding: 2px; border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.fic-iban-copy:hover { color: var(--accent); }
.fic-stat-row { display: flex; gap: 20px; margin-top: 10px; }
.fic-stat-item { text-align: left; }
.fic-stat-val { font-size: 1.15rem; font-weight: 700; color: var(--accent); line-height: 1; }
.fic-stat-val--neutral { color: var(--text-primary); }
.fic-stat-lbl { font-size: 0.675rem; color: var(--text-muted); margin-top: 2px; }

/* Light mode overrides */
/* â”€â”€ Action buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fortune-ic-btn {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-secondary);
  font-size: 0.75rem; font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer; white-space: nowrap; line-height: 1;
  transition: all var(--transition);
}
.fortune-ic-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05) !important;
}
.fortune-ic-btn--edit:hover {
  color: var(--accent) !important;
  border-color: rgba(0,229,195,0.35) !important;
  background: var(--accent-glow) !important;
}
.fortune-ic-btn--archive:hover {
  color: #f59e0b !important;
  border-color: rgba(245,158,11,0.35) !important;
  background: rgba(245,158,11,0.08) !important;
}
.fortune-ic-btn--danger { margin-left: auto; }
.fortune-ic-btn--danger:hover {
  color: var(--danger) !important;
  border-color: rgba(255,107,107,0.35) !important;
  background: var(--danger-glow) !important;
}
.fortune-user-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: var(--font-sans);
  color: var(--text-secondary); transition: background var(--transition);
}
.fortune-user-menu-item:hover { background: var(--bg-card); }
.fortune-user-menu-item--danger { color: var(--danger); }
.fortune-user-menu-item--danger:hover { background: var(--danger-glow); }

/* =============================================================================
   END OF FORTUNE APP CSS
   ============================================================================= */

/* =============================================================================
   LOCK / SETUP SCREEN â€” ViewLock (fortune-lock.js)
   ============================================================================= */

.vl-wrap {
  position: relative;
  width: 100%; min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  background: #08080e;
  overflow: hidden;
}
.vl-bg-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.vl-bg-glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,170,.12) 0%, transparent 65%);
  top: -200px; left: -200px; filter: blur(60px);
}
.vl-bg-glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 65%);
  bottom: -150px; right: -150px; filter: blur(60px);
}
.vl-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: rgba(18,18,28,.95);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04) inset;
  animation: vl-in .45s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes vl-in {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.vl-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.vl-brand-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,212,170,.2) 0%, rgba(0,212,170,.08) 100%);
  border: 1px solid rgba(0,212,170,.25);
  display: flex; align-items: center; justify-content: center;
  color: #00d4aa;
}
.vl-brand-name {
  font-family: var(--font-heading, 'Syne', sans-serif);
  font-size: 18px; font-weight: 700; color: #f1f1f5; letter-spacing: -.2px;
}
.vl-title {
  font-family: var(--font-heading, 'Syne', sans-serif);
  font-size: 22px; font-weight: 700;
  color: #f1f1f5; margin: 0 0 8px; line-height: 1.2; letter-spacing: -.3px;
}
.vl-desc { font-size: 13px; color: #8b8ba8; line-height: 1.65; margin: 0 0 24px; }
.vl-label {
  display: block; font-size: 12px; font-weight: 600;
  color: #6b6b88; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.vl-field-wrap {
  position: relative; display: flex; align-items: stretch;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 14px;
}
.vl-field-wrap:focus-within {
  border-color: rgba(0,212,170,.5);
  box-shadow: 0 0 0 3px rgba(0,212,170,.1);
}
.vl-field-icon {
  padding: 0 0 0 14px; color: #4a4a6a; flex-shrink: 0;
  display: flex; align-items: center;
}
.vl-input {
  flex: 1; padding: 13px 10px; background: none; border: none; outline: none;
  color: #f1f1f5; font-size: 15px; font-family: var(--font-sans, 'DM Sans', sans-serif);
  letter-spacing: .5px; min-width: 0;
  box-shadow: none;
}
.vl-input:focus,
.vl-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}
.vl-input::placeholder { color: #3a3a5a; }
.vl-toggle-eye {
  padding: 0 14px; background: none; border: none; cursor: pointer;
  color: #4a4a6a; display: flex; align-items: center; flex-shrink: 0;
  transition: color .15s;
}
.vl-toggle-eye:hover { color: #8b8ba8; }
@keyframes vl-shake {
  0%,100% { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
}
.vl-shake { animation: vl-shake .4s ease; }
.vl-error {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(255,107,107,.07); border: 1px solid rgba(255,107,107,.18);
  border-radius: 10px; padding: 10px 12px;
  color: #ff6b6b; font-size: 13px; line-height: 1.5; margin-bottom: 14px;
}
.vl-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: #00d4aa; color: #0a0a12;
  font-family: var(--font-sans, 'DM Sans', sans-serif);
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: background .15s, transform .1s, opacity .15s;
}
.vl-btn:hover:not(:disabled) { background: #00c4a0; }
.vl-btn:active:not(:disabled) { transform: scale(.99); }
.vl-btn:disabled { opacity: .45; cursor: not-allowed; }
@keyframes vl-spin { to { transform: rotate(360deg); } }
.vl-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.2); border-top-color: rgba(0,0,0,.7);
  border-radius: 50%; animation: vl-spin .7s linear infinite; flex-shrink: 0;
}
.vl-sep {
  display: flex; align-items: center; gap: 10px; margin: 18px 0;
}
.vl-sep span:not(.vl-sep-text) { flex: 1; height: 1px; background: rgba(255,255,255,.07); }
.vl-sep-text { font-size: 12px; color: #4a4a6a; }
.vl-relogin {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: #6b6b88; font-size: 13px; text-decoration: none;
  padding: 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02);
  transition: color .15s, border-color .15s, background .15s;
  cursor: pointer; font-family: var(--font-sans, sans-serif); width: 100%;
}
.vl-relogin:hover { color: #00d4aa; border-color: rgba(0,212,170,.2); background: rgba(0,212,170,.04); }
.vl-security-badge {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 20px; font-size: 11px; color: #3a3a5a;
}
