/*
 * Capa visual traída de la plataforma de oposiciones (dyna-plataforma-laravel,
 * public/css/app.css), no reinventada. Recortada a las reglas que estas
 * pantallas usan: se han dejado fuera los componentes propios de exámenes,
 * clasificaciones y justicia de esa plataforma, que no existen aquí.
 */

:root {
  --blue: #0758bd;
  --blue-dark: #073b82;
  --blue-light: #e8f2ff;
  --ink: #10223f;
  --muted: #62708a;
  --line: #dbe3ee;
  --surface: #fff;
  --background: #f2f6fb;
  --success: #16804a;
  --danger: #c43737;
  --warning: #8a6200;
  --radius: 18px;
  --shadow: 0 12px 35px rgba(16, 34, 63, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background); }
a { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
h2 { font-size: 1.35rem; }
button, .button {
  appearance: none; border: 0; border-radius: 12px; background: var(--blue); color: white;
  padding: .85rem 1.15rem; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
  display: inline-flex; justify-content: center; align-items: center; gap: .4rem;
}
button:hover, .button:hover { background: var(--blue-dark); }
button:disabled { opacity: .45; cursor: not-allowed; }
.button.secondary { color: var(--blue); background: var(--blue-light); }
.button.danger { background: #fff0f0; color: var(--danger); }
.small-button { padding: .6rem .85rem; }
.text-button { color: var(--muted); background: transparent; text-decoration: underline; }
input, select {
  width: 100%; border: 1px solid #c9d4e3; border-radius: 11px; padding: .82rem .9rem;
  background: white; color: var(--ink); font: inherit;
}
input:focus, select:focus { outline: 3px solid rgba(7, 88, 189, .15); border-color: var(--blue); }
label { display: grid; gap: .4rem; color: #31415d; font-weight: 650; }
.stack { display: grid; gap: 1rem; }

.site-header {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: white; padding: .9rem max(1rem, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; color: white; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand small { opacity: .85; margin-top: .15rem; }
.brand-mark {
  width: 64px; height: 64px; background: white; color: var(--blue-dark); border-radius: 16px;
  display: grid; place-content: center; text-align: center; font-weight: 900; line-height: .8; box-shadow: var(--shadow);
}
.brand-mark span, .brand-mark em { color: #60a4d6; font-style: normal; }
.brand-mark.small { width: 46px; height: 46px; border-radius: 12px; font-size: .85rem; }
.site-header nav { display: flex; align-items: center; gap: .8rem; }
.site-header nav a { color: white; text-decoration: none; font-weight: 650; }
.site-header nav form { margin: 0; }
.user-tag { color: white; opacity: .9; font-size: .85rem; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2.2rem 0 4rem; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading h1 { margin-bottom: .25rem; color: var(--blue-dark); }
.heading-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.eyebrow { color: var(--blue); letter-spacing: .12em; font-weight: 850; font-size: .75rem; margin-bottom: .55rem; }
.card { min-width: 0; background: var(--surface); border: 1px solid #e5ebf3; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }

.insight-list { display: grid; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.insight-item {
  display: flex; align-items: center; justify-content: space-between; gap: .85rem;
  padding: .85rem; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); text-decoration: none; background: #fbfdff;
}
.insight-item:hover { border-color: #b8d2f2; background: var(--blue-light); }
.insight-item span, .insight-item strong, .insight-item small { display: block; }
.insight-item small { color: var(--muted); margin-top: .18rem; }

.checkbox-row { display: flex; flex-direction: row; align-items: center; gap: .6rem; }
.checkbox-row input[type="checkbox"] { width: auto; }

.status-badge { display: inline-flex; border-radius: 999px; padding: .3rem .6rem; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.status-active { background: #e3f7eb; color: var(--success); }
.status-inactive { background: #edf0f4; color: var(--muted); }

.alert { border-radius: 12px; padding: .85rem 1rem; margin: 0 0 1rem; }
.alert.success { background: #e7f7ee; color: #17683f; border: 1px solid #b9e4cc; }
.alert.error { background: #fff0f0; color: #9f2c2c; border: 1px solid #efc3c3; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(145deg, #eaf3ff, #f8fafc 55%, #dcecff); }
.auth-card { width: min(440px, 100%); background: white; padding: 2rem; border-radius: 22px; box-shadow: 0 24px 70px rgba(16, 34, 63, .16); }
.auth-card .brand-mark { margin-bottom: 1.5rem; }

@media (max-width: 800px) {
  .site-header { align-items: flex-start; }
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; }
  .brand small { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 540px) {
  .page-shell { width: min(100% - 1rem, 1180px); padding-top: 1.2rem; }
  .site-header { padding: .7rem; align-items: stretch; flex-direction: column; }
  .brand strong { font-size: .85rem; }
  .site-header nav { gap: .35rem .65rem; justify-content: flex-start; }
  .site-header nav a { font-size: .78rem; }
  .small-button { padding: .5rem .65rem; font-size: .78rem; }
  .auth-card { padding: 1.4rem; }
}
