/* ══════════════════════════════════════════════
   MI SEMANA — Mobile-first dark theme
   ══════════════════════════════════════════════ */

:root {
  --bg:        #0D1117;
  --surface:   #161B22;
  --surface2:  #21262D;
  --border:    #30363D;
  --text:      #E6EDF3;
  --muted:     #7D8590;

  --didi:      #FF6B35;
  --didi-bg:   rgba(255,107,53,0.13);
  --ist:       #3B82F6;
  --ist-bg:    rgba(59,130,246,0.13);
  --school:    #A78BFA;
  --school-bg: rgba(167,139,250,0.13);
  --blocked:   #4B5563;
  --blocked-bg:rgba(75,85,99,0.13);
  --morning:   #FBBF24;
  --morning-bg:rgba(251,191,36,0.13);
  --micro:     #34D399;
  --micro-bg:  rgba(52,211,153,0.13);
  --family:    #F472B6;
  --family-bg: rgba(244,114,182,0.13);
  --rest:      #818CF8;
  --rest-bg:   rgba(129,140,248,0.13);

  --success:   #10B981;
  --danger:    #EF4444;
  --warn:      #F59E0B;

  --radius:    14px;
  --radius-sm: 8px;
  --nav-h:     64px;
  --header-h:  52px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ══════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.login-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 32px 24px; width: 100%; max-width: 360px;
  text-align: center;
}
.login-emoji { font-size: 56px; line-height: 1; }
.login-content h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.login-sub { color: var(--muted); font-size: 14px; }

.btn-google {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  width: 100%; padding: 14px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background 0.15s;
}
.btn-google:hover { background: var(--surface2); }

.btn-offline {
  width: 100%; padding: 11px 20px;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--muted);
  font-size: 13px; cursor: pointer; transition: border-color 0.15s;
}
.btn-offline:hover { border-color: var(--muted); }

.login-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; flex-direction: column; gap: 1px; }
#header-weekday { font-size: 13px; font-weight: 600; text-transform: capitalize; }
#header-date { font-size: 11px; color: var(--muted); }
#header-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.goal-chip {
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  background: var(--surface); border-radius: 20px;
  color: var(--success);
}

/* ══════════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════════ */
#app-main {
  position: fixed;
  top: var(--header-h); bottom: var(--nav-h); left: 0; right: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.view { display: none; padding: 16px 16px 8px; animation: fadeIn 0.18s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ══════════════════════════════════════════════
   BLOCK CARDS — shared
   ══════════════════════════════════════════════ */
.block-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.block-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--block-color, var(--muted));
}

.block-card.featured {
  padding: 20px 16px 20px 20px;
  border-color: var(--block-color, var(--muted));
  background: color-mix(in srgb, var(--block-color, var(--muted)) 8%, var(--surface));
}

.block-now-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--success); background: rgba(16,185,129,0.12);
  border-radius: 4px; padding: 3px 8px;
  margin-bottom: 8px;
}
.block-type-badge {
  font-size: 11px; font-weight: 600;
  color: var(--block-color, var(--muted));
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.block-name {
  font-size: 17px; font-weight: 700; line-height: 1.3;
  margin-bottom: 4px;
}
.block-desc {
  font-size: 13px; color: var(--muted); line-height: 1.4;
  margin-bottom: 10px;
}
.block-time-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.block-time {
  font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.block-countdown {
  font-size: 12px; font-weight: 600;
  color: var(--block-color, var(--muted));
}
.btn-checkin {
  margin-top: 14px; width: 100%;
  padding: 13px; border-radius: var(--radius-sm);
  background: var(--block-color, var(--muted));
  border: none; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-checkin:active { opacity: 0.8; }

.block-card.done-card {
  opacity: 0.55;
}
.block-card.done-card::after {
  content: '✓';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--success);
}

/* Next card */
.next-card { border-style: dashed; }

/* Upcoming list */
#upcoming-list .block-card { padding: 12px 12px 12px 20px; }

/* Type colors helper */
.type-didi      { --block-color: var(--didi); }
.type-industech { --block-color: var(--ist); }
.type-school    { --block-color: var(--school); }
.type-blocked   { --block-color: var(--blocked); }
.type-morning   { --block-color: var(--morning); }
.type-micro     { --block-color: var(--micro); }
.type-family    { --block-color: var(--family); }
.type-rest      { --block-color: var(--rest); }

/* ══════════════════════════════════════════════
   SEMANA VIEW
   ══════════════════════════════════════════════ */
.week-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.week-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.week-btn:active { background: var(--surface2); }
.week-label-text { font-size: 15px; font-weight: 600; }

.week-day-section { margin-bottom: 20px; }
.week-day-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.week-day-name {
  font-size: 14px; font-weight: 700;
}
.week-day-date { font-size: 12px; color: var(--muted); }
.week-day-today .week-day-name { color: var(--ist); }

.week-block-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface); border-radius: var(--radius-sm);
  border-left: 3px solid var(--block-color, var(--muted));
  margin-bottom: 6px; cursor: pointer;
  transition: background 0.1s;
}
.week-block-row:active { background: var(--surface2); }
.week-block-time { font-size: 11px; color: var(--muted); min-width: 50px; font-variant-numeric: tabular-nums; }
.week-block-name { font-size: 13px; font-weight: 500; flex: 1; }
.week-block-done { font-size: 14px; color: var(--success); }
.week-block-income { font-size: 12px; color: var(--didi); font-weight: 600; }

/* ══════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════ */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.dash-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted); margin-bottom: 12px;
}

.goal-card { background: linear-gradient(135deg, var(--surface) 60%, rgba(16,185,129,0.06)); }
.goal-amounts { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.earned-amount { font-size: 32px; font-weight: 800; color: var(--success); letter-spacing: -1px; }
.goal-sep { font-size: 20px; color: var(--muted); }
.goal-amount { font-size: 20px; font-weight: 600; color: var(--muted); }

.goal-bar-track {
  height: 8px; background: var(--surface2);
  border-radius: 4px; overflow: hidden; margin-bottom: 6px;
}
.goal-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--success), #34D399);
  border-radius: 4px; transition: width 0.6s ease;
}
.goal-pct { font-size: 12px; color: var(--muted); }

.dash-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  margin-bottom: 12px;
}
.dash-mini-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 10px;
  text-align: center;
}
.didi-card { border-top: 3px solid var(--didi); }
.industech-card { border-top: 3px solid var(--ist); }
.other-card { border-top: 3px solid var(--muted); }
.mini-icon { font-size: 18px; margin-bottom: 4px; }
.mini-val { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.mini-label { font-size: 10px; color: var(--muted); }

.industech-stats { display: flex; align-items: center; }
.ist-stat { flex: 1; text-align: center; padding: 4px 0; }
.ist-val { font-size: 28px; font-weight: 800; color: var(--ist); }
.ist-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ist-divider { width: 1px; height: 48px; background: var(--border); }

.history-chart { display: flex; align-items: flex-end; gap: 6px; height: 80px; padding-top: 8px; }
.history-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.history-bar {
  width: 100%; background: var(--ist); border-radius: 4px 4px 0 0;
  min-height: 4px; transition: height 0.4s ease;
}
.history-bar-label { font-size: 10px; color: var(--muted); white-space: nowrap; }
.history-bar-val { font-size: 10px; color: var(--text); font-weight: 600; }

.projection-text { font-size: 18px; font-weight: 700; color: var(--success); }

/* ══════════════════════════════════════════════
   FINANZAS
   ══════════════════════════════════════════════ */
.fin-total { font-size: 36px; font-weight: 800; color: var(--success); letter-spacing: -1px; margin-bottom: 16px; }
.fin-split { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.split-col { text-align: center; padding: 12px 6px; border-radius: var(--radius-sm); }
.needs-col { background: rgba(59,130,246,0.1); }
.debt-col { background: rgba(239,68,68,0.1); }
.invest-col { background: rgba(16,185,129,0.1); }
.split-pct { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.needs-col .split-pct { color: var(--ist); }
.debt-col .split-pct { color: var(--danger); }
.invest-col .split-pct { color: var(--success); }
.split-amt { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.split-lbl { font-size: 10px; color: var(--muted); }

.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted); margin: 16px 0 10px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 10px; }

.debt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.debt-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.debt-name { font-size: 15px; font-weight: 700; }
.debt-rate { font-size: 12px; color: var(--danger); font-weight: 600; }
.debt-balance { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.debt-bar-track { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.debt-bar-fill { height: 100%; background: var(--danger); border-radius: 3px; transition: width 0.4s; }
.debt-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.debt-delete { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 2px 6px; }
.debt-delete:hover { color: var(--danger); }

.payoff-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.payoff-item:last-child { border-bottom: none; }
.payoff-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.payoff-months { font-size: 13px; color: var(--muted); }
.payoff-date { font-size: 12px; color: var(--success); font-weight: 600; }
.payoff-total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 14px; font-weight: 600; }

/* ══════════════════════════════════════════════
   AJUSTES
   ══════════════════════════════════════════════ */
.setting-row { display: flex; gap: 10px; align-items: center; }
.setting-input {
  flex: 1; padding: 12px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; outline: none; width: 100%;
}
.setting-input:focus { border-color: var(--ist); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.toggle-check { display: none; }
.toggle-slider {
  width: 46px; height: 26px; background: var(--border);
  border-radius: 13px; position: relative; transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-slider::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; background: #fff;
  border-radius: 50%; transition: transform 0.2s;
}
.toggle-check:checked + .toggle-slider { background: var(--success); }
.toggle-check:checked + .toggle-slider::after { transform: translateX(20px); }

.btn-save-small {
  padding: 12px 16px; background: var(--ist); border: none;
  border-radius: var(--radius-sm); color: #fff; font-size: 14px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-add-small {
  padding: 6px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text); font-size: 13px;
  cursor: pointer;
}
.btn-add-small:hover { background: var(--surface2); }

.user-info-text { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.btn-logout {
  width: 100%; padding: 12px; background: transparent;
  border: 1px solid var(--danger); border-radius: var(--radius-sm);
  color: var(--danger); font-size: 14px; font-weight: 600; cursor: pointer;
}
.app-version { text-align: center; font-size: 11px; color: var(--muted); margin-top: 24px; padding-bottom: 12px; }

/* ══════════════════════════════════════════════
   BOTTOM NAV
   ══════════════════════════════════════════════ */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); transition: color 0.15s;
  padding: 8px 0;
}
.nav-item.active { color: var(--ist); }
.nav-item:active { color: var(--text); }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-lbl { font-size: 10px; font-weight: 500; }

/* ══════════════════════════════════════════════
   CHECKIN MODAL — HEADER CON COLOR
   ══════════════════════════════════════════════ */
.checkin-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 8px 20px 16px; border-bottom: 3px solid var(--ist);
  flex-shrink: 0;
}
.checkin-header-left { flex: 1; }
.checkin-type-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 6px;
}
.checkin-header h3 { font-size: 18px; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.checkin-time-range { font-size: 12px; color: var(--muted); }

/* ══════════════════════════════════════════════
   GUÍA DE ACCIÓN — PASOS
   ══════════════════════════════════════════════ */
.guide-section { padding: 16px 0 0; }
.guide-subtitle {
  font-size: 13px; color: var(--muted); font-style: italic;
  margin-bottom: 14px; line-height: 1.5;
}
.guide-steps-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--muted); margin-bottom: 10px;
}
.guide-steps-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.guide-step {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  border: 1px solid transparent;
}
.guide-step:active { background: var(--surface2); }
.guide-step input[type="checkbox"] { display: none; }

.step-box {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  border: 2px solid var(--border); display: flex; align-items: center;
  justify-content: center; margin-top: 1px;
  transition: all 0.18s; color: transparent;
}
.guide-step input:checked ~ .step-box {
  background: var(--success); border-color: var(--success); color: #fff;
}
.guide-step input:checked ~ .step-text {
  text-decoration: line-through; color: var(--muted); opacity: 0.7;
}

.step-text {
  font-size: 13.5px; line-height: 1.55; color: var(--text);
  flex: 1; transition: all 0.18s;
}

.guide-tip {
  margin-top: 4px; margin-bottom: 4px;
  padding: 10px 14px;
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-sm); font-size: 12.5px;
  color: var(--morning); line-height: 1.5;
}

.guide-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 14px; color: var(--muted); font-size: 12px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.guide-divider::before, .guide-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* IndusTech fields grid */
.industech-fields-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.ist-field .setting-input { text-align: center; font-size: 18px; font-weight: 700; padding: 10px; }
.ist-field .modal-label { text-align: center; font-size: 11px; }

/* ══════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end;
  backdrop-filter: blur(4px);
}
.modal-sheet {
  width: 100%; max-height: 90vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

.modal-drag-handle {
  width: 36px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 12px auto 8px;
  flex-shrink: 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 20px 14px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: none;
  color: var(--muted); font-size: 16px; cursor: pointer;
}
.modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.modal-footer { padding: 12px 20px 20px; flex-shrink: 0; }

.modal-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.modal-section { margin-bottom: 16px; }
.modal-section.hidden { display: none; }
.modal-textarea {
  width: 100%; padding: 12px 14px; min-height: 80px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; resize: none; outline: none;
  font-family: inherit;
}
.modal-textarea:focus { border-color: var(--ist); }

.checkin-status-group {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  margin-bottom: 16px;
}
.status-btn {
  padding: 10px 6px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; text-align: center;
}
.status-btn.active {
  background: var(--ist); border-color: var(--ist);
  color: #fff;
}
.status-btn:active { opacity: 0.8; }

.money-input-wrap {
  display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.money-prefix {
  padding: 12px 12px 12px 14px;
  font-size: 18px; font-weight: 700; color: var(--success);
}
.money-input {
  flex: 1; padding: 12px 14px 12px 0;
  background: transparent; border: none;
  color: var(--text); font-size: 22px; font-weight: 700;
  outline: none; width: 100%;
}
.money-input-wrap:focus-within { border-color: var(--ist); }

.btn-primary {
  width: 100%; padding: 15px;
  background: var(--ist); border: none;
  border-radius: var(--radius); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:active { opacity: 0.85; }

.quick-debt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.debt-chip {
  padding: 6px 14px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--text); font-size: 13px; cursor: pointer;
}
.debt-chip:active { background: var(--ist); border-color: var(--ist); color: #fff; }

/* ══════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 32px 16px;
  color: var(--muted); font-size: 14px;
}
.empty-state-icon { font-size: 36px; margin-bottom: 8px; }

/* ══════════════════════════════════════════════
   HEADER — BACK + USER BUTTONS
   ══════════════════════════════════════════════ */
.btn-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-right: 8px; flex-shrink: 0;
  transition: background 0.15s;
}
.btn-back:active { background: var(--border); }

.btn-header-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-left: 6px; transition: color 0.15s, border-color 0.15s;
}
.btn-header-icon:active { color: var(--text); border-color: var(--muted); }

#header-title-group { display: flex; flex-direction: column; gap: 1px; }

/* ── USER SHEET ── */
.user-sheet-body {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 20px 8px; gap: 4px;
}
.user-sheet-avatar { font-size: 36px; margin-bottom: 4px; }
.user-sheet-name   { font-size: 16px; font-weight: 700; }
.user-sheet-email  { font-size: 13px; color: var(--muted); }
.user-sheet-badge  {
  margin-top: 6px; font-size: 12px; padding: 4px 12px;
  background: var(--surface2); border-radius: 20px;
  color: var(--muted); border: 1px solid var(--border);
}
.user-sheet-actions {
  padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 10px;
}
.btn-sheet-logout {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  width: 100%; padding: 13px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius); color: var(--danger);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.btn-sheet-logout:active { background: rgba(239,68,68,0.2); }
.btn-sheet-close {
  width: 100%; padding: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--muted);
  font-size: 14px; cursor: pointer;
}

/* ══════════════════════════════════════════════
   HOY — SUMMARY BAR + PILLS
   ══════════════════════════════════════════════ */
.hoy-summary-bar {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 12px; scrollbar-width: none;
}
.hoy-summary-bar::-webkit-scrollbar { display: none; }
.summary-chip {
  flex-shrink: 0; padding: 6px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--muted);
  white-space: nowrap;
}
.chip-btn {
  cursor: pointer; color: var(--ist); border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.08);
  transition: background 0.15s;
}
.chip-btn:active { background: rgba(59,130,246,0.18); }

.section-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 0 8px;
}
.pill-btn {
  font-size: 12px; padding: 5px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; color: var(--muted); cursor: pointer;
  transition: background 0.15s;
}
.pill-btn:active { background: var(--surface2); color: var(--text); }

.pill-btn-solid {
  font-size: 13px; padding: 8px 18px;
  background: var(--ist); border: none;
  border-radius: 20px; color: #fff; font-weight: 600; cursor: pointer;
}
.pill-btn-solid:active { opacity: 0.85; }

/* ══════════════════════════════════════════════
   DASHBOARD ACTIONS
   ══════════════════════════════════════════════ */
.dash-action-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.btn-dash-action {
  width: 100%; padding: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.btn-dash-action:active { background: var(--surface2); }

/* ══════════════════════════════════════════════
   FAB — FLOATING ACTION BUTTON
   ══════════════════════════════════════════════ */
.fab {
  position: fixed; right: 20px;
  bottom: calc(var(--nav-h) + 16px); z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ist); border: none; color: #fff;
  font-size: 26px; font-weight: 300; cursor: pointer;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.fab.fab-open { transform: rotate(45deg); background: var(--danger); }
.fab:active { opacity: 0.9; }

.fab-backdrop {
  position: fixed; inset: 0; z-index: 88;
  background: rgba(0,0,0,0.4);
}

.fab-menu {
  position: fixed; right: 20px;
  bottom: calc(var(--nav-h) + 80px); z-index: 89;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  animation: fabMenuIn 0.18s ease;
}
@keyframes fabMenuIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }

.fab-action {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 10px 16px; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3); color: var(--text);
  transition: background 0.15s;
}
.fab-action:active { background: var(--surface2); }
.fab-action-icon { font-size: 18px; }
.fab-action-label { font-size: 14px; font-weight: 500; white-space: nowrap; }

/* ══════════════════════════════════════════════
   INGRESO RÁPIDO MODAL
   ══════════════════════════════════════════════ */
.ingreso-type-row { display: flex; gap: 8px; }
.itype-btn {
  flex: 1; padding: 10px 6px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; text-align: center;
}
.itype-btn.active {
  background: var(--ist); border-color: var(--ist); color: #fff;
}
.itype-btn:active { opacity: 0.85; }

/* ══════════════════════════════════════════════
   SYNC BADGE
   ══════════════════════════════════════════════ */
.sync-badge {
  display: inline-block;
  font-size: 10px; padding: 2px 8px;
  border-radius: 10px; margin-left: 6px;
  background: rgba(16,185,129,0.15); color: var(--success);
}
.sync-badge.offline { background: rgba(245,158,11,0.15); color: var(--warn); }

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #f59e0b;
  color: #000;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  letter-spacing: 0.5px;
}
