:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #334155;
  --soft: #f1f5f9;
  --ok: #166534;
  --warn: #92400e;
  --bad: #991b1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
}

header {
  background: var(--primary);
  color: white;
  padding: 22px 18px;
}

header h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

header p {
  margin: 0;
  opacity: .9;
  font-size: 14px;
}

.header-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 960px;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

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

@media (min-width: 980px) {
  .grid.two {
    grid-template-columns: 1.1fr .9fr;
    align-items: start;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

@media (min-width: 720px) {
  .patient-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  background: white;
  color: var(--text);
}

textarea {
  min-height: 70px;
  resize: vertical;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: var(--primary);
  color: white;
  font-weight: 600;
}

button.secondary {
  background: var(--soft);
  color: var(--primary);
  border: 1px solid var(--line);
}

.status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }

.items {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}

.item-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.item-number {
  font-weight: bold;
  color: var(--primary);
}

.item-text {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bdi-item {
  grid-template-columns: 70px 1fr;
  align-items: start;
}

.bdi-item .item-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bdi-option {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
  padding: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.bdi-option input {
  width: auto;
  margin-top: 3px;
}

.bdi-option span {
  display: block;
  line-height: 1.35;
}

.bdi-option:has(input:checked) {
  background: var(--soft);
  border-color: var(--primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.score {
  text-align: right;
  font-weight: bold;
}

.note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.gravedad-baja {
  color: #166534;
  background: #dcfce7;
  border-radius: 8px;
  padding: 4px 7px;
}

.gravedad-media {
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  padding: 4px 7px;
}

.gravedad-alta {
  color: #991b1b;
  background: #fee2e2;
  border-radius: 8px;
  padding: 4px 7px;
}

.interpretacion-box {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.alerta-clinica {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.recomendacion-clinica {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #334155;
}

.informe,
.print-only {
  display: none;
}

@media (max-width: 640px) {
  .item-row {
    grid-template-columns: 1fr;
  }

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

@media print {
  body {
    background: white;
  }

  header,
  .toolbar,
  .no-print,
  .items {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: none;
  }

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

  .informe,
  .print-only {
    display: block;
    page-break-before: always;
  }
}


/* ===== DASHBOARD PROFESIONAL ===== */

.dashboard-body {
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  min-height: 100vh;
}

.dashboard-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.dashboard-header h1 {
  font-size: 32px;
  margin: 0;
  color: #1f2937;
}

.dashboard-header p {
  margin: 6px 0 0;
  color: #6b7280;
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.test-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;

  min-height: 170px;
  padding: 22px;

  background: white;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);

  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.test-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  border-color: #2563eb;
  background: #ffffff;
}

.test-icon {
  font-size: 34px;
  margin-bottom: 14px;
}

.test-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
}

.test-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-header h1 {
    font-size: 26px;
  }

  .logout {
    width: 100%;
  }
}




/* ===== ADAPTACION TESTS ===== */

.formacion-card {
  cursor: pointer;
  transition: 0.2s;
}

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

.logout {
  background: #222;
  color: white;
  border-radius: 6px;
  padding: 8px 12px;
}


/* ===== PANEL DE TESTS - ESTILO INSTITUCIONAL ===== */

.tests-home {
  margin: 0;
  min-height: 100vh;
  background: #111;
  color: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
}

.tests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 42px;
  background: #161616;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.tests-logo img {
  width: 82px;
  height: auto;
  display: block;
}

.tests-brand {
  flex: 1;
  text-align: right;
  font-size: 15px;
  letter-spacing: .08em;
  color: #f2f2f2;
  line-height: 1.35;
}

.tests-brand span {
  display: block;
  font-size: 13px;
  color: #c9a86a;
  letter-spacing: .04em;
  margin-top: 4px;
}

.tests-logout {
  background: transparent;
  border: 1px solid #c9a86a;
  color: #c9a86a;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.tests-logout:hover {
  background: #c9a86a;
  color: #111;
}

.tests-hero {
  padding: 70px 20px 45px;
  text-align: center;
  background: linear-gradient(180deg, #1a1a1a, #111);
}

.tests-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 700;
  color: #ffffff;
}

.tests-hero p {
  margin-top: 14px;
  font-size: 18px;
  color: #cfcfcf;
}

.tests-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 35px 20px 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.tests-card {
  min-height: 220px;
  text-align: left;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(201,168,106,.45);
  background: #1b1b1b;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: .25s ease;
}

.tests-card:hover {
  transform: translateY(-6px);
  background: #222;
  border-color: #c9a86a;
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
}

.tests-card span {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.tests-card small {
  display: block;
  color: #cfcfcf;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 12px;
}

.tests-card b {
  color: #c9a86a;
  font-size: 14px;
  margin-top: 22px;
}

@media (max-width: 980px) {
  .tests-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .tests-header {
    padding: 16px 22px;
  }
}

@media (max-width: 620px) {
  .tests-header {
    flex-direction: column;
    text-align: center;
  }

  .tests-brand {
    text-align: center;
  }

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

  .tests-card {
    min-height: 170px;
  }
}






/* ===== MEJORA SELECT RESPUESTAS ===== */

.item-row select {
  font-size: 16px;        /* más grande */
  padding: 10px 12px;     /* más cómodo */
  height: 42px;           /* botón más alto */
  min-width: 220px;       /* evita que se corte */
  line-height: 1.3;
}



/* ===== SELECT RESPUESTAS (MINIMAL PRO) ===== */

.item-row select {
  font-size: 12px;
  padding: 2px 4px;
  height: 22px;
  min-width: 100px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

/* Desktop */
@media (min-width: 720px) {
  .item-row {
    grid-template-columns: 60px 1fr 110px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .item-row select {
    width: 100%;
    height: 24px;
  }
}


/* ===== LOGIN PROFESIONAL ===== */

.login-body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(135deg, #111, #1f2937);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-box {
  background: #1b1b1b;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(201,168,106,0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 25px;
}

.login-header h2 {
  margin: 0;
  color: #fff;
}

.login-header p {
  color: #aaa;
  font-size: 14px;
  margin-top: 5px;
}

/* inputs */
.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: none;
  background: #2a2a2a;
  color: #fff;
}

/* botón ingresar */
.btn-login {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #c9a86a;
  color: #111;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

.btn-login:hover {
  background: #b89558;
}

/* botón whatsapp */
.btn-whatsapp {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #25d366;
  color: #25d366;
  font-size: 14px;
}

.btn-whatsapp:hover {
  background: #25d366;
  color: #111;
}

/* error */
.login-error {
  color: #ff4d4d;
  margin-top: 10px;
  text-align: center;
}


/* ===== LOGIN PREMIUM ===== */

.login-premium-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(201,168,106,.18), transparent 35%),
    linear-gradient(135deg, #0f0f0f, #1f2937);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  padding: 20px;
}

.login-premium-card {
  width: 100%;
  max-width: 420px;
  background: rgba(20,20,20,.95);
  border: 1px solid rgba(201,168,106,.35);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  text-align: center;
}

.login-logo img {
  width: 90px;
  margin-bottom: 18px;
}

.login-premium-card h1 {
  color: #fff;
  margin: 0;
  font-size: 28px;
}

.login-subtitle {
  color: #c9a86a;
  font-size: 14px;
  margin: 8px 0 24px;
}

.login-form input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #252525;
  color: #fff;
  box-sizing: border-box;
}

.login-form input::placeholder {
  color: #9ca3af;
}

.btn-login-premium {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: #c9a86a;
  color: #111;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
}

.btn-login-premium:hover {
  background: #b89558;
}

.btn-access-premium {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #25d366;
  background: transparent;
  color: #25d366;
  font-weight: 700;
  cursor: pointer;
}

.btn-access-premium:hover {
  background: #25d366;
  color: #111;
}

.login-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 12px;
}

.login-note {
  color: #aaa;
  font-size: 12px;
  margin-top: 22px;
  line-height: 1.4;
}


.login-separador {
  border: none;
  border-top: 1px solid rgba(201,168,106,.25);
  margin: 24px 0;
}

.solicitud-box h2 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 14px;
}

.solicitud-box textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 13px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #252525;
  color: #fff;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

.solicitud-box textarea::placeholder {
  color: #9ca3af;
}


/* ===== ESPACIADO FORMULARIO SOLICITUD ===== */

.solicitud-box input,
.solicitud-box textarea {
  margin-bottom: 14px; /* más aire entre campos */
}

/* opcional: separación superior del bloque */
.solicitud-box {
  margin-top: 10px;
}



/* ===== FORMULARIO SOLICITUD PRO ===== */

.solicitud-subtitulo {
  color: #aaa;
  font-size: 13px;
  margin: -4px 0 18px;
  line-height: 1.4;
}

.campo-form {
  margin-bottom: 16px;
  text-align: left;
}

.campo-form label {
  display: block;
  color: #c9a86a;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.campo-form input,
.campo-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: #252525;
  color: #fff;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.campo-form textarea {
  min-height: 95px;
  resize: vertical;
}

.campo-form input::placeholder,
.campo-form textarea::placeholder {
  color: #777;
}

.campo-form input:focus,
.campo-form textarea:focus {
  outline: none;
  border-color: #c9a86a;
  box-shadow: 0 0 0 3px rgba(201,168,106,.16);
  background: #202020;
}

.campo-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.16) !important;
}


/* BOTON VOLVER */
.volver-header {
  position: absolute;
  top: 20px;
  left: 20px;
}

.btn-volver {
  text-decoration: none;
  color: #c9a86a;
  border: 1px solid #c9a86a;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.btn-volver:hover {
  background: #c9a86a;
  color: #111;
}


/* MARCAR SECCIÓN ACTIVA */
#menu a.activo {
  color: #c9a86a;
  font-weight: bold;
}





/* ===== AJUSTE HEADER LOGIN ===== */

.login-premium-body header {
  padding: 10px 20px;
}

/* achicar logo SOLO en login */
.login-premium-body .logo img {
  width: 55px;
  height: auto;
}

/* achicar altura del header */
.login-premium-body .nav-container {
  align-items: center;
  gap: 15px;
}

/* menú más compacto */
.login-premium-body #menu a {
  font-size: 13px;
}

/* botón más chico */
.login-premium-body .btn-header-inline {
  padding: 6px 10px;
  font-size: 12px;
}


/* ===== LOGIN MINIMALISTA PRO ===== */

.login-premium-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(201,168,106,.18), transparent 35%),
    linear-gradient(135deg, #0f0f0f, #1f2937);
  font-family: Arial, Helvetica, sans-serif;
  padding: 24px;
  box-sizing: border-box;
}

.login-topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 10;
}

.login-back {
  display: inline-flex;
  text-decoration: none;
  color: #c9a86a;
  border: 1px solid rgba(201,168,106,.55);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(0,0,0,.25);
}

.login-back:hover {
  background: #c9a86a;
  color: #111;
}

.login-premium-card {
  width: 100%;
  max-width: 430px;
  margin: 70px auto 30px;
  background: rgba(20,20,20,.96);
  border: 1px solid rgba(201,168,106,.35);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  text-align: center;
  box-sizing: border-box;
}

.login-logo img {
  width: 86px !important;
  height: auto !important;
  max-width: 86px !important;
  display: block;
  margin: 0 auto 18px;
}

.login-premium-card h1 {
  color: #fff;
  margin: 0;
  font-size: 28px;
}

.login-subtitle {
  color: #c9a86a;
  font-size: 14px;
  margin: 8px 0 24px;
}

.login-form input,
.campo-form input,
.campo-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: #252525;
  color: #fff;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

.login-form input {
  margin-bottom: 12px;
}

.login-form input::placeholder,
.campo-form input::placeholder,
.campo-form textarea::placeholder {
  color: #777;
}

.btn-login-premium,
.btn-access-premium {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  box-sizing: border-box;
}

.btn-login-premium {
  border: none;
  background: #c9a86a;
  color: #111;
}

.btn-access-premium {
  border: 1px solid #25d366;
  background: transparent;
  color: #25d366;
}

.btn-login-premium:hover {
  background: #b89558;
}

.btn-access-premium:hover {
  background: #25d366;
  color: #111;
}

.login-separador {
  border: none;
  border-top: 1px solid rgba(201,168,106,.25);
  margin: 24px 0;
}

.solicitud-box h2 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 8px;
}

.solicitud-subtitulo {
  color: #aaa;
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.4;
}

.campo-form {
  margin-bottom: 16px;
  text-align: left;
}

.campo-form label {
  display: block;
  color: #c9a86a;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.campo-form textarea {
  min-height: 95px;
  resize: vertical;
}

.campo-form input:focus,
.campo-form textarea:focus,
.login-form input:focus {
  outline: none;
  border-color: #c9a86a;
  box-shadow: 0 0 0 3px rgba(201,168,106,.16);
}

.campo-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.16) !important;
}

.login-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 12px;
}

.login-note {
  color: #aaa;
  font-size: 12px;
  margin-top: 22px;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .login-premium-body {
    padding: 18px;
  }

  .login-premium-card {
    margin-top: 64px;
    padding: 24px;
  }

  .login-topbar {
  position: static;
  width: 100%;
  display: flex;
  justify-content: center; /* centra el botón */
  margin-bottom: 18px;
}

.login-back {
  width: auto;
  text-align: center;
}
}

.login-back {
  display: inline-block;
}


/* FIX DEFINITIVO BOTÓN VOLVER EN MOBILE */
@media (max-width: 520px) {

  .login-premium-body {
    display: block !important;
    padding: 16px !important;
  }

  .login-topbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 0 18px 0 !important;
  }

  .login-back {
    display: inline-flex !important;
    width: auto !important;
    max-width: none !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 auto !important;
  }

  .login-premium-card {
    margin: 0 auto 30px auto !important;
  }
}



/* ===== PDF CLÍNICO UNIFICADO ===== */

.pdf-container {
  max-width: 800px;
  margin: auto;
  padding: 30px;
  font-family: Arial, sans-serif;
  color: #111;
  background: white;
}

.pdf-header {
  text-align: center;
}

.pdf-header h1 {
  margin: 0;
  font-size: 24px;
}

.pdf-header p {
  margin-top: 6px;
  font-size: 13px;
  color: #555;
}

.pdf-container h2 {
  font-size: 17px;
  margin-top: 18px;
}

.pdf-container p,
.pdf-container li {
  font-size: 14px;
  line-height: 1.6;
}

.firma {
  margin-top: 60px;
  text-align: center;
}

.nota {
  margin-top: 35px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

@media print {
  body * {
    visibility: hidden;
  }

  #informeClinico,
  #informeClinico * {
    visibility: visible;
  }

  #informeClinico {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}













/* ===== PANEL ADMIN PRO ===== */

.admin-filtros {
  display: flex;
  gap: 14px;            /* 🔥 más separación */
  margin: 25px 0;       /* 🔥 más aire arriba y abajo */
  flex-wrap: wrap;
  align-items: center;
}

.admin-filtros input,
.admin-filtros select {
  padding: 12px 14px;   /* 🔥 más cómodo */
  border-radius: 10px;
  border: 1px solid #ddd;
  min-width: 240px;
}

.admin-filtros button {
  padding: 12px 16px;
  border-radius: 10px;
}

.tabla-scroll {
  overflow-x: auto;
}

.detalle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
}

#detalleContenido pre {
  background: #f3f4f6;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
}

@media (max-width: 768px) {
  .admin-filtros {
    flex-direction: column;
  }

  .admin-filtros input,
  .admin-filtros select,
  .admin-filtros button {
    width: 100%;
  }

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


@media (max-width: 768px) {

  .admin-filtros {
    flex-direction: column;
    gap: 12px;
  }

  .admin-filtros input,
  .admin-filtros select,
  .admin-filtros button {
    width: 100%;
  }

}









/* ===== PANEL ADMIN PRO ===== */

.admin-filtros {
  display: flex;
  gap: 14px;            /* 🔥 más separación */
  margin: 25px 0;       /* 🔥 más aire arriba y abajo */
  flex-wrap: wrap;
  align-items: center;
}

.admin-filtros input,
.admin-filtros select {
  padding: 12px 14px;   /* 🔥 más cómodo */
  border-radius: 10px;
  border: 1px solid #ddd;
  min-width: 240px;
}

.admin-filtros button {
  padding: 12px 16px;
  border-radius: 10px;
}

.tabla-scroll {
  overflow-x: auto;
}

.detalle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
}

#detalleContenido pre {
  background: #f3f4f6;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
}

@media (max-width: 768px) {
  .admin-filtros {
    flex-direction: column;
  }

  .admin-filtros input,
  .admin-filtros select,
  .admin-filtros button {
    width: 100%;
  }

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


@media (max-width: 768px) {

  .admin-filtros {
    flex-direction: column;
    gap: 12px;
  }

  .admin-filtros input,
  .admin-filtros select,
  .admin-filtros button {
    width: 100%;
  }

}


.btn-volver-wrapper {
  margin-right: 10px;
}

.btn-volver {
  font-size: 12px;
  padding: 6px 10px;
}


@media (max-width: 768px) {

  .btn-volver-wrapper {
    order: -1;              /* 🔥 lo pone arriba del todo */
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
  }

}






.bloque-tests {
  padding: 40px 0;
}

.bloque-tests-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.bloque-tests-texto {
  color: #ccc;
  font-size: 1rem;
  margin-bottom: 15px;
  line-height: 1.6;
}

.bloque-tests-nota {
  font-size: 0.85rem;
  color: #888;
  margin-top: 15px;
}





/* ===== FIX BOTON TESTS MOBILE ===== */

.bloque-tests .btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  width: 100%;
}

.bloque-tests .btn-header-inline {
  display: inline-block;
  width: auto;
  max-width: 100%;
  text-align: center;
}

/* Asegurar visibilidad en mobile */
@media (max-width: 768px) {
  .bloque-tests .btn-wrapper {
    display: flex !important;
  }

  .bloque-tests .btn-header-inline {
    display: inline-block !important;
    width: 100%;
    max-width: 320px;
  }
}





/* ===== BOTON TESTS EN PAGINA SUPERVISION ===== */

.bloque-tests .btn-header-inline {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: #c9a86a;
  color: #111 !important;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #c9a86a;
  margin-top: 18px;
  max-width: 100%;
}

.bloque-tests .btn-header-inline:hover {
  background: #b89558;
  color: #111 !important;
}

.bloque-tests .btn-wrapper {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
}

@media (max-width: 768px) {
  .bloque-tests .btn-header-inline {
    width: 100%;
    max-width: 320px;
    font-size: 14px;
    padding: 12px 14px;
  }
}



.form-postulacion {
  display: grid;
  gap: 10px;
  min-width: 280px;
  max-width: 360px;
}

.form-postulacion input,
.form-postulacion textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: inherit;
  box-sizing: border-box;
}

.form-postulacion textarea {
  min-height: 75px;
  resize: vertical;
}

.form-postulacion input::placeholder,
.form-postulacion textarea::placeholder {
  color: #aaa;
}

.post-estado {
  font-size: 13px;
  margin: 0;
}

.post-estado.ok {
  color: #86efac;
}

.post-estado.error {
  color: #fca5a5;
}

@media (max-width: 768px) {
  .form-postulacion {
    width: 100%;
    max-width: none;
  }
}





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

.badge-estado {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.estado-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.estado-actions button {
  padding: 8px 12px;
  border-radius: 8px;
}

/* BADGES */

.badge-bajo {
  background: #dcfce7;
  color: #166534;
}

.badge-medio {
  background: #fef3c7;
  color: #92400e;
}

.badge-alto {
  background: #fee2e2;
  color: #991b1b;
}



/* =========================
   MESA DE ENTRADA DIGITAL
========================= */

.mesa-body {
  min-height: 100vh;
  background: #0f1115;
  color: #f5f5f5;
}

.mesa-header {
  min-height: 86px;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,10,0.96);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mesa-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mesa-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.mesa-brand strong {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.mesa-brand span {
  display: block;
  color: #c9a86a;
  font-size: 0.78rem;
  margin-top: 3px;
}

.mesa-volver {
  color: #c9a86a;
  text-decoration: none;
  border: 1px solid rgba(201,168,106,0.45);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.mesa-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 54px 22px 80px;
}

.mesa-hero {
  margin-bottom: 28px;
}

.mesa-hero span {
  color: #c9a86a;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 1.8px;
}

.mesa-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 10px 0 12px;
}

.mesa-hero p {
  max-width: 760px;
  color: #cfcfcf;
  line-height: 1.7;
}

.mesa-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid #c9a86a;
  border-radius: 18px;
  padding: 30px;
}

.mesa-form {
  display: grid;
  gap: 18px;
}

.mesa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.mesa-form label {
  display: block;
  font-size: 0.82rem;
  color: #c9a86a;
  margin-bottom: 7px;
}

.mesa-form input,
.mesa-form select,
.mesa-form textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: inherit;
  box-sizing: border-box;
}

.mesa-form textarea {
  min-height: 120px;
  resize: vertical;
}

.mesa-form option {
  color: #111;
}

.mesa-aviso {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #bdbdbd;
  background: rgba(201,168,106,0.08);
  border-left: 2px solid #c9a86a;
  padding: 12px 14px;
  border-radius: 10px;
}

.mesa-btn {
  justify-self: start;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid #c9a86a;
  background: #c9a86a;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.mesa-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .mesa-header {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

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

  .mesa-card {
    padding: 22px;
  }

  .mesa-btn,
  .mesa-volver {
    width: 100%;
    text-align: center;
  }
}







/* =========================
   DASHBOARD INSTITUCIONAL
========================= */

.dashboard-hero {
  text-align: center;
  padding: 42px 20px 20px;
}

.dashboard-kicker {
  display: inline-block;
  color: #c9a86a;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .78rem;
  margin-bottom: 8px;
}

.dashboard-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 10px;
}

.dashboard-hero p {
  max-width: 720px;
  margin: 0 auto;
  color: #d0d0d0;
  line-height: 1.7;
}

.dashboard-metricas {
  max-width: 1120px;
  margin:18px auto 18px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.dashboard-metrica {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-left: 3px solid #c9a86a;
  border-radius: 18px;
  padding: 20px;

  position:relative;
  overflow:hidden;
}


.dashboard-metrica::before{

  content:"";

  position:absolute;

  inset:0;

  background:
    radial-gradient(
      circle at top right,
      rgba(201,168,106,.10),
      transparent 42%
    );

  pointer-events:none;
}

.dashboard-metrica::after{

  content:"";

  position:absolute;

  width:120px;

  height:120px;

  right:-60px;

  top:-60px;

  background:
    radial-gradient(
      circle,
      rgba(201,168,106,.14),
      transparent 70%
    );

  transition:.35s ease;
}

.dashboard-metrica:hover::after{

  right:-35px;

  top:-35px;
}

.dashboard-metrica:hover{

  transform:translateY(-4px);

  box-shadow:
    0 10px 24px rgba(0,0,0,.24);

  transition:.28s ease;
}



.dashboard-metrica span {
  display: block;
  color: #c9a86a;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin-bottom: 8px;
}

.dashboard-metrica strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 6px;
}

.dashboard-metrica small {
  color: #bdbdbd;
  line-height: 1.4;
}

.dashboard-section-title{

  max-width:1120px;
  margin:8px auto 10px;
  padding:0 22px;
}

.dashboard-section-title span {
  color: #c9a86a;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .75rem;
}

.dashboard-section-title h2 {
  margin-top: 6px;
  font-size: 1.6rem;
}

@media (max-width: 900px) {
  .dashboard-metricas {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .dashboard-metricas {
    grid-template-columns: 1fr;
  }
}


/* =========================
   DASHBOARD MODULE CARDS
========================= */

/* =========================
   DASHBOARD MODULE PREMIUM
========================= */

.dashboard-module {

  position: relative;

  overflow: hidden;

  text-align: left;

  min-height: 145px;

  padding: 22px;

  border-radius: 18px;

  border: 1px solid rgba(255,255,255,.08);

  border-left: 3px solid #c9a86a;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.025)
    );

  backdrop-filter: blur(8px);

  transition:
    transform .28s ease,
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease;
}

.dashboard-module:hover {

  transform:
    translateY(-6px);

  border-color:
    rgba(201,168,106,.35);

  box-shadow:
    0 10px 28px rgba(0,0,0,.28);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.07),
      rgba(255,255,255,.03)
    );
}

.dashboard-module span {

  display:block;

  font-size:1.02rem;

  margin-bottom:12px;

  font-weight:700;

  letter-spacing:.2px;
}

.dashboard-module small {

  display:block;

  color:#cfcfcf;

  line-height:1.55;

  font-size:.92rem;
}

.dashboard-module b {

  display:inline-flex;

  align-items:center;

  gap:6px;

  margin-top:22px;

  color:#c9a86a;

  font-size:.88rem;

  letter-spacing:.3px;
}

.dashboard-module::before {

  content:"";

  position:absolute;

  inset:0;

  background:
    radial-gradient(
      circle at top right,
      rgba(201,168,106,.10),
      transparent 42%
    );

  opacity:.6;

  pointer-events:none;
}

.dashboard-module::after {

  content:"";

  position:absolute;

  width:140px;

  height:140px;

  right:-70px;

  bottom:-70px;

  background:
    radial-gradient(
      circle,
      rgba(201,168,106,.14),
      transparent 70%
    );

  transition:.35s ease;
}

.dashboard-module:hover::after {

  right:-40px;

  bottom:-40px;
}


/* =========================
   ACTIVIDAD DASHBOARD
========================= */

.dashboard-actividad{

  max-width:1120px;

margin:38px auto;

  padding:0 22px;
}

.dashboard-actividad-header{
  margin-bottom:22px;
}

.dashboard-actividad-header span{

  color:#c9a86a;

  text-transform:uppercase;

  letter-spacing:1.6px;

  font-size:.75rem;
}

.dashboard-actividad-header h2{
  margin-top:6px;
  font-size:1.7rem;
}

.actividad-grid{

  display:grid;

  grid-template-columns:repeat(3,1fr);

  gap:18px;
}

.actividad-card{

  background:rgba(255,255,255,.04);

  border:1px solid rgba(255,255,255,.08);

  border-radius:18px;

  padding:24px;

  transition:.25s;
}

.actividad-card:hover{
  transform:translateY(-3px);
}

.actividad-card strong{

  display:block;

  margin-bottom:12px;

  font-size:1rem;
}

.actividad-card p{

  color:#cfcfcf;

  line-height:1.7;

  margin-bottom:16px;
}

.actividad-card small{
  color:#9d9d9d;
}

@media(max-width:900px){

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

}


.admin-title {
  margin-top: 42px;
}

.admin-modulos {
  margin-top: 10px;
}

.admin-modulos .dashboard-module {
  border-left-color: #8f7a4f;
}


/* =========================
   ADMIN MODULES
========================= */

.admin-title {
  margin-top: 44px;
}

.admin-modulos {
  margin-top: 10px;
}

.admin-modulos .dashboard-module {
  border-left-color: #8f7a4f;
  background: rgba(201,168,106,.035);
}

.admin-modulos .dashboard-module span {
  color: #f3e4c1;
}

.admin-modulos .dashboard-module b {
  color: #c9a86a;
}


.public-title {
  margin-top: 44px;
}

.public-modulos .dashboard-module {
  border-left-color: #4f708f;
  background: rgba(79,112,143,.05);
}



/* =========================
   FOOTER DASHBOARD MINIMAL
========================= */

.dashboard-footer-min {
  margin-top: 64px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.22);
}

.dashboard-footer-min-content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 22px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.dashboard-footer-brand strong {
  display: block;
  color: #f5f5f5;
  font-size: .95rem;
  margin-bottom: 5px;
}

.dashboard-footer-brand span {
  color: #a8a8a8;
  font-size: .82rem;
}

.dashboard-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-footer-links a {
  color: #c9a86a;
  text-decoration: none;
  font-size: .84rem;
  transition: .2s;
}

.dashboard-footer-links a:hover {
  opacity: .75;
}

.dashboard-footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px 22px;
  color: #777;
  font-size: .78rem;
}

@media (max-width: 768px) {
  .dashboard-footer-min-content {
    flex-direction: column;
    text-align: center;
  }

  .dashboard-footer-links {
    justify-content: center;
  }

  .dashboard-footer-bottom {
    text-align: center;
  }
}


.dashboard-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(201,168,106,.12);
  color: #c9a86a;
  font-style: normal;
  font-size: .76rem;
  font-weight: 700;
}




/* =========================
   SKELETON LOADING
========================= */

.metric-loading,
.loading-text{

  position:relative;

  overflow:hidden;

  color:transparent !important;
}

.metric-loading::after,
.loading-text::after{

  content:"";

  position:absolute;

  inset:0;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.04),
      rgba(255,255,255,.12),
      rgba(255,255,255,.04)
    );

  animation:
    skeletonMove 1.4s infinite;
}

.metric-loading{

  border-radius:8px;

  min-width:70px;

  display:inline-block;
}

.loading-text{

  border-radius:8px;

  min-height:18px;
}

@keyframes skeletonMove{

  0%{
    transform:translateX(-100%);
  }

  100%{
    transform:translateX(100%);
  }

}


/* =========================
   FADE IN SYSTEM
========================= */

.dashboard-metrica,
.dashboard-module,
.actividad-card{

  opacity:0;

  transform:translateY(14px);

  animation:
    fadeCard .6s ease forwards;
}

.dashboard-metrica:nth-child(1){
  animation-delay:.05s;
}

.dashboard-metrica:nth-child(2){
  animation-delay:.12s;
}

.dashboard-metrica:nth-child(3){
  animation-delay:.18s;
}

.dashboard-module:nth-child(1){
  animation-delay:.08s;
}

.dashboard-module:nth-child(2){
  animation-delay:.16s;
}

.dashboard-module:nth-child(3){
  animation-delay:.24s;
}

.dashboard-module:nth-child(4){
  animation-delay:.32s;
}

.actividad-card:nth-child(1){
  animation-delay:.10s;
}

.actividad-card:nth-child(2){
  animation-delay:.18s;
}

.actividad-card:nth-child(3){
  animation-delay:.26s;
}

@keyframes fadeCard{

  to{

    opacity:1;

    transform:translateY(0);
  }

}



/* =========================
   BADGES CATEGORÍAS
========================= */

.badge-categoria{

  display:inline-flex;

  align-items:center;

  gap:6px;

  padding:6px 12px;

  border-radius:999px;

  font-size:.78rem;

  font-weight:700;

  letter-spacing:.2px;
}

/* ESCRITOS */

.cat-escritos{

  background:rgba(201,168,106,.14);

  color:#d7b47a;
}

/* MODELOS */

.cat-modelos{

  background:rgba(120,170,255,.12);

  color:#8db4ff;
}

/* JURISPRUDENCIA */

.cat-jurisprudencia{

  background:rgba(140,120,255,.12);

  color:#a69bff;
}

/* CAUSAS */

.cat-causas{

  background:rgba(255,120,120,.12);

  color:#ff9b9b;
}

/* INFORMES */

.cat-informes{

  background:rgba(120,255,190,.12);

  color:#84f2bf;
}

/* NOTAS */

.cat-notas{

  background:rgba(255,200,120,.12);

  color:#ffc977;
}

/* ACADÉMICO */

.cat-academico{

  background:rgba(180,180,180,.12);

  color:#d5d5d5;
}




.mensaje-final-periciado {
  border-left: 4px solid #c9a86a;
}

.btn-enviar-evaluacion {
  background: #c9a86a;
  color: #111;
  font-weight: 700;
}




.card table,
.card table td,
.card .score,
#interpretacionClinica,
.interpretacion-box {
  color: #1a1a1a !important;
}




#mensajeFinalPericiado,
#mensajeFinalPericiado h2,
#mensajeFinalPericiado p,
#mensajeFinalPericiado .note {
  color: #1a1a1a !important;
}


.card,
.card h1,
.card h2,
.card h3,
.card p,
.card label,
.card span,
.card small,
.card strong {
  color: #1f1f1f;
}

.card input,
.card select,
.card textarea {
  color: #1f1f1f;
  background: #fff;
}


#estadoDocumento {
  color: #1f1f1f !important;
}

#estadoDocumento.ok {
  color: #2e7d32 !important;
}

#estadoDocumento.error {
  color: #c62828 !important;
}


.pago-turno-box {
  margin-top: 22px;
  padding: 20px;
  border-radius: 16px;
  background: #fff8e6;
  border: 1px solid #e5c978;
}

.pago-turno-box h3 {
  margin-top: 0;
  color: #1f1f1f;
}

.aviso-pago {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border-left: 4px solid #c9a86a;
  color: #1f1f1f;
}

.aviso-pago p {
  margin-bottom: 0;
  color: #1f1f1f;
}





.analisis-separador{
  height: 35px;
}

.analisis-busqueda{
  margin-top: 10px;
  padding: 24px;
}

.busqueda-dni{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.busqueda-dni input{
  min-width: 280px;
}









.panel-bienvenida-tests{
  text-align:center;
  max-width:760px;
  margin:30px auto;
  cursor:default;
}

.panel-bienvenida-tests h2{
  font-size:1.8rem;
  margin-bottom:10px;
  color:#c9a96e;
  font-weight:500;
}

.panel-bienvenida-tests p{
  color:#666;
  line-height:1.7;
  margin-bottom:8px;
}




.estado-evaluacion-card{
  max-width:760px;
  margin:20px auto 35px;
  cursor:default;
}

.estado-tests p{
  display:flex;
  justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.08);
  padding:10px 0;
}

.estado-completado{
  color:#22c55e;
  font-weight:600;
}

.estado-pendiente{
  color:#c9a96e;
  font-weight:500;
}