/* Portal Admin Acme — estilos */
:root {
  --acme-blue: #0f3d8c;
  --acme-blue-dark: #0a2d66;
  --acme-gold: #f0a30a;
  --bg: #eef2f8;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e3e8f0;
  --green: #15803d;
  --red: #b91c1c;
  --radius: 12px;
  --shadow: 0 4px 14px rgba(15, 61, 140, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a { color: var(--acme-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Top bar ---- */
.topbar {
  background: linear-gradient(120deg, var(--acme-blue), var(--acme-blue-dark));
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.topbar .inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand .logo { font-size: 1.5rem; }
.brand small { display: block; font-weight: 500; opacity: .85; font-size: .72rem; }
.topbar nav { display: flex; gap: 6px; margin-left: 8px; flex-wrap: wrap; }
.topbar nav a {
  color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .9rem;
}
.topbar nav a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.topbar nav a.active { background: rgba(255,255,255,.22); }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--acme-gold); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.user-meta .name { font-size: .86rem; font-weight: 700; line-height: 1.1; }
.user-meta .email { font-size: .72rem; opacity: .85; }
.btn-logout {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35);
  color: #fff; padding: 7px 13px; border-radius: 8px; font-size: .82rem; font-weight: 600;
}
.btn-logout:hover { background: rgba(255,255,255,.28); text-decoration: none; }

/* Barra superior en dos líneas: el avatar / "Sign out" SIEMPRE queda arriba a
   la derecha (línea 1 = marca + usuario), y la navegación va en su propia
   línea debajo (no empuja el botón de salida fuera de su esquina). */
.topbar .brand { order: 0; }
.topbar .spacer { order: 1; }
.topbar .user-chip { order: 2; }
.topbar nav {
  order: 3; flex-basis: 100%; margin-left: 0; margin-top: 2px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.16);
}

/* ---- Layout ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 26px 22px 70px; }
h1.page-title { font-size: 1.5rem; margin: 0 0 4px; color: var(--acme-blue-dark); }
p.page-sub { margin: 0 0 22px; color: var(--muted); }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 20px 22px;
}
.card + .card { margin-top: 18px; }
.card h2 { font-size: 1.05rem; margin: 0 0 14px; color: var(--acme-blue-dark);
           border-bottom: 2px solid var(--line); padding-bottom: 10px; }

/* ---- Tarjetas plegables (<details class="collapsible">) ----
   El resumen se pliega para que la página enseñe primero lo que hay que hacer.
   La tarjeta de dentro (auditoría) usa el mismo patrón. */
details.collapsible > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary::before {
  content: "▸"; color: var(--acme-blue); font-size: .9rem; transition: transform .15s ease;
}
details.collapsible[open] > summary::before { content: "▾"; }
details.collapsible > summary > h2 { flex: 1; margin: 0; border-bottom: none; padding-bottom: 0; }
details.collapsible[open] > summary > h2 { border-bottom: 2px solid var(--line); padding-bottom: 10px; }
details.collapsible[open] > summary { margin-bottom: 14px; }
details.collapsible.audit { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
details.collapsible.audit > summary > h3 {
  margin: 0; font-size: .95rem; color: var(--acme-blue-dark); flex: 1;
}
details.collapsible.audit[open] > summary { margin-bottom: 12px; }
details.collapsible.audit table.data { min-width: 0; }

/* ---- Registro de las corridas de los pasos 4/5 (provisioning) ----
   Cada corrida lleva su resumen y el detalle persona a persona; se separan con
   una línea para que se distingan cuando el paso se ha repetido. */
.provisioning-run + .provisioning-run {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.provisioning-run > p { margin: 0 0 6px; font-size: .88rem; }
.provisioning-run table.data { min-width: 0; }

/* ---- Tareas pendientes del usuario (My reservations) ---- */
.card.notice-card { border-left: 5px solid #f59e0b; }
.card.notice-card h2 { color: #b45309; }
ul.todo-list { margin: 0; padding-left: 20px; }
ul.todo-list li { margin: 6px 0; font-size: .9rem; }
.badge.todo { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
form.inline-form { display: inline; }
td.actions .btn + .btn, td.actions form + .btn, td.actions .btn + form { margin-left: 6px; }
.vpc-access-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.vpc-access-form label { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; font-weight: 600; }
.vpc-access-form input { min-width: 280px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; }
.vpc-access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.vpc-access-card p { margin: 8px 0; color: var(--muted); font-size: .9rem; }
/* Botón "Close the session" del panel de VPC Access (revoca el token de Guacamole). */
.vpc-access-reset { margin-top: 16px; }

/* Importación de asistentes desde un CSV (paso 2 del asistente de la reserva). */
.csv-import { margin: 4px 0 20px; }
.csv-import summary { cursor: pointer; font-weight: 600; color: var(--acme-blue); }
.csv-import form { margin-top: 12px; padding: 14px; background: #f7f9fd; border: 1px solid var(--line); border-radius: var(--radius); }
.csv-import textarea { width: 100%; min-height: 90px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; }
.csv-import code { background: #e9eefb; padding: 1px 5px; border-radius: 5px; }

/* Aviso de instancia de desarrollo (base de datos desechable + auto-recarga):
   así un nombre público apuntando al puerto equivocado se ve a la primera. */
.dev-banner {
  margin: 0 0 16px; padding: 10px 14px;
  background: #fff7e6; border: 1px solid #ffd591; border-radius: var(--radius);
  color: #8a5300; font-size: .88rem;
}
body.auth-wrap .dev-banner {
  position: fixed; top: 0; left: 0; right: 0; max-width: none; margin: 0;
  border-radius: 0; text-align: center; z-index: 5;
}
.vpc-debug { margin-top: 16px; font-size: .82rem; }
.vpc-debug summary { cursor: pointer; color: var(--acme-blue); font-weight: 600; }
.vpc-debug pre { max-height: 260px; overflow: auto; padding: 10px; background: #f6f8fc; border-radius: 8px; white-space: pre-wrap; }

/* ---- Flash messages ---- */
.flashes { list-style: none; margin: 0 0 16px; padding: 0; }
.flashes li {
  padding: 11px 14px; border-radius: 9px; margin-bottom: 8px;
  font-size: .9rem; border-left: 5px solid var(--acme-blue); background: #fff;
}
.flashes .success { border-color: var(--green); background: #f0fdf4; }
.flashes .error   { border-color: var(--red); background: #fef2f2; }
.flashes .warning { border-color: var(--acme-gold); background: #fffbeb; }
.flashes .info    { border-color: var(--acme-blue); background: #eff6ff; }

/* ---- Landing (sections) ---- */
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 8px; }
.section-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px;
  color: var(--ink); transition: transform .12s ease, box-shadow .12s ease;
}
.section-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,61,140,.14); text-decoration: none; }
.section-card .ico { font-size: 1.9rem; }
.section-card h3 { margin: 10px 0 6px; color: var(--acme-blue-dark); }
.section-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* ---- Tables ---- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] {
  flex: 1; min-width: 220px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 9px; font-size: .9rem;
}
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .55; cursor: wait; }
.btn:hover { border-color: var(--acme-blue); color: var(--acme-blue); }
.btn-primary { background: var(--acme-blue); color: #fff; border-color: var(--acme-blue); }
.btn-primary:hover { background: var(--acme-blue-dark); color: #fff; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #991b1b; color: #fff; }
.badge.lock { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table.data { border-collapse: collapse; width: 100%; min-width: 860px; font-size: .9rem; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: #f6f8fc; color: #334; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; position: sticky; top: 0; }
table.data tbody tr:hover { background: #fafbfe; }
.chip {
  display: inline-block; background: #eaf1ff; color: var(--acme-blue);
  border-radius: 999px; padding: 2px 9px; font-size: .74rem; margin: 1px 2px 1px 0; font-weight: 600;
}
.badge {
  display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: .74rem; font-weight: 800;
}
.badge.yes { background: #dcfce7; color: var(--green); }
.badge.no  { background: #f3f4f6; color: var(--muted); }
.muted { color: var(--muted); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.fvc-consistency {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid #fbbf24;
  border-radius: 9px; background: #fffbeb; color: #78350f;
}
.fvc-consistency span { flex: 1; min-width: 240px; font-size: .88rem; }
.loading-state::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px;
  border: 2px solid #cbd5e1; border-top-color: var(--acme-blue);
  border-radius: 50%; vertical-align: -3px; animation: fvc-spin .8s linear infinite;
}
@keyframes fvc-spin { to { transform: rotate(360deg); } }
.fvc-loading-overlay, .page-loading-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center;
  justify-content: center; background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px);
}
.fvc-loading-overlay[hidden], .page-loading-overlay[hidden] { display: none; }
.fvc-loading-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 190px; padding: 24px 30px; color: var(--acme-blue-dark);
  background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}
.fvc-loading-card span { color: var(--muted); font-size: .82rem; }
.fvc-loading-spinner {
  width: 34px; height: 34px; border: 4px solid #dbe5f5;
  border-top-color: var(--acme-blue); border-radius: 50%; animation: fvc-spin .8s linear infinite;
}

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 5px; color: #334155; }
.field .hint { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.field input[type=text], .field input[type=password], .field select, .field input[type=search] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: .92rem;
}
.field input:focus, .field select:focus { outline: 2px solid #bcd2f5; border-color: var(--acme-blue); }
.field.full { grid-column: 1 / -1; }
.password-row { display: flex; gap: 8px; }
.password-row input { flex: 1; }
.group-picker { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fbfcfe; }
.group-picker label { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 500; padding: 3px 0; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; align-items: center; }

/* ---- Standalone auth pages ---- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
             background: linear-gradient(135deg, var(--acme-blue), var(--acme-blue-dark)); padding: 24px; }
.auth-card { background: #fff; border-radius: 16px; max-width: 460px; width: 100%;
             box-shadow: 0 18px 50px rgba(0,0,0,.3); padding: 34px 30px; text-align: center; }
.auth-card .big { font-size: 2.6rem; }
.auth-card h1 { margin: 10px 0 6px; font-size: 1.4rem; color: var(--acme-blue-dark); }
.auth-card p { color: var(--muted); font-size: .92rem; line-height: 1.5; margin: 8px 0 18px; }
.auth-card .btn-signin {
  display: inline-block; background: var(--acme-blue); color: #fff; padding: 12px 24px;
  border-radius: 10px; font-weight: 700; font-size: .95rem;
}
.auth-card .btn-signin:hover { background: var(--acme-blue-dark); text-decoration: none; }

footer.foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 26px; }

/* ---- Acciones en tabla ---- */
.btn-sm { padding: 4px 10px; font-size: .78rem; border-radius: 7px; }
td.actions { white-space: nowrap; text-align: right; }

/* ---- Modal de edición ---- */
/* El atributo `hidden` debe ganar a `display:flex` del backdrop; de lo
   contrario el modal aparece al cargar la página y bloquea la interacción. */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 60; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; max-width: 520px; width: 100%;
  padding: 24px 26px; box-shadow: 0 22px 60px rgba(0, 0, 0, .35);
  max-height: 92vh; overflow: auto;
}
.modal h3 { margin: 0 0 2px; color: var(--acme-blue-dark); }
.modal .field { margin-top: 12px; }
.modal input[type=text], .modal select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; font-size: .92rem;
}
.modal input:focus, .modal select:focus { outline: 2px solid #bcd2f5; border-color: var(--acme-blue); }
.modal .check-line {
  display: flex; gap: 8px; align-items: center; font-weight: 600;
  margin-top: 14px; font-size: .9rem;
}
.modal-error {
  margin-top: 10px; padding: 8px 10px; background: #fef2f2; color: var(--red);
  border: 1px solid #fecaca; border-radius: 8px; font-size: .85rem;
}

/* ---- Confirmación estilizada ---- */
.confirm-modal h3 { margin: 0; }
.confirm-modal p {
  white-space: pre-line; color: var(--muted); font-size: .95rem;
  line-height: 1.5; margin: 14px 0 6px;
}
.confirm-modal .form-actions { margin-top: 16px; justify-content: flex-end; }

/* ---- Login (pantalla fija) ---- */
.auth-card.wide { max-width: 660px; text-align: left; }
.auth-card.wide h1, .auth-card.wide .big { text-align: center; }
.login-features { list-style: none; padding: 0; margin: 14px 0; }
.login-features li { padding: 7px 0; border-bottom: 1px solid var(--line); color: #334155; font-size: .92rem; }
.login-features li:last-child { border-bottom: none; }
.login-redirect { margin-top: 16px; font-size: .78rem; color: var(--muted); word-break: break-all; }
.btn-signin-block {
  display: block; text-align: center; background: var(--acme-blue); color: #fff;
  padding: 13px 20px; border-radius: 10px; font-weight: 700; font-size: 1rem; margin-top: 6px;
}
.btn-signin-block:hover { background: var(--acme-blue-dark); color: #fff; text-decoration: none; }

/* ---- Aviso transitorio (borrado, etc.) ---- */
.notice {
  margin: 0 0 12px; padding: 9px 12px; border-radius: 9px;
  font-size: .88rem; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a;
}
.notice.error { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.notice.success { background: #f0fdf4; border-color: #bbf7d0; color: var(--green); }

/* ---- Acciones de página + modal "Add user" ---- */
.page-actions { margin: 0 0 18px; display: flex; }
#addModal .modal { max-width: 780px; }
#addModal .modal > .muted { margin: 6px 0 14px; font-size: .9rem; }

/* ---- VPC Management ---- */
.alert-box { padding: 12px 14px; border-radius: 9px; font-size: .9rem; margin: 0 0 18px; }
.alert-box.danger { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.vpc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; margin-top: 6px;
}
.vpc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px;
}
.vpc-card.busy { opacity: .7; }
.vpc-head { display: flex; justify-content: space-between; align-items: center; }
.vpc-title { display: inline-flex; align-items: center; }
.vpc-code { font-weight: 800; color: var(--acme-blue-dark); font-size: 1.05rem; }
.vpc-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: .85rem; }
.vpc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.log-box {
  background: #0f172a; color: #dbeafe; border-radius: 9px; padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem;
  white-space: pre-wrap; max-height: 220px; overflow: auto; margin: 0;
}

/* =======================================================================
   SASE Booking — estilos propios
   ======================================================================= */

/* ---- Contadores de "Mis reservas" ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--acme-blue-dark); line-height: 1.1; }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.toolbar-spacer { flex: 1; }

/* ---- Badges de estado ---- */
.badge.st-pending   { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge.st-approved  { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }
.badge.st-rejected  { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.badge.st-cancelled { background: #f3f4f6; color: var(--muted); border: 1px solid #e5e7eb; }
.badge.st-completed { background: #eff6ff; color: var(--acme-blue); border: 1px solid #bfdbfe; }
.badge.st-live      { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }

/* ---- Tabla clave/valor (detalle) ---- */
table.kv { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.kv th {
  text-align: left; width: 190px; padding: 8px 12px 8px 0; color: #334155;
  font-size: .82rem; vertical-align: top; border-bottom: 1px solid var(--line);
}
table.kv td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: none; }

/* ---- Campos extra del formulario ---- */
.field input[type=datetime-local],
.field input[type=date],
.field input[type=number] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; font-size: .92rem; font-family: inherit; background: #fff;
}
.field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; font-size: .92rem; font-family: inherit; resize: vertical;
}
.field input[type=datetime-local]:focus,
.field input[type=date]:focus,
.field input[type=number]:focus,
.field textarea:focus { outline: 2px solid #bcd2f5; border-color: var(--acme-blue); }
/* Casilla pegada a su campo (p. ej. "Start now" junto a la hora de inicio) y
   pareja campo + unidad (duración en horas/días). */
.field .check-inline {
  display: inline-flex; gap: 7px; align-items: center;
  margin-top: 8px; font-size: .86rem; font-weight: 600; color: #334155;
}
.field .inline-field { display: flex; gap: 8px; align-items: center; }
.field .inline-field input { flex: 1 1 auto; min-width: 0; }
.field .inline-field select { flex: 0 0 auto; width: auto; }
.form-heading {
  font-weight: 800; color: var(--acme-blue-dark); margin: 22px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--line); font-size: 1rem;
}
.group-picker label input[type=text] {
  flex: 1; min-width: 120px; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 7px; font-size: .85rem;
}

/* ---- Cola de aprobación ---- */
.approval-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.approval-actions .reject-form {
  border-left: 3px solid #fecaca; padding-left: 14px;
}

/* ---- Calendario ---- */
table.cal-table { min-width: 720px; }
table.cal-table th { text-align: center; white-space: nowrap; }
td.cal-vm { font-weight: 700; color: var(--acme-blue-dark); white-space: nowrap; }
td.cal-cell { min-width: 110px; padding: 6px 8px; }
.cal-item {
  display: block; border-radius: 6px; padding: 3px 7px; margin-bottom: 4px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.cal-item:hover { text-decoration: none; filter: brightness(.96); }
.cal-item.st-pending  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.cal-item.st-approved { background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }
.cal-item.st-completed { background: #eff6ff; color: var(--acme-blue); border: 1px solid #bfdbfe; }

.log-box.err { border: 1px solid #f87171; }
/* LED de estado SSH */
.led {
  width: 12px; height: 12px; border-radius: 50%; margin-right: 8px;
  background: #94a3b8; display: inline-block; flex: 0 0 auto; vertical-align: middle;
}
.led.green { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.led.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.led.checking { background: #f59e0b; animation: led-pulse 1s ease-in-out infinite; }
@keyframes led-pulse { 50% { opacity: .35; } }

/* ---- Estado de borrado ---- */
tr.row-deleting td { opacity: .45; pointer-events: none; }
.del-progress { color: var(--muted); font-size: .8rem; font-style: italic; }

/* ---- Experience Wizard ---- */
.wizard-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.wizard-step {
  padding: 8px 18px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); color: var(--muted); font-weight: 700;
  font-size: .88rem; box-shadow: var(--shadow); cursor: default;
}
.wizard-step.active { background: var(--acme-blue); border-color: var(--acme-blue); color: #fff; }
.wizard-panel > .muted { margin: 0 0 14px; font-size: .9rem; }
.wizard-file-actions {
  margin: 14px 0 0; padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.wizard-file-actions input[type=file] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
/* Importar usuarios desde archivo (CSV/TSV) */
.import-box {
  background: #f4fbf6; border: 1px solid #cdecd9; border-radius: 10px;
  padding: 12px 14px; margin: 14px 0 6px;
}
.import-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: space-between;
}
.import-title { font-size: .98rem; font-weight: 800; color: #14532d; }
.import-box > .muted { margin: 6px 0 0; font-size: .85rem; line-height: 1.5; }
.import-box label.btn { cursor: pointer; }
.import-hint {
  font-size: .8rem; color: #3f6212; line-height: 1.55;
  background: #f7fee7; border: 1px solid #d9f99d;
  border-radius: 8px; padding: 8px 10px; margin-top: 10px;
}
.import-hint code {
  background: #e7f0dd; padding: 1px 5px; border-radius: 4px; font-size: .76rem;
}
.import-errors {
  margin-top: 10px; font-size: .84rem; color: var(--red);
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 10px;
}
.import-errors p { margin: 0 0 4px; font-weight: 700; }
.import-errors ul { margin: 0; padding-left: 18px; }
.import-errors li { margin: 1px 0; }
.import-errors li.muted { color: var(--muted); font-weight: 400; }
.pw-cell { display: inline-flex; align-items: center; gap: 6px; }
.pw-cell .pw {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .5px; color: #334155;
}
.check-line {
  display: inline-flex; gap: 8px; align-items: center;
  font-weight: 600; font-size: .9rem;
}
.review-summary { margin: 0 0 4px; }
#wizReview h3 {
  font-size: .98rem; margin: 18px 0 8px; color: var(--acme-blue-dark);
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
#wizReview .clean-check {
  margin-top: 14px; background: #fffbeb; border: 1px solid #fde68a;
  padding: 10px 12px; border-radius: 9px; color: #78350f; line-height: 1.5;
}
.review-vpc-note { margin: 6px 0 0; font-size: .85rem; }
table.review-users, table.review-vpcs { min-width: 640px; font-size: .86rem; }
/* Log de ejecución del wizard: cada línea es un <span> bloque dentro del <pre> */
.log-box .logline { display: block; line-height: 1.5; }
.log-box .logline.info { color: #93c5fd; }
.log-box .logline.ok { color: #86efac; }
.log-box .logline.err { color: #fca5a5; }
#wizExecute:disabled, #wizBack:disabled, #wizExecute.busy { opacity: .6; cursor: not-allowed; }
#wizRows .pw { word-break: break-all; }

/* ---- Experience Wizard: borradores en servidor + contraseña compartida ---- */
.draft-box {
  background: #f7faff; border: 1px solid #dbe6fb; border-radius: 10px;
  padding: 12px 14px; margin: 0 0 16px;
}
.draft-box .hint { margin-top: 8px; }
.draft-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.draft-row:last-of-type { margin-bottom: 0; }
.draft-row label { font-size: .82rem; font-weight: 700; color: #334155; }
.draft-row input[type=text] {
  flex: 1 1 260px; min-width: 220px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 9px; font-size: .9rem;
}
.draft-row select {
  flex: 1 1 300px; min-width: 220px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; font-size: .9rem; background: #fff;
}
#draftStatus { font-size: .8rem; }
.form-heading {
  font-size: 1.02rem; margin: 18px 0 12px; color: var(--acme-blue-dark);
  border-bottom: 2px solid var(--line); padding-bottom: 8px;
}
.password-panel {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 14px; margin: 0 0 6px;
}
.password-panel label { display: block; font-size: .86rem; font-weight: 700; margin-bottom: 6px; color: #78350f; }
.password-panel .password-row { display: flex; gap: 8px; flex-wrap: wrap; }
.password-panel input { flex: 1 1 260px; min-width: 200px; padding: 9px 11px; border: 1px solid #f0c86b; border-radius: 9px; font-size: .92rem; }
.password-panel input:focus { outline: 2px solid #fcd34d; border-color: var(--acme-gold); }
.password-panel .hint { color: #78350f; opacity: .85; }
.review-pw {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fffbeb; border: 1px solid #fde68a; color: #78350f;
  border-radius: 9px; padding: 8px 12px; margin: 10px 0;
  font-size: .9rem;
}
.review-pw .pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .5px; }
table.data .st-created { color: var(--green); font-size: .78rem; }
table.data .st-error { color: var(--red); font-size: .78rem; }
.wizard-panel table.data td .btn + .btn { margin-left: 6px; }

/* ---- Proceso de una experiencia (stepper) ---- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700;
  background: #f3f4f6; color: var(--muted); border: 1px solid var(--line);
}
.step-body { padding-top: 2px; }
.step-label { font-weight: 700; color: #334155; font-size: .92rem; }
.step-hint { font-size: .78rem; color: var(--muted); }
.step.done .step-num { background: #dcfce7; color: var(--green); border-color: #bbf7d0; }
.step.done .step-label { color: var(--green); }
.step.active .step-num { background: var(--acme-blue); color: #fff; border-color: var(--acme-blue); }
.step.active .step-label { color: var(--acme-blue-dark); }
.step.pending { opacity: .55; }

/* El asistente del solicitante lleva sus pasos en **horizontal**: es un panel,
   y cada paso se puede pulsar para volver a él. */
#xpWizardHead .steps { flex-direction: row; flex-wrap: wrap; gap: 12px 18px; align-items: stretch; }
#xpWizardHead .step {
  flex: 0 1 auto; align-items: center; gap: 9px; cursor: pointer;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
#xpWizardHead .step:hover { border-color: var(--acme-blue); background: #f6f9ff; }
#xpWizardHead .step.active { border-color: var(--acme-blue); background: #eef4ff; }
#xpWizardHead .step-num { flex: 0 0 24px; height: 24px; font-size: .78rem; }
#xpWizardHead .step-body { padding-top: 0; }
#xpWizardHead .step-hint { font-size: .72rem; }
#xpWizardHead .wizard-hint { margin: 12px 0 0; font-size: .78rem; color: var(--muted); }

/* =======================================================================
   SASE — shared shell additions (view switcher)
   ======================================================================= */
.view-switch {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
}
.view-switch a {
  color: #fff; padding: 6px 13px; border-radius: 7px;
  font-size: .84rem; font-weight: 700; white-space: nowrap;
}
.view-switch a:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }
.view-switch a.active { background: #fff; color: var(--acme-blue-dark); }
/* System settings page (/admin/system-settings). */
.settings-group h2 { display: flex; align-items: center; gap: 8px; }
.settings-table { min-width: 1080px; }
.settings-table th:nth-child(1) { width: 34%; }
.settings-table th:nth-child(2) { width: 30%; }
.settings-table td { vertical-align: top; }

.settings-key code { font-size: .82rem; color: var(--acme-blue-dark); }
.settings-key .badge { margin-left: 6px; }
.settings-desc { color: var(--muted); font-size: .78rem; margin-top: 4px; max-width: 46ch; }

.settings-value input[type=text] {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem;
  background: #fff; color: var(--ink);
}
.settings-value input[type=text]:focus {
  outline: none; border-color: var(--acme-blue); box-shadow: 0 0 0 3px rgba(15, 61, 140, .12);
}
.settings-value .settings-number { max-width: 160px; }
.settings-value .settings-secret { border-color: #fecaca; background: #fff8f8; }
.settings-kind { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.settings-readonly { font-size: .8rem; color: var(--muted); word-break: break-all; }

.settings-check { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink); }
.settings-check .settings-bool { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.settings-default code { font-size: .78rem; color: var(--muted); word-break: break-all; }

.settings-row.stored .settings-key code { color: var(--green); }
.settings-row.stored td { background: #fbfefc; }
.settings-row[hidden] { display: none; }

/* Locked form row (the experience manager's own attendee row): greyed out because
   the values come from Entra ID and the application account, not from the form. */
.form-grid.locked-row { opacity: .7; }
.form-grid.locked-row input[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

/* One VM per participant: the approval screen asks for one per slot, so the
   selects are laid out in a compact grid instead of one tall column. */
.slot-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.slot-row { display: flex; flex-direction: column; gap: 4px; }
.slot-row .slot-label { font-size: .82rem; font-weight: 600; color: #475569; }
.slot-row select { padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 6px; }

/* Changing the VM of one participant from the reservation detail. */
.slot-form { display: flex; gap: 6px; align-items: center; }
.slot-form select { padding: 5px 7px; border: 1px solid #e2e8f0; border-radius: 6px; }

/* Booking editor: filters in a toolbar (the search input is styled above, the
   selects were not) and the read-only slot table of an experience. */
.toolbar select {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .9rem;
  background: #fff;
  color: var(--ink);
}
.toolbar form { display: flex; gap: 8px; align-items: center; }
/* Danger zone: the delete card of the booking editor. */
.alert-box.danger h2 { color: #b91c1c; border-bottom-color: #fecaca; }
