/* Portal de levantamientos: misma identidad que el visor (Manual Bisonte 2022) */
@font-face { font-family: Poppins; src: url(/visor/assets/Poppins-Light.otf) format("opentype"); font-weight: 300; }
@font-face { font-family: Poppins; src: url(/visor/assets/Poppins-Regular.otf) format("opentype"); font-weight: 400; }
@font-face { font-family: Poppins; src: url(/visor/assets/Poppins-Bold.otf) format("opentype"); font-weight: 700; }

:root {
  --azul: #19408F;
  --azul-claro: #2C93D1;
  --gris: #424241;
  --degradado: linear-gradient(135deg, #19408F 0%, #2C93D1 100%);
  --fondo: #f3f6fa;
  --linea: #e3e7ee;
  --muted: #7b7b7a;
  --ok: #1f9d6b;
  --warn: #d9822b;
  --err: #c2412d;
  --radio: 10px;
  --sombra: 0 6px 24px rgba(16, 33, 74, 0.10);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--fondo); color: var(--gris);
  font: 300 14px/1.5 Poppins, system-ui, "Segoe UI", sans-serif; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: 0.06em; color: var(--azul); }
h2 { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--azul); margin: 22px 0 12px; }
h2:first-child { margin-top: 0; }
h3 { font-size: 16px; font-weight: 700; color: var(--gris); }
a { color: var(--azul-claro); text-decoration: none; font-weight: 400; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.gap { gap: 12px; flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }

button, .primary, .ghost { font: inherit; font-weight: 400; cursor: pointer; border-radius: var(--radio); padding: 10px 18px;
  border: 1px solid var(--azul); display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }
.primary { background: var(--azul); color: #fff; }
.primary:hover { background: #15367a; }
.primary:disabled { background: #b8c3d8; border-color: #b8c3d8; cursor: default; }
.ghost { background: #fff; color: var(--azul); }
.small.primary, .small.ghost { padding: 6px 12px; font-size: 13px; }
.block { width: 100%; margin-top: 10px; }

label { display: block; margin-bottom: 14px; font-weight: 400; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], select {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: var(--gris);
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); }
input:focus, select:focus { outline: 2px solid rgba(44, 147, 209, 0.35); border-color: var(--azul-claro); }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 300; }
.check input { margin-top: 3px; accent-color: var(--azul); }
fieldset { border: 1px solid var(--linea); border-radius: var(--radio); padding: 10px 14px 2px; margin: 0 0 6px; }
legend { font-size: 12px; color: var(--muted); padding: 0 4px; }


/* ---------------- ingreso ---------------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-brand { background: var(--degradado); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.login-brand img { width: 200px; margin-bottom: 36px; }
.login-brand h1 { color: #fff; font-size: 26px; }
.login-brand p { max-width: 420px; opacity: 0.92; font-size: 15px; }
.login-brand ul { list-style: none; padding: 0; margin: 18px 0 0; }
.login-brand li { padding-left: 22px; position: relative; margin-bottom: 8px; }
.login-brand li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: #fff; opacity: 0.85; }
.login-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: #fff; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 18px; margin-bottom: 4px; }
.login-form .muted { margin-top: 0; margin-bottom: 22px; }
.legal { margin-top: 40px; display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legal b { color: var(--azul); }

/* ---------------- barra superior ---------------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 10px 28px; background: var(--degradado); color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand img { width: 60px; }
.brand span { font-weight: 700; letter-spacing: 0.08em; font-size: 13px; }
.topbar nav { display: flex; gap: 6px; flex: 1; }
.topbar nav a { color: #fff; padding: 7px 14px; border-radius: 999px; opacity: 0.85; }
.topbar nav a.on, .topbar nav a:hover { background: rgba(255, 255, 255, 0.18); opacity: 1; text-decoration: none; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--azul); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.who { display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.who span { font-size: 11px; opacity: 0.85; }
.logout { color: #fff; font-size: 12px; margin-left: 6px; opacity: 0.85; }

/* ---------------- páginas internas ---------------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .muted { margin: 4px 0 0; }
.search { width: 260px !important; margin: 0 !important; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.thumb { position: relative; height: 150px; background: #dde5f0 center / cover; }
.thumb.placeholder { background: linear-gradient(135deg, #dfe8f5, #c9d8ee); }
.chip { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 400; color: #fff; }
.chip.ok { background: var(--ok); }
.chip.run { background: var(--azul-claro); }
.chip.wait { background: #8a94a6; }
.chip.err { background: var(--err); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body .muted, .card-body .meta { margin: 0; font-size: 12px; }
.card-body .row { margin-top: auto; padding-top: 10px; }
.err-text { color: var(--err); }
.progress { height: 6px; border-radius: 999px; background: var(--linea); overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; background: var(--degradado); transition: width 0.2s; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.panel { background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: var(--sombra); }
.side { position: sticky; top: 80px; }
.drop { border: 2px dashed #b9c8de; border-radius: 14px; padding: 30px 16px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; background: #f8fafd; margin-bottom: 16px; }
.drop:hover { border-color: var(--azul-claro); background: #f1f7fc; }
.drop svg { width: 38px; height: 38px; fill: none; stroke: var(--azul); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.file { border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 14px; margin-bottom: 16px; }
.consent { margin-top: 8px; }

.checks { list-style: none; padding: 0; margin: 0 0 14px; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.checks li span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c5cfdd; flex: none; }
.checks li.ok span { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 3px #fff; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 6px; padding: 12px 14px; background: var(--fondo); border-radius: var(--radio); font-size: 13px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 400; }
.steps { margin: 0 0 8px; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.steps .opt { color: var(--muted); }

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 36px 24px; }
  .login-brand img { width: 150px; margin-bottom: 20px; }
  .two-col { grid-template-columns: 1fr; }
  .side { position: static; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .topbar nav { order: 3; width: 100%; }
  .who { display: none; }
  .search { width: 100% !important; }
}

/* ---------------- piezas del portal real ---------------- */
.err-box { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radio); background: #fdecea; color: var(--err); font-size: 13px; }
.ok-box { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radio); background: #e7f6ef; color: var(--ok); font-size: 13px; }
.empty { padding: 50px 20px; text-align: center; background: #fff; border-radius: 14px; box-shadow: var(--sombra); }
.empty p { margin: 6px 0 16px; }
.danger { background: #fff; color: var(--err); border-color: var(--err); }
.thumb-icon { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(25, 64, 143, 0.35); }
.thumb-icon svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.chip.sub { background: #6b7a99; }

table.tabla { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); }
.tabla th, .tabla td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--linea); font-size: 13px; }
.tabla th { font-size: 11px; letter-spacing: 0.08em; color: var(--azul); font-weight: 700; background: #f8fafd; }
.tabla tr:last-child td { border-bottom: 0; }
.pill { padding: 2px 9px; border-radius: 999px; font-size: 11px; background: var(--fondo); }
.pill.admin { background: #e3ecfa; color: var(--azul); }
.pill.off { background: #fdecea; color: var(--err); }

.modal-fondo { position: fixed; inset: 0; z-index: 20; background: rgba(13, 26, 51, 0.45); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: var(--sombra); }
.modal h2 { margin-top: 0; }
.secreto { font: 400 16px/1.4 Consolas, monospace; padding: 10px 12px; background: var(--fondo); border-radius: var(--radio); user-select: all; word-break: break-all; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: var(--radio);
  background: #fff; box-shadow: var(--sombra); border-left: 4px solid var(--azul-claro); max-width: calc(100vw - 32px); }
.toast.err { border-left-color: var(--err); }
pre.log { max-height: 50vh; overflow: auto; background: #0f1b33; color: #d8e2f1; padding: 12px; border-radius: var(--radio); font-size: 11px; white-space: pre-wrap; }
body:not(.admin) .solo-admin { display: none !important; }
.legal a[href=""] { display: none; }
.drop.over { border-color: var(--azul-claro); background: #eaf4fb; }
.modal .row { margin-top: 8px; }
.tabla td.row { display: table-cell; }
.tabla td.row button { margin-right: 6px; }

.topbar nav a { white-space: nowrap; }
@media (max-width: 1150px) { .brand span { display: none; } .who { display: none; } }

/* enlaces de marca y textos del inicio */
.legal a:not([href]), .brand a:not([href]) { color: inherit; text-decoration: none; cursor: default; }
.brand a { color: #fff; display: flex; align-items: center; }
.logo-link { align-self: flex-start; }
.pronto { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); font-size: 11px; }

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#f-registro, #reg-ok { width: 100%; max-width: 380px; }
#reg-ok .ok-box { margin: 14px 0; }
.topbar .badge { background: #fff; color: var(--azul); margin-left: 4px; }
#solicitudes .tabla select { padding: 6px 8px; margin: 0; }
/* en pantallas angostas el menú se desliza dentro de la barra, sin ensanchar la página */
@media (max-width: 860px) {
  .topbar nav { overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .row.gap { flex-wrap: wrap; }
}

/* compartir */
.modal.ancho { max-width: 620px; }
.enlace { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--fondo); border-radius: var(--radio); font-size: 13px; color: var(--gris); }
.enlace.vencido { opacity: 0.6; }
#cm-nuevo { margin-top: 12px; }
#cm-nuevo .secreto { font-size: 13px; }
@media (max-width: 600px) { .enlace { flex-wrap: wrap; } .enlace .grow { flex-basis: 100%; } }

/* pantallas angostas (y grabación vertical): la tarjeta ocupa todo el ancho */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .thumb { height: 220px; }
  .page-head { align-items: stretch; }
  .page-head .row { width: 100%; }
  .page-head .row .search { flex: 1; }
}

/* cursor del recorrido automático */
.tour-cursor { position: fixed; left: -15px; top: -15px; width: 30px; height: 30px; z-index: 60; pointer-events: none;
  border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(25, 64, 143, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4); }
.tour-cursor::before { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; }
.tour-cursor::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 3px solid var(--azul-claro); opacity: 0; }
.tour-cursor.clic::after { animation: tour-clic 0.45s ease-out; }
@keyframes tour-clic { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
