/* =============================================
   CREDITOYA 24 - CHECK24 STYLE DESIGN SYSTEM
   ============================================= */

:root {
  --navy: #003082;
  --navy-dark: #002060;
  --navy-light: #1565c0;
  --cat-blue: #1565c0;
  --cat-blue-hover: #1976d2;
  --gold: #f5a623;
  --gold-dark: #e09010;
  --cta: #0066cc;
  --cta-hover: #0052a3;
  --cta-light: #e8f0fc;
  --green: #2e7d32;
  --green-light: #e8f5e9;
  --red: #c62828;
  --red-light: #ffebee;
  --orange: #e65100;
  --orange-light: #fff3e0;
  --bg: #f5f7fa;
  --bg-white: #ffffff;
  --border: #dde3ec;
  --border-light: #eef1f6;
  --text: #1a1a2e;
  --text-muted: #5a6a7e;
  --text-light: #8fa0b4;
  --font: 'Inter', Arial, system-ui, sans-serif;
  --shadow-xs: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 9999px;
  --nav-top-h: 64px;
  --nav-cat-h: 48px;
  --nav-total: 112px;
  --container: 1200px;
}

/* =============================================
   RESET
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
img, svg { display: block; }
input, select { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   NAVBAR TOP
   ============================================= */

#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
}

.nav-top { background: var(--navy); }

.nav-top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--nav-top-h);
}

/* Logo */
.logo { display: flex; align-items: center; flex-shrink: 0; }

.logo-mark {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}
.logo-mark span { color: var(--gold); }

/* Search bar */
.nav-search {
  flex: 1;
  position: relative;
  max-width: 620px;
}
.nav-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.nav-search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 44px;
  border: 2px solid var(--gold);
  border-radius: var(--r-full);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-search-input::placeholder { color: var(--text-muted); }
.nav-search-input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(245,166,35,0.2); }

/* Utility buttons */
.nav-utils {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-util-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-util-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-util-btn svg { flex-shrink: 0; }
.nav-util-user { color: #fff; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* =============================================
   CATEGORY BAR
   ============================================= */

.nav-categories {
  background: var(--cat-blue);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-cats-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--nav-cat-h);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-cats-inner::-webkit-scrollbar { display: none; }

.nav-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.nav-cat:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-cat.active {
  color: #fff;
  border-bottom-color: var(--gold);
  background: rgba(255,255,255,0.08);
}
.nav-cat-all { opacity: 0.7; }

/* =============================================
   TOAST
   ============================================= */

#toast-container {
  position: fixed;
  top: calc(var(--nav-total) + 12px);
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--text);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease forwards;
  max-width: 340px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
  background: #fff;
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.hero-badge {
  position: absolute;
  top: -8px;
  right: 0;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #e53935, #b71c1c);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.hero-badge .badge-pct { font-size: 22px; font-weight: 800; line-height: 1; }

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* Hero form */
.hero-form-wrap {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.hero-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 22px;
  border-right: 1px solid var(--border);
  min-width: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.hero-field:hover { background: #fafbfd; }
.hero-field:last-of-type { border-right: none; }

.hero-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hero-field input,
.hero-field select {
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.hero-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6a7e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 20px;
}

.hero-form-cta {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  flex-shrink: 0;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--cta);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,102,204,0.35);
}
.btn-cta:hover { background: var(--cta-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,102,204,0.45); }
.btn-cta:active { transform: translateY(0); }

/* Trust row below hero form */
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-trust-item svg { color: var(--green); }
.hero-trust-item strong { color: var(--text); }

/* =============================================
   PARTNERS SECTION
   ============================================= */

.partners-section {
  background: #fff;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-light);
}

.partners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.partners-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

/* Partners carousel */
.partners-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.carousel-track {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  flex: 1;
}
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  flex-shrink: 0;
  filter: grayscale(0.3);
  transition: filter 0.2s, box-shadow 0.2s;
}
.partner-logo:hover { filter: grayscale(0); box-shadow: var(--shadow-xs); }
.partner-logo span {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.partner-logo .logo-dkb { color: #003082; }
.partner-logo .logo-galicia { color: #e30613; }
.partner-logo .logo-santander { color: #ec0000; }
.partner-logo .logo-uala { color: #5b14b8; }
.partner-logo .logo-macro { color: #ffcc00; background: #003082; padding: 2px 6px; border-radius: 3px; }
.partner-logo .logo-hsbc { color: #db0011; }
.partner-logo .logo-mercado { color: #009ee3; }

.carousel-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.carousel-btn:hover { background: var(--bg); color: var(--text); }

/* Advantages */
.advantages-col { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.advantage-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.advantage-badge .badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--navy);
  background: #fff;
  line-height: 1.1;
  text-align: center;
}
.advantage-badge span { font-size: 10px; color: var(--text-muted); font-weight: 500; }

.ratings-block { display: flex; flex-direction: column; gap: 2px; }
.stars { display: flex; align-items: center; gap: 3px; }
.star { color: #f5a623; font-size: 18px; }
.star-empty { color: var(--border); }
.ratings-score { font-size: 15px; font-weight: 700; color: var(--text); }
.ratings-count { font-size: 12px; color: var(--text-muted); }
.ratings-quote {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  max-width: 220px;
  margin-top: 4px;
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */

.main-content { padding: 32px 0 60px; }

.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar { position: sticky; top: calc(var(--nav-total) + 16px); }

.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.sidebar-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-body { padding: 16px 18px; }

.filter-group { margin-bottom: 20px; }
.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Range slider in sidebar */
.range-wrap { padding: 0 4px; }
.range-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--cta) 0%, var(--cta) 50%, var(--border) 50%, var(--border) 100%);
  outline: none;
  cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--cta);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.15s;
}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-val {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.range-val strong { color: var(--text); font-size: 13px; }

/* Select in sidebar */
.sidebar-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.sidebar-select:focus { border-color: var(--cta); }

/* Modalidad pills (landing) */
.modalidad-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.modalidad-pill:hover { border-color: var(--cta); box-shadow: var(--shadow-sm); }
.modalidad-pill.active { border-color: var(--cta); background: var(--cta-light); }

/* Pill options */
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-opt {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.pill-opt:hover { border-color: var(--cta); color: var(--cta); }
.pill-opt.active { border-color: var(--cta); background: var(--cta-light); color: var(--cta); font-weight: 600; }

.sidebar-search-btn {
  width: 100%;
  padding: 13px;
  background: var(--cta);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}
.sidebar-search-btn:hover { background: var(--cta-hover); transform: translateY(-1px); }

/* =============================================
   RESULTS AREA
   ============================================= */

.results-area {}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-title { font-size: 18px; font-weight: 700; color: var(--text); }
.results-count { font-size: 14px; color: var(--text-muted); font-weight: 400; }

/* Sort pills */
.sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sort-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.sort-pill {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.sort-pill:hover { border-color: var(--cta); color: var(--cta); }
.sort-pill.active { border-color: var(--cta); background: var(--cta); color: #fff; }

/* =============================================
   OFFER CARDS
   ============================================= */

.offers-list { display: flex; flex-direction: column; gap: 12px; }

.offer-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
}
.offer-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.offer-card.best {
  border-color: var(--gold);
  border-width: 2px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Best offer ribbon */
.offer-ribbon {
  display: none;
  background: var(--gold);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 16px;
  text-align: center;
}
.offer-card.best .offer-ribbon { display: block; }

.offer-body {
  display: grid;
  grid-template-columns: 160px 1fr 1fr 1fr 180px;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}

/* Bank logo column */
.offer-bank {}
.bank-logo-box {
  width: 120px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: #fff;
  overflow: hidden;
}
.bank-name-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.bank-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Metric columns */
.offer-metric {}
.metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}
.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.metric-value.highlight { color: var(--cta); }
.metric-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Probability column */
.offer-prob {}
.prob-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.prob-badge.alta { background: var(--green-light); color: var(--green); }
.prob-badge.media { background: var(--orange-light); color: var(--orange); }
.prob-badge.baja { background: var(--red-light); color: var(--red); }

.prob-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}
.prob-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}
.prob-bar-fill.alta { background: var(--green); }
.prob-bar-fill.media { background: var(--orange); }
.prob-bar-fill.baja { background: var(--red); }
.prob-pct { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* CTA column */
.offer-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-apply {
  padding: 12px 20px;
  background: var(--cta);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0,102,204,0.3);
}
.btn-apply:hover { background: var(--cta-hover); transform: translateY(-1px); }

.btn-details {
  padding: 8px 20px;
  background: transparent;
  color: var(--cta);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid var(--cta);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.btn-details:hover { background: var(--cta-light); }

/* Offer expandable details */
.offer-details {
  border-top: 1px solid var(--border-light);
  padding: 16px 22px;
  background: #fafbfd;
  display: none;
}
.offer-details.open { display: block; }
.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.detail-item {}
.detail-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.detail-val { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 2px; }

/* =============================================
   SKELETON LOADERS
   ============================================= */

.skeleton-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 160px 1fr 1fr 1fr 180px;
  gap: 16px;
  align-items: center;
}

.skel {
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e8ef 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skel-logo { width: 100%; height: 48px; }
.skel-line { height: 12px; margin-bottom: 8px; }
.skel-line.lg { height: 24px; width: 70%; }
.skel-line.sm { height: 10px; width: 50%; }
.skel-btn { height: 40px; border-radius: var(--r-md); }

/* =============================================
   EMPTY / NO RESULTS
   ============================================= */

.no-results {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 48px;
  text-align: center;
}
.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.no-results p { color: var(--text-muted); font-size: 14px; }

/* =============================================
   WIZARD (multi-step form overlay)
   ============================================= */

.wizard-overlay {
  background: var(--bg);
  min-height: calc(100vh - var(--nav-total));
  padding: 32px 0 60px;
}

.wizard-container { max-width: 680px; margin: 0 auto; }

/* Progress bar */
.wizard-progress {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: #fff;
  flex-shrink: 0;
  transition: all 0.3s;
}
.progress-step.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.progress-step.active .step-dot { background: var(--cta); border-color: var(--cta); color: #fff; }
.step-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.progress-step.active .step-label { color: var(--cta); }
.progress-step.done .step-label { color: var(--green); }
.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  transition: background 0.3s;
}
.progress-line.done { background: var(--green); }

/* Wizard card */
.wizard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.wizard-card-header {
  background: var(--navy);
  color: #fff;
  padding: 20px 28px;
}
.wizard-card-header h2 { font-size: 18px; font-weight: 700; }
.wizard-card-header p { font-size: 13px; opacity: 0.8; margin-top: 4px; }

.wizard-card-body { padding: 28px; }

/* Form elements */
.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-label span { color: var(--text-muted); font-weight: 400; font-size: 12px; }

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-input:focus { border-color: var(--cta); box-shadow: 0 0 0 3px rgba(0,102,204,0.12); }

.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.form-select:focus { border-color: var(--cta); }

/* Amount chips */
.amount-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.amount-chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.amount-chip:hover { border-color: var(--cta); color: var(--cta); }

/* Amount display */
.amount-display {
  font-size: 28px;
  font-weight: 800;
  color: var(--cta);
  text-align: center;
  padding: 10px 0;
  font-variant-numeric: tabular-nums;
}

/* Plazo grid */
.plazo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.plazo-btn {
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.plazo-btn:hover { border-color: var(--cta); color: var(--cta); }
.plazo-btn.active { border-color: var(--cta); background: var(--cta); color: #fff; }

/* Cuota preview */
.cuota-preview {
  background: var(--cta-light);
  border: 1px solid #c5d9f5;
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.cuota-preview-label { font-size: 13px; color: var(--text-muted); }
.cuota-preview-val { font-size: 20px; font-weight: 800; color: var(--cta); }

/* Historial grid */
.historial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.historial-btn {
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  background: #fff;
}
.historial-btn:hover { border-color: var(--cta); }
.historial-btn.active { border-color: var(--cta); background: var(--cta-light); }
.historial-icon { font-size: 22px; margin-bottom: 4px; }
.historial-label { font-size: 13px; font-weight: 600; color: var(--text); }
.historial-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Checkbox */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--cta);
  cursor: pointer;
  margin-top: 2px;
}
.checkbox-wrap label {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}
.checkbox-wrap a { color: var(--cta); }

/* Wizard nav buttons */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-top: 1px solid var(--border-light);
  background: #fafbfd;
}

.btn-back {
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-back:hover { border-color: var(--text-muted); color: var(--text); }

.btn-next {
  padding: 11px 28px;
  background: var(--cta);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-next:hover { background: var(--cta-hover); transform: translateY(-1px); }
.btn-next:disabled { background: var(--border); cursor: not-allowed; transform: none; }

/* =============================================
   INFO SECTIONS (below results)
   ============================================= */

.info-sections { padding: 0 0 60px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }

.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.info-card-icon {
  width: 44px;
  height: 44px;
  background: var(--cta-light);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--cta);
}
.info-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.info-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* FAQ Section */
.faq-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.faq-header { background: var(--navy); color: #fff; padding: 18px 24px; font-size: 16px; font-weight: 700; }
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--bg); }
.faq-q svg { flex-shrink: 0; color: var(--text-muted); transition: transform 0.2s; }
.faq-q.open svg { transform: rotate(180deg); }
.faq-a {
  padding: 0 24px 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  display: none;
}
.faq-a.open { display: block; }

/* =============================================
   FOOTER
   ============================================= */

#footer { border-top: 1px solid var(--border); }

.footer-client-bar {
  background: #f0f4fa;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.footer-client-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-client-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-client-icon {
  width: 44px;
  height: 44px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.footer-client-info strong { color: var(--cta); }

.footer-client-cta {
  padding: 9px 22px;
  border: 2px solid var(--cta);
  border-radius: var(--r-md);
  color: var(--cta);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s;
  flex-shrink: 0;
}
.footer-client-cta:hover { background: var(--cta); color: #fff; }

.footer-main { background: #fff; padding: 40px 0 32px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -1px;
}
.footer-logo span { color: var(--gold); }

.footer-brand-col p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.footer-social { display: flex; gap: 8px; }
.social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s;
}
.social-btn:hover { border-color: var(--navy); color: var(--navy); background: #f0f4fa; }

.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--cta); }

.footer-bottom { background: #f5f7fa; border-top: 1px solid var(--border); padding: 14px 0; }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 12px; color: var(--text-light); line-height: 1.5; }
.footer-bottom-links { display: flex; gap: 16px; flex-shrink: 0; }
.footer-bottom-links a { font-size: 12px; color: var(--text-light); transition: color 0.15s; }
.footer-bottom-links a:hover { color: var(--cta); }

/* =============================================
   LANDING VIEW (when not on results page)
   ============================================= */

.landing-section {
  padding: 48px 0;
}
.landing-section + .landing-section { border-top: 1px solid var(--border-light); }
.section-title { font-size: 1.6rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.section-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-card {
  text-align: center;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.how-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.how-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.how-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .offer-body {
    grid-template-columns: 140px 1fr 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .offer-actions { grid-column: 1 / -1; flex-direction: row; }
  .btn-apply, .btn-details { flex: 1; }

  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-grid { grid-template-columns: 1fr; gap: 24px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-top-h: 56px; }

  .nav-search { display: none; }
  .nav-utils .nav-util-btn span { display: none; }
  .nav-util-btn { padding: 6px 8px; flex-direction: row; }
  .nav-hamburger { display: flex; }

  .nav-cat span { display: none; }
  .nav-cat { padding: 0 10px; }

  .hero { padding: 28px 0; }
  .hero-title { font-size: 1.5rem; }
  .hero-badge { width: 72px; height: 72px; font-size: 9px; }
  .hero-badge .badge-pct { font-size: 18px; }

  .hero-form-wrap { flex-direction: column; border-radius: var(--r-md); }
  .hero-field { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-field:last-of-type { border-bottom: none; }
  .hero-form-cta { padding: 12px 14px; }
  .btn-cta { width: 100%; justify-content: center; }

  .offer-body { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .offer-bank { grid-column: 1 / -1; }
  .offer-actions { grid-column: 1 / -1; }

  .plazo-grid { grid-template-columns: repeat(4, 1fr); }
  .historial-grid { grid-template-columns: 1fr 1fr; }

  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-client-inner { flex-direction: column; align-items: flex-start; }
  .how-grid { grid-template-columns: 1fr; }

  .hero-trust { gap: 12px; }
}

@media (max-width: 480px) {
  .offer-body { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .wizard-card-body { padding: 18px; }
  .wizard-footer { padding: 16px 18px; }
  .details-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   DOCUMENTOS
   ============================================= */

.docs-modal-box { max-width: 600px !important; max-height: 90vh; overflow-y: auto; }
.docs-titulo { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.docs-sub    { font-size: .88rem; color: var(--text-muted); margin-bottom: 16px; }

/* Barra resumen de progreso */
.docs-resumen {
  display: flex; align-items: center; gap: 12px;
  background: #f0f4ff; border-radius: 10px; padding: 10px 14px;
  margin-bottom: 16px; font-size: .83rem; color: var(--navy); font-weight: 600;
}
.docs-barra-wrap { flex: 1; height: 6px; background: #dce6f8; border-radius: 3px; }
.docs-barra-fill { height: 100%; background: var(--navy); border-radius: 3px; transition: width .4s; }

.docs-lista { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.doc-item {
  border: 1.5px solid var(--border-light); border-radius: 10px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: border-color .2s, background .2s;
}
.doc-item-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.doc-item:has(.doc-estado-subido)   { border-color: #4caf50; }
.doc-item:has(.doc-estado-aprobado) { border-color: #2e7d32; background: #f6fdf6; }
.doc-item:has(.doc-estado-error)    { border-color: #dc3545; }

.doc-icon   { font-size: 1.4rem; flex-shrink: 0; }
.doc-nombre { font-weight: 700; font-size: .88rem; color: var(--text-dark); }
.doc-desc   { font-size: .75rem; color: var(--text-muted); }

.doc-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.doc-estado-badge {
  font-size: .7rem; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap;
}
.doc-estado-pendiente { background: #fff3cd; color: #856404; }
.doc-estado-subiendo  { background: #cfe2ff; color: #084298; }
.doc-estado-subido    { background: #d1e7dd; color: #0a3622; }
.doc-estado-aprobado  { background: #d1e7dd; color: #0a3622; }
.doc-estado-rechazado,
.doc-estado-error     { background: #f8d7da; color: #842029; }

.doc-upload-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 7px; cursor: pointer;
  border: 1.5px solid var(--navy); color: var(--navy);
  font-size: .78rem; font-weight: 600; background: #fff;
  transition: background .15s; white-space: nowrap;
}
.doc-upload-btn:hover { background: var(--bg-light); }

/* Botón docs en card de solicitud (perfil usuario) */
.doc-upload-btn-card {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid #c0c8d8; color: #555;
  font-size: .75rem; font-weight: 600; background: #f8fafc;
  transition: all .15s;
}
.doc-upload-btn-card:hover { background: #e8f0fe; border-color: var(--navy); color: var(--navy); }

/* Docs admin checklist */
.docs-admin-lista { display: flex; flex-direction: column; gap: 8px; }
.docs-admin-item {
  border: 1px solid var(--border-light); border-radius: 10px;
  padding: 12px 16px; transition: border-color .2s;
}
.docs-admin-item-header { display: flex; align-items: center; gap: 8px; }
.docs-admin-acciones {
  display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #f0f0f0; flex-wrap: wrap;
}
.docs-accion-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 6px; font-size: .78rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
}
.docs-accion-ver     { background: #f0f4ff; color: var(--navy); border-color: #c5d9f5; }
.docs-accion-aprobar { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.docs-accion-rechazar{ background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.docs-accion-btn:hover { filter: brightness(.95); }

.docs-aviso {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: #666; background: #f8fafc;
  border-radius: 8px; padding: 10px 14px; margin: 12px 0;
  border: 1px solid #e5e7eb;
}

/* Progress bar */
.docs-progress-wrap {
  margin: 12px 0; background: var(--bg-light); border-radius: 99px;
  height: 8px; overflow: hidden; position: relative;
}
.docs-progress-bar {
  height: 100%; background: var(--navy);
  border-radius: 99px; transition: width .4s ease;
  width: 0%;
}
.docs-progress-label {
  font-size: .78rem; color: var(--text-muted); text-align: center; margin-top: 6px;
}

/* Preview texto extraído */
.doc-preview {
  margin-top: 10px; padding: 10px 12px;
  background: #f0f4ff; border-radius: 7px; border: 1px solid #c5d9f5;
}
.doc-preview-label { font-size: .7rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; text-transform: uppercase; }
.doc-preview-texto { font-size: .78rem; color: var(--text-muted); line-height: 1.5; font-family: monospace; }

/* Editor cédula */
.cedula-editor-box {
  margin-top: 14px; border: 1.5px solid #a5d6a7;
  border-radius: 12px; padding: 16px; background: #f9fdf9;
  transition: border-color .3s;
}
.cedula-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 8px;
}
.cedula-editor-titulo {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .85rem; color: #1b5e20;
}
.cedula-editor-badge {
  font-size: .65rem; font-weight: 800; padding: 2px 8px;
  border-radius: 20px; background: #c8e6c9; color: #1b5e20;
  text-transform: uppercase; white-space: nowrap;
}
.cedula-editor-badge-warn { background: #ffe0b2; color: #e65100; }

.cedula-editor-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 14px;
}
.cedula-editor-field { display: flex; flex-direction: column; gap: 4px; }
.cedula-editor-field label {
  font-size: .72rem; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: .04em;
}
.cedula-editor-input {
  padding: 8px 10px; border-radius: 7px; font-size: .88rem;
  border: 1.5px solid #c8e6c9; background: #fff;
  transition: border-color .2s;
}
.cedula-editor-input:focus { outline: none; border-color: #2e7d32; }
.cedula-input-ok    { border-color: #4caf50 !important; background: #f1f8f1 !important; }
.cedula-input-empty { border-color: #ffcc80 !important; background: #fff8f0 !important; }

.cedula-editor-footer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.cedula-guardar-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px; background: #2e7d32; color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: .88rem; font-weight: 700; transition: background .2s;
}
.cedula-guardar-btn:hover    { background: #1b5e20; }
.cedula-guardar-btn:disabled { opacity: .6; cursor: not-allowed; }
.cedula-editor-aviso { font-size: .75rem; color: #888; }
.cedula-confirmado   { font-size: .88rem; font-weight: 700; color: #2e7d32; }

/* Campos cédula en admin */
.cedula-campo-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #c8e6c9; font-size: .85rem;
}
.cedula-campo-row:last-of-type { border-bottom: none; }
.cedula-campo-label { color: #555; font-weight: 600; }
.cedula-campo-val   { color: #1a1a2e; font-weight: 700; }

.docs-aviso {
  font-size: .78rem; color: var(--text-muted); background: #f5f7fa;
  border-radius: 7px; padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--border-light);
}

/* Admin docs */
.docs-admin-lista { display: flex; flex-direction: column; gap: 14px; }
.docs-admin-item {
  border: 1.5px solid var(--border-light); border-radius: 10px; padding: 14px;
}
.docs-admin-item-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.docs-admin-texto {
  background: #f0f4ff; border-radius: 7px; padding: 10px; margin-bottom: 10px;
}
.docs-admin-acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.docs-accion-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 7px; font-size: .82rem;
  font-weight: 600; cursor: pointer; border: 1.5px solid;
  text-decoration: none; transition: background .15s;
}
.docs-accion-ver      { border-color: var(--navy); color: var(--navy); background: #fff; }
.docs-accion-ver:hover { background: var(--bg-light); }
.docs-accion-aprobar  { border-color: #2e7d32; color: #2e7d32; background: #fff; }
.docs-accion-aprobar:hover { background: #f1f8f1; }
.docs-accion-rechazar { border-color: #dc3545; color: #dc3545; background: #fff; }
.docs-accion-rechazar:hover { background: #fff5f5; }

.docs-admin-cedula {
  background: #f1f8f1; border-radius: 8px; padding: 10px 12px;
  margin-bottom: 10px; border: 1px solid #a5d6a7;
}

/* =============================================
   MODAL DE SOLICITUD DE CRÉDITO
   ============================================= */

.solicitud-modal-box {
  max-width: 580px !important;
  max-height: 90vh;
  overflow-y: auto;
}

.sol-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.sol-bank-dot {
  width: 52px; height: 52px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-align: center; padding: 4px;
}
.sol-titulo { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.sol-sub    { font-size: .82rem; color: var(--text-muted); }

.sol-metricas {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; margin-bottom: 16px;
}
.sol-metrica {
  background: var(--bg-light); border-radius: 8px;
  padding: 10px; text-align: center;
}
.sol-metrica-val   { font-size: .95rem; font-weight: 800; color: var(--text-dark); }
.sol-metrica-label { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.highlight-gold    { color: var(--gold) !important; }

.sol-desglose {
  background: var(--bg-light); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 14px;
}
.sol-desglose-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: .88rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}
.sol-desglose-row:last-child { border: none; }
.sol-desglose-row.total { font-weight: 800; color: var(--text-dark); font-size: .95rem; }

.sol-prob-wrap { margin-bottom: 16px; }
.sol-prob-label { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

.sol-solicitante { margin-bottom: 14px; }
.sol-solicitante-titulo {
  font-size: .8rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 10px;
}
.sol-solicitante-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sol-field { display: flex; flex-direction: column; gap: 4px; }
.sol-field label { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.sol-field input {
  padding: 8px 10px; border: 1.5px solid var(--border-light);
  border-radius: 7px; font-size: .88rem;
  transition: border-color .2s;
}
.sol-field input:focus { outline: none; border-color: var(--cta); }

.sol-legal {
  font-size: .75rem; color: var(--text-muted);
  background: #fff8e1; border-radius: 7px;
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid #ffe082;
}

.sol-btn-enviar {
  width: 100%; padding: 14px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s;
}
.sol-btn-enviar:hover    { background: var(--navy-dark); }
.sol-btn-enviar:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 480px) {
  .sol-metricas { grid-template-columns: 1fr 1fr; }
  .sol-solicitante-grid { grid-template-columns: 1fr; }
}

/* =============================================
   PANEL ADMINISTRADOR
   ============================================= */

.admin-container {
  max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px;
}

.admin-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px;
}
.admin-title { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.admin-sub   { font-size: .9rem; color: var(--text-muted); }
.admin-rol-badge {
  display: inline-block; background: var(--navy); color: #fff;
  font-size: .65rem; font-weight: 800; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase;
}
.admin-back-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--border-light);
  color: var(--text-muted); border-radius: 8px; padding: 8px 14px;
  cursor: pointer; font-size: .85rem; transition: border-color .2s, color .2s;
}
.admin-back-btn:hover { border-color: var(--navy); color: var(--navy); }

/* KPI cards */
.admin-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 28px;
}
.admin-kpi {
  background: #fff; border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  padding: 20px; display: flex; align-items: center; gap: 16px;
}
.admin-kpi-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-kpi-val   { font-size: 1.6rem; font-weight: 800; color: var(--text-dark); }
.admin-kpi-label { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* Tabs */
.admin-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}
.admin-tab {
  background: none; border: none; cursor: pointer;
  padding: 10px 20px; font-size: .95rem; font-weight: 600;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .2s, border-color .2s;
}
.admin-tab:hover  { color: var(--navy); }
.admin-tab.active { color: var(--navy); border-bottom-color: var(--navy); }

/* Toolbar */
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.admin-toolbar-title { font-weight: 600; color: var(--text-dark); }
.admin-search {
  padding: 9px 14px; border: 1.5px solid var(--border-light);
  border-radius: 8px; font-size: .9rem; width: 280px;
  transition: border-color .2s;
}
.admin-search:focus { outline: none; border-color: var(--cta); }

.admin-add-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px; padding: 9px 16px;
  cursor: pointer; font-size: .88rem; font-weight: 600;
  transition: background .2s;
}
.admin-add-btn:hover { background: var(--navy-dark); }

/* Tabla */
.admin-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border-light); }
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.admin-table thead { background: var(--bg-light); }
.admin-table th {
  padding: 12px 14px; text-align: left;
  font-size: .75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border-light);
}
.admin-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  color: var(--text-dark); vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #f9fbff; }

/* Chips de rol */
.admin-rol-chip {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
}
.admin-rol-cliente    { background: #e8f0fe; color: #003082; }
.admin-rol-asesor     { background: #e6f4ea; color: #1b5e20; }
.admin-rol-originador { background: #fff3e0; color: #e65100; }
.admin-rol-admin      { background: #fce4ec; color: #880e4f; }
.admin-rol-super_admin{ background: #1a1a2e; color: #f5a623; }

.admin-tipo-chip {
  background: var(--bg-light); color: var(--text-muted);
  padding: 3px 8px; border-radius: 6px; font-size: .75rem;
}

/* Select cambio de rol */
.admin-rol-select {
  padding: 5px 8px; border: 1.5px solid var(--border-light);
  border-radius: 6px; font-size: .82rem; cursor: pointer;
}

.admin-loading {
  text-align: center; padding: 48px; color: var(--text-muted);
}

.admin-icon-btn {
  width: 30px; height: 30px; border-radius: 6px;
  border: 1.5px solid var(--border-light); background: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: border-color .15s, color .15s;
}
.admin-icon-btn:hover { border-color: var(--navy); color: var(--navy); }
.admin-icon-danger:hover { border-color: #dc3545; color: #dc3545; }

/* Formulario originador */
.orig-form-card {
  background: #f9fbff; border: 1.5px solid var(--border-light);
  border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.orig-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

/* Detalle usuario modal */
.detalle-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.detalle-item {
  background: var(--bg-light); border-radius: 8px; padding: 10px 14px;
}
.detalle-item span { display: block; font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.detalle-item strong { font-size: .9rem; color: var(--text-dark); }

@media (max-width: 768px) {
  .admin-kpis { grid-template-columns: 1fr 1fr; }
  .admin-header { flex-direction: column; gap: 12px; }
  .admin-search { width: 100%; }
  .orig-form-grid { grid-template-columns: 1fr; }
  .detalle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .admin-kpis { grid-template-columns: 1fr; }
}

/* =============================================
   PERFIL DE USUARIO
   ============================================= */

.perfil-container {
  max-width: 1000px; margin: 40px auto; padding: 0 20px 60px;
}

.perfil-empty {
  text-align: center; padding: 80px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.perfil-empty h2 { font-size: 1.5rem; color: var(--text-dark); }
.perfil-empty p  { color: var(--text-muted); }

/* Header card */
.perfil-header-card {
  background: var(--navy); color: #fff;
  border-radius: 16px; padding: 32px;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 28px; position: relative;
}

.perfil-avatar-wrap { position: relative; flex-shrink: 0; }

.perfil-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--gold);
}
.perfil-avatar-initials {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 900; border: 3px solid rgba(255,255,255,.3);
}
.perfil-rol-badge {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--navy);
  font-size: .6rem; font-weight: 800; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase; white-space: nowrap;
}

.perfil-header-info { flex: 1; }
.perfil-nombre  { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.perfil-email   { font-size: .9rem; opacity: .8; margin-bottom: 4px; }
.perfil-desde   { font-size: .8rem; opacity: .6; }

.perfil-logout-btn {
  position: absolute; top: 20px; right: 20px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 8px; padding: 8px 14px;
  cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; gap: 6px;
  transition: background .2s;
}
.perfil-logout-btn:hover { background: rgba(255,255,255,.25); }

/* Grid de cards */
.perfil-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

.perfil-card {
  background: #fff; border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: 24px;
}
.perfil-card-full { grid-column: 1 / -1; }

.perfil-card-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.perfil-card-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-dark); }

/* Formulario perfil */
.perfil-form { display: flex; flex-direction: column; gap: 14px; }

.perfil-field { display: flex; flex-direction: column; gap: 5px; }
.perfil-field label { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.perfil-field input, .perfil-field select {
  padding: 10px 12px; border: 1.5px solid var(--border-light);
  border-radius: 8px; font-size: .95rem; color: var(--text-dark);
  transition: border-color .2s;
}
.perfil-field input:focus, .perfil-field select:focus {
  outline: none; border-color: var(--cta);
}

.perfil-save-btn {
  margin-top: 6px; padding: 11px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: .9rem; font-weight: 600;
  transition: background .2s;
}
.perfil-save-btn:hover { background: var(--navy-dark); }

/* Solicitudes */
.perfil-solicitudes-empty {
  text-align: center; padding: 32px; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.perfil-link-btn {
  background: none; border: none; color: var(--cta);
  cursor: pointer; font-size: inherit; font-weight: 600;
  text-decoration: underline;
}

.solicitud-row {
  display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr;
  align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .9rem;
}
.solicitud-row:last-child { border-bottom: none; }
.solicitud-entidad { font-weight: 600; color: var(--text-dark); }
.solicitud-monto   { color: var(--navy); font-weight: 700; }
.solicitud-fecha, .solicitud-plazo { color: var(--text-muted); font-size: .85rem; }

.estado-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
}
.estado-pendiente    { background: #fff3cd; color: #856404; }
.estado-aprobado     { background: #d1e7dd; color: #0a3622; }
.estado-rechazado    { background: #f8d7da; color: #842029; }
.estado-en-revision  { background: #cfe2ff; color: #084298; }
.estado-recibida     { background: #e2e3e5; color: #383d41; }
.estado-docs         { background: #fff3cd; color: #856404; }
.estado-revision     { background: #cfe2ff; color: #084298; }
.estado-enviada      { background: #fde8d8; color: #7a3500; }
.estado-estudio      { background: #fde8d8; color: #7a3500; }
.estado-preaprobada  { background: #d1f2eb; color: #0b6954; }
.estado-desembolso   { background: #d6eaf8; color: #154360; }
.estado-desembolsada { background: #003082; color: #fff; }
.estado-cancelada    { background: #eeeeee; color: #555; }

/* ── PIPELINE BOARD ─────────────────────────────── */
.pipeline-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 16px;
  min-height: 400px;
}
.pipeline-col {
  flex: 0 0 200px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 0 0 8px;
  display: flex;
  flex-direction: column;
}
.pipeline-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 8px;
  border-radius: 10px 10px 0 0;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.pipeline-col-title { font-size: .78rem; font-weight: 700; color: #333; }
.pipeline-col-count {
  font-size: .72rem; font-weight: 800; color: #fff;
  padding: 2px 7px; border-radius: 20px;
}
.pipeline-cards { padding: 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pipeline-card {
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.pipeline-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateY(-1px); }
.pipeline-card-banco { font-size: .8rem; font-weight: 700; color: var(--navy); }
.pipeline-card-cliente { font-size: .75rem; color: #555; margin: 2px 0; }
.pipeline-card-monto { font-size: .85rem; font-weight: 800; color: #111; }
.pipeline-card-meta { display: flex; justify-content: space-between; margin-top: 4px; }
.pipeline-card-modal { font-size: .68rem; background: #e8f0fe; color: #003082; padding: 1px 6px; border-radius: 10px; }
.pipeline-card-fecha { font-size: .68rem; color: #aaa; }
.pipeline-empty { text-align: center; color: #bbb; font-size: .78rem; padding: 20px 8px; }

/* ── TIMELINE ────────────────────────────────────── */
.timeline { padding: 8px 0; }
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 0 0 20px 0;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e5e7eb;
  flex-shrink: 0;
  margin-top: 2px;
}
.timeline-current .timeline-dot {
  background: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}
.timeline-body { flex: 1; }
.timeline-estado { font-weight: 700; font-size: .88rem; color: #111; text-transform: capitalize; }
.timeline-fecha { font-size: .75rem; color: #888; margin: 2px 0; }
.timeline-nota { font-size: .82rem; color: #444; margin-top: 4px; background: #f8f9fa; padding: 6px 10px; border-radius: 6px; }
.timeline-visible { font-size: .7rem; background: #e8f0fe; color: #003082; padding: 1px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }

/* ── COMENTARIOS INTERNOS ───────────────────────── */
.comentarios-list { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }
.comentario-item { background: #f8f9fa; border-radius: 8px; padding: 10px 14px; border-left: 3px solid #e5e7eb; }
.comentario-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.comentario-tipo { font-size: .68rem; padding: 1px 8px; border-radius: 10px; font-weight: 700; text-transform: uppercase; }
.comentario-tipo-nota     { background: #e2e3e5; color: #383d41; }
.comentario-tipo-alerta   { background: #fff3cd; color: #856404; }
.comentario-tipo-decision { background: #cfe2ff; color: #084298; }
.comentario-texto { font-size: .85rem; color: #333; line-height: 1.5; }

/* ── SOLICITUD CARD USUARIO ──────────────────────── */
.solicitud-card-usuario {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.solicitud-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.solicitud-card-banco { font-size: 1rem; font-weight: 700; color: var(--navy); }
.solicitud-card-meta  { font-size: .8rem; color: #666; margin-top: 2px; }

/* Barra de progreso */
.solicitud-progress {
  display: flex;
  align-items: center;
  margin: 12px 0 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.solicitud-paso {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex-shrink: 0; min-width: 56px;
}
.solicitud-paso-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #e5e7eb; border: 2px solid #e5e7eb;
  transition: all .2s;
}
/* Completado */
.paso-done .solicitud-paso-dot {
  background: var(--navy); border-color: var(--navy);
  box-shadow: 0 0 0 3px #e8f0fe;
}
/* Actual / en curso */
.paso-actual .solicitud-paso-dot {
  background: #fff; border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px #fff4cc;
  width: 16px; height: 16px;
}
/* Cancelado en ese paso */
.paso-cancelado .solicitud-paso-dot {
  background: #dc3545; border-color: #dc3545;
  box-shadow: 0 0 0 3px #fde8ea;
}
.solicitud-paso-label {
  font-size: .58rem; color: #bbb; white-space: nowrap;
  text-align: center; max-width: 60px; line-height: 1.2;
}
.paso-done .solicitud-paso-label     { color: var(--navy); font-weight: 600; }
.paso-actual .solicitud-paso-label   { color: #b8860b; font-weight: 700; }
.paso-cancelado .solicitud-paso-label { color: #dc3545; font-weight: 600; }

.solicitud-paso-line { flex: 1; height: 3px; background: #e5e7eb; min-width: 12px; border-radius: 2px; }
.line-done { background: var(--navy); }

.solicitud-cancelada { opacity: .85; }
.solicitud-cancelada .solicitud-paso-line { background: #e5e7eb; }

/* Mini timeline en card */
.solicitud-timeline { border-top: 1px solid #f0f0f0; padding-top: 10px; margin-bottom: 10px; }
.sol-timeline-item { display: flex; gap: 10px; padding-bottom: 10px; align-items: flex-start; }
.sol-timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex-shrink: 0; margin-top: 4px; }
.sol-timeline-estado { font-size: .8rem; font-weight: 700; color: #333; margin-right: 8px; }
.sol-timeline-fecha  { font-size: .75rem; color: #aaa; }
.sol-timeline-nota   { font-size: .78rem; color: #555; margin-top: 3px; }

.solicitud-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .perfil-header-card { flex-direction: column; text-align: center; }
  .perfil-grid { grid-template-columns: 1fr; }
  .perfil-card-full { grid-column: 1; }
  .solicitud-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .solicitud-estado { grid-column: 1 / -1; }
}

/* =============================================
   AUTH — Modal de login y menú de usuario
   ============================================= */

/* Avatar en navbar */
.nav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

/* Modal overlay */
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,30,82,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.auth-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 100%; max-width: 420px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}

.auth-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  border-radius: 6px; transition: background .15s;
}
.auth-modal-close:hover { background: var(--bg-light); }

.auth-modal-logo {
  font-size: 1.8rem; font-weight: 900;
  color: var(--navy); text-align: center; margin-bottom: 16px;
}
.auth-modal-logo span { color: var(--gold); }

.auth-modal-title {
  font-size: 1.3rem; font-weight: 700;
  color: var(--text-dark); text-align: center; margin-bottom: 6px;
}

.auth-modal-sub {
  font-size: .9rem; color: var(--text-muted);
  text-align: center; margin-bottom: 28px;
}

/* Botón Google */
.auth-google-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 13px 20px;
  border: 2px solid #e0e0e0; border-radius: 10px;
  background: #fff; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: #333;
  transition: border-color .2s, box-shadow .2s;
}
.auth-google-btn:hover {
  border-color: #4285F4;
  box-shadow: 0 2px 12px rgba(66,133,244,.15);
}

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: .85rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-light);
}

/* Email form */
.auth-email-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border-light); border-radius: 8px;
  font-size: .95rem; margin-bottom: 10px;
  transition: border-color .2s;
  box-sizing: border-box;
}
.auth-email-input:focus { outline: none; border-color: var(--cta); }

.auth-magic-btn {
  width: 100%; padding: 12px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: .95rem; font-weight: 600;
  transition: background .2s;
}
.auth-magic-btn:hover { background: var(--navy-dark); }

.auth-magic-note {
  font-size: .8rem; color: var(--text-muted);
  text-align: center; margin-top: 8px;
}

.auth-terms {
  font-size: .78rem; color: var(--text-muted);
  text-align: center; margin-top: 20px;
}
.auth-terms a { color: var(--cta); text-decoration: none; }

/* ── Menú dropdown de usuario ───────────────── */
.user-menu-dropdown {
  position: fixed; z-index: 1999;
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  min-width: 260px;
  overflow: hidden;
  animation: fadeInDown .15s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--border-light);
  background: var(--bg-light);
}

.user-menu-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}

.user-menu-initials {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.2rem; flex-shrink: 0;
}

.user-menu-name { font-weight: 700; font-size: .95rem; color: var(--text-dark); }
.user-menu-email { font-size: .78rem; color: var(--text-muted); }

.user-menu-rol {
  display: inline-block; margin-top: 4px;
  background: var(--navy); color: #fff;
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em;
}

.user-menu-items { padding: 8px 0; }

.user-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: none; border: none;
  cursor: pointer; font-size: .9rem; color: var(--text-dark);
  text-align: left; transition: background .15s;
}
.user-menu-item:hover { background: var(--bg-light); }

.user-menu-footer {
  border-top: 1px solid var(--border-light); padding: 8px 0;
}

.user-menu-logout {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: none; border: none;
  cursor: pointer; font-size: .9rem; color: #dc3545;
  transition: background .15s;
}
.user-menu-logout:hover { background: #fff5f5; }

/* =============================================
   BARRA COMPARATIVA TASAS SFC — APPLE STYLE
   ============================================= */
.offer-tbar-row {
  padding: 0 20px 16px;
  border-top: 1px solid rgba(0,0,0,.05);
}
.offer-tbar-row .tbar {
  margin-top: 12px;
}

.tbar {
  margin-top: 10px;
  padding: 10px 12px 8px;
  background: rgba(0,0,0,.03);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  font-family: -apple-system, 'Inter', sans-serif;
}
.tbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tbar-zona {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 2px 8px;
  border-radius: 20px;
}
.zona-baja  { background: #d4edda; color: #155724; }
.zona-media { background: #fff3cd; color: #856404; }
.zona-alta  { background: #f8d7da; color: #721c24; }
.tbar-rank {
  font-size: .67rem;
  color: #999;
  font-weight: 500;
}

/* Track tricolor */
.tbar-track {
  position: relative;
  height: 10px;
  border-radius: 5px;
  overflow: visible;
  display: flex;
  margin: 4px 0 20px;
}
.tbar-zone-low  { flex: 1; background: linear-gradient(90deg,#34c759,#a8e6b0); border-radius: 5px 0 0 5px; }
.tbar-zone-mid  { flex: 1; background: linear-gradient(90deg,#a8e6b0,#ffd60a); }
.tbar-zone-high { flex: 1; background: linear-gradient(90deg,#ffd60a,#ff3b30); border-radius: 0 5px 5px 0; }

/* Línea de promedio */
.tbar-prom-line {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 18px;
  background: rgba(0,0,0,.35);
  border-radius: 1px;
  transform: translateX(-50%);
  z-index: 2;
}
.tbar-prom-tip {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .62rem;
  color: #666;
  white-space: nowrap;
  font-weight: 600;
}
.tbar-prom-line::before {
  content: '▼';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: rgba(0,0,0,.4);
}

/* Punto de la entidad */
.tbar-dot {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2.5px solid #003082;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  box-shadow: 0 1px 4px rgba(0,48,130,.3);
  transition: left .8s cubic-bezier(.34,1.56,.64,1);
}
.tbar-dot-label {
  position: absolute;
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  font-weight: 700;
  color: #003082;
  white-space: nowrap;
}

/* Fila inferior */
.tbar-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.tbar-min, .tbar-max {
  font-size: .65rem;
  color: #aaa;
  text-align: center;
  line-height: 1.2;
}
.tbar-min small, .tbar-max small { font-size: .6rem; display: block; color: #bbb; }
.tbar-diff {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}
.tbar-diff-ok      { background: #d4edda; color: #155724; }
.tbar-diff-bad     { background: #f8d7da; color: #721c24; }
.tbar-diff-neutral { background: #fff3cd; color: #856404; }

/* ===== CONSENT CHECKBOXES (Habeas Data, Ley 1266) ===== */
.sol-consents {
  background: #f9fafb;
  border-left: 4px solid var(--gold);
  border-radius: var(--r-md);
  padding: 14px;
  margin: 16px 0;
}

.sol-consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
}

.sol-consent-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--cta);
  cursor: pointer;
}

.sol-consent-checkbox span {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text);
}

.sol-consent-checkbox input[type="checkbox"]:checked ~ span {
  color: var(--text);
  font-weight: 500;
}

.sol-consent-checkbox:last-child {
  margin-bottom: 0;
}

/* ===== Botón flotante de WhatsApp ===== */
#wa-float{
  position:fixed; right:20px; bottom:20px; z-index:9999;
  display:flex; align-items:center; gap:10px;
  background:#25D366; color:#fff;
  padding:14px 18px; border-radius:50px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  text-decoration:none; font-weight:600; font-size:15px;
  transition:transform .2s ease, box-shadow .2s ease;
}
#wa-float:hover{ transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.3); }
#wa-float svg{ flex:0 0 auto; }
#wa-float .wa-float-label{ white-space:nowrap; }
#wa-float::after{
  content:""; position:absolute; inset:0; border-radius:50px;
  box-shadow:0 0 0 0 rgba(37,211,102,.5);
  animation:wa-pulse 2.2s infinite;
}
@keyframes wa-pulse{
  0%{ box-shadow:0 0 0 0 rgba(37,211,102,.5); }
  70%{ box-shadow:0 0 0 16px rgba(37,211,102,0); }
  100%{ box-shadow:0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width:600px){
  #wa-float{ right:14px; bottom:14px; padding:14px; }
  #wa-float .wa-float-label{ display:none; } /* en móvil solo el ícono */
}
