:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

body { margin: 0; padding: 16px; background: #f6f7fb; }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  margin-bottom: 12px;
}

h1 { font-size: 18px; margin: 0 0 10px; }
h2 { font-size: 16px; margin: 0 0 10px; }

label { display: block; font-size: 13px; margin: 10px 0 6px; color: #333; }

input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d9dbe7;
  font-size: 16px;
  background:#fff;
}

textarea { min-height: 110px; resize: vertical; }

button { font-family: inherit; }

button:disabled { opacity: .6; cursor: not-allowed; transform:none; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pill { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ok { background: #e7f8ec; color: #0a7a2f; }
.bad { background: #fde8e8; color: #b42318; }

.muted { color: #6b7280; font-size: 13px; }
.small { font-size: 13px; }
.hidden { display: none; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

hr { border: none; border-top: 1px solid #eef0f7; margin: 14px 0; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid #eef0f7; font-size: 13px; text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }

.topbar { display:flex; gap:10px; align-items:center; justify-content:space-between; }
#reader { width: 100%; }

.qrbox {
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 12px;
  border:1px dashed #d9dbe7;
  border-radius: 16px;
  background:#fafbff;
}

.tabs { display:flex; gap:8px; flex-wrap:wrap; }

.tabbtn {
  width:auto;
  padding:10px 12px;
  border-radius: 999px;
  border: 1px solid #d9dbe7;
  background: #eef0f7;
  color: #111827;
  font-weight: 700;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.tabbtn.active { background:#111827; color:#fff; border-color:#111827; }

/* ========= HOME HOSPITAL PREMIUM ========= */
.home-purple{
  min-height:100vh;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.82) 0%,
      rgba(248,250,252,.72) 40%,
      rgba(241,245,249,.68) 100%
    ),
    url("../assets/bg-biomed.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.home-purple::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 520px at 15% 0%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(700px 420px at 85% 10%, rgba(255,255,255,.25), transparent 55%);
}

.home-shell{ max-width: 980px; margin: 0 auto; padding: 18px; }
.home-header{ padding: 18px 0 6px; }
.home-brand{ color:#111827; position: relative; z-index: 1; }

.home-badge{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background: #111827;
  color:#fff;
  font-weight:800;
  font-size:13px;
}

.home-title{
  margin:10px 0 0;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing:-0.02em;
  color:#111827;
}

.home-subtitle{ margin:6px 0 0; color:#374151; }

.home-role{ margin-top: 14px; position: relative; z-index: 1; }
.home-h2{ margin: 0 0 10px; color:#111827; font-size:16px; }

/* ===== ROLES ===== */
.role-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px){ .role-grid{ grid-template-columns:1fr; } }

.role-card,
.role-card-ghost{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px;
  border-radius:20px;
  text-decoration:none;

  background:#ffffff;
  color:#111827;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 40px rgba(17,24,39,.12);

  transition: transform .12s ease, box-shadow .12s ease;
}

.role-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(17,24,39,.18);
}

.role-icon{
  width:52px; height:52px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  background:#f5f3ff;
  border:1px solid #e9d5ff;
  font-size:24px;
}

.role-title{ font-weight:950; font-size:17px; letter-spacing:-0.01em; }
.role-desc{ font-size:13px; color:#4b5563; margin-top:2px; line-height:1.35; }

.role-go{
  margin-left:auto;
  padding:10px 12px;
  border-radius:999px;
  background:#111827;      /* ← ahora azul oscuro */
  color:#fff;
  border:1px solid #111827;
  font-weight:900;
  box-shadow: 0 6px 16px rgba(17,24,39,.22);
  white-space: nowrap;
}

.role-card:hover .role-go{ background:#000000; border-color:#000000; }

/* ===== MENSAJE ===== */
.home-message{
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background:#ffffff;
  border: 1px solid #e5e7eb;
  color:#111827;
  line-height:1.55;
  box-shadow: 0 10px 28px rgba(17,24,39,.12);
}

/* ========= CAROUSEL ========= */
.carousel2{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:10px;
  align-items:center;
  margin-top: 14px;
}

.car2-btn{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  background:#fff;
  font-size:26px;
  cursor:pointer;
}

.car2-frame{
  overflow:hidden;
  border-radius:18px;
  border:1px solid #eef0f7;
  background:#fff;
  height:auto;
}

.car2-track{
  display:flex;
  transform: translateX(0%);
  transition: transform .35s ease;
}

.car2-slide{ min-width:100%; margin:0; background:#fff; }

.carousel2 .car2-slide img{
  width:100%;
  height:auto;
  display:block;
}

.car2-slide figcaption{
  padding:10px 12px;
  font-size:13px;
  color:#374151;
}

.car2-dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:10px;
}

.dot{
  width:9px;
  height:9px;
  border-radius:999px;
  border:0;
  background:#d1d5db;
  cursor:pointer;
}

.dot.active{ background:#111827; } /* ← azul oscuro */

/* ========= BOTONES: TODOS IGUALES (AZUL OSCURO) ========= */
.btn,
button.btn,
button,
a.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  width:auto;
  min-height:44px;          /* mismo alto para TODOS */
  padding:10px 16px;        /* mismo padding para TODOS */
  border-radius:12px;

  font-weight:900;
  font-size:14px;
  line-height:1;
  text-decoration:none;
  cursor:pointer;

  background:#111827;
  color:#ffffff;
  border:1px solid #111827;

  box-shadow: 0 6px 14px rgba(17,24,39,.18);
  transition: all .15s ease;
}

.btn:hover,
button:hover,
a.btn:hover{
  background:#000000;
  border-color:#000000;
  transform: translateY(-1px);
}

/* fila de CTA */
.home-cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:10px;
}

/* ===== GRID 3 COLUMNAS (Cómo llegar) ===== */
.info-grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top:12px;
}

@media (max-width: 860px){
  .info-grid-3{ grid-template-columns:1fr; }
}

.info-box{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:14px;
  box-shadow: 0 8px 22px rgba(17,24,39,.08);
}

.info-title{
  font-weight:900;
  font-size:13px;
  color:#111827;
  margin-bottom:4px;
}

.info-text{
  font-size:13px;
  color:#4b5563;
  line-height:1.45;
}
/* ========= FLECHAS CARRUSEL — PREMIUM ========= */

.car2-btn{
  width:48px;
  height:48px;
  border-radius:999px;              /* círculo perfecto */

  background: rgba(17,24,39,.82);   /* oscuro elegante */
  color:#ffffff;

  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  font-size:28px;
  font-weight:700;
  line-height:1;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);

  transition: all .18s ease;
}

/* hover */
.car2-btn:hover{
  background: rgba(17,24,39,.95);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 14px 32px rgba(0,0,0,.35);
}

/* active táctil */
.car2-btn:active{
  transform: scale(.96);
}

/* en móvil un pelín más pequeñas */
@media (max-width: 640px){
  .car2-btn{
    width:42px;
    height:42px;
    font-size:24px;
  }
}/* ===== FIX: Alumno menos transparente + texto más oscuro ===== */

/* oscurece un pelín el overlay del fondo para que todo se lea mejor */
.home-purple::before{
  background:
    radial-gradient(900px 520px at 15% 0%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(700px 420px at 85% 10%, rgba(255,255,255,.16), transparent 55%);
}

/* card glass MÁS sólida y texto oscuro */
.glass-card{
  background: rgba(255,255,255,.88) !important;     /* antes 0.10 -> demasiado transparente */
  border: 1px solid rgba(17,24,39,.10) !important;
  color: #111827 !important;
  box-shadow: 0 16px 40px rgba(17,24,39,.12) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* títulos */
.glass-card h2, .glass-card h3{
  color:#111827 !important;
}

/* texto secundario */
.glass-card .muted{
  color: #4b5563 !important;
}

/* labels */
.glass-card label{
  color:#111827 !important;
}

/* inputs dentro de glass: blanco limpio */
.glass-card input,
.glass-card select,
.glass-card textarea{
  background: #ffffff !important;
  border: 1px solid rgba(17,24,39,.18) !important;
  color:#111827 !important;
}

/* tip-box dentro de alumno: también más sólido y texto oscuro */
.tip-box.soft{
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  color:#111827 !important;
}
.tip-box.soft .tip-title{ color:#111827 !important; }
.tip-box.soft .tip-text{ color:#374151 !important; }

/* tabs glass: más claras y texto oscuro */
.tabs.glass-tabs{
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(17,24,39,.10) !important;
}

.tabs.glass-tabs .tabbtn{
  background: rgba(17,24,39,.06) !important;
  border: 1px solid rgba(17,24,39,.14) !important;
  color:#111827 !important;
}

.tabs.glass-tabs .tabbtn.active{
  background:#111827 !important;
  border-color:#111827 !important;
  color:#fff !important;
  box-shadow:none !important;
}

/* tabla dentro de glass: texto oscuro */
.glass-card th, .glass-card td{
  border-bottom: 1px solid rgba(17,24,39,.10) !important;
  color:#111827 !important;
}
.glass-card th{
  color:#6b7280 !important;
}

/* pills: ajusta para fondo claro */
.pill.bad{
  background:#fde8e8 !important;
  color:#b42318 !important;
  border-color: rgba(180,35,24,.25) !important;
}
.pill.good, .pill.ok{
  background:#e7f8ec !important;
  color:#0a7a2f !important;
  border-color: rgba(10,122,47,.22) !important;
}
/* ===== FIX OVERFLOW EN MÓVIL (cuadros que se agrandan) ===== */

/* 1) Base: evita que cualquier cosa se salga por padding/ancho */
*,
*::before,
*::after{
  box-sizing: border-box;
}

img, canvas, svg{
  max-width: 100%;
  height: auto;
}

/* 2) Cards en flex: permite encoger texto y evita overflow */
.role-card,
.role-card-ghost{
  min-width: 0;
  max-width: 100%;
}

.role-card > *{
  min-width: 0;
}

/* texto largo: no agranda el cuadro */
.role-title{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-desc{
  overflow: hidden;
}

/* 3) En móvil: NO dejes que el botón empuje el ancho.
      Si hace falta, baja a la siguiente línea dentro de la card */
@media (max-width: 520px){
  .role-card,
  .role-card-ghost{
    flex-wrap: wrap;
  }

  .role-go{
    margin-left: 0;
    width: 100%;
  }
}