/* ============================================================
   FIJO — Estilos Principales (Rediseño Visual v3.0)
   Paleta: Verde esmeralda + Verde lima + Fondos oscuros premium
   Tipografías: Clash Display (headings) + Outfit (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Bebas+Neue&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');

/* ── Variables ── */
:root {
  --bg:           #F2FBF4;
  --surface:      #FFFFFF;
  --surface-2:    #EBF7EE;
  --border:       #C8E6CE;
  --text:         #0D2B14;
  --text-muted:   #4A7A56;
  --text-light:   #8DB59A;
  --primary:      #16A34A;
  --primary-dark: #15803D;
  --primary-glow: rgba(22,163,74,.13);
  --accent:       #84CC16;
  --accent-soft:  rgba(132,204,22,.13);
  --green:        #16A34A;
  --green-soft:   rgba(22,163,74,.12);
  --red:          #DC2626;
  --red-soft:     rgba(220,38,38,.11);
  --amber:        #D97706;
  --amber-soft:   rgba(217,119,6,.12);
  --sidebar-w:    265px;
  --radius:       18px;
  --radius-sm:    11px;
  --shadow:       0 4px 28px rgba(22,163,74,.09);
  --shadow-lg:    0 10px 44px rgba(22,163,74,.17);
  --transition:   all .25s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:           #071A0C;
  --surface:      #0D2418;
  --surface-2:    #142F1E;
  --border:       #1C4228;
  --text:         #E8FAF0;
  --text-muted:   #5BA874;
  --text-light:   #2A5C3A;
  --primary-glow: rgba(22,163,74,.22);
  --accent-soft:  rgba(132,204,22,.18);
  --shadow:       0 4px 24px rgba(0,0,0,.45);
  --shadow-lg:    0 10px 44px rgba(0,0,0,.65);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .3s, color .3s;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-brand {
  background: linear-gradient(150deg, #052E14 0%, #14532D 45%, #166534 75%, #15803D 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
/* Decorative circles */
.auth-brand::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(132,204,22,.18) 0%, transparent 70%);
  border-radius: 50%;
  top: -140px; left: -140px;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(22,163,74,.2) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -80px; right: -80px;
}
/* Extra decorative ring */
.auth-brand .deco-ring {
  display: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 3rem;
  z-index: 1;
}
.brand-logo .logo-icon {
  width: 56px; height: 56px;
  background: rgba(132,204,22,.25);
  border: 2px solid rgba(132,204,22,.4);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(10px);
  color: #BEFF6A;
}
.brand-logo span {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
}

.brand-tagline {
  z-index: 1;
  text-align: center;
  color: rgba(255,255,255,.93);
}
.brand-tagline h1 {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #FFFFFF 40%, #BEFF6A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-tagline p {
  font-size: 1rem;
  font-weight: 400;
  opacity: .8;
  max-width: 320px;
  line-height: 1.65;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-top: 3rem;
  z-index: 1;
}
.brand-feature {
  display: flex;
  align-items: center;
  gap: .85rem;
  color: rgba(255,255,255,.9);
  font-size: .9rem;
}
.brand-feature i {
  width: 30px; height: 30px;
  background: rgba(132,204,22,.2);
  border: 1px solid rgba(132,204,22,.35);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
  flex-shrink: 0;
  color: #BEFF6A;
}

/* ── Auth Panel ── */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--surface);
  overflow-y: auto;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-box h2 {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
  letter-spacing: -.8px;
}
.auth-box .subtitle {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 2.5rem;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: .45rem;
}
.form-group .input-wrap { position: relative; }
.form-group .input-wrap i {
  position: absolute;
  left: 1rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: .9rem;
  pointer-events: none;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .85rem 1rem .85rem 2.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-group input::placeholder { color: var(--text-light); }
.form-group input.no-icon,
.form-group select.no-icon { padding-left: 1rem; }

/* ── Alerts ── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .87rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .5rem;
}
.alert-error   { background: var(--red-soft);   color: var(--red);   border: 1px solid rgba(220,38,38,.2); }
.alert-success { background: var(--green-soft);  color: var(--green); border: 1px solid rgba(22,163,74,.2); }
.alert-info    { background: var(--primary-glow); color: var(--primary); border: 1px solid rgba(22,163,74,.2); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.85rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 700;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  letter-spacing: .2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #22C55E 100%);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 20px rgba(22,163,74,.38);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(22,163,74,.48);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-glow); }
.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: none;
  padding: .42rem .7rem;
  border-radius: 8px;
  font-size: .82rem;
}
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }

.auth-switch {
  text-align: center;
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.auth-switch a { color: var(--primary); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

/* Password toggle */
.pass-eye {
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-light);
  cursor: pointer; font-size: .9rem;
  padding: 0;
}
.pass-eye:hover { color: var(--primary); }

/* Strength bar */
.strength-bar  { height: 5px; border-radius: 99px; background: var(--border); margin-top: .4rem; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 99px; width: 0; transition: width .3s, background .3s; }
.strength-label { font-size: .74rem; color: var(--text-muted); margin-top: .3rem; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.5rem 1.5rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), #22C55E);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(22,163,74,.35);
}
.sidebar-logo span {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.6px;
  color: var(--text);
}
.sidebar-nav { flex: 1; padding: 1rem; overflow-y: auto; }
.nav-section-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  padding: .75rem .75rem .4rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .72rem .95rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
}
.nav-item i { width: 18px; text-align: center; font-size: .98rem; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
  border-left: 3px solid var(--primary);
}

.sidebar-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}
.user-card { display: flex; align-items: center; gap: .75rem; }
.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), #22C55E);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .9rem; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(22,163,74,.3);
}
.user-info .name   { font-size: .9rem; font-weight: 700; color: var(--text); }
.user-info .role   { font-size: .75rem; color: var(--text-muted); }

/* ── Main ── */
.main-content { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 70px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(22,163,74,.06);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-left h1 {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--text);
}
.menu-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.3rem; color: var(--text);
  padding: .4rem; border-radius: 8px;
}
.menu-toggle:hover { background: var(--surface-2); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.theme-toggle {
  width: 42px; height: 42px;
  border: none;
  background: var(--surface-2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-muted);
  transition: var(--transition);
}
.theme-toggle:hover { background: var(--primary-glow); color: var(--primary); }

.page-body { padding: 2rem; flex: 1; }

/* ── Sections ── */
.section { display: none; }
.section.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.3rem;
  margin-bottom: 1.8rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; }
.stat-card.income::before  { background: linear-gradient(90deg, var(--green), #86EFAC); }
.stat-card.expense::before { background: linear-gradient(90deg, var(--red), #FCA5A5); }
.stat-card.balance::before { background: linear-gradient(90deg, var(--primary), #22C55E); }
.stat-card.savings::before { background: linear-gradient(90deg, var(--amber), #FCD34D); }
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: .25rem;
}
.stat-card.income  .stat-icon { background: var(--green-soft);   color: var(--green); }
.stat-card.expense .stat-icon { background: var(--red-soft);     color: var(--red); }
.stat-card.balance .stat-icon { background: var(--primary-glow); color: var(--primary); }
.stat-card.savings .stat-icon { background: var(--amber-soft);   color: var(--amber); }
.stat-label {
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted);
}
.stat-value {
  font-family: 'Bebas Neue', 'DM Mono', monospace;
  font-size: 2.2rem; font-weight: 400;
  letter-spacing: 1.5px; line-height: 1; color: var(--text);
}
.stat-sub { font-size: .78rem; color: var(--text-light); }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-title {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 700; color: var(--text);
  letter-spacing: -.3px;
}

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.3rem; }

/* ── Movement Items ── */
.filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filter-bar select,
.filter-bar input[type="date"] {
  padding: .52rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text); font-size: .87rem;
  outline: none; transition: var(--transition);
}
.filter-bar select:focus,
.filter-bar input[type="date"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

.movements-list { display: flex; flex-direction: column; gap: .6rem; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.movement-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .95rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.movement-item:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.mv-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.mv-icon.income  { background: var(--green-soft); color: var(--green); }
.mv-icon.expense { background: var(--red-soft);   color: var(--red); }
.mv-info { flex: 1; min-width: 0; }
.mv-desc { font-weight: 700; font-size: .88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-meta { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.mv-amount { font-family: 'Bebas Neue', 'DM Mono', monospace; font-size: 1.1rem; font-weight: 400; letter-spacing: 1px; white-space: nowrap; }
.mv-amount.income  { color: var(--green); }
.mv-amount.expense { color: var(--red); }

/* Empty state */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; opacity: .2; display: block; margin-bottom: .85rem; }
.empty-state p { font-size: .88rem; }

/* ── Form Movement ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.type-btn {
  padding: .75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  font-size: .87rem; font-weight: 700;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.type-btn:hover { border-color: var(--text-light); }
.type-btn.income.active  { background: var(--green-soft);  border-color: var(--green);  color: var(--green); }
.type-btn.expense.active { background: var(--red-soft);    border-color: var(--red);    color: var(--red); }

/* ── Goals ── */
.goal-item {
  margin-bottom: 1.2rem; padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.goal-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.goal-header { display: flex; justify-content: space-between; margin-bottom: .5rem; align-items: center; }
.goal-name { font-weight: 700; font-size: .9rem; }
.goal-amounts { font-family: 'Bebas Neue', 'DM Mono', monospace; font-size: .88rem; letter-spacing: .8px; color: var(--text-muted); }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: .5rem; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #22C55E); transition: width .8s cubic-bezier(.4,0,.2,1); }
.progress-fill.green { background: linear-gradient(90deg, var(--green), #4ADE80); }
.progress-fill.amber { background: linear-gradient(90deg, var(--amber), #FCD34D); }
.goal-pct { font-size: .76rem; color: var(--text-muted); margin-top: .3rem; text-align: right; }

/* ── Top Categories ── */
.category-rank { display: flex; flex-direction: column; gap: .7rem; }
.cat-item { display: flex; align-items: center; gap: .85rem; }
.cat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.cat-info { flex: 1; }
.cat-name { font-size: .83rem; font-weight: 700; }
.cat-bar-wrap { height: 5px; background: var(--surface-2); border-radius: 99px; margin-top: 3px; }
.cat-bar { height: 100%; border-radius: 99px; }
.cat-amount { font-family: 'Bebas Neue', 'DM Mono', monospace; font-size: .95rem; font-weight: 400; letter-spacing: .8px; color: var(--red); white-space: nowrap; }

/* ── Charts ── */
.chart-wrap { position: relative; width: 100%; height: 250px; }

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .6rem; z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: .87rem; font-weight: 600; color: var(--text);
  min-width: 240px;
  animation: toastIn .35s ease;
  transition: opacity .3s, transform .3s;
}
.toast.hide { opacity: 0; transform: translateX(100%); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast i { font-size: 1.05rem; }
.toast.success i { color: var(--green); }
.toast.error   i { color: var(--red); }
.toast.info    i { color: var(--primary); }

/* ── Settings ── */
.settings-section { margin-bottom: 2rem; }
.settings-section h3 {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 700; margin-bottom: 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--border);
  letter-spacing: -.3px;
}
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: .9rem; font-weight: 600; }
.setting-desc  { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.toggle-switch { position: relative; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 99px; cursor: pointer; transition: .3s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; left: 3px; top: 3px; transition: .3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.tag { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .7rem; background: var(--primary-glow); color: var(--primary); border-radius: 99px; font-size: .78rem; font-weight: 700; }
.tag button { background: none; border: none; color: var(--primary); font-size: .75rem; line-height: 1; padding: 0; cursor: pointer; }
.tag-add-row { display: flex; gap: .5rem; }
.tag-add-row input { flex: 1; padding: .5rem .85rem; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: .87rem; outline: none; }
.tag-add-row input:focus { border-color: var(--primary); }

/* Sidebar overlay (mobile) */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; }

/* Badges */
.badge { display: inline-block; padding: .18rem .55rem; border-radius: 99px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red   { background: var(--red-soft);   color: var(--red); }

/* Helpers */
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.w-full { width: 100%; }

/* Logo móvil en formulario de login */
.mobile-brand-header {
  display: none;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
}
.mobile-brand-header span {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
}
@media (max-width: 768px) {
  .mobile-brand-header { display: flex; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 2rem 1.25rem; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay { display: block; }
  .sidebar-overlay.hidden { display: none; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .page-body { padding: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── ESTILOS v2.1 (compatibilidad total sin cambiar funcionalidad) ── */

/* Badge azul para Ahorro */
.badge-blue { background: rgba(22,163,74,.15); color: #16A34A; }

/* Botón tipo ahorro en selector */
.type-btn.saving { border-color: var(--accent); color: #5A8500; }
.type-btn.saving.active,
.type-btn.saving:hover { background: var(--accent-soft); color: #3F6200; border-color: var(--accent); }

/* Ícono del movimiento tipo ahorro */
.mv-icon.saving { background: var(--accent-soft); color: #5A8500; }

/* Monto de tipo ahorro */
.mv-amount.saving { color: #5A8500; }

/* Ajuste del selector de tipo para que quepan 3 botones */
.type-selector { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; margin-bottom: 1.25rem; }

/* Tarjeta CTA de movimiento */
.cta-movement-card { cursor: default; }

/* Etiqueta de sección de estado de cuenta */
.account-status-label {
  font-family: 'Clash Display', 'Outfit', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: .6rem;
}
