/* ═══════════════════════════════════════════════════════════════════
   Aquandes Operaciones — Premium UI
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Tokens ──────────────────────────────────────────────────────── */
:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-900: #0c4a6e;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --green-50: #f0fdf4;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --amber-50: #fffbeb;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --orange-500: #f97316;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --teal-500: #14b8a6;
  --indigo-500: #6366f1;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
}

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

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

body {
  font-family: var(--font);
  background: var(--slate-100);
  color: var(--slate-800);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

input, textarea, select, button {
  font-family: var(--font);
  font-size: 16px;
}

/* ─── Pantallas ───────────────────────────────────────────────────── */
.pantalla { display: none; min-height: 100vh; }
.pantalla.activa { display: block; }
.oculto { display: none !important; }

/* ─── Contenido / scroll ──────────────────────────────────────────── */
.contenido {
  padding: 12px 16px 32px;
  max-width: 480px;
  margin: 0 auto;
}
.screen-content {
  padding: 16px 16px 32px;
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Topbar ──────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 16px;
  background: white;
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.topbar span {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-800);
  text-align: center;
}
.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--slate-100);
  border-radius: 10px;
  color: var(--slate-600);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-back:active { background: var(--slate-200); }
.btn-back svg { width: 18px; height: 18px; }
.paso-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-600);
  background: var(--blue-50);
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* App topbar (home) */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: white;
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.app-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-topbar-logo {
  width: 22px;
  height: 22px;
  color: var(--sky-600);
}
.app-topbar-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-topbar-actions { display: flex; gap: 6px; }
.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--slate-100);
  border-radius: 10px;
  color: var(--slate-500);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.topbar-btn svg { width: 18px; height: 18px; }
.topbar-btn:active { background: var(--slate-200); }
.topbar-btn-exit:active { background: #fee2e2; color: var(--red-500); }

/* ─── Progress bar ────────────────────────────────────────────────── */
.progreso-bar {
  height: 3px;
  background: var(--slate-200);
}
.progreso-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sky-500), var(--sky-400));
  transition: width .4s ease;
}

/* ─── Cards ───────────────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
}
.card-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 14px;
}
.card-sub {
  font-size: 13px;
  color: var(--slate-500);
  margin: -10px 0 14px;
}
.card-icon-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  margin-bottom: 12px;
}
.card-icon-header svg { width: 22px; height: 22px; }
.card-icon--blue { background: #eff6ff; color: var(--blue-600); }
.card-icon--indigo { background: #eef2ff; color: var(--indigo-500); }
.card-icon--amber { background: #fffbeb; color: var(--amber-500); }
.card-icon--sky { background: #f0f9ff; color: var(--sky-600); }
.card-icon--orange { background: #fff7ed; color: var(--orange-500); }
.card-icon--red { background: #fef2f2; color: var(--red-500); }
.card-icon--teal { background: #f0fdfa; color: var(--teal-500); }

/* ─── Form fields ─────────────────────────────────────────────────── */
.field-group { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 6px;
}
.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field-icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  color: var(--slate-400);
  pointer-events: none;
}
.field-icon svg { width: 17px; height: 17px; }
.field-input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 40px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--slate-800);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.field-input:not(.field-input-wrap .field-input) {
  padding: 0 14px;
}
.field-input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
.field-input::placeholder { color: var(--slate-400); }
.field-eye {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 6px;
}
.field-eye svg { width: 17px; height: 17px; }
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--slate-800);
  font-size: 15px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color .2s;
}
.field-textarea:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.field-textarea::placeholder { color: var(--slate-400); }

select.field-input { padding-left: 14px; cursor: pointer; }
.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--slate-400);
  pointer-events: none;
}
.select-wrapper select {
  width: 100%;
  height: 46px;
  padding: 0 36px 0 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--slate-800);
  font-size: 15px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .2s;
}
.select-wrapper select:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--sky-600), var(--sky-700));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(3,105,161,.3);
  transition: transform .1s, box-shadow .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary:active { transform: scale(.98); box-shadow: 0 2px 6px rgba(3,105,161,.25); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: white;
  color: var(--slate-700);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-secondary:active { background: var(--slate-50); }

.btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  background: transparent;
  color: var(--sky-600);
  border: 1.5px solid var(--sky-300, #7dd3fc);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-outline:active { background: #f0f9ff; }

.btn-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--slate-500);
  font-size: 13px;
  text-align: center;
  padding: 8px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Login screen ────────────────────────────────────────────────── */
#pantalla-inicio {
  background: linear-gradient(160deg, var(--sky-900) 0%, var(--sky-700) 55%, var(--sky-500) 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.login-bubbles span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.login-bubbles span:nth-child(1) { width: 280px; height: 280px; top: -80px; right: -60px; }
.login-bubbles span:nth-child(2) { width: 180px; height: 180px; bottom: 100px; left: -50px; }
.login-bubbles span:nth-child(3) { width: 120px; height: 120px; top: 40%; right: -30px; }

.login-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 48px 20px 32px;
  max-width: 400px;
  margin: 0 auto;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.login-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.login-logo svg { width: 100%; height: 100%; }
.login-brand-text { display: flex; flex-direction: column; }
.login-brand-name {
  font-size: 24px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}
.login-brand-sub {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  font-weight: 500;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
  flex: 1;
}
.login-card-header { margin-bottom: 20px; }
.login-card-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}
.login-card-header p {
  font-size: 13px;
  color: var(--slate-500);
}

/* User chip */
.login-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
}
.login-user-chip svg { width: 16px; height: 16px; color: var(--slate-400); flex-shrink: 0; }
.login-user-chip span { flex: 1; }
.chip-change {
  background: none;
  border: none;
  color: var(--sky-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* First login badge */
.first-login-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.first-login-badge svg { width: 16px; height: 16px; flex-shrink: 0; }

.recover-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 10px;
}
.recover-text {
  font-size: 13px;
  color: var(--slate-600);
  margin-bottom: 10px;
  line-height: 1.5;
}
.recover-msg {
  font-size: 13px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
}
.recover-msg.ok { background: #d1fae5; color: #065f46; }
.recover-msg.err { background: #fee2e2; color: #991b1b; }

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
}

.login-footer {
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  margin-top: 20px;
  text-transform: capitalize;
}

/* ─── Home / Tipo ─────────────────────────────────────────────────── */
.home-content {
  padding: 16px 16px 32px;
  max-width: 480px;
  margin: 0 auto;
}
.home-greeting {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-500);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 18px;
  padding: 18px 16px 16px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.action-card:active { transform: scale(.97); box-shadow: none; }
.action-icon {
  margin-bottom: 12px;
}
.action-icon svg {
  width: 48px;
  height: 48px;
}
.action-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--slate-800);
  line-height: 1.3;
  margin-bottom: 4px;
}
.action-desc {
  font-size: 12px;
  color: var(--slate-500);
  line-height: 1.4;
}
.action-done {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
}
.action-done svg { width: 16px; height: 16px; flex-shrink: 0; }
.action-lock {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-400);
}
.action-lock svg { width: 13px; height: 13px; }

/* Card color accents */
.action-card--checklist { color: var(--blue-600); }
.action-card--checklist::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--sky-400));
  border-radius: 18px 18px 0 0;
}
.action-card--mant { color: #d97706; }
.action-card--mant::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber-500), #fbbf24);
  border-radius: 18px 18px 0 0;
}
.action-card--carga { color: var(--teal-500); }
.action-card--carga::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-500), #5eead4);
  border-radius: 18px 18px 0 0;
}
.action-card--descarga { color: var(--indigo-500); }
.action-card--descarga::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo-500), #818cf8);
  border-radius: 18px 18px 0 0;
}

.action-card--locked {
  opacity: .7;
  cursor: not-allowed;
}
.action-card.tipo-card-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.action-card.tipo-card-mant-done {
  border-color: #fde68a;
  background: #fffbeb;
}
.action-card.tipo-card-descarga-done {
  border-color: #c7d2fe;
  background: #eef2ff;
}

/* Messages */
.tipo-msg {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #713f12;
  margin-bottom: 12px;
}

/* Cumpleaños */
.cumple-aviso {
  background: linear-gradient(90deg, #fdf4ff, #fce7f3);
  border-bottom: 1px solid #e9d5ff;
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cumple-label { font-weight: 700; color: #7c3aed; margin-right: 4px; }
.cumple-entry { display: flex; align-items: center; gap: 5px; }
.cumple-pastel { font-size: 16px; }
.cumple-nombre { font-weight: 600; color: #1e1b4b; }
.cumple-fecha { font-size: 12px; color: #6b7280; }
.cumple-badge { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.cumple-badge-hoy { background: #7c3aed; color: white; }
.cumple-badge-pronto { background: #ddd6fe; color: #4c1d95; }
.cumple-badge-dias { background: #e0e7ff; color: #3730a3; }
.cumple-sep { color: #d1d5db; margin: 0 4px; }

/* ─── Checklist radios ────────────────────────────────────────────── */
.check-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
}
.check-row:last-child { border-bottom: none; }
.check-row-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
}
.check-row-label svg { width: 16px; height: 16px; color: var(--slate-400); flex-shrink: 0; }
.radio-group {
  display: flex;
  gap: 8px;
}
.radio-group-2 { gap: 8px; }
.radio-pill { display: none; }
.radio-pill { }
.radio-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--slate-200);
  background: var(--slate-50);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.radio-pill input[type="radio"] { display: none; }
.radio-pill:has(input:checked) { border-width: 2px; }
.radio-pill--ok:has(input:checked) { background: #f0fdf4; border-color: #16a34a; color: #15803d; }
.radio-pill--warn:has(input:checked) { background: #fffbeb; border-color: #d97706; color: #b45309; }
.radio-pill--err:has(input:checked) { background: #fef2f2; border-color: #dc2626; color: #b91c1c; }

/* ─── Photos ──────────────────────────────────────────────────────── */
.fotos-header-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.fotos-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #f0f9ff;
  border-radius: 11px;
  color: var(--sky-600);
  flex-shrink: 0;
}
.fotos-header-icon svg { width: 22px; height: 22px; }
.fotos-header-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fotos-header-text strong { font-size: 14px; color: var(--slate-800); }
.fotos-header-text span { font-size: 12px; color: var(--slate-500); }
.fotos-counter {
  font-size: 20px;
  font-weight: 800;
  color: var(--sky-600);
  flex-shrink: 0;
}

.grid-fotos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.foto-item { }
.foto-preview {
  position: relative;
  aspect-ratio: 1;
  background: white;
  border: 2px dashed var(--slate-300);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.foto-preview:active { background: var(--slate-50); }
.foto-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
}
.foto-svg-icon {
  width: 72px;
  height: 54px;
  color: var(--sky-500);
  margin-bottom: 4px;
}
.foto-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-700);
  text-align: center;
  line-height: 1.3;
}
.foto-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--slate-400);
}
.foto-sub svg { width: 12px; height: 12px; }
.preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.foto-ok {
  position: absolute;
  top: 6px;
  right: 6px;
}
.foto-ok svg { width: 28px; height: 28px; }
.input-file {
  display: none;
}

/* When photo is done */
.foto-preview:has(.preview-img:not(.oculto)) {
  border-style: solid;
  border-color: #16a34a;
}

.btn-enviar-fotos {
  width: 100%;
  height: 54px;
  font-size: 16px;
}

/* ─── Success ─────────────────────────────────────────────────────── */
.exito-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}
.exito-ring { margin-bottom: 20px; }
.exito-ring svg { width: 80px; height: 80px; }
.exito-titulo {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-800);
  margin-bottom: 8px;
}
.exito-msg {
  font-size: 15px;
  color: var(--slate-500);
  margin-bottom: 16px;
}
.exito-detalle {
  background: var(--slate-50);
  border-left: 3px solid var(--sky-500);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  color: var(--slate-700);
  width: 100%;
  margin-bottom: 20px;
}
.exito-detalle p { margin-bottom: 4px; }
.exito-detalle p:last-child { margin-bottom: 0; }
.exito-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }

/* ─── Maintenance ─────────────────────────────────────────────────── */
.mant-instruccion {
  font-size: 13px;
  color: var(--slate-500);
  margin: -10px 0 14px;
}
.mant-grupo {
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.mant-grupo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slate-50);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-200);
}
.mant-grupo-header svg { width: 16px; height: 16px; color: var(--slate-400); flex-shrink: 0; }
.mant-km-ref {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-400);
}
.mant-grupo--carga .mant-grupo-header {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}
.mant-grupo-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.mant-grupo-badge--carga { background: #dbeafe; color: #1d4ed8; }

.mant-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--slate-100);
  transition: background .1s;
  -webkit-tap-highlight-color: transparent;
}
.mant-check:last-child { border-bottom: none; }
.mant-check:active { background: var(--slate-50); }
.mant-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--slate-300);
  border-radius: 5px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: white;
  transition: all .15s;
}
.mant-check input[type="checkbox"]:checked {
  background: var(--sky-600);
  border-color: var(--sky-600);
}
.mant-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.mant-check span {
  flex: 1;
  font-size: 14px;
  color: var(--slate-700);
  line-height: 1.4;
}
.mant-km-tag {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--sky-600);
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 20px;
}

.radio-opciones-row {
  display: flex;
  gap: 10px;
}
.radio-opcion-card {
  flex: 1;
  cursor: pointer;
}
.radio-opcion-card input[type="radio"] { display: none; }
.radio-opcion-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid var(--slate-200);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
  text-align: center;
  line-height: 1.3;
  transition: all .15s;
}
.radio-opcion-inner svg { width: 22px; height: 22px; }
.radio-opcion-card:has(input:checked) .radio-opcion-inner {
  background: #eff6ff;
  border-color: var(--blue-500);
  color: var(--blue-700);
}

.btn-mant-enviar {
  width: 100%;
  height: 54px;
  margin-top: 4px;
  font-size: 16px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
}

/* Maintenance photo grid */
.mant-fotos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mant-foto-slot { }
.mant-foto-area {
  position: relative;
  aspect-ratio: 1;
  background: var(--slate-50);
  border: 2px dashed var(--slate-300);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.mant-foto-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--slate-400);
}
.mant-foto-placeholder svg { width: 24px; height: 24px; }
.mant-foto-placeholder span { font-size: 11px; font-weight: 600; }

/* ─── Loading / Error states ──────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 32px 16px;
  color: var(--slate-500);
  font-size: 14px;
}
.loading::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--sky-500);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.carga-error {
  text-align: center;
  padding: 32px 16px;
}
.carga-error-icono { font-size: 40px; margin-bottom: 12px; }
.carga-error-detalle { font-size: 12px; color: var(--slate-400); }

/* ─── Descarga ────────────────────────────────────────────────────── */
.desc-banner {
  background: white;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
}
.desc-banner-icon { font-size: 28px; }
.desc-banner-titulo { font-size: 15px; font-weight: 700; color: var(--slate-800); }
.desc-banner-fecha { font-size: 12px; color: var(--slate-500); }
.desc-banner-sub { font-size: 13px; color: var(--slate-600); }
.desc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-100);
}
.desc-item:last-child { border-bottom: none; }
.desc-label { font-size: 14px; color: var(--slate-700); font-weight: 500; }
.desc-stepper { display: flex; align-items: center; gap: 6px; }
.desc-step-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--slate-200);
  border-radius: 9px;
  background: white;
  font-size: 18px;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s;
}
.desc-step-btn:active { background: var(--slate-100); }
.desc-step-val {
  width: 52px;
  height: 36px;
  border: 1.5px solid var(--slate-200);
  border-radius: 9px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800);
  background: white;
  outline: none;
}
.desc-opcional { font-size: 12px; font-weight: 400; color: var(--slate-400); }
.desc-hub-view { padding-top: 12px; }
.desc-hub-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--slate-500);
  font-size: 14px;
}
.desc-ruta-ctx {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
}
.desc-modificar-btn {
  width: 100%;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sky-600);
  cursor: pointer;
  margin-top: 8px;
}
.desc-fecha-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* ─── Banners / alerts ────────────────────────────────────────────── */
.banner-forzado {
  background: #fef3c7;
  border-bottom: 1px solid #fde68a;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
}

/* ─── Mi Cuenta ───────────────────────────────────────────────────── */
.mc-perfil-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 16px;
}
.mc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.mc-info { display: flex; flex-direction: column; gap: 4px; }
.mc-nombre { font-size: 17px; font-weight: 800; color: var(--slate-800); }
.mc-rol-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  background: #e0f2fe;
  color: var(--sky-700);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.mc-buk-loading { font-size: 14px; color: var(--slate-500); padding: 8px 0; }
.mc-pwd-toggle-btn {
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: background .15s;
}
.mc-pwd-toggle-btn:active { background: var(--slate-50); }
.mc-pwd-campo { margin-bottom: 12px; }
.mc-pwd-wrap { position: relative; display: flex; }
.mc-pwd-wrap input {
  flex: 1;
  height: 44px;
  padding: 0 40px 0 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  font-size: 15px;
  color: var(--slate-800);
  outline: none;
  background: white;
  transition: border-color .2s;
}
.mc-pwd-wrap input:focus { border-color: var(--sky-500); }
.mc-pwd-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 4px;
}
.mc-pwd-eye svg { width: 17px; height: 17px; }

/* ─── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  padding: 0;
}
.modal-overlay.activa { display: flex; }
.modal-box {
  background: white;
  border-radius: 20px 20px 0 0;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0,0,0,.15);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--slate-800); }
.modal-close {
  background: var(--slate-100);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--slate-600);
}
.modal-body {
  overflow-y: auto;
  padding: 16px 20px;
  flex: 1;
}
.modal-campo { margin-bottom: 16px; }
.modal-campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 6px;
}
.modal-campo input, .modal-campo textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  font-size: 15px;
  color: var(--slate-800);
  outline: none;
  font-family: var(--font);
  background: white;
  transition: border-color .2s;
}
.modal-campo input:focus, .modal-campo textarea:focus { border-color: var(--sky-500); }
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--slate-200);
  flex-shrink: 0;
}
.btn-modal-cancel {
  flex: 1;
  height: 44px;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
}
.btn-modal-ok {
  flex: 2;
  height: 44px;
  background: var(--sky-600);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Modal maintenance items */
.mp-cats { }
.mp-cat-titulo {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 4px;
}
.mp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--slate-700);
}
.mp-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 2px solid var(--slate-300);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: white;
}
.mp-check input:checked { background: var(--sky-600); border-color: var(--sky-600); }
.mp-check input:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0;
  width: 5px; height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.mp-otro-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  font-size: 14px;
  margin-top: 4px;
}
.mp-realizado { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mp-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--slate-700);
  cursor: pointer;
}
.mp-taller-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  font-size: 14px;
}
.mp-foto-slot { }
.mp-foto-area {
  aspect-ratio: 1;
  background: var(--slate-50);
  border: 2px dashed var(--slate-300);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.mp-foto-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--slate-400);
  font-size: 22px;
}
.mp-foto-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #b91c1c;
  margin-top: 8px;
}

/* ─── Campo / textarea (legacy compat) ────────────────────────────── */
.campo { margin-bottom: 14px; }
.campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 6px;
}
.campo input, .campo select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--slate-800);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
  appearance: none;
  -webkit-appearance: none;
}
.campo input:focus, .campo select:focus { border-color: var(--sky-500); }
.campo textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--slate-800);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  resize: vertical;
  transition: border-color .2s;
}
.campo textarea:focus { border-color: var(--sky-500); }

/* ─── Misc / carga content ────────────────────────────────────────── */
.carga-vacio {
  text-align: center;
  padding: 40px 16px;
  color: var(--slate-500);
  font-size: 14px;
}
.tipo-carga-count {
  font-size: 11px;
  color: var(--sky-600);
  font-weight: 700;
  margin-top: 4px;
}

/* ─── Safe area ────────────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .exito-container,
  .contenido,
  .home-content,
  .screen-content {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}
