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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;

  background:
    linear-gradient(rgba(223, 223, 223, 0.88), rgba(223, 223, 223, 0.88)),
    url("../img/fondoBG.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;
  color: #1f2937;
}

.dashboard {
  min-height: 100vh;
}

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

.navbar {
    width: 100%;
    background: #074a7b;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 40px;

    position: sticky;

    top: 0;

    z-index: 1000;

    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}


.nav-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-logo span {
    color: white;
    font-size: 42px;
    font-weight: 700;
}

.menu-btn {
  display: none;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-link {
  background: transparent;
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 0;
  box-shadow: none;
}

.nav-link:hover,
.nav-link.active {
  color: #7ec8ff;
}

.nav-right {
  display: none;
}
.nav-icons {
    display: flex;
    gap: 20px;
}

.nav-icons a {
    color: white;
    font-size: 22px;
    transition: 0.3s;
}

.nav-icons a:hover {
    color: #7ec8ff;
    transform: scale(1.1);
}

/* =========================
MAIN
========================= */

.main {
  width: 95%;
  max-width: 1200px;
  margin: auto;
  padding-bottom: 40px;
}

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

.hero {
  padding: 60px;

  border-radius: 28px;

  background: url("../img/fondoBG.png"), rgba(255, 255, 255, 0.82);

  background-size: 300px, auto;
  background-repeat: repeat, no-repeat;

  backdrop-filter: blur(10px);

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.4);

  margin-bottom: 30px;
}

.hero h2 {
  color: #074a7b;
  font-size: 42px;
  margin-bottom: 20px;
  max-width: 700px;
}

.hero p {
  color: #475569;
  line-height: 1.8;
  max-width: 700px;
  font-size: 18px;
}

.hero-btn {
  display: inline-block;

  margin-top: 25px;

  text-decoration: none;

  background: #074a7b;

  color: white;

  padding: 15px 28px;

  border-radius: 50px;

  font-weight: 700;

  transition: 0.25s;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* =========================
METRICS
========================= */

.metrics {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

  gap: 20px;

  margin: 30px 0;
}

.metric-card {
  background: white;

  border-radius: 24px;

  padding: 30px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  transition: 0.25s;
}

.metric-card:hover {
  transform: translateY(-5px);
}

.metric-card h4 {
  color: #074a7b;
  font-size: 18px;
  margin-bottom: 10px;
}

.metric-card p {
  font-size: 28px;
  font-weight: 700;
}

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

.panel {
  padding: 35px;

  border-radius: 28px;

  background: url("../img/fondoBG.png"), rgba(255, 255, 255, 0.82);

  background-size: 300px, auto;
  background-repeat: repeat, no-repeat;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.4);
}

.panel h3 {
  color: #074a7b;

  font-size: 30px;

  margin-bottom: 20px;

  position: relative;

  padding-left: 18px;
}

.panel h3::before {
  content: "";

  position: absolute;

  left: 0;
  top: 50%;

  transform: translateY(-50%);

  width: 5px;
  height: 28px;

  background: #b82627;

  border-radius: 20px;
}

.panel-description {
  margin-top: 15px;
  margin-bottom: 25px;

  line-height: 1.8;

  color: #475569;
}

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

.footer {
  margin-top: 30px;
  text-align: center;
  color: #64748b;
  padding: 20px;
}

.hero,
.metric-card,
.panel {
  background: url("../img/fondoBG.png"), rgba(255, 255, 255, 0.85);

  background-size: 600px;

  background-repeat: repeat;

  border-radius: 28px;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.4);
}

.metric-card:hover {
  transform: translateY(-5px);

  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);

  transition: 0.3s;
}
.card-design {
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    url("../img/fondoBG.png");

  background-size: auto, 320px;

  background-repeat: no-repeat, repeat;

  border-radius: 28px;

  backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.4);

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}
.subnav {
  width: 95%;
  max-width: 1200px;

  margin: 20px auto;

  padding: 15px 20px;

  display: flex;
  justify-content: center;
  gap: 15px;

  flex-wrap: wrap;

  border-radius: 24px;

  background: url("../img/fondoBG.png"), rgba(255, 255, 255, 0.88);

  background-size: 700px;

  background-repeat: repeat;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.subnav-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 14px 24px;

  border-radius: 50px;

  text-decoration: none;

  background: white;

  color: #074a7b;

  font-weight: 700;

  transition: 0.25s;
}

.subnav-item:hover {
  background: #074a7b;
  color: white;

  transform: translateY(-2px);
}

.subnav-item.active {
  background: #074a7b;
  color: white;
}
.panel {
  padding: 35px;

  border-radius: 28px;

  background: url("../img/fondoBG.png"), rgba(255, 255, 255, 0.88);

  background-size: 700px;

  background-repeat: repeat;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.4);

  margin-bottom: 30px;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-weight: 600;
  color: #074a7b;
}
input:not([type="radio"]) {
  width: 100%;
  padding: 18px 16px;
  border: none;
  border-radius: 18px;
  background: #dfe5ec;
  font-size: 18px;
  margin-top: 5px;
  transition: 0.25s;
}

input:focus {
  outline: none;

  background: white;

  box-shadow: 0 0 0 4px rgba(46, 111, 242, 0.12);
}
button {
  border: none;

  background: #074a7b;

  color: white;
  margin-top: 10px;

  padding: 15px 24px;

  border-radius: 50px;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s;

  width: fit-content;
}

button:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.result-box {
  margin-top: 40px;

  padding: 28px;

  max-width: 500px;

  border-radius: 24px;

  background: white;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.result-box h4 {
  color: #074a7b;
  margin-bottom: 20px;
}
.result-box p {
  margin-bottom: 18px;
  line-height: 1.8;
}

.result-box span {
  font-weight: 700;
  color: #074a7b;
}
.result-box p:last-child {
  margin-bottom: 0;
}

/* =========================
FORMULARIO
========================= */

.calc-form {
  display: flex;
  flex-direction: column;

  gap: 22px;

  margin-top: 30px;
  margin-bottom: 35px;

  max-width: 100%;
}

/* CADA CAMPO */

.input-group {
  display: flex;
  flex-direction: column;

  gap: 10px;

  margin-bottom: 5px;
}

.input-group label {
  font-size: 16px;

  font-weight: 700;

  color: #074a7b;

  margin-bottom: 5px;
}

/* =========================
TABLA CLIENTES
========================= */

.clients-table {
  width: 100%;

  border-collapse: separate;

  border-spacing: 0;

  margin-top: 30px;

  overflow: hidden;

  border-radius: 24px;

  background: white;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* CABECERA */

.clients-table thead {
  background: #074a7b;
}

.clients-table th {
  color: white;

  padding: 22px 16px;

  font-size: 16px;

  font-weight: 700;

  text-align: center;
}

/* ESQUINAS */

.clients-table th:first-child {
  border-top-left-radius: 24px;
}

.clients-table th:last-child {
  border-top-right-radius: 24px;
}

/* FILAS */

.clients-table td {
  padding: 22px 16px;

  text-align: center;

  border-bottom: 1px solid #e5e7eb;

  font-size: 16px;
}

.clients-table tbody tr:hover {
  background: #f8fafc;
}

/* BOTONES TABLA */

.table-btn {
  border: none;

  background: #074a7b;

  color: white;

  padding: 12px 22px;

  border-radius: 50px;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s;

  margin: 0 5px;
}

.table-btn:hover {
  transform: translateY(-2px);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.delete-btn {
  background: #b82627;
}

/* ==========================
CREDITOS
========================== */

.credit-search {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.credit-client-card {
  background: rgba(255, 255, 255, 0.85);

  padding: 30px;

  border-radius: 28px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  max-width: 600px;

  margin-bottom: 25px;
}

.credit-client-card h4 {
  color: #074a7b;

  font-size: 34px;

  margin-bottom: 20px;
}

.credit-client-card p {
  margin-bottom: 15px;

  font-size: 24px;
}

.credit-buttons {
  display: flex;

  gap: 15px;

  flex-wrap: wrap;
}

.credit-result {
  margin-top: 25px;

  max-width: 520px;

  background: #cfead5;

  border-left: 8px solid #16a34a;

  border-radius: 28px;

  padding: 28px;

  color: #166534;

  font-size: 24px;
}

.credit-result p {
  margin-bottom: 18px;

  font-weight: 600;
}

.credit-result hr {
  margin: 18px 0;

  border: none;

  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

#credit-status {
  font-size: 32px;

  font-weight: 800;
}

/* ==========================
RADIO CREDITOS
========================== */

.credit-radio-group {
  display: flex;

  gap: 20px;

  flex-wrap: wrap;
}

.radio-card {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 16px 24px;

  background: white;

  border-radius: 24px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  cursor: pointer;

  transition:
    background 0.3s,
    box-shadow 0.3s,
    border-color 0.3s;

  border: 2px solid transparent;
}

.radio-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.radio-card input {
  width: auto;

  margin: 0;
}
/* ==========================
CREDITOS RESPONSIVE
========================== */

@media (max-width: 768px) {
  .credit-search {
    flex-direction: column;
    align-items: stretch;
  }

  .credit-search button {
    width: 100%;
  }

  .credit-buttons {
    flex-direction: column;
  }

  .credit-buttons button {
    width: 100%;
  }

  .credit-client-card {
    max-width: 100%;
  }

  .credit-result {
    max-width: 100%;
    font-size: 18px;
  }

  #credit-status {
    font-size: 24px;
  }

  .credit-radio-group {
    flex-direction: column;
  }

  .radio-card {
    width: 100%;
    justify-content: flex-start;
  }

  .table-credit-container {
    overflow-x: auto;
  }

  .table-credit-container table {
    min-width: 700px;
  }
}

.radio-card:has(input:checked) {
  border: 2px solid #074a7b;

  background: #eef6ff;

  box-shadow: 0 10px 25px rgba(7, 74, 123, 0.15);
}

/* ==========================
QUIZ SCORE
========================== */

.quiz-score-box {
  display: flex;

  align-items: center;

  gap: 20px;

  padding: 25px;

  margin-bottom: 25px;

  background: linear-gradient(135deg, #074a7b, #0a5f9c);

  color: white;

  border-radius: 28px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.score-icon {
  width: 80px;

  height: 80px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.18);

  font-size: 36px;
}

.score-info h4 {
  margin: 0;

  opacity: 0.9;

  font-size: 18px;
}

.score-info h2 {
  margin-top: 8px;

  font-size: 42px;

  font-weight: 800;
}
.calculators-subnav {
  margin-bottom: 25px;
}

.calculators-subnav button {
  border: none;
}

/* ==========================
FUTURO FINANCIERO
========================== */

.future-panel {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.future-panel:hover {
  transform: translateY(-6px);

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ==========================
TEORIA
========================== */

.theory-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

  gap: 25px;

  margin-top: 30px;
}

.theory-card {
  background: white;

  border-radius: 28px;

  padding: 25px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  transition: 0.3s;

  border: 1px solid rgba(7, 74, 123, 0.08);
}

.theory-card:hover {
  transform: translateY(-6px);

  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
}

.theory-card h4 {
  color: #074a7b;

  font-size: 26px;

  margin-bottom: 10px;
}

.theory-card p {
  color: #555;

  line-height: 1.6;
}

.formula {
  margin: 18px 0;

  padding: 15px;

  background: #f4f8fc;

  border-left: 5px solid #074a7b;

  border-radius: 14px;

  font-weight: 700;

  font-size: 20px;
}

.theory-btn {
  background: #074a7b;

  color: white;

  border: none;

  padding: 14px 24px;

  border-radius: 999px;

  cursor: pointer;

  font-weight: 700;

  transition: 0.3s;
}

.theory-btn:hover {
  transform: translateY(-2px);

  background: #0b5d99;
}

.demo-box {
  margin-top: 18px;

  padding: 15px;

  background: #eef7ff;

  border-radius: 18px;

  display: none;
}

.credit-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.credit-buttons button {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-pagar {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.pagada {
  color: green;
  font-weight: bold;
  font-size: 20px;
}
.btn-credito {
  margin: 5px;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-credito.activo {
  background: #2563eb;
  color: white;
  font-weight: bold;
}

.pagada {
  color: green;
  font-size: 22px;
  font-weight: bold;
}
.btn-credito {
  margin: 5px;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-credito.activo {
  background: #2563eb;
  color: white;
  font-weight: bold;
}

.pagada {
  color: green;
  font-size: 22px;
  font-weight: bold;
}

.payment-left {
  flex: 1;
  min-width: 0;
}

.credit-search {
  display: flex;
  align-items: center;
  gap: 15px;
}
.credit-search .input-group {
  flex: 1;
  max-width: 350px;
}

.credit-buttons {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-left {
  flex: 1;
}
.payment-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.payment-top > * {
  flex-shrink: 0;
}

.credit-client-card {
  width: 320px;
  min-width: 320px;

  background: rgba(255, 255, 255, 0.92);

  padding: 25px;

  border-radius: 24px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  margin: 0;
}

.credit-client-card h4 {
  color: #074a7b;
  font-size: 2rem;
  margin-bottom: 20px;
}

.credit-client-card p {
  font-size: 18px;
  margin-bottom: 12px;
}

.credit-client-card p {
  margin-bottom: 12px;
  font-size: 1.1rem;
}


/* ==========================
   ALERTA MODERNA
========================== */

.overlay-alerta {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.35);

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 20px;

  z-index: 9999;

  opacity: 0;
  transition: 0.3s ease;
}

.overlay-alerta.mostrar {
  opacity: 1;
}

.alerta-modal {
  width: 100%;
  max-width: 360px;

  background: #ffffff;

  border-radius: 24px;

  padding: 35px 25px;

  text-align: center;

  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);

  transform: scale(0.85);

  transition: 0.3s ease;
}

.overlay-alerta.mostrar .alerta-modal {
  transform: scale(1);
}

.alerta-check {
  width: 80px;
  height: 80px;

  margin: 0 auto 20px;

  border-radius: 50%;

  background: #dcfce7;

  color: #16a34a;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 38px;
}

.alerta-modal h2 {
  color: #074a7b;

  font-size: 32px;

  margin-bottom: 10px;
}

.alerta-modal p {
  color: #475569;

  font-size: 17px;

  line-height: 1.5;
}