/* Agenda Guiadora — Compañía · Custom Styles */
:root {
  --navy:   #0f2d52;
  --teal:   #0e9f9f;
  --gold:   #e6a800;
  --green:  #2a9d5c;
  --red:    #dc2626;
  --bg:     #f0f7f4;
  --surface:#ffffff;
  --border: #d1e7dd;
  --text:   #1a2e3b;
  --muted:  #6b7280;
}

/* ─── Base ─────────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ─── Layout ────────────────────────────────────── */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: var(--navy);
  padding: 12px 16px 10px;
  padding-top: calc(12px + env(safe-area-inset-top));
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
#app-main {
  padding-top: 66px;
  padding-bottom: 72px;
  min-height: 100vh;
  overflow-y: auto;
}
#app-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ─── Navigation ─────────────────────────────────── */
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px 6px;
  color: rgba(255,255,255,.55);
  cursor: pointer; border: none; background: none;
  font-size: 10px; gap: 3px;
  transition: color .15s;
  min-height: 56px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.nav-active { color: var(--gold); }

/* ─── Views ──────────────────────────────────────── */
.view { display: none; padding: 12px 14px; }
.view.active { display: block; }

/* ─── Cards ──────────────────────────────────────── */
.card-base {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
}
.card-base:active { transform: scale(.98); box-shadow: 0 0 0 rgba(0,0,0,0); }

.card-stat {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

/* ─── Etapa Badges ───────────────────────────────── */
.badge-etapa {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-alba      { background: #fce7f3; color: #9d174d; }
.badge-amanecer  { background: #fef3c7; color: #92400e; }
.badge-luz       { background: #e0f2fe; color: #075985; }
.badge-resplandor{ background: #ede9fe; color: #5b21b6; }
.badge-sin       { background: #f3f4f6; color: #6b7280; }

/* ─── Forms ──────────────────────────────────────── */
.input-field {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.input-field:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,159,159,.15);
}
textarea.input-field { resize: vertical; min-height: 70px; }
select.input-field { cursor: pointer; }

.label-form {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.label-field {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.value-field {
  font-size: 14px;
  color: var(--text);
}

/* ─── Buttons ────────────────────────────────────── */
.btn-primary {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background .15s, transform .1s;
  min-height: 50px;
}
.btn-primary:active { background: #0b8a8a; transform: scale(.97); }

.btn-secondary {
  background: #e8f4f4;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  min-height: 46px;
}
.btn-secondary:active { background: #d0ecec; }

.btn-danger {
  background: #fef2f2;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  min-height: 46px;
}
.btn-danger:active { background: #fee2e2; }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  min-height: 50px;
}

/* ─── FAB ─────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom) + 14px);
  right: 18px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14,159,159,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 30;
  transition: transform .15s, box-shadow .15s;
}
.fab:active { transform: scale(.92); box-shadow: 0 2px 6px rgba(14,159,159,.3); }

/* ─── Modal ──────────────────────────────────────── */
#modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end;
}
#modal.hidden { display: none; }
#modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
#modal-sheet {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -4px 24px rgba(0,0,0,.15);
  padding-bottom: env(safe-area-inset-bottom);
}
#modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
#modal-title { font-size: 18px; font-weight: 700; color: var(--navy); }
#modal-close {
  background: #f3f4f6; border: none; border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 18px; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
#modal-scroll {
  overflow-y: auto; padding: 16px 18px; flex: 1;
}
#modal-footer {
  padding: 12px 18px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

/* ─── Toast ──────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 60;
  pointer-events: none;
}
#toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#toast.bg-teal-700 { background: var(--teal); }
#toast.bg-red-600  { background: var(--red); }

/* ─── Ley / Promesa cards ─────────────────────────── */
.ley-card {
  background: linear-gradient(135deg, var(--navy) 0%, #1a4a7a 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}
.ley-card h3 { color: var(--gold); font-size: 13px; letter-spacing: .1em; margin-bottom: 10px; }
.ley-card li { margin-bottom: 6px; font-size: 14px; line-height: 1.5; }
.ley-card li::before { content: "✦ "; color: var(--gold); font-size: 10px; }
.promesa-card {
  background: linear-gradient(135deg, #0a7a6e 0%, var(--teal) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}
.promesa-card h3 { color: #fff; font-size: 13px; letter-spacing: .1em; margin-bottom: 10px; opacity: .8; }
.promesa-card p { font-size: 15px; line-height: 1.8; font-style: italic; }

/* ─── Progress bar ───────────────────────────────── */
.progress-bar {
  height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--teal); border-radius: 99px; transition: width .4s;
}

/* ─── Section headers ─────────────────────────────── */
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 16px 0 8px;
}

/* ─── Menu grid (Más) ─────────────────────────────── */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.menu-tile {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 14px;
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  transition: transform .1s;
}
.menu-tile:active { transform: scale(.96); }
.menu-tile .tile-icon { font-size: 32px; margin-bottom: 6px; }
.menu-tile .tile-label { font-size: 13px; font-weight: 700; color: var(--navy); }

/* ─── Checklist ──────────────────────────────────── */
.check-item {
  display: flex; align-items: center; gap: 10px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.check-item.checked {
  background: #ecfdf5;
  border-color: var(--teal);
}
.check-item input[type=checkbox] {
  width: 20px; height: 20px;
  accent-color: var(--teal);
  flex-shrink: 0;
  cursor: pointer;
}

/* ─── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ─── Utilities ──────────────────────────────────── */
.hidden { display: none !important; }
.text-navy { color: var(--navy); }
.text-teal { color: var(--teal); }
.text-gold  { color: var(--gold); }
.bg-navy  { background: var(--navy); }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
