:root {
  --uy-blue: #0d6efd;
  --uy-green: #198754;
  --uy-orange: #fd7e14;
}

body {
  background: #f8f9fa;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Navbar clara: el logo tiene texto azul oscuro */
.app-navbar {
  background: #fff;
  border-bottom: 1px solid #e5e8ec;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

.brand-logo {
  height: 72px;
  width: auto;
}

.brand-country {
  color: #1b2a4e;
  font-size: 1.1rem;
  font-weight: 600;
  padding-left: 1rem;
  border-left: 2px solid #4fb3a9;
}

/* Formulario */
.form-card {
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.input-group-text {
  min-width: 52px;
  justify-content: center;
}

/* Tarjetas de escenario */
.scenario-card {
  border-radius: 10px;
  transition: transform .15s, box-shadow .15s;
}

.scenario-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.card-header {
  border-radius: 9px 9px 0 0 !important;
  font-weight: 600;
  font-size: .95rem;
}

/* Resumen */
#summaryBox {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #eee;
  border-radius: 12px;
}

/* Override Bootstrap CSS variables so table text is visible on dark background */
#summaryBox .table {
  --bs-table-color: #fff;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

#summaryBox th {
  color: #adb5bd !important;
  font-weight: 400;
  font-size: .85rem;
}

#summaryBox td {
  color: #fff !important;
  font-weight: 600;
}

/* Gráfica */
#chartContainer {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  padding: 20px;
}

/* Spinner cotización */
#rateStatus {
  font-size: .82rem;
  min-height: 1.4em;
}

/* Búsqueda de propiedades */
.localidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .15rem 1rem;
  max-height: 220px;
  overflow-y: auto;
  padding: .75rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
}

.source-badge {
  font-weight: 500;
  font-size: .8rem;
}

.property-card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.property-card .card-img-top {
  height: 170px;
  object-fit: cover;
  background: #e9ecef;
}

/* Responsive */
@media (max-width: 767px) {
  .scenario-card { margin-bottom: 1rem; }
  #summaryBox td { font-size: .9rem; }
  .brand-logo { height: 56px; }
}

/* Página de financiamiento */
.fin-index {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
}

.rates-table th[scope="rowgroup"] {
  vertical-align: top;
}

.bank-card {
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.tips-list li + li {
  margin-top: .5rem;
}

/* Banco y tasas en el simulador */
.rates-teaser {
  margin-top: 1rem;
  transition: box-shadow .15s;
}

.rates-teaser:hover,
.rates-teaser:focus-visible {
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.rate-chip {
  font-size: .85rem;
  padding: .25rem .6rem;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  background: #fff;
  color: #1b2a4e;
  font-variant-numeric: tabular-nums;
}

#interestRate[readonly] {
  background: #eef4ff;
}

/* Tarjeta de banco enlazada desde el simulador */
.col-md-6:target .bank-card {
  outline: 3px solid #0d6efd;
  outline-offset: 2px;
}

/* Aviso para volver a la simulación: queda visible al bajar por la página */
#backToSimulation {
  position: sticky;
  top: .5rem;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

[id^="banco-"] {
  scroll-margin-top: 6rem;
}
