/* ===========================================================================
   Software Salones — Design System v2 (panel)
   Paleta: ink cálido + acento flame. Tipografía: Outfit.
   =========================================================================== */
:root {
  /* Superficies */
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e9e6e0;
  --line-strong: #d9d5cd;

  /* Texto */
  --ink: #1f2023;
  --ink-2: #44464c;
  --muted: #807d75;

  /* Sidebar (oscuro) */
  --side-bg: #191a1e;
  --side-line: #2a2b30;
  --side-text: #a4a29b;
  --side-text-hover: #e8e6e0;

  /* Acento único */
  --accent: #d65a31;
  --accent-strong: #bf4c26;
  --accent-soft: #faeae2;
  --accent-ring: rgba(214, 90, 49, 0.28);

  /* Semánticos (desaturados) */
  --ok: #2e8f63;
  --ok-soft: #e3f2ea;
  --warn: #b07d22;
  --warn-soft: #faf0da;
  --danger: #c44438;
  --danger-soft: #fae7e4;
  --info: #3a6ea5;
  --info-soft: #e7eef6;

  /* Sombra cálida, una sola fuente de luz (arriba) */
  --shadow-sm: 0 1px 2px rgba(58, 48, 38, 0.05);
  --shadow-md: 0 1px 2px rgba(58, 48, 38, 0.05), 0 10px 28px -8px rgba(58, 48, 38, 0.09);

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;

  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  display: flex;
  min-height: 100dvh;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------------------
   Sidebar
--------------------------------------------------------------------------- */
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--side-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #34353b transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  color: #f2f0ea;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
.brand .brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  flex-shrink: 0;
}
.brand span { line-height: 1.1; }
.brand small { display: block; font-size: 10.5px; font-weight: 500; color: var(--side-text); letter-spacing: .04em; }

.sidebar nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px 18px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--side-text);
  text-decoration: none;
  padding: 7.5px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.sidebar nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--side-text-hover); }
.sidebar nav a.active {
  background: rgba(214, 90, 49, 0.16);
  color: #f6b29a;
}
.sidebar nav a.active svg { opacity: 1; }

.nav-sep {
  font-size: 10px;
  font-weight: 600;
  color: #66645e;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 16px 10px 5px;
}

.public-link {
  margin-top: auto;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--side-text);
  text-decoration: none;
  padding: 12px 18px;
  border-top: 1px solid var(--side-line);
  display: flex; align-items: center; gap: 8px;
  transition: color .15s ease;
}
.public-link:hover { color: var(--side-text-hover); }
.public-link svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------------------
   Main / topbar
--------------------------------------------------------------------------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-weight: 600; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.plan-chip {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); border: 1px solid var(--line-strong); padding: 2px 8px; border-radius: 20px;
}
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.user-chip { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-strong);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.logout-form { margin: 0; }

.content { padding: 28px 32px 48px; max-width: 1240px; width: 100%; }

/* ---------------------------------------------------------------------------
   Encabezados de página
--------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--ink); text-wrap: balance; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.page-head .muted { margin: 5px 0 0; font-size: 13px; max-width: 62ch; }
.page-head-right { display: flex; gap: 12px; align-items: center; }

/* ---------------------------------------------------------------------------
   Cards
--------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards .card { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* KPIs */
.stat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line);
}
.stat-icon.blue { background: var(--info-soft); border-color: transparent; }
.stat-icon.green { background: var(--ok-soft); border-color: transparent; }
.stat-icon.violet { background: var(--accent-soft); border-color: transparent; }
.stat-icon.red { background: var(--danger-soft); border-color: transparent; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .01em; }
.stat-value { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 1px; }
.cards-4 .stat-value { font-size: 17.5px; }

/* ---------------------------------------------------------------------------
   Tablas
--------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th {
  color: var(--muted); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding-top: 6px; padding-bottom: 8px;
}
td { color: var(--ink-2); }
td strong { color: var(--ink); font-weight: 600; }
td.r, th.r { text-align: right; }
td.r { font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s ease; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
tfoot th, tfoot td { border-top: 1.5px solid var(--line-strong); border-bottom: none; font-weight: 600; color: var(--ink); padding-top: 12px; }

.deuda { color: var(--danger); font-weight: 600; }
.ok { color: var(--ok); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { color: var(--muted); padding: 26px 0; text-align: center; font-size: 13.5px; }
.table-scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.inactivo { opacity: 0.5; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 7px; vertical-align: 1px; }

table.kv th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Filas coloreadas por estado (estilo FUNZONE, en tonos de la paleta) */
.reservas-table tr.r-ok td { background: #ecf6f0; }
.reservas-table tr.r-ok:hover td { background: #e2f0e8; }
.reservas-table tr.r-warn td { background: #fcf4dd; }
.reservas-table tr.r-warn:hover td { background: #f7edcd; }
.reservas-table tr.r-info td { background: #e9f2f8; }
.reservas-table tr.r-info:hover td { background: #ddebf4; }
.reservas-table td { white-space: nowrap; }
tr.fila-pendiente td { background: var(--warn-soft); }
tr.fila-pendiente:hover td { background: #f6ead0; }

/* Leyenda de colores del listado */
.leyenda-card { display: flex; gap: 22px; flex-wrap: wrap; padding: 11px 22px; font-size: 12.5px; color: var(--muted); }
.ley { display: flex; align-items: center; gap: 7px; }
.ley-sw { width: 13px; height: 13px; border-radius: 4px; border: 1px solid rgba(0,0,0,.07); }
.ley-sw.r-ok { background: #ecf6f0; }
.ley-sw.r-warn { background: #fcf4dd; }
.ley-sw.r-info { background: #e9f2f8; }

/* ---------------------------------------------------------------------------
   Badges
--------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge.presupuestado { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.reservado { background: var(--info-soft); color: var(--info); }
.badge.realizado { background: var(--ok-soft); color: var(--ok); }
.badge.cancelado { background: var(--danger-soft); color: var(--danger); }
.badge.ant-aprobado, .badge.pg-aprobado, .badge.acc-creacion, .badge.acc-aprobacion { background: var(--ok-soft); color: var(--ok); }
.badge.ant-pendiente, .badge.pg-pendiente, .badge.acc-edicion { background: var(--warn-soft); color: var(--warn); }
.badge.ant-sin_estado { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.pg-rechazado, .badge.acc-cancelacion, .badge.acc-rechazo { background: var(--danger-soft); color: var(--danger); }
.badge.mod, .badge.cat, .badge.acc-apertura { background: var(--info-soft); color: var(--info); }
.badge.acc-cierre { background: var(--surface-2); color: var(--muted); }
.badge.acc-login { background: var(--ok-soft); color: var(--ok); }
.badge.acc-logout { background: var(--surface-2); color: var(--muted); }
.badge.bal-perfecto { background: var(--info-soft); color: var(--info); }
.badge.bal-sobrante { background: var(--ok-soft); color: var(--ok); }
.badge.bal-faltante { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------------------------------
   Formularios
--------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 130px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 8.5px 11px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #b3b0a8; }
input:hover, select:hover, textarea:hover { border-color: #c4c0b6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.filtros-card { padding: 16px 22px; }
.filtros-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.filtros-titulo { font-weight: 700; font-size: 14px; color: var(--ink); }
.filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px 14px;
}
.filtros-btns { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.check-inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.check-inline input { width: auto; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 4px 0; }

/* ---------------------------------------------------------------------------
   Galería (panel)
--------------------------------------------------------------------------- */
.galeria-upload { display: flex; flex-direction: column; gap: 14px; }
.upload-drop {
  border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 32px 20px;
  text-align: center; background: var(--bg); transition: border-color .15s, background .15s;
}
.upload-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.upload-drop p { margin: 4px 0; }
.upload-ico { font-size: 38px; margin-bottom: 6px; }
.upload-foot { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.galeria-item { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); position: relative; }
.galeria-item img { width: 100%; height: 150px; object-fit: cover; display: block; }
.galeria-item.oculta img { opacity: .45; filter: grayscale(.4); }
.galeria-tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.galeria-item figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.galeria-cap { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.galeria-acc { display: flex; gap: 6px; }
.galeria-acc form { flex: 1; }
.galeria-acc .btn { width: 100%; }

/* ---------------------------------------------------------------------------
   Botones
--------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.small { padding: 4.5px 10px; font-size: 12px; box-shadow: none; }
.ok-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.ok-btn:hover { background: #257a53; border-color: #257a53; }
.danger-btn { background: var(--surface); border-color: var(--line-strong); color: var(--danger); }
.danger-btn:hover { background: var(--danger-soft); border-color: var(--danger); }
.acciones-inline { display: flex; gap: 6px; justify-content: flex-end; }
.acciones-inline form { margin: 0; }

/* ---------------------------------------------------------------------------
   Misceláneas
--------------------------------------------------------------------------- */
.total-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.total-pill strong { color: var(--danger); font-weight: 700; }
.mes-picker input { font-size: 13.5px; }

.aviso-importante {
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  font-size: 13.5px;
  color: #6e5417;
}
.link-generado { border-left: 3px solid var(--ok); }
.link-box { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.link-box input { flex: 1; font-family: ui-monospace, 'Cascadia Mono', monospace; font-size: 12.5px; background: var(--surface-2); }

.aplicar-bar { flex-direction: row; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.aplicar-bar label { flex: 0 0 200px; }

/* ---------------------------------------------------------------------------
   Modales
--------------------------------------------------------------------------- */
.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 640px;
  width: 92%;
  box-shadow: 0 24px 64px -12px rgba(30, 24, 18, 0.35);
}
.modal::backdrop { background: rgba(25, 22, 18, 0.45); backdrop-filter: blur(3px); }
.modal .form { padding: 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.modal-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close {
  background: var(--surface-2); border: 1px solid var(--line);
  width: 28px; height: 28px; border-radius: 8px;
  font-size: 13px; cursor: pointer; color: var(--muted);
  display: grid; place-items: center;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

/* ---------------------------------------------------------------------------
   Login / error (standalone)
--------------------------------------------------------------------------- */
.login-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  background: var(--bg);
}
.login-side {
  background: var(--side-bg);
  color: #f0eee8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  position: relative;
  overflow: hidden;
}
.login-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 420px at 85% -10%, rgba(214, 90, 49, 0.22), transparent 60%),
    radial-gradient(520px 420px at -10% 110%, rgba(58, 110, 165, 0.14), transparent 60%);
  pointer-events: none;
}
.login-side > * { position: relative; }
.login-side .brand { padding: 0; }
.login-tagline h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: #f6f4ee; margin: 0 0 14px; text-wrap: balance; }
.login-tagline p { color: #9c9a92; font-size: 14.5px; line-height: 1.6; max-width: 42ch; margin: 0; }
.login-feats { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 9px; }
.login-feats li { display: flex; gap: 9px; align-items: center; color: #b6b4ac; font-size: 13.5px; }
.login-feats li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.login-foot { color: #66645e; font-size: 12px; }

.login-form-side { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 360px; max-width: 100%; }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-sub { color: var(--muted); margin: 0 0 24px; font-size: 13.5px; }
.login-hint { margin-top: 18px; font-size: 12px; color: var(--muted); }
.login-hint code { background: var(--surface); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; font-size: 11.5px; }
.alert.error {
  background: var(--danger-soft); color: var(--danger);
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px;
  border: 1px solid #efc4be;
}
/* error.ejs standalone reusa login-card centrada */
.login-body.single { grid-template-columns: 1fr; place-items: center; }
.login-brand { font-size: 22px; font-weight: 800; color: var(--ink); }

/* ---------------------------------------------------------------------------
   Calendario del panel
--------------------------------------------------------------------------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 22px; }
.suc-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.suc-tab {
  border: 1px solid var(--line-strong); background: var(--surface);
  padding: 6px 13px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; color: var(--muted); font-family: inherit;
  transition: all .15s ease;
}
.suc-tab:hover { border-color: var(--ink-2); color: var(--ink); }
.suc-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-range { font-weight: 600; margin-left: 6px; font-size: 13.5px; }
.cal-card { padding: 0; overflow: hidden; }

.cal-grid { display: grid; grid-template-columns: 52px repeat(7, 1fr); }
.cal-col { border-right: 1px solid var(--line); }
.cal-col:last-child { border-right: none; }
.cal-times { background: var(--surface-2); }
.cal-dayhead {
  height: 42px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line); text-transform: capitalize;
}
.cal-dayhead.hoy { background: var(--ink); color: #fff; }
.cal-day.hoy .cal-slots { background: #fbf8f4; }
.cal-time { font-size: 10.5px; color: var(--muted); padding: 2px 7px; border-bottom: 1px dashed var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.cal-slots { position: relative; }
.cal-slot { border-bottom: 1px dashed #f0ede7; cursor: pointer; transition: background .12s ease; }
.cal-slot:hover { background: var(--accent-soft); }
.cal-event {
  position: absolute; left: 3px; right: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 7px; padding: 4px 7px; overflow: hidden;
  font-size: 11px; box-shadow: var(--shadow-sm); cursor: default;
}
.ev-tit { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.ev-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-mon { color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------
   Cajas
--------------------------------------------------------------------------- */
.cajas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; margin-bottom: 16px; }
.caja-card { margin-bottom: 0; }
.caja-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 14px; }
.caja-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  background: var(--ok-soft);
}
.caja-icon.cerrada { background: var(--surface-2); border: 1px solid var(--line); filter: grayscale(1); opacity: .7; }
.caja-estado { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
.caja-estado.abierta { background: var(--ok-soft); color: var(--ok); }
.caja-estado.cerrada { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.caja-kv th { width: auto; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.caja-kv td, .caja-kv th { padding: 7px 4px; }
.caja-kv td { font-variant-numeric: tabular-nums; }
.caja-esperado th, .caja-esperado td { border-top: 1.5px solid var(--line-strong); border-bottom: none; font-size: 14.5px; color: var(--ink); }
.caja-form { margin-top: 14px; }

/* ---------------------------------------------------------------------------
   RRHH
--------------------------------------------------------------------------- */
.evento-staff { padding: 16px 22px; }
.evento-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.asig-table { margin-bottom: 8px; }
.asig-table th, .asig-table td { padding: 7px 10px; }
.asig-form summary { cursor: pointer; color: var(--accent-strong); font-weight: 600; font-size: 13px; padding: 6px 0; list-style: none; }
.asig-form summary::before { content: ''; }
.asig-form summary:hover { text-decoration: underline; }
.asig-form .row { align-items: flex-end; }

/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */
@media (max-width: 940px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: column; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; padding-bottom: 10px; }
  .nav-sep { display: none; }
  .public-link { display: none; }
  .content { padding: 20px 16px 40px; }
  .cards, .cards-4, .grid-2 { grid-template-columns: 1fr; }
  .cal-grid { min-width: 760px; }
  .cal-card { overflow-x: auto; }
  .login-body { grid-template-columns: 1fr; }
  .login-side { display: none; }
}
