:root {
  --navy: #03152f;
  --navy-2: #062853;
  --navy-3: #07182d;
  --gold: #ffb400;
  --white: #f8fbff;
  --muted: #b8c7da;
  --line: #2187ff;
  --danger: #ff8a8a;
  --success: #72e5a2;
}

/* =========================
   CONFIGURACIÓN GENERAL
========================= */

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  color: var(--white);
  background:
    #021229
    url("/fondo-tecnologico.png")
    center / cover
    fixed
    no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(1, 12, 28, 0.34),
    rgba(1, 12, 28, 0.62)
  );
  pointer-events: none;
}

.shell,
.admin-shell,
footer {
  position: relative;
  z-index: 1;
}

/* =========================
   DISTRIBUCIÓN PRINCIPAL
========================= */

.shell {
  width: min(1200px, 94%);
  margin: auto;
  padding: 34px 0 24px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 34px;
  align-items: center;
}

.hero {
  padding: 24px;
}

/* =========================
   ENCABEZADO SOMEFI
========================= */

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 12px;

  width: 100%;
  margin: 0 0 28px;
}

.brand .somefi-logo {
  display: block;

  width: 54px;
  height: 54px;
  min-width: 54px;
  max-width: 54px;
  max-height: 54px;

  flex: 0 0 54px;
  object-fit: contain;
  margin: 0;
}

/* SOMEFI: blanco y grueso */
.brand span {
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
}

/* UNAM · Facultad de Ingeniería: amarillo y delgado */
.brand strong {
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.2;
  min-width: 0;
  margin: 0;
}

/* =========================
   TÍTULO DEL EVENTO
========================= */

.title-row {
  display: flex;
  gap: 22px;
  align-items: center;
  margin: 34px 0 18px;
}

.edition {
  color: var(--gold);
  font-size: clamp(6.5rem, 15vw, 11rem);
  line-height: 0.72;
  letter-spacing: -0.08em;
}

.title-row p {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  font-weight: 700;
}

.title-row h1 {
  margin: 7px 0 0;
  text-transform: uppercase;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(2.8rem, 5.7vw, 5.3rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
}

/* =========================
   MODALIDAD Y BIENVENIDA
========================= */

.mode {
  display: inline-block;
  padding: 13px 20px;

  border: 2px solid var(--gold);
  border-radius: 8px;

  color: var(--gold);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
}

.welcome {
  margin-top: 22px;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 700;
}

/* =========================
   DATOS DEL EVENTO
========================= */

.facts {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.facts span {
  padding: 8px 13px;

  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;

  background: rgba(3, 23, 48, 0.42);
  line-height: 1.35;
}

.facts b {
  color: var(--gold);
  margin-right: 6px;
}

/* =========================
   TARJETA DEL FORMULARIO
========================= */

.card {
  position: relative;

  padding: clamp(24px, 4vw, 42px);

  border: 1px solid rgba(255, 180, 0, 0.78);
  border-radius: 24px;

  background: linear-gradient(
    155deg,
    rgba(8, 38, 78, 0.97),
    rgba(2, 20, 44, 0.98)
  );

  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.card-heading p {
  margin: 0;

  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-heading h2,
.card-heading h1 {
  margin: 0.35rem 0;
  font-size: 2rem;
}

.card-heading span {
  color: var(--muted);
  line-height: 1.5;
}

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

form {
  margin-top: 25px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 13px 14px;

  border: 1px solid #58789b;
  border-radius: 10px;

  background: var(--navy-3);
  color: #ffffff;

  font: inherit;
  outline: none;
}

input::placeholder {
  color: #8ea3bb;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.16);
}

/* =========================
   RADIO BUTTONS
========================= */

fieldset {
  padding: 13px 15px;

  border: 1px solid #355a82;
  border-radius: 12px;
}

legend {
  padding: 0 7px;
  font-weight: 800;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.choice-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.choice-row input,
.consent input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

/* =========================
   CONSENTIMIENTO
========================= */

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;

  margin: 20px 0;

  color: #dce6f1;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* =========================
   BOTONES
========================= */

button,
.button {
  display: inline-block;
  padding: 13px 18px;

  border: 0;
  border-radius: 10px;

  background: var(--gold);
  color: #06162b;

  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;

  cursor: pointer;
}

button:hover,
.button:hover {
  filter: brightness(1.07);
}

button:active,
.button:active {
  transform: translateY(1px);
}

.secondary {
  margin-left: 8px;
  background: #294663;
  color: #ffffff;
}

/* =========================
   MENSAJES
========================= */

#status {
  min-height: 1.5rem;
  font-weight: 700;
}

.success {
  color: var(--success);
}

.error {
  color: var(--danger);
}

/* Campo trampa contra bots */
.trap {
  position: absolute;
  left: -10000px;
}

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

.admin-shell {
  width: min(1220px, 94%);
  margin: 44px auto;
}

.login-card {
  max-width: 520px;
  margin: 8vh auto;
}

.hidden {
  display: none;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.dashboard-head p {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.table-wrap {
  overflow: auto;
  margin-top: 24px;

  border: 1px solid #294d72;
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 1050px;

  border-collapse: collapse;
  background: #06172d;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #284764;
  text-align: left;
}

th {
  position: sticky;
  top: 0;

  background: #092344;
  color: var(--gold);
}

/* =========================
   PIE DE PÁGINA
========================= */

footer {
  padding: 16px 12px 28px;
  color: var(--muted);
  text-align: center;
}

/* =========================
   TABLETAS
========================= */

@media (max-width: 900px) {
  body {
    background-position: 65% center;
  }

  .shell {
    grid-template-columns: 1fr;
    padding-top: 16px;
  }

  .hero {
    padding: 10px 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .full {
    grid-column: auto;
  }

  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================
   CELULARES
========================= */

@media (max-width: 700px) {
  .brand {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    margin-bottom: 20px;
  }

  .brand .somefi-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;
    max-height: 38px;
    flex: 0 0 38px;
  }

  .brand span {
    font-size: 1.18rem;
    font-weight: 800;
  }

  .brand strong {
    max-width: 155px;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.12;
    white-space: normal;
  }
}

/* =========================
   CELULARES MUY PEQUEÑOS
========================= */

@media (max-width: 420px) {
  .brand {
    gap: 6px;
  }

  .brand .somefi-logo {
    width: 34px;
    height: 34px;
    min-width: 34px;
    max-width: 34px;
    max-height: 34px;
    flex-basis: 34px;
  }

  .brand span {
    font-size: 1.05rem;
  }

  .brand strong {
    max-width: 130px;
    font-size: 0.68rem;
  }
}