:root {
  --bg: #F9F6F0;
  --card: #FFFFFF;
  --ink: #2E2E2E;
  --muted: #6E6E6E;
  --border: #E5DFD2;
  --primary: #2E5077;
  --primary-dark: #223C5C;
  --primary-tint: #E6ECF1;
  --success: #16A34A;
  --success-tint: #E7F8EC;
  --warning: #F5A524;
  --warning-tint: #FEF3DA;
  --danger: #F2545B;
  --danger-tint: #FDE7E8;
  --shadow: 0 10px 30px rgba(30, 40, 90, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  min-height: 100vh;
}

.word {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--primary);
}
.word-logo { height: 34px; display: block; margin: 0 auto; }

/* login */
.login-shell {
  min-height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px 30px;
}
.login-card .word { display: block; text-align: center; margin-bottom: 6px; }
.h1 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.5rem; margin: 22px 0 4px; }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: #4A4A4A; margin-bottom: 6px; }
.field input {
  width: 100%; height: 50px; border-radius: 16px; border: 1.5px solid var(--border);
  background: #fff; padding: 0 18px; font-family: inherit; font-size: 14.5px; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #3d5aef22; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border-radius: 16px; border: none;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15.5px; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 20px rgba(61,90,239,0.28); }
.btn-primary:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
.btn-white { background: #fff; color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); font-weight: 700; height: auto; padding: 0; }

.link-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin: 14px 0 22px; color: var(--muted); }
.link-row a { color: var(--primary); text-decoration: none; font-weight: 600; }

.error-box {
  background: var(--danger-tint); color: #A8323A; border-radius: 12px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none;
}
.error-box.show { display: block; }

/* inicio */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.avatar-blob {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #5B8AB0);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem; cursor: pointer; border: none;
}
.greet { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.5rem; margin: 18px 0 2px; }
.greet-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.cat-chip { font-weight: 700; background: var(--primary-tint); color: var(--primary); border-radius: 8px; padding: 2px 9px; font-size: 13px; }

.vep-card {
  background: linear-gradient(150deg, var(--primary), #4A7CA8); color: #fff;
  border-radius: 22px; padding: 22px 22px 20px; margin-bottom: 16px;
  box-shadow: 0 14px 30px rgba(61,90,239,0.3);
}
.vep-card .lbl { font-size: 12px; opacity: 0.85; font-weight: 600; margin: 0 0 6px; }
.vep-card .amt { font-family: 'Poppins', sans-serif; font-size: 2.1rem; font-weight: 800; }
.vep-card .due { font-size: 12.5px; opacity: 0.85; margin: 4px 0 16px; }

.card { background: var(--card); border-radius: 20px; padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(30,40,90,0.06); }
.card h3 { font-family: 'Poppins', sans-serif; font-size: 1.02rem; font-weight: 700; margin: 0 0 12px; }

.progress-track { height: 10px; border-radius: 999px; background: var(--primary-tint); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #5B8AB0); }
.progress-amt { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.progress-note { font-size: 12.5px; color: #4A4A4A; margin-top: 10px; }

.doc-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; }
.doc-left { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.doc-ico { width: 34px; height: 34px; border-radius: 11px; background: var(--primary-tint); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.empty-note { color: var(--muted); font-size: 13px; padding: 8px 0; }

.state-msg { text-align: center; color: var(--muted); font-size: 14px; padding: 60px 0; }

/* ---------- mascota ---------- */
.empty-mascot { text-align: center; padding: 10px 0 4px; }
.empty-mascot img { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 10px; display: block; }
.empty-mascot p { margin: 0; }

.success-overlay { position: fixed; inset: 0; background: rgba(249,246,240,0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 300; gap: 14px; }
.success-overlay img { width: 140px; height: 140px; object-fit: contain; }
.success-overlay p { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--primary); margin: 0; }

/* ---------- bottom sheet (elegir tipo de documento) ---------- */
.sheet-overlay { position: fixed; inset: 0; background: rgba(27,33,64,0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 200; }
.sheet-overlay.hidden { display: none; }
.sheet-card { width: 100%; max-width: 460px; background: var(--card); border-radius: 24px 24px 0 0; padding: 22px 22px 28px; }
.sheet-card h3 { font-family: 'Poppins', sans-serif; font-size: 1.1rem; margin: 0 0 4px; }
.sheet-card .sheet-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.sheet-option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--border);
  background: #fff; margin-bottom: 9px; font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink); cursor: pointer; text-align: left;
}
.sheet-option:hover { background: var(--primary-tint); border-color: var(--primary); }
.sheet-option i { color: var(--primary); width: 18px; text-align: center; }
.sheet-cancel { width: 100%; text-align: center; padding: 10px; color: var(--muted); font-size: 13.5px; background: none; border: none; margin-top: 4px; font-family: inherit; cursor: pointer; }
.doc-type-tag { font-size: 11px; color: var(--muted); }
