/* ═══════════════════════════════════════════════════════════════════
   FELO MIND — LifeOS
   Stylesheet v1.0 | Mobile-First | Midnight HUD Theme
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────
   0. RESET & BOX MODEL
─────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; }


/* ───────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS — Midnight HUD System
─────────────────────────────────────────────────────────────────── */
:root {
  /* ── Paleta base ── */
  --bg-base:       #060A12;   /* Midnight: profundo como espacio */
  --bg-surface:    #0D1220;   /* Superficie de tarjetas */
  --bg-raised:     #111827;   /* Nivel elevado, inputs */
  --bg-overlay:    #1A2235;   /* Hover, selección */

  /* ── Acentos neón ── */
  --cyan:          #00F5FF;
  --cyan-dim:      #00C8D4;
  --cyan-glow:     rgba(0, 245, 255, 0.12);
  --cyan-glow-lg:  rgba(0, 245, 255, 0.22);
  --violet:        #BF00FF;
  --violet-dim:    #9900CC;
  --violet-glow:   rgba(191, 0, 255, 0.12);
  --green-neon:    #00FF88;
  --green-dim:     rgba(0, 255, 136, 0.15);
  --amber:         #FFB800;
  --red-alert:     #FF4566;
  --red-dim:       rgba(255, 69, 102, 0.15);

  /* ── Texto ── */
  --text-primary:  #E8F0FE;
  --text-secondary: #7B8BAD;
  --text-muted:    #4A566E;
  --text-inverse:  #060A12;

  /* ── Glassmorphism ── */
  --glass-bg:       rgba(13, 18, 32, 0.75);
  --glass-border:   rgba(0, 245, 255, 0.08);
  --glass-border-hover: rgba(0, 245, 255, 0.2);
  --glass-blur:     16px;

  /* ── Sombras ── */
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow-cyan: 0 0 24px rgba(0, 245, 255, 0.15);
  --shadow-glow-violet: 0 0 24px rgba(191, 0, 255, 0.2);
  --shadow-fab:    0 8px 32px rgba(0, 245, 255, 0.35);

  /* ── Tipografía ── */
  --font-sans:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   0.6875rem;   /* 11px */
  --text-sm:   0.8125rem;   /* 13px */
  --text-base: 0.9375rem;   /* 15px */
  --text-md:   1.0625rem;   /* 17px */
  --text-lg:   1.25rem;     /* 20px */
  --text-xl:   1.5rem;      /* 24px */
  --text-2xl:  2rem;        /* 32px */
  --text-3xl:  2.5rem;      /* 40px */

  /* ── Espaciado ── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;

  /* ── Radio ── */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 999px;

  /* ── Transiciones ── */
  --transition-fast:   120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   380ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Layout ── */
  --nav-height:       68px;
  --safe-bottom:      env(safe-area-inset-bottom, 0px);
  --page-padding:     var(--space-4);
}


/* ───────────────────────────────────────────────────────────────────
   2. UTILIDADES GLOBALES
─────────────────────────────────────────────────────────────────── */
.hidden        { display: none !important; }
.invisible     { visibility: hidden; }
.sr-only       { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.font-mono     { font-family: var(--font-mono); }
.text-cyan     { color: var(--cyan); }
.text-violet   { color: var(--violet); }
.text-green    { color: var(--green-neon); }
.text-amber    { color: var(--amber); }
.text-muted    { color: var(--text-secondary); }
.text-sm       { font-size: var(--text-sm); }
.text-xs       { font-size: var(--text-xs); }
.text-center   { text-align: center; }
.fw-500        { font-weight: 500; }
.fw-600        { font-weight: 600; }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2         { gap: var(--space-2); }
.gap-3         { gap: var(--space-3); }
.gap-4         { gap: var(--space-4); }

.w-full        { width: 100%; }
.mt-4          { margin-top: var(--space-4); }
.mb-4          { margin-bottom: var(--space-4); }


/* ───────────────────────────────────────────────────────────────────
   3. GLASSMORPHISM — Sistema base de tarjetas
─────────────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.glass--cyan {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
}

.glass--violet {
  border-color: rgba(191, 0, 255, 0.18);
  box-shadow: var(--shadow-card), var(--shadow-glow-violet);
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:active {
  border-color: var(--glass-border-hover);
}

.card__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.card__value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card__sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}


/* ───────────────────────────────────────────────────────────────────
   4. ANIMACIONES
─────────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 245, 255, 0.2); }
  50%       { box-shadow: 0 0 32px rgba(0, 245, 255, 0.45); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes barLoad {
  from { width: 0%; }
  to   { width: 85%; }
}

@keyframes dashProgress {
  to { stroke-dashoffset: 0; }
}

.anim-fade-in   { animation: fadeIn  var(--transition-slow) ease both; }
.anim-slide-up  { animation: slideUp var(--transition-slow) cubic-bezier(0.22, 1, 0.36, 1) both; }
.anim-scale-in  { animation: scaleIn var(--transition-base) ease both; }

/* Stagger para listas de tarjetas */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }

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


/* ───────────────────────────────────────────────────────────────────
   5. SPLASH SCREEN
─────────────────────────────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
  display: flex !important; /* override .hidden para que la transición funcione */
}

.splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.splash__logo {
  animation: pulseGlow 2s ease-in-out infinite;
  border-radius: var(--radius-full);
}

.splash__name {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.splash__bar {
  width: 160px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.splash__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: var(--radius-full);
  animation: barLoad 1.4s ease forwards;
}


/* ───────────────────────────────────────────────────────────────────
   6. PAGE LAYOUT — Contenedor de vistas
─────────────────────────────────────────────────────────────────── */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-4));
  animation: fadeIn var(--transition-slow) ease;
}

.page--centered {
  padding-bottom: 0;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

.page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--space-6) + env(safe-area-inset-top, 16px)) var(--page-padding) var(--space-4);
}

.page__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.page__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--page-padding);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page__scroll::-webkit-scrollbar { display: none; }

/* Grid de tarjetas 2 columnas */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.cards-grid--1 {
  grid-template-columns: 1fr;
}

.col-span-2 {
  grid-column: 1 / -1;
}


/* ───────────────────────────────────────────────────────────────────
   7. BOTTOM NAVIGATION
─────────────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(0, 245, 255, 0.06);
  z-index: 100;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-3);
  gap: 4px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  min-height: var(--nav-height);
  position: relative;
}

.nav-tab--center {
  pointer-events: none;
}

.nav-tab.active {
  color: var(--cyan);
}

.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--cyan);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 0 12px var(--cyan);
}

.nav-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.nav-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* ───────────────────────────────────────────────────────────────────
   8. FLOATING ACTION BUTTON — Chat IA
─────────────────────────────────────────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  z-index: 101;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  animation: pulseGlow 3s ease-in-out infinite;
}

.chat-fab svg {
  width: 24px;
  height: 24px;
  stroke: var(--bg-base);
}

.chat-fab:active {
  transform: translateX(-50%) scale(0.93);
  box-shadow: 0 4px 16px rgba(0, 245, 255, 0.25);
}


/* ───────────────────────────────────────────────────────────────────
   9. FORMULARIO DE LOGIN
─────────────────────────────────────────────────────────────────── */
.login-page {
  width: 100%;
  max-width: 400px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo {
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.login-logo__mark {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: rgba(0, 245, 255, 0.06);
  border: 1px solid rgba(0, 245, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-cyan);
}

.login-logo__mark svg {
  width: 32px;
  height: 32px;
}

.login-logo__name {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.login-logo__sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.01em;
}

/* Tabs Login / Registro */
.auth-tabs {
  display: flex;
  width: 100%;
  background: var(--bg-raised);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-6);
}

.auth-tab {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border-radius: calc(var(--radius-md) - 3px);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-align: center;
}

.auth-tab.active {
  background: var(--bg-overlay);
  color: var(--cyan);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Fields */
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.field__input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-raised);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}

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

.field__input:focus {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.08);
}

.field__input.error {
  border-color: var(--red-alert);
  box-shadow: 0 0 0 3px var(--red-dim);
}

.field__error {
  font-size: var(--text-xs);
  color: var(--red-alert);
  display: none;
}

.field__error.visible { display: block; }

/* Botones primarios */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  transition: all var(--transition-fast);
  cursor: pointer;
  outline: none;
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0099FF 100%);
  color: var(--bg-base);
  box-shadow: 0 4px 16px rgba(0, 245, 255, 0.25);
  width: 100%;
  padding: var(--space-4) var(--space-6);
}

.btn--primary:active {
  transform: scale(0.97);
  box-shadow: none;
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn--ghost:active {
  background: var(--bg-raised);
  color: var(--text-primary);
}

.btn--danger {
  color: var(--red-alert);
  background: var(--red-dim);
}

/* Spinner dentro de botón */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--bg-base);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn--loading .btn-spinner  { display: block; }
.btn--loading .btn-text     { display: none; }


/* ───────────────────────────────────────────────────────────────────
   10. DASHBOARD — HUD PRINCIPAL
─────────────────────────────────────────────────────────────────── */

/* Saludo de bienvenida */
.hud-greeting {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-5);
}

.hud-greeting__time {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hud-greeting__name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hud-greeting__name span {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Balance Hero ── */
.balance-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.balance-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0,245,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.balance-hero__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.balance-hero__amount {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.balance-hero__amount .currency {
  font-size: 0.5em;
  color: var(--text-secondary);
  vertical-align: super;
  margin-right: 2px;
}

.balance-split {
  display: flex;
  gap: var(--space-5);
}

.balance-split__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.balance-split__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.balance-split__value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Medidor circular de Energía ── */
.energy-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.gauge-ring {
  position: relative;
  width: 96px;
  height: 96px;
}

.gauge-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-ring__track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 6;
}

.gauge-ring__fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 251.2;  /* 2π × r(40) */
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px var(--cyan));
}

.gauge-ring__value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-ring__number {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}

.gauge-ring__unit {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.energy-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Tarjeta de gasto mensual ── */
.expense-card__bar-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-3);
}

.expense-card__bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Tarjeta de tarea prioritaria ── */
.task-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.task-chip--high   { background: rgba(255, 184, 0, 0.12); color: var(--amber); }
.task-chip--critical { background: var(--red-dim); color: var(--red-alert); }
.task-chip--medium { background: var(--cyan-glow); color: var(--cyan); }

.task-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin: var(--space-2) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Quick Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.stat-item {
  background: var(--bg-raised);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.stat-item__value {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
}

.stat-item__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Section Headings ── */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.section-heading__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.section-heading__action {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.04em;
}


/* ───────────────────────────────────────────────────────────────────
   11. CHAT DRAWER
─────────────────────────────────────────────────────────────────── */
.chat-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.chat-drawer:not([hidden]) {
  pointer-events: all;
}

.chat-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.chat-drawer:not([hidden]) .chat-drawer__backdrop {
  opacity: 1;
}

.chat-drawer__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 90dvh;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-slow) cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.chat-drawer:not([hidden]) .chat-drawer__panel {
  transform: translateY(0);
}

.chat-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(0,245,255,0.15), rgba(191,0,255,0.15));
  border: 1px solid rgba(0, 245, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--cyan);
}

.chat-header-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}

.chat-header-status {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-neon);
  box-shadow: 0 0 6px var(--green-neon);
  display: inline-block;
}

.chat-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.chat-close svg { width: 16px; height: 16px; }
.chat-close:active { background: var(--bg-overlay); color: var(--text-primary); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chat-messages::-webkit-scrollbar { display: none; }

.chat-msg {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  line-height: 1.5;
  position: relative;
  animation: slideUp 0.25s ease;
}

.chat-msg--ai {
  background: var(--bg-raised);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: var(--radius-sm);
  align-self: flex-start;
  color: var(--text-primary);
}

.chat-msg--user {
  background: linear-gradient(135deg, rgba(0,245,255,0.12), rgba(0,153,255,0.08));
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-bottom-right-radius: var(--radius-sm);
  align-self: flex-end;
  color: var(--text-primary);
}

.chat-msg__time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Indicador de "escribiendo" */
.chat-msg--typing .typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 18px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + var(--safe-bottom));
  border-top: 1px solid var(--glass-border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--bg-raised);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: 1.4;
  resize: none;
  outline: none;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color var(--transition-fast);
}

.chat-input:focus {
  border-color: rgba(0, 245, 255, 0.25);
}

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

.chat-send {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--cyan), #0099FF);
  color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 245, 255, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.chat-send svg { width: 18px; height: 18px; stroke: var(--bg-base); }
.chat-send:active { transform: scale(0.92); box-shadow: none; }


/* ───────────────────────────────────────────────────────────────────
   12. TOAST NOTIFICATIONS
─────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--space-4) + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: calc(100% - var(--space-8));
  max-width: 380px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-raised);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  animation: slideDown 0.3s ease;
  pointer-events: all;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.toast--success { border-left: 3px solid var(--green-neon); }
.toast--error   { border-left: 3px solid var(--red-alert); }
.toast--info    { border-left: 3px solid var(--cyan); }
.toast--warning { border-left: 3px solid var(--amber); }

.toast.fade-out {
  animation: fadeIn 0.3s ease reverse forwards;
}


/* ───────────────────────────────────────────────────────────────────
   13. SKELETON LOADERS
─────────────────────────────────────────────────────────────────── */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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

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

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg);
}


/* ───────────────────────────────────────────────────────────────────
   14. EMPTY STATES
─────────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-6);
  text-align: center;
}

.empty-state__icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state__sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}


/* ───────────────────────────────────────────────────────────────────
   15. RESPONSIVE — Tablet / Desktop (progresivo)
─────────────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  :root { --page-padding: var(--space-6); }
  .login-page { padding: var(--space-10); }
  .cards-grid { gap: var(--space-4); }
}

@media (min-width: 768px) {
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .chat-fab   { left: calc(50% + 120px); }
  .chat-drawer__panel { max-width: 480px; left: 50%; transform: translateX(-50%) translateY(100%); border-radius: var(--radius-xl); }
  .chat-drawer:not([hidden]) .chat-drawer__panel { transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   FELO MIND — Capa 5 Additions
   Agregar al FINAL de assets/css/style.css
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────
   16. MODAL GENÉRICO (Onboarding + Confirmaciones)
─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;          /* Sheet desde abajo en mobile */
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}

.modal-overlay--center {
  align-items: center;
  padding: var(--space-4);
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-6) var(--space-5);
  padding-bottom: calc(var(--space-6) + var(--safe-bottom));
  animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 92dvh;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.modal-overlay--center .modal {
  border-radius: var(--radius-xl);
  padding-bottom: var(--space-6);
  animation: scaleIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal__handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-5);
}

.modal__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.modal__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-5);
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* ───────────────────────────────────────────────────────────────────
   17. ONBOARDING — Selector de moneda/país
─────────────────────────────────────────────────────────────────── */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.currency-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-raised);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  text-align: left;
  position: relative;
}

.currency-option:active,
.currency-option:hover {
  background: var(--bg-overlay);
}

.currency-option.selected {
  border-color: var(--cyan);
  background: var(--cyan-glow);
}

.currency-option.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: var(--text-xs);
  color: var(--cyan);
  font-weight: 700;
}

.currency-option__flag {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.currency-option__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.currency-option__code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.currency-option__country {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ───────────────────────────────────────────────────────────────────
   18. VISTA FINANZAS — Componentes específicos
─────────────────────────────────────────────────────────────────── */

/* Header de balance con acción */
.finance-hero {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  position: relative;
  overflow: hidden;
}

.finance-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0,245,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.finance-hero__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.finance-hero__amount {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.finance-hero__splits {
  display: flex;
  gap: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--glass-border);
}

.finance-split {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.finance-split__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.finance-split__value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

/* Tabs de filtro */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: var(--space-4);
  -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--bg-raised);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-tab.active {
  background: var(--cyan-glow);
  border-color: rgba(0, 245, 255, 0.25);
  color: var(--cyan);
}

/* Lista de transacciones */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tx-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
  cursor: pointer;
}

.tx-item:active { border-color: var(--glass-border-hover); }

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

.tx-icon--expense { background: var(--red-dim); }
.tx-icon--income  { background: var(--green-dim); }

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

.tx-info__desc {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-info__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

.tx-amount {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  flex-shrink: 0;
}

.tx-amount--expense { color: var(--red-alert); }
.tx-amount--income  { color: var(--green-neon); }

/* Date separator */
.tx-date-sep {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) 0 var(--space-2);
}

/* Botones de acción rápida "+" */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.quick-action:active { transform: scale(0.96); opacity: 0.85; }

.quick-action--income {
  background: var(--green-dim);
  color: var(--green-neon);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.quick-action--expense {
  background: var(--red-dim);
  color: var(--red-alert);
  border: 1px solid rgba(255, 69, 102, 0.2);
}

/* Drawer de nueva transacción */
.tx-drawer {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
}

.tx-drawer:not([hidden]) { pointer-events: all; }

.tx-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.tx-drawer:not([hidden]) .tx-drawer__backdrop { opacity: 1; }

.tx-drawer__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 88dvh;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform var(--transition-slow) cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  scrollbar-width: none;
}

.tx-drawer:not([hidden]) .tx-drawer__panel {
  transform: translateY(0);
}

.tx-drawer__panel::-webkit-scrollbar { display: none; }

/* Type selector en drawer */
.type-selector {
  display: flex;
  background: var(--bg-raised);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-5);
}

.type-btn {
  flex: 1;
  padding: var(--space-2);
  border-radius: calc(var(--radius-md) - 3px);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
  text-align: center;
  color: var(--text-muted);
}

.type-btn.active--income {
  background: var(--bg-overlay);
  color: var(--green-neon);
}

.type-btn.active--expense {
  background: var(--bg-overlay);
  color: var(--red-alert);
}

/* Category pills en drawer */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.category-pill {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--bg-raised);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-pill.selected {
  background: var(--cyan-glow);
  border-color: rgba(0,245,255,0.3);
  color: var(--cyan);
}

/* Amount display grande */
.amount-display {
  text-align: center;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: var(--space-4);
}

.amount-display__value {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.amount-display__currency {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ───────────────────────────────────────────────────────────────────
   19. VISTA TRABAJO — Kanban y Proyectos
─────────────────────────────────────────────────────────────────── */

/* Proyectos: lista con color lateral */
.project-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-3);
  transition: border-color var(--transition-fast);
  cursor: pointer;
}

.project-card:active { border-color: var(--glass-border-hover); }

.project-card__stripe {
  width: 4px;
  flex-shrink: 0;
}

.project-card__body {
  flex: 1;
  padding: var(--space-4);
  min-width: 0;
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.project-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.project-card__client {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.project-card__progress-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.project-card__bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.project-card__bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

.project-card__pct {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 30px;
  text-align: right;
}

.project-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-badge--active   { background: var(--cyan-glow);   color: var(--cyan); }
.project-badge--on-hold  { background: rgba(255,184,0,.1); color: var(--amber); }
.project-badge--planning { background: var(--violet-glow); color: var(--violet); }
.project-badge--done     { background: var(--green-dim);   color: var(--green-neon); }

/* Kanban — Columnas horizontales con scroll */
.kanban {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--page-padding));
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

.kanban::-webkit-scrollbar { display: none; }

.kanban-col {
  flex-shrink: 0;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kanban-col__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-1);
}

.kanban-col__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kanban-col__count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  opacity: 0.7;
}

.kanban-col--todo     .kanban-col__header { background: rgba(123,139,173,0.08); color: var(--text-secondary); }
.kanban-col--progress .kanban-col__header { background: var(--cyan-glow); color: var(--cyan); }
.kanban-col--review   .kanban-col__header { background: rgba(255,184,0,0.08); color: var(--amber); }
.kanban-col--done     .kanban-col__header { background: var(--green-dim); color: var(--green-neon); }

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.kanban-card:active {
  border-color: var(--glass-border-hover);
  transform: scale(0.98);
}

.kanban-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.kanban-card__project {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
}

.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-dot--1 { background: var(--red-alert); box-shadow: 0 0 6px var(--red-alert); }
.priority-dot--2 { background: var(--amber); }
.priority-dot--3 { background: var(--cyan); }
.priority-dot--4 { background: var(--text-muted); }

/* Timer widget */
.timer-widget {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid rgba(0,245,255,0.15);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-glow-cyan);
}

.timer-widget__display {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.04em;
  line-height: 1;
  flex-shrink: 0;
}

.timer-widget__info {
  flex: 1;
  min-width: 0;
}

.timer-widget__task {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer-widget__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.timer-stop-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--red-dim);
  border: 1px solid rgba(255,69,102,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.timer-stop-btn:active { transform: scale(0.92); }

.timer-stop-btn svg { width: 14px; height: 14px; color: var(--red-alert); }

/* Task list diaria */
.task-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  transition: border-color var(--transition-fast);
}

.task-item--done {
  opacity: 0.5;
}

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--glass-border-hover);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.task-check.checked {
  background: var(--cyan);
  border-color: var(--cyan);
}

.task-check.checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--bg-base);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.task-item__title {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.task-item--done .task-item__title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-item__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Work tabs (Proyectos / Tareas / Kanban) */
.work-tabs {
  display: flex;
  background: var(--bg-raised);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-4);
}

.work-tab {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border-radius: calc(var(--radius-md) - 3px);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition-fast);
}

.work-tab.active {
  background: var(--bg-overlay);
  color: var(--cyan);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
