:root {
  --navy: #0b1626;
  --gold: #ffb020;
  --ice: #7fd3f7;
  --paper: #f4f7fb;
  --card: #ffffff;
  --ink: #0b1626;
  --muted: #5c6b7a;
  --line: #e1e7ef;
  --danger: #9b2c2c;
  --ok: #1f7a4d;
  --warn: #ff7a45;
  --menu: #f4f7fb;
  --menu-ink: #0b1626;
  --menu-muted: #3e5568;
  --menu-line: #d3dde7;
  --menu-hover: #e4edf5;
  --menu-active: #fff3d6;
  --font: "Carlito", Calibri, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: white;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
}

a { color: var(--ice); }

.publico-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.4rem;
}

.wordmark, .lockup { height: auto; display: block; }

.wordmark { width: min(220px, 70%); }

.wordmark.hotel {
  width: auto;
  max-width: min(320px, 88vw);
  max-height: 168px;
  object-fit: contain;
}

.marca { line-height: 0; }

.marco, .marco-ancho {
  width: min(100% - 1.5rem, 32rem);
  margin: 0 auto;
}

.marco-ancho { width: min(100% - 2rem, 72rem); }

main { padding: 1rem 0 2.5rem; }

.ficha, .panel, .login {
  background: var(--card);
  color: var(--ink);
  border-radius: 16px;
  padding: 1.25rem;
}

.ficha a, .panel a, .login a { color: #145a86; }

.hotel, h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.concepto, .comercio, .ayuda, .aviso {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.placa {
  margin: 1rem 0;
  background: var(--gold);
  color: var(--navy);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.monto {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.datos { margin: 0; }
.datos div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.datos dt { color: var(--muted); }
.datos dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

button, .boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: auto;
  margin-top: 1rem;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.ficha button, .login button, .ficha .boton { width: 100%; }

button.secundario, a.secundario, .boton.secundario {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}

button.link, button.salir {
  width: auto;
  min-height: 0;
  margin: 0;
  background: none;
  font-weight: 600;
}

button.link { color: var(--ice); }

.aviso-error { color: var(--danger); font-weight: 700; }
.aviso-ok { color: var(--ok); font-weight: 700; }

.pie {
  color: #d5dee8;
  padding: 0.4rem 1rem 1.6rem;
  font-size: 0.92rem;
  text-align: center;
}

.pie a { color: var(--ice); }
.pie .razon { color: white; font-weight: 700; margin: 0 0 0.2rem; }
.pie p { margin: 0.15rem 0; }
.legales { margin-top: 0.7rem; }

.campo { display: block; margin: 0.8rem 0; }
.campo span { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 0.25rem; font-weight: 700; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d5dee4;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: white;
}

textarea { min-height: 5rem; }
input[type="checkbox"] { width: 1.25rem; min-height: 1.25rem; }

.fila { display: flex; gap: 0.5rem; align-items: center; }
.fila button, .fila .boton, td button, td .boton { width: auto; margin-top: 0.35rem; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; color: var(--ink); }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.estado { font-weight: 700; }
.pagado { color: var(--ok); }
.pendiente { color: var(--navy); }
.vencido, .cancelado, .rechazado { color: var(--danger); }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--paper);
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 0.8rem;
  color: var(--ink);
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 0 2rem;
}

.gate-col {
  width: min(420px, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
}

.lockup { width: min(320px, 100%); }

.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  background: var(--menu);
  color: var(--menu-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  max-height: 100vh;
  border-right: 1px solid var(--menu-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--menu-ink);
  text-decoration: none;
  padding: 12px 12px 10px;
}

.brand img { width: 36px; height: 36px; display: block; }

.brand-lock { display: flex; flex-direction: column; min-width: 0; }
.brand b { font-size: 20px; letter-spacing: -0.03em; line-height: 1; color: var(--menu-ink); }
.brand small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a5270;
  font-weight: 700;
  line-height: 1.2;
}

.side nav { padding: 0 0 8px; overflow: auto; }

.side-fold { margin: 2px 0 0; }
.side-fold > summary.side-label {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 8px 0;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--menu-muted);
  font-weight: 700;
}
.side-fold > summary.side-label::-webkit-details-marker { display: none; }
.side-fold > summary.side-label::marker { content: ""; }
.side-fold > summary.side-label::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  border-color: var(--menu-muted) transparent transparent transparent;
  flex: none;
}
.side-fold[open] > summary.side-label::after {
  border-width: 0 4px 5px 4px;
  border-color: transparent transparent var(--menu-muted) transparent;
}
.side-fold > summary.side-label:hover { background: var(--menu-hover); color: var(--menu-ink); }

.side-link {
  display: block;
  padding: 5px 14px 5px 15px;
  border-left: 3px solid transparent;
  color: #163044;
  text-decoration: none;
  font-size: 13.5px;
}

.side-link:hover { color: var(--menu-ink); background: var(--menu-hover); }
.side-link[aria-current="page"] {
  background: var(--menu-active);
  color: var(--menu-ink);
  border-left-color: var(--gold);
  font-weight: 700;
}

.side-user {
  margin-top: auto;
  background: white;
  border-top: 1px solid var(--menu-line);
  padding: 0.55rem 0.6rem 0.7rem;
  position: relative;
}

.cuenta { position: relative; }
.cuenta summary { list-style: none; cursor: pointer; padding: 0.2rem 0.15rem; border-radius: 8px; }
.cuenta summary::-webkit-details-marker { display: none; }
.cuenta summary::marker { content: ""; }
.cuenta summary:hover { background: var(--menu-hover); }
.cuenta summary strong { display: block; color: var(--menu-ink); word-break: break-all; }
.cuenta summary .caret { float: right; margin-top: 0.35rem; color: var(--menu-muted); font-size: 0.7rem; }
.cuenta-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: white;
  border: 1px solid var(--menu-line);
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 12px 32px rgba(11, 22, 38, 0.16);
}
.cuenta-menu a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  color: var(--menu-ink);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}
.cuenta-menu a:hover,
.cuenta-menu a[aria-current="page"] { background: var(--menu-hover); }
.cuenta-menu button {
  width: 100%;
  margin: 0;
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.84rem;
  background: transparent;
  color: var(--menu-ink);
  border: 1px solid #c5d0db;
}

.role {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

button.salir {
  width: 100%;
  margin-top: 0.7rem;
  min-height: 40px;
  background: transparent;
  color: var(--menu-ink);
  border: 1px solid #c5d0db;
}

.workspace { min-width: 0; background: var(--navy); }
.workspace main { width: auto; max-width: none; margin: 0; padding: 14px 18px 32px; }
.workspace h1, .workspace h2 { color: white; }
.workspace .panel {
  background: #12263a;
  color: white;
  border: 1px solid #243c58;
  border-radius: 10px;
}
.workspace .panel h1, .workspace .panel h2 { color: white; }
.workspace .panel a, .workspace .panel .boton { color: var(--ice); }
.workspace .panel .boton, .workspace .panel button { color: var(--navy); }
.workspace .panel button.secundario, .workspace .panel a.secundario {
  background: transparent;
  color: white;
  border: 1px solid #243c58;
}
.workspace .ayuda, .workspace .campo span { color: #8fa6bb; }
.workspace .aviso-error { color: #ff7a7a; }
.workspace .aviso-ok { color: var(--ice); }
.workspace table { color: white; background: #12263a; }
.workspace th, .workspace td { border-bottom-color: #243c58; color: white; }
.workspace th { color: #8fa6bb; background: #0c1c2f; }
.workspace .pendiente { color: white; }
.workspace .pagado { color: var(--ice); }
.workspace .vencido, .workspace .cancelado, .workspace .rechazado { color: #ff7a7a; }
.workspace input, .workspace select, .workspace textarea { width: min(100%, 360px); color: var(--navy); background: white; }
.workspace textarea { width: min(100%, 520px); }
.workspace form.cobro,
.workspace form.usuario { max-width: 28rem; }
.workspace form.cobro .moneda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 0.2rem;
  padding: 0;
  border: 0;
}
.workspace form.cobro .moneda legend {
  flex: 1 0 100%;
  margin-bottom: 0.15rem;
  color: #8fa6bb;
  font-size: 0.86rem;
  font-weight: 700;
}
.workspace form.cobro .moneda label {
  flex: 1 1 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  border: 1px solid #8fa6bb;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.workspace form.cobro .moneda input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}
.workspace form.cobro .moneda label:has(input:checked) {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.workspace form.cobro .moneda label:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.workspace form.cobro input,
.workspace form.cobro select,
.workspace form.cobro textarea,
.workspace form.cobro > button,
.workspace form.usuario input,
.workspace form.usuario select,
.workspace form.usuario > button { width: 100%; max-width: none; }
.workspace form.usuario input[type="checkbox"] { width: 1.25rem; min-height: 1.25rem; }
.workspace .panel button.peligro {
  width: auto;
  margin-top: 0.8rem;
  background: transparent;
  color: #ff7a7a;
  border: 1px solid #ff7a7a;
}
.workspace .filtros {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 0.45rem;
  overflow-x: auto;
}
.workspace .filtros .campo { flex: 1 1 0; min-width: 7.5rem; margin: 0; }
.workspace .filtros input,
.workspace .filtros select {
  width: 100%;
  min-height: 36px;
  padding: 0.3rem 0.45rem;
}
.workspace .filtros button {
  flex: 0 0 auto;
  margin: 0;
  min-height: 36px;
  padding: 0 0.75rem;
  white-space: nowrap;
}
.workspace table.lista { font-size: 0.86rem; }
.workspace table.lista th,
.workspace table.lista td { white-space: nowrap; vertical-align: middle; padding: 0.35rem 0.45rem; }
.workspace table.lista td.fecha { font-variant-numeric: tabular-nums; }
.workspace table.lista td.accion button {
  margin: 0;
  min-height: 32px;
  padding: 4px 10px;
  white-space: nowrap;
}
.workspace pre { background: #0c1c2f; color: white; }
.panel h1, .ficha h1 { color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }



@media (max-width: 800px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .side { position: sticky; max-height: 100vh; }
  .workspace main { padding: 14px 12px 28px; }
}
