:root{
  --mcc-blue:#2f3e91;
  --mcc-blue-dark:#26357f;
  --mcc-red:#ef2b35;
  --mcc-yellow:#ffc533;
  --mcc-green:#8cc63f;
  --ink:#202530;
  --muted:#6b7280;
  --line:#dde2eb;
}

*{box-sizing:border-box}
html,body{min-height:100%}

body{
  margin:0;
  color:var(--ink);
  background:
    radial-gradient(circle at 7% 12%, rgba(239,43,53,.19), transparent 22%),
    radial-gradient(circle at 93% 10%, rgba(255,197,51,.20), transparent 22%),
    radial-gradient(circle at 90% 88%, rgba(140,198,63,.17), transparent 24%),
    linear-gradient(135deg,#24317a 0%,#334294 48%,#26357f 100%);
  min-height:100vh;
}

.page-wrap{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding:26px 16px 46px;
}

.main-card{
  background:#fff;
  border-radius:20px;
  box-shadow:0 18px 48px rgba(12,20,65,.26);
  overflow:hidden;
}

/* CABECERA COMPACTA */
.top-card-header{
  position:relative;
  background:#fff;
  border-bottom:1px solid #eceff5;
}

.top-card-header::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:4px;
  background:linear-gradient(
    90deg,
    var(--mcc-red) 0 25%,
    var(--mcc-yellow) 25% 50%,
    var(--mcc-green) 50% 75%,
    var(--mcc-blue) 75% 100%
  );
}

.top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px 8px;
}

.logo-slot{
  display:flex;
  align-items:center;
  min-height:72px;
}

/* Logo con tamaño legible sin dominar el encabezado */
.brand-logo{
  display:block;
  width:235px;
  max-width:235px;
  height:auto;
  max-height:70px;
  object-fit:contain;
  object-position:left center;
}

.admin-link{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  padding:0;
  color:var(--mcc-blue);
  background:#fff;
  border:1px solid #d9deeb;
  border-radius:10px;
  text-decoration:none;
  box-shadow:0 3px 10px rgba(22,31,85,.06);
}
.admin-link:hover{
  color:#fff;
  background:var(--mcc-blue);
  border-color:var(--mcc-blue);
}

.title-area{
  text-align:center;
  padding:2px 22px 18px;
}

.header-title{
  color:#222;
  font-size:clamp(1.45rem,2.6vw,2rem);
  line-height:1.15;
  font-weight:800;
  margin:0 0 6px;
}
.header-subtitle{
  margin:0;
  color:#444a56;
  font-weight:700;
  font-size:1rem;
}
.header-note{
  margin:6px 0 0;
  color:var(--muted);
  font-size:.92rem;
}

.content-area{
  padding:20px 22px 24px;
}

.form-card{
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  box-shadow:none;
  margin-bottom:13px;
}
.section-title{
  padding:10px 14px;
  text-align:center;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.15px;
  color:#30343d;
  background:#eceef2;
  border-bottom:1px solid #dde1e8;
}
.form-card .card-body{padding:17px}
.form-label{font-weight:700;color:#343944}
.required::after{content:" *";color:#dc3545}

.form-control,.form-select{
  min-height:43px;
  border-radius:8px;
  border-color:#d6dae4;
}
textarea.form-control{min-height:auto}
.form-control:focus,.form-select:focus{
  border-color:#6873ca;
  box-shadow:0 0 0 .18rem rgba(47,62,145,.11);
}
.form-check-input:checked{
  background-color:var(--mcc-blue);
  border-color:var(--mcc-blue);
}

/* FOOTER DEL FORMULARIO: NO FIJO, SOLO BOTÓN */
.form-footer{
  position:static !important;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:14px 0 4px;
  margin:0;
  background:transparent;
  border:0;
  box-shadow:none;
}

.btn-submit{
  min-width:min(100%,300px);
  padding:12px 28px;
  border:0;
  border-radius:9px;
  font-weight:800;
  color:#fff;
  background:var(--mcc-blue);
  box-shadow:0 7px 18px rgba(47,62,145,.20);
}
.btn-submit:hover{
  color:#fff;
  background:var(--mcc-blue-dark);
}

/* Dashboard */
.dashboard-body{background:#f5f7fb}
.dashboard-nav{background:linear-gradient(90deg,#1e2c70,#36459b)}
.stat-card{border:0;border-radius:16px;box-shadow:0 7px 20px rgba(36,48,107,.09)}
.data-card{border:0;border-radius:16px;box-shadow:0 7px 20px rgba(36,48,107,.09);overflow:hidden}

/* Login / gracias */
body > .page-wrap > .public-header{
  border-radius:18px;
  box-shadow:0 15px 40px rgba(13,22,70,.24);
  background:#fff;
  padding:22px;
}
body > .page-wrap > .public-header .brand-logo{
  width:125px;
  max-width:125px;
  max-height:55px;
}

@media(max-width:767.98px){
  .page-wrap{padding:10px 8px 26px}
  .main-card{border-radius:14px}

  .top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px 8px;
}

  .logo-slot{
  display:flex;
  align-items:center;
  min-height:72px;
}

  .brand-logo{
    width:185px;
    max-width:185px;
    max-height:58px;
  }

  .admin-link{
    width:38px;
    height:38px;
    padding:0;
    min-height:38px;
  }
  .title-area{
    padding:4px 14px 15px;
  }

  .header-title{
    font-size:1.25rem;
  }

  .header-subtitle{
    font-size:.92rem;
  }

  .header-note{
    font-size:.84rem;
  }

  .content-area{
    padding:13px 10px 17px;
  }

  .form-card{
    border-radius:9px;
  }

  .form-card .card-body{
    padding:13px;
  }

  .section-title{
    font-size:.88rem;
    padding:9px 10px;
  }

  .form-footer{
    padding:10px 0 2px;
  }
}
