/* ==========================================================================
   Hotel FJA - Gestión web  (sistema visual v2)
   Bootstrap 5 + estilos propios.
   Los colores de estado vienen del sistema Delphi: confirmada (índigo),
   reservada (ámbar), mantenimiento (verde) y hoy (amarillo).
   ========================================================================== */

:root {
  --ink: #161c2d;
  --ink-2: #47516a;
  --ink-3: #7b8499;
  --ink-4: #a9b0c0;
  --paper: #f3f5fa;
  --surface: #ffffff;
  --line: #e3e7ef;
  --line-2: #eef1f6;

  --conf: #4f5bd5;
  --conf-2: #7a5af5;
  --conf-soft: #eaecfc;
  --conf-ink: #2f3aa8;
  --res: #f09a22;
  --res-soft: #fef2df;
  --res-ink: #9a5d0c;
  --mant: #1fa97a;
  --mant-soft: #dff5ec;
  --mant-ink: #16704f;
  --today: #f6c945;
  --today-soft: #fff7d6;
  --weekend: #f7f8fb;

  --ok: #1f9d6b;
  --ok-soft: #e1f5ec;
  --warn: #c98710;
  --warn-soft: #fcf1d9;
  --bad: #d6455d;
  --bad-soft: #fde8ec;
  --sky: #2f9be0;
  --sky-soft: #e2f1fc;
  --teal: #12a5a0;
  --teal-soft: #dcf5f3;
  --violet: #7a5af5;
  --violet-soft: #ede8fe;

  --nav-w: 244px;
  --top-h: 64px;
  --r-xl: 20px;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(22, 28, 45, .04), 0 4px 16px rgba(22, 28, 45, .05);
  --shadow-2: 0 2px 4px rgba(22, 28, 45, .05), 0 14px 34px rgba(22, 28, 45, .10);
  --shadow-3: 0 24px 60px rgba(22, 28, 45, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bs-body-font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-primary: var(--conf);
  --bs-primary-rgb: 79, 91, 213;
  --bs-border-color: var(--line);
  --bs-link-color: var(--conf-ink);
  --bs-link-color-rgb: 47, 58, 168;
}

html, body { height: 100%; }
body {
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 750; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
.text-muted { color: var(--ink-3) !important; }
.small-muted { font-size: .82rem; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--conf); outline-offset: 2px; }
.form-control:focus, .form-select:focus, .btn:focus-visible { box-shadow: 0 0 0 3px rgba(79, 91, 213, .22); border-color: var(--conf); }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; border-radius: 10px; font-weight: 600; transition: transform .15s var(--ease), box-shadow .2s, background-color .15s, border-color .15s; }
.btn:active { transform: scale(.97); }
.btn i { line-height: 1; }
.btn-primary {
  --bs-btn-bg: var(--conf); --bs-btn-border-color: var(--conf);
  --bs-btn-hover-bg: var(--conf-ink); --bs-btn-hover-border-color: var(--conf-ink); --bs-btn-active-bg: var(--conf-ink);
  background-image: linear-gradient(135deg, var(--conf), var(--conf-2));
  border: 0; box-shadow: 0 6px 16px rgba(79, 91, 213, .32);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(79, 91, 213, .42); transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:disabled { box-shadow: none; filter: grayscale(.3); }
.btn-light { --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #f6f7fb; --bs-btn-hover-border-color: #d5dae6; --bs-btn-color: var(--ink-2); box-shadow: 0 1px 2px rgba(22,28,45,.04); }
.btn-soft { background: var(--conf-soft); color: var(--conf-ink); border: 0; }
.btn-soft:hover { background: #dde0fa; color: var(--conf-ink); }
[data-perm][hidden] { display: none !important; }
.btn-pay { background: #17805a; border: 0; color: #fff; box-shadow: 0 6px 16px rgba(23, 128, 90, .28); }
.btn-pay:hover, .btn-pay:focus-visible { background: #126a4a; color: #fff; }
.btn-danger-soft { background: var(--bad-soft); color: var(--bad); border: 0; }
.btn-danger-soft:hover { background: #fbd5dc; color: var(--bad); }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .5rem .75rem; }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.form-label { font-size: .8rem; font-weight: 650; color: var(--ink-2); margin-bottom: .3rem; }
.form-text { font-size: .78rem; color: var(--ink-3); }
.is-invalid ~ .invalid-msg, .invalid-msg { font-size: .78rem; color: var(--bad); margin-top: .25rem; }
.form-check-input:checked { background-color: var(--conf); border-color: var(--conf); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-icon > .form-control { padding-left: 36px; }

/* ==========================================================================
   Animaciones
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes barIn { from { opacity: 0; transform: scaleX(.6); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(246, 201, 69, .7); } 70% { box-shadow: 0 0 0 9px rgba(246, 201, 69, 0); } 100% { box-shadow: 0 0 0 0 rgba(246, 201, 69, 0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Entrada escalonada de los bloques de cada pantalla */
.view > *, .stagger > * { animation: rise .5s var(--ease) backwards; }
.view > *:nth-child(2), .stagger > *:nth-child(2) { animation-delay: .05s; }
.view > *:nth-child(3), .stagger > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4), .stagger > *:nth-child(4) { animation-delay: .15s; }
.view > *:nth-child(5), .stagger > *:nth-child(5) { animation-delay: .2s; }
.view > *:nth-child(6), .stagger > *:nth-child(6) { animation-delay: .25s; }
.view > *:nth-child(n+7), .stagger > *:nth-child(n+7) { animation-delay: .3s; }
.stagger-fast > * { animation: pop .38s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 28ms); }

/* ==========================================================================
   Login
   ========================================================================== */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); background: var(--surface); }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(122, 90, 245, .55), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(18, 165, 160, .35), transparent 60%),
    linear-gradient(160deg, #1b2240, #121729 70%);
}
.login-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.login-art > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.login-art h1 { color: #fff; font-size: 2.6rem; line-height: 1.08; max-width: 13ch; font-weight: 800; letter-spacing: -.03em; animation: rise .7s var(--ease) backwards; }
.login-art p { color: #b9c0d6; max-width: 44ch; animation: rise .7s .15s var(--ease) backwards; }
.login-rack { display: grid; gap: 9px; margin: 34px 0; max-width: 620px; }
.login-rack .lr-row { display: grid; grid-template-columns: 56px repeat(14, 1fr); gap: 4px; align-items: center; }
.login-rack .lr-room { font-size: .72rem; color: #8b93ad; }
.login-rack .lr-bar { height: 22px; border-radius: 7px; transform-origin: left; animation: growX .7s var(--ease) backwards; animation-delay: calc(var(--i) * 80ms + .25s); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-form { width: 100%; max-width: 360px; animation: rise .6s .1s var(--ease) backwards; }
.login-form h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.login-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 18px; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 26px 24px; min-height: 0; }
  .login-art h1 { font-size: 1.5rem; max-width: none; margin: 14px 0 0; }
  .login-rack, .login-art p, .login-foot { display: none; }
}

/* ==========================================================================
   Estructura: navegación lateral + barra superior
   ========================================================================== */
.app { display: none; min-height: 100vh; }
.app.ready { display: block; }

.nav-side {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w); z-index: 1030;
  display: flex; flex-direction: column; padding: 16px 12px;
  color: #c3c9da;
  background: radial-gradient(500px 300px at 0% 0%, rgba(122, 90, 245, .28), transparent 70%), linear-gradient(180deg, #1a2038, #12172a);
  transition: width .25s var(--ease);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; min-height: 64px; }
.brand-mark {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; background: #fff; color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; letter-spacing: -.02em; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.brand-text { min-width: 0; line-height: 1.2; }
.brand-text b { display: block; color: #fff; font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: .74rem; color: #8f97b0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group { font-size: .7rem; color: #6f7893; padding: 14px 12px 6px; font-weight: 600; }
.nav-side a.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: #b4bbcf; text-decoration: none; font-size: .9rem; font-weight: 550; margin-bottom: 3px;
  transition: background-color .15s, color .15s, transform .15s var(--ease);
}
.nav-side a.nav-item i { font-size: 1.15rem; line-height: 1; width: 22px; text-align: center; transition: transform .2s var(--ease); }
.nav-side a.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-side a.nav-item:hover i { transform: scale(1.12); }
.nav-side a.nav-item.active { background: linear-gradient(135deg, rgba(79,91,213,.95), rgba(122,90,245,.9)); color: #fff; box-shadow: 0 8px 20px rgba(79, 91, 213, .38); }
.nav-bottom { margin-top: auto; }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); margin-top: 8px; }
.nav-user .who { min-width: 0; line-height: 1.2; flex: 1; }
.nav-user .who b { display: block; color: #fff; font-size: .84rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user .who span { font-size: .72rem; color: #8f97b0; }
.nav-user button { border: 0; background: none; color: #9aa2ba; padding: 6px; border-radius: 8px; }
.nav-user button:hover { color: #fff; background: rgba(255,255,255,.1); }

.main { margin-left: var(--nav-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .25s var(--ease); }
.topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--top-h);
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(243, 245, 250, .86); backdrop-filter: saturate(1.5) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .nav-toggle { border: 0; background: none; color: var(--ink-2); font-size: 1.25rem; padding: 4px 6px; border-radius: 8px; }
.topbar .nav-toggle:hover { background: var(--line-2); }
.topbar .page-title { font-size: 1.1rem; font-weight: 750; margin: 0; white-space: nowrap; }
.topbar .search { position: relative; flex: 1; max-width: 400px; margin-left: auto; }
.topbar .search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.topbar .search input { padding-left: 38px; background: var(--surface); border-radius: 12px; box-shadow: 0 1px 2px rgba(22,28,45,.04); }
.topbar .search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--line-2); color: var(--ink-3); font-size: .7rem; border-radius: 6px; padding: 2px 7px; font-family: inherit; }
.topbar .search input:focus ~ kbd, .topbar .search input:not(:placeholder-shown) ~ kbd { display: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  max-height: 62vh; overflow: auto; display: none; z-index: 1040; padding: 6px;
}
.search-results.show { display: block; animation: slideDown .18s var(--ease); }
.search-results a { display: flex; gap: 10px; padding: 9px 10px; color: var(--ink); text-decoration: none; border-radius: 10px; align-items: center; }
.search-results a:hover, .search-results a.focus { background: var(--line-2); }
.search-toggle { display: none; }

/* Menú lateral colapsado (preferencia del usuario o pantallas medianas) */
body.nav-collapsed { --nav-w: 76px; }
body.nav-collapsed .brand-text, body.nav-collapsed .nav-item span, body.nav-collapsed .nav-group, body.nav-collapsed .nav-user .who { display: none; }
body.nav-collapsed .nav-side a.nav-item { justify-content: center; padding: 12px 0; }
body.nav-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
body.nav-collapsed .nav-user { justify-content: center; padding: 6px; background: none; }
body.nav-collapsed .nav-user .avatar { display: none; }
@media (max-width: 1199.98px) and (min-width: 768px) {
  :root { --nav-w: 76px; }
  .brand-text, .nav-item span, .nav-group, .nav-user .who { display: none; }
  .nav-side a.nav-item { justify-content: center; padding: 12px 0; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-user { justify-content: center; padding: 6px; background: none; }
  .nav-user .avatar { display: none; }
  .topbar .nav-toggle { display: none; }
}

.view { padding: 24px 28px 40px; flex: 1; min-width: 0; }
.view-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-bottom: 18px; }
.view-head h1 { margin: 0; }
.view-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.tabbar, .fab { display: none; }
@media (max-width: 767.98px) {
  :root { --top-h: 56px; }
  .nav-side { display: none; }
  .main { margin-left: 0; padding-bottom: 72px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .nav-toggle, .topbar .btn-new { display: none; }
  .search-toggle { display: inline-flex; margin-left: auto; }
  .topbar .search { display: none; position: absolute; left: 10px; right: 10px; top: 9px; max-width: none; margin: 0; }
  .topbar .search kbd { display: none; }
  .topbar.searching .search { display: block; }
  .topbar.searching .search-toggle, .topbar.searching .page-title { visibility: hidden; }
  .view { padding: 16px 14px 28px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--ink-3); text-decoration: none; padding: 5px 0; border-radius: 10px; font-weight: 550; }
  .tabbar a i { font-size: 1.25rem; transition: transform .2s var(--ease); }
  .tabbar a.active { color: var(--conf-ink); }
  .tabbar a.active i { transform: translateY(-2px) scale(1.1); }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 1029;
    width: 56px; height: 56px; border-radius: 18px; border: 0; color: #fff; font-size: 1.5rem;
    background: linear-gradient(135deg, var(--conf), var(--conf-2)); box-shadow: 0 12px 28px rgba(79, 91, 213, .45);
    animation: pop .4s .3s var(--ease) backwards;
  }
  .fab:active { transform: scale(.94); }
}

/* ==========================================================================
   Superficies: cards, KPI, avatares, chips
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.panel-head .ms-auto { font-size: .84rem; }
.panel-body { padding: 18px 20px; }
.h-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .95rem; background: var(--conf-soft); color: var(--conf-ink); flex: 0 0 auto; }
.count-pill { font-size: .75rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); padding: 2px 9px; border-radius: 20px; }

/* Tonos reutilizables */
.tone-indigo { --t-2: #8f97ee; --t: var(--conf); --t-soft: var(--conf-soft); --t-ink: var(--conf-ink); }
.tone-violet { --t-2: #a892fa; --t: var(--violet); --t-soft: var(--violet-soft); --t-ink: #5236c9; }
.tone-teal   { --t-2: #55c9c4; --t: var(--teal); --t-soft: var(--teal-soft); --t-ink: #0b7773; }
.tone-green  { --t-2: #55c79a; --t: var(--ok); --t-soft: var(--ok-soft); --t-ink: #167350; }
.tone-amber  { --t-2: #f6bd6b; --t: var(--res); --t-soft: var(--res-soft); --t-ink: var(--res-ink); }
.tone-rose   { --t-2: #ec8496; --t: var(--bad); --t-soft: var(--bad-soft); --t-ink: #a82a41; }
.tone-sky    { --t-2: #77bdee; --t: var(--sky); --t-soft: var(--sky-soft); --t-ink: #1a6ca6; }
.tone-slate  { --t-2: #98a2b8; --t: #64708a; --t-soft: #edf0f5; --t-ink: #47516a; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--t-soft); opacity: .55; transition: transform .4s var(--ease); }
.kpi:hover::after { transform: scale(1.25); }
.kpi > * { position: relative; z-index: 1; }
.kpi-ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--t), var(--t-2)); box-shadow: 0 8px 18px rgba(22, 28, 45, .14); }
.kpi-body { min-width: 0; flex: 1; }
.kpi-val { font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: -.025em; white-space: nowrap; }
.kpi-val.sm { font-size: 1.35rem; }
.kpi-lbl { font-size: .84rem; color: var(--ink-2); font-weight: 550; margin-top: 2px; }
.kpi-sub { font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
.kpi-bar { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 10px; }
.kpi-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--t); transform-origin: left; animation: growX .9s .25s var(--ease) backwards; }
@media (max-width: 1199.98px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  .kpis, .kpis.cols-3 { gap: 10px; }
  .kpi { padding: 13px; gap: 10px; flex-direction: column; }
  .kpi-ico { flex-basis: auto; width: 38px; height: 38px; font-size: 1.05rem; border-radius: 11px; }
  .kpi-val { font-size: 1.3rem; } .kpi-val.sm { font-size: 1.05rem; }
}

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 750; font-size: .78rem; flex: 0 0 auto; background: var(--conf-soft); color: var(--conf-ink); }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .66rem; }
.av-0 { background: #eaecfc; color: #2f3aa8; } .av-1 { background: #dcf5f3; color: #0b7773; }
.av-2 { background: #fef2df; color: #9a5d0c; } .av-3 { background: #fde8ec; color: #a82a41; }
.av-4 { background: #e2f1fc; color: #1a6ca6; } .av-5 { background: #ede8fe; color: #5236c9; }
.av-6 { background: #e1f5ec; color: #167350; } .av-7 { background: #f3e9fb; color: #8a3cb5; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 650; padding: 3px 10px; border-radius: 20px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip-conf { background: var(--conf-soft); color: var(--conf-ink); }
.chip-res { background: var(--res-soft); color: var(--res-ink); }
.chip-mant { background: var(--mant-soft); color: var(--mant-ink); }
.pay { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 650; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pay::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pay-pagado { color: #167350; background: var(--ok-soft); }
.pay-parcial { color: #9a6508; background: var(--warn-soft); }
.pay-impago { color: #a82a41; background: var(--bad-soft); }
.pay-sin_cargo { color: var(--ink-2); background: var(--line-2); }

.seg { display: inline-flex; background: #e9ecf3; border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 9px; font-size: .85rem; color: var(--ink-2); font-weight: 600; transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(22,28,45,.14); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; transition: background-color .15s, padding-left .2s var(--ease); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover, button.list-row:hover { background: #f8f9fd; padding-left: 24px; }
button.list-row { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; }
.list-row .hab { flex: 0 0 auto; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; background: var(--conf-soft); color: var(--conf-ink); font-weight: 750; font-size: .92rem; }
.list-row .who { min-width: 0; flex: 1; }
.list-row .who b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .who span { font-size: .8rem; color: var(--ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: .9rem; }
.empty .e-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 12px; font-size: 1.5rem; background: var(--line-2); color: var(--ink-3); animation: float 4s ease-in-out infinite; }
.empty b { display: block; color: var(--ink); font-weight: 650; margin-bottom: 2px; }

/* ==========================================================================
   Panel del día
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); color: #fff; padding: 26px 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 16px;
  background:
    radial-gradient(600px 320px at 100% 0%, rgba(122, 90, 245, .6), transparent 65%),
    radial-gradient(500px 300px at 0% 120%, rgba(18, 165, 160, .4), transparent 60%),
    linear-gradient(140deg, #232b52, #141a30 75%);
  box-shadow: 0 18px 44px rgba(20, 26, 48, .28);
}
.hero::after { content: ""; position: absolute; inset: 0; opacity: .6; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 36px 36px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero > * { position: relative; z-index: 1; }
.hero .when { font-size: .85rem; color: #aab2cf; display: flex; align-items: center; gap: 8px; }
.hero .when .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--today); animation: pulse 2s infinite; }
.hero h1 { color: #fff; font-size: 2rem; margin: 4px 0 14px; letter-spacing: -.03em; font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero .daynav { display: inline-flex; align-items: center; background: rgba(255,255,255,.1); border-radius: 11px; backdrop-filter: blur(4px); }
.hero .daynav button { border: 0; background: none; color: #fff; padding: 7px 11px; border-radius: 11px; }
.hero .daynav button:hover { background: rgba(255,255,255,.14); }
.hero .daynav input { background: none; border: 0; color: #fff; width: 138px; padding: 4px 2px; font-weight: 600; color-scheme: dark; }
.hero .btn-glass { background: rgba(255,255,255,.12); color: #fff; border: 0; backdrop-filter: blur(4px); }
.hero .btn-glass:hover { background: rgba(255,255,255,.2); color: #fff; }
.hero .btn-white { background: #fff; color: var(--conf-ink); border: 0; box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.hero .btn-white:hover { background: #fff; color: var(--conf-ink); transform: translateY(-1px); }
.hero-occ { display: flex; align-items: center; gap: 22px; }
.hero-stats { display: grid; gap: 8px; font-size: .85rem; color: #c3c9e0; min-width: 150px; }
.hero-stats div { display: flex; align-items: center; gap: 8px; }
.hero-stats i.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hero-stats b { color: #fff; margin-left: auto; font-weight: 700; }

.ring { position: relative; width: var(--ring, 132px); height: var(--ring, 132px); flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .trk { stroke: rgba(255,255,255,.14); }
.ring .val { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.ring .seg2 { stroke: var(--res); stroke-linecap: round; transition: stroke-dashoffset 1.2s .15s var(--ease); }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring .center b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.ring .center > span { font-size: .72rem; color: #aab2cf; }
.ring.light .trk { stroke: var(--line-2); }
.ring.light .center > span { color: var(--ink-3); }
@media (max-width: 767.98px) {
  .hero { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-occ { justify-content: space-between; }
  .ring { --ring: 112px; }
  .ring .center b { font-size: 1.55rem; }
}

/* Tablero de habitaciones */
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.room {
  position: relative; display: flex; flex-direction: column; text-align: left; width: 100%; min-height: 104px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 13px; color: var(--ink);
  text-decoration: none; overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s, border-color .2s;
}
.room::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.room .rn { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .76rem; color: var(--ink-3); font-weight: 600; }
.room .rn .no { display: inline-flex; align-items: center; gap: 6px; }
.room .rn .no i { font-size: .95rem; }
.room .rt { font-weight: 700; font-size: .92rem; line-height: 1.25; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.room .rs { font-size: .76rem; color: var(--ink-2); margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 6px; }
.room.is-conf::before { background: linear-gradient(180deg, var(--conf), var(--conf-2)); }
.room.is-conf .rn .no i { color: var(--conf); }
.room.is-res { background: linear-gradient(180deg, #fff9ee, var(--res-soft)); border-color: #f6dfb9; }
.room.is-res::before { background: var(--res); }
.room.is-res .rn .no i { color: var(--res); }
.room.is-mant { background: linear-gradient(180deg, #f1fbf7, var(--mant-soft)); border-color: #c4ead9; }
.room.is-mant::before { background: var(--mant); }
.room.is-mant .rn .no i { color: var(--mant); }
.room.is-free { background: repeating-linear-gradient(135deg, #fff 0 10px, #fafbfd 10px 20px); }
.room.is-free .rt { color: var(--ink-4); font-weight: 600; }
.room.is-free .add { margin-top: auto; font-size: .76rem; color: var(--conf-ink); font-weight: 650; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s var(--ease); }
button.room:hover, a.room:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #cdd3ea; }
button.room.is-free:hover .add { opacity: 1; transform: none; }
.tag-in, .tag-out { font-size: .66rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.tag-in { background: var(--ok-soft); color: #167350; }
.tag-out { background: var(--bad-soft); color: #a82a41; }

/* Ocupación de los próximos días */
.occ-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 7px; align-items: end; height: 170px; }
.occ-col { display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; text-decoration: none; }
.occ-col .stack { width: 100%; max-width: 34px; display: flex; flex-direction: column-reverse; flex: 1; justify-content: flex-start; border-radius: 9px; background: var(--line-2); overflow: hidden; }
.occ-col .seg-b { width: 100%; background: linear-gradient(180deg, var(--conf-2), var(--conf)); transform-origin: bottom; animation: growY .8s var(--ease) backwards; animation-delay: calc(var(--i) * 40ms + .2s); }
.occ-col .seg-b.r { background: var(--res); }
.occ-col .pct { font-size: .7rem; color: var(--ink-2); font-weight: 650; }
.occ-col .d { font-size: .7rem; color: var(--ink-3); text-align: center; line-height: 1.15; }
.occ-col.today .d { color: var(--ink); font-weight: 750; }
.occ-col.today .stack { box-shadow: 0 0 0 2px var(--today); }
.occ-col:hover .stack { filter: brightness(1.06); }

.meter { display: grid; gap: 14px; }
.meter-row .top { display: flex; justify-content: space-between; align-items: baseline; font-size: .86rem; color: var(--ink-2); margin-bottom: 6px; }
.meter-row .top b { color: var(--ink); font-size: 1rem; }
.meter-row .track { height: 9px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.meter-row .track > span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--t), var(--t-2)); transform-origin: left; animation: growX 1s .2s var(--ease) backwards; }

/* ==========================================================================
   Agenda
   ========================================================================== */
.agenda-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.month-nav { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 1px 2px rgba(22,28,45,.04); }
.month-nav button { border: 0; background: none; padding: 7px 11px; color: var(--ink-2); border-radius: 10px; }
.month-nav button:hover { color: var(--ink); background: var(--line-2); }
.month-nav .label { min-width: 152px; text-align: center; font-weight: 750; padding: 0 6px; }
.month-nav input[type=month] { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.agenda-toolbar .legend { margin-left: auto; }

.agenda-wrap {
  --day-w: 116px; --room-w: 156px; --row-h: 72px; --lane-h: 62px;
  position: relative; overflow: auto; max-height: calc(100vh - var(--top-h) - 168px); min-height: 320px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  overscroll-behavior: contain;
}
.agenda-wrap.compact { --day-w: 38px; --room-w: 118px; --row-h: 40px; --lane-h: 32px; }
.agenda { display: grid; grid-template-columns: var(--room-w) repeat(var(--days), var(--day-w)); width: max-content; position: relative; }

.ag-corner, .ag-day { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.ag-corner { left: 0; z-index: 7; border-right: 1px solid var(--line); display: flex; align-items: end; padding: 8px 14px; font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.ag-day { text-align: center; padding: 7px 2px 5px; border-left: 1px solid var(--line-2); font-size: .72rem; color: var(--ink-3); line-height: 1.2; }
.ag-day b { display: block; font-size: 1rem; color: var(--ink); font-weight: 750; }
.ag-day.we { background: #f8f9fc; }
.ag-day.today { background: linear-gradient(180deg, var(--today), #f9d971); color: var(--ink); }
.ag-day .occ { margin: 5px auto 0; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; width: 78%; }
.ag-day.today .occ { background: rgba(22,28,45,.14); }
.ag-day .occ > span { display: block; height: 100%; background: linear-gradient(90deg, var(--conf), var(--conf-2)); transform-origin: left; animation: growX .8s var(--ease) backwards; }
.ag-day .occ-n { font-size: .66rem; margin-top: 3px; color: var(--ink-2); }
.agenda-wrap.compact .ag-day { font-size: .64rem; padding: 6px 0 4px; }
.agenda-wrap.compact .ag-day b { font-size: .82rem; }
.agenda-wrap.compact .ag-day .wd-long, .agenda-wrap:not(.compact) .ag-day .wd-short { display: none; }

.ag-room { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2); padding: 8px 14px; display: flex; align-items: center; gap: 10px; }
.ag-room .ri { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--conf-soft); color: var(--conf-ink); font-weight: 750; font-size: .85rem; flex: 0 0 auto; }
.ag-room b { font-size: .86rem; font-weight: 700; display: block; white-space: nowrap; }
.ag-room span { font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
.agenda-wrap.compact .ag-room { padding: 4px 10px; gap: 8px; }
.agenda-wrap.compact .ag-room span { display: none; }
.agenda-wrap.compact .ag-room .ri { width: 24px; height: 24px; font-size: .72rem; border-radius: 7px; }
.agenda-wrap.compact .ag-room b { font-size: .78rem; }

.ag-track { display: grid; grid-column: 2 / -1; grid-template-columns: repeat(var(--days), var(--day-w)); grid-auto-rows: var(--lane-h); border-bottom: 1px solid var(--line-2); padding: 4px 0; position: relative; }
.ag-cell { grid-row: 1 / -1; border-left: 1px solid var(--line-2); position: relative; }
.ag-cell.we { background: var(--weekend); }
.ag-cell.today { background: var(--today-soft); box-shadow: inset 1px 0 0 var(--today), inset -1px 0 0 var(--today); }
.can-add .ag-cell { cursor: pointer; }
.can-add .ag-cell::after { content: "+"; position: absolute; inset: 4px; border-radius: 9px; display: grid; place-items: center; color: var(--conf); font-weight: 700; font-size: 1.1rem; background: var(--conf-soft); opacity: 0; transform: scale(.85); transition: opacity .15s, transform .18s var(--ease); }
.can-add .ag-cell:hover::after { opacity: .9; transform: none; }
/* Selección de varios días para reservar */
.agenda-wrap.selecting, .agenda-wrap.selecting * { user-select: none; cursor: col-resize !important; }
.agenda-wrap.selecting .ag-cell::after { opacity: 0 !important; }
.ag-sel { grid-row: 1 / -1; z-index: 3; margin: 3px 2px; border-radius: 10px; border: 2px dashed var(--conf); background: rgba(79, 91, 213, .14);
  display: flex; align-items: center; justify-content: center; padding: 0 6px; pointer-events: none; animation: pop .15s var(--ease); overflow: hidden; }
.ag-sel span { background: var(--conf); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: .74rem; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 10px rgba(79, 91, 213, .35); }
.ag-sel span b { font-weight: 800; }
.agenda-wrap.compact .ag-sel span { font-size: .68rem; padding: 2px 7px; }
.ag-selbar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1060; display: flex; align-items: center; gap: 10px;
  background: #151b33; color: #fff; border-radius: 16px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow-3); width: min(560px, calc(100vw - 24px)); animation: selbar .2s var(--ease); }
@keyframes selbar { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ag-selbar .txt { flex: 1; min-width: 0; line-height: 1.25; }
.ag-selbar .txt b { display: block; font-size: .9rem; }
.ag-selbar .txt span { font-size: .8rem; color: #c3c9de; }
@media (max-width: 767.98px) { .ag-selbar { bottom: 84px; } }
.ag-hint i { color: var(--conf); }

.ag-bar {
  position: relative; z-index: 2; margin: 0 3px; border: 0; text-align: left;
  border-radius: 10px; padding: 6px 10px 6px 12px; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, #eef0fd, var(--conf-soft)); color: var(--ink);
  box-shadow: inset 4px 0 0 var(--conf), 0 1px 2px rgba(47,58,168,.08);
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
  font-size: .78rem; line-height: 1.25; transform-origin: left;
  animation: barIn .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 9ms);
  transition: transform .18s var(--ease), box-shadow .18s, filter .18s;
}
.ag-bar:hover { transform: translateY(-2px); box-shadow: inset 4px 0 0 var(--conf), 0 8px 18px rgba(47,58,168,.22); z-index: 3; }
.ag-bar .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
.ag-bar .m { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-bar .p { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.ag-bar .p.pagado { background: var(--ok); }
.ag-bar .p.parcial { background: var(--warn); }
.ag-bar .p.impago { background: var(--bad); }
.ag-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; box-shadow: none; }
.ag-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.ag-bar.cont-l .t::before { content: "‹ "; color: var(--ink-3); }
.ag-bar.res { background: repeating-linear-gradient(135deg, var(--res-soft) 0 8px, #fbe4c0 8px 16px); box-shadow: inset 4px 0 0 var(--res); }
.ag-bar.res:hover { box-shadow: inset 4px 0 0 var(--res), 0 8px 18px rgba(240,154,34,.25); }
.ag-bar.mant { background: repeating-linear-gradient(135deg, var(--mant-soft) 0 8px, #c9ecdd 8px 16px); box-shadow: inset 4px 0 0 var(--mant); }
.ag-bar.mant:hover { box-shadow: inset 4px 0 0 var(--mant), 0 8px 18px rgba(31,169,122,.25); }
.ag-bar.is-new { animation: pop .6s var(--ease), glow 1.6s ease-out; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(79,91,213,.6); } 100% { box-shadow: 0 0 0 16px rgba(79,91,213,0); } }
.agenda-wrap.compact .ag-bar { padding: 3px 6px 3px 9px; border-radius: 7px; }
.agenda-wrap.compact .ag-bar .m { display: none; }
.agenda-wrap.compact .ag-bar .t { font-size: .72rem; font-weight: 650; }
.agenda-wrap.compact .ag-bar .p { top: 50%; transform: translateY(-50%); right: 5px; width: 6px; height: 6px; box-shadow: none; }
.agenda-wrap.compact .ag-bar.short .t { visibility: hidden; }
.agenda-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stat-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; font-size: .82rem; color: var(--ink-2); }
.stat-pill i { color: var(--conf); }
.stat-pill b { color: var(--ink); }

.ag-tip {
  position: fixed; z-index: 2000; pointer-events: none; max-width: 300px;
  background: rgba(22, 28, 45, .96); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: .8rem;
  box-shadow: var(--shadow-3); opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .14s, transform .16s var(--ease);
}
.ag-tip.show { opacity: 1; transform: none; }
.ag-tip b { display: block; font-size: .9rem; margin-bottom: 2px; }
.ag-tip .r { color: #c3c9da; }
.ag-tip .k { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin-top: 8px; }
.ag-tip .k span:nth-child(odd) { color: #98a1b8; }

.daystrip { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.daystrip::-webkit-scrollbar { display: none; }
.daystrip button { flex: 0 0 54px; scroll-snap-align: center; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 7px 0 8px; text-align: center; color: var(--ink-2); font-size: .7rem; line-height: 1.2; transition: transform .18s var(--ease), background-color .15s; }
.daystrip button b { display: block; font-size: 1.1rem; color: var(--ink); }
.daystrip button .dot { display: block; height: 4px; margin: 5px 11px 0; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.daystrip button .dot > span { display: block; height: 100%; background: var(--conf); }
.daystrip button.we { background: var(--weekend); }
.daystrip button.today { border-color: var(--today); box-shadow: inset 0 -3px 0 var(--today); }
.daystrip button.on { background: linear-gradient(135deg, var(--conf), var(--conf-2)); border-color: transparent; color: #dfe2ff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(79,91,213,.35); }
.daystrip button.on b { color: #fff; }
.daystrip button.on .dot { background: rgba(255,255,255,.3); }
.daystrip button.on .dot > span { background: #fff; }
.daylist { display: grid; gap: 9px; }
.daylist .room { min-height: 0; }

/* ==========================================================================
   Tablas, filtros y listados
   ========================================================================== */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.tbl th { position: sticky; top: 0; background: #f8f9fc; z-index: 1; font-weight: 650; color: var(--ink-2); font-size: .76rem; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl th .si { opacity: .35; margin-left: 2px; }
.tbl th.sorted .si { opacity: 1; color: var(--conf); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; transition: background-color .12s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #f6f7fd; }
.tbl tbody tr.selected td { background: var(--conf-soft); }
.tbl .r { text-align: right; }
.tbl tfoot td { font-weight: 750; background: #f8f9fc; border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .name { font-weight: 650; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user > div { min-width: 0; }
.cell-user > div > b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.cell-user > div > span { display: block; font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.hab-badge { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--conf-soft); color: var(--conf-ink); font-weight: 750; font-size: .8rem; }

.filters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.filters .f-4 { grid-column: span 4; } .filters .f-3 { grid-column: span 3; } .filters .f-2 { grid-column: span 2; } .filters .f-6 { grid-column: span 6; }
.filters-toggle { display: none; border: 0; }
@media (max-width: 1199.98px) { .filters .f-4 { grid-column: span 12; } .filters .f-2, .filters .f-3 { grid-column: span 4; } }
@media (max-width: 767.98px) {
  .filters-toggle { display: flex; }
  .filters-wrap:not(.open) { display: none; }
  .filters .f-2, .filters .f-3, .filters .f-6 { grid-column: span 6; }
  .hide-mobile { display: none !important; }
}
.totals-bar { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.totals-bar b { color: var(--ink); }

.rcards { display: none; }
@media (max-width: 767.98px) { .rcards { display: block; } }
.rcard { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 12px 16px; color: var(--ink); }
.rcard:active { background: #f6f7fd; }
.rcard .body { min-width: 0; flex: 1; }
.rcard .top { display: flex; justify-content: space-between; gap: 8px; }
.rcard .top b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard .meta { font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.rcard .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .85rem; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line-2); font-size: .85rem; color: var(--ink-2); }
.pager .ms-auto { display: flex; gap: 6px; }

/* ==========================================================================
   Ficha de reserva (panel lateral)
   ========================================================================== */
.offcanvas.detail { --bs-offcanvas-width: 580px; border-left: 0; box-shadow: var(--shadow-3); }
.offcanvas-backdrop.show { opacity: .35; backdrop-filter: blur(2px); }
@media (max-width: 575.98px) {
  .offcanvas.detail { --bs-offcanvas-width: 100vw; }
  .d-hero { padding: 16px 16px 20px; }
  .d-top { gap: 6px; }
  .d-top .chip, .d-top .pay { padding: 3px 8px; font-size: .7rem; }
  .stay { margin-left: 16px; margin-right: 16px; }
  .detail .nav-tabs { margin-left: 16px; margin-right: 16px; flex-wrap: nowrap; }
  .detail .nav-tabs .nav-link { margin-right: 6px; font-size: .82rem; white-space: nowrap; }
  .detail .nav-tabs .nav-link > i { display: none; }
  .detail .d-body { padding: 16px 16px 28px; }
  .money-box { gap: 6px; }
  .money-box > div { padding: 10px; }
  .money-box .v { font-size: 1rem; }
}
.d-hero { position: relative; padding: 18px 22px 20px; color: #fff; overflow: hidden;
  background: radial-gradient(400px 220px at 100% 0%, rgba(122, 90, 245, .6), transparent 65%), linear-gradient(140deg, #252e57, #151b33); }
.d-hero.res { background: radial-gradient(400px 220px at 100% 0%, rgba(255, 200, 110, .5), transparent 65%), linear-gradient(140deg, #b56a0c, #8a4f06); }
.d-hero.mant { background: radial-gradient(400px 220px at 100% 0%, rgba(120, 230, 190, .45), transparent 65%), linear-gradient(140deg, #157a58, #0e5a41); }
.d-top { display: flex; width: 100%; align-items: center; gap: 8px; margin-bottom: 14px; }
.d-top .d-num { font-size: .84rem; color: rgba(255,255,255,.75); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.d-top .ms-auto { flex: 0 0 auto; }
.d-top .chip, .d-top .pay { background: rgba(255,255,255,.16); color: #fff; }
.d-top .icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.d-top .icon-btn:hover { background: rgba(255,255,255,.26); }
.d-who { display: flex; align-items: center; gap: 14px; }
.d-who .avatar { background: rgba(255,255,255,.18); color: #fff; }
.d-name { font-size: 1.4rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0; color: #fff; }
.d-sub { color: rgba(255,255,255,.78); font-size: .88rem; margin-top: 2px; }
.stay { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin: -18px 22px 0; position: relative; z-index: 2; box-shadow: var(--shadow-2); }
.stay .side .l { font-size: .74rem; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.stay .side .v { font-weight: 750; font-size: 1.1rem; }
.stay .side .w { font-size: .78rem; color: var(--ink-2); }
.stay .side.end { text-align: right; }
.stay .side .salida { margin-top: 4px; display: inline-block; white-space: nowrap; font-size: .72rem; font-weight: 700; color: var(--conf-ink); background: var(--conf-soft); padding: 2px 8px; border-radius: 99px; }
@media (max-width: 575px) { .stay .side .salida { white-space: normal; border-radius: 10px; line-height: 1.25; padding: 3px 8px; } }
.stay .side.end .l { justify-content: flex-end; }
.stay .mid { text-align: center; font-size: .76rem; color: var(--ink-2); padding: 0 6px; }
.stay .mid b { display: block; font-size: 1.3rem; color: var(--conf-ink); }
.stay .mid .line { display: block; height: 2px; width: 70px; margin: 4px auto; border-radius: 1px; background: linear-gradient(90deg, var(--conf), var(--conf-2)); }
.detail .nav-tabs { border-bottom: 1px solid var(--line); gap: 4px; margin: 14px 22px 0; }
.detail .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--ink-3); font-weight: 650; font-size: .88rem; padding: 10px 4px; margin-right: 14px; background: none; display: flex; align-items: center; gap: 6px; }
.detail .nav-tabs .nav-link.active { color: var(--ink); border-bottom-color: var(--conf); }
.detail .d-body { padding: 18px 22px 28px; overflow-y: auto; flex: 1; }
.detail #detail-content { display: flex; flex-direction: column; height: 100%; }
/* Acciones de la ficha: quedan fijas al pie, y ahí mismo se confirma la eliminación */
.d-actions { flex: 0 0 auto; display: flex; gap: 8px; padding: 12px 22px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(21, 27, 51, .05); }
.d-actions > .btn { flex: 1 1 0; white-space: nowrap; justify-content: center; }
.d-actions > .btn-primary { flex-grow: 1.4; }
.d-actions > .btn-pay { flex-grow: 1.6; }
.d-actions > .btn.solo-ico { flex: 0 0 46px; padding-left: 0; padding-right: 0; }
.grp-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.grp-totals > div { padding: 10px 12px; border-radius: var(--r); background: #f7f8fc; border: 1px solid var(--line-2); }
.grp-totals span { display: block; font-size: .72rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-totals b { font-size: 1.2rem; font-weight: 800; }
.grp-totals .hl { background: var(--conf-soft); border-color: #cfd4f6; }
.grp-totals .hl b { color: var(--conf-ink); }
.d-actions.confirming { background: var(--bad-soft); border-top-color: #f6c2cb; }
.d-confirm { width: 100%; display: grid; gap: 12px; animation: rise .22s var(--ease); }
.d-confirm-txt { display: flex; gap: 12px; align-items: flex-start; }
.d-confirm-txt > i { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: #fff; color: var(--bad); }
.d-confirm-txt b { display: block; font-size: .96rem; color: #7d1226; }
.d-confirm-txt span { display: block; font-size: .85rem; color: #8c2a3b; line-height: 1.4; }
.d-confirm-txt .d-confirm-err { margin-top: 6px; font-weight: 700; }
/* Confirmación del envío del comprobante por mail (tono índigo en lugar de rojo) */
.d-actions.confirming:has(.is-mail) { background: var(--conf-soft); border-top-color: #cfd3f7; }
.d-confirm.is-mail .d-confirm-txt > i { color: var(--conf); }
.d-confirm.is-mail .d-confirm-txt b { color: var(--conf-ink); word-break: break-word; }
.d-confirm.is-mail .d-confirm-txt span { color: #3d4570; }
.d-confirm.is-mail .d-confirm-txt a { font-weight: 700; color: var(--conf-ink); white-space: nowrap; }
.d-confirm.is-mail .d-confirm-err { color: var(--bad); }
.d-confirm-btns { display: flex; gap: 8px; justify-content: flex-end; }
.d-confirm-btns .btn { min-width: 120px; justify-content: center; }
.btn-danger { background: #c7334c; border-color: #c7334c; color: #fff; }
.btn-danger:hover, .btn-danger:focus-visible, .btn-danger:active { background: #a8243b !important; border-color: #a8243b !important; color: #fff; }
@media (max-width: 575.98px) {
  .d-actions { padding: 10px 12px; gap: 6px; }
  .d-actions > .btn { padding-left: 8px; padding-right: 8px; font-size: .84rem; }
  .d-confirm-btns .btn { flex: 1 1 0; min-width: 0; }
}
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--ink-3); font-weight: 550; display: flex; align-items: center; gap: 8px; }
.kv dt i { color: var(--ink-4); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 118px 1fr; } }
.money-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.money-box > div { padding: 12px 14px; border-radius: var(--r); background: #f7f8fc; border: 1px solid var(--line-2); }
.money-box .l { font-size: .74rem; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.money-box .v { font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.money-box .v.bad { color: var(--bad); }
.money-box .v.ok { color: var(--ok); }
.pay-progress { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: -8px 0 18px; }
.pay-progress > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--ok), #55c79a); transform-origin: left; animation: growX .9s var(--ease) backwards; }
.section-t { font-size: .84rem; font-weight: 750; color: var(--ink-2); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.notes { white-space: pre-wrap; background: #fffbea; border: 1px solid #f3e7b8; border-radius: var(--r); padding: 12px 14px; font-size: .9rem; }
.note-info { background: var(--sky-soft); border: 0; color: #1a5a88; border-radius: var(--r); padding: 11px 14px; font-size: .86rem; display: flex; gap: 10px; }
.note-warn { background: var(--warn-soft); border: 0; color: #7a5108; border-radius: var(--r); padding: 11px 14px; font-size: .86rem; display: flex; gap: 10px; }
.timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 16px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.timeline .tl-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 650; }
.timeline .tl-sub { font-size: .8rem; color: var(--ink-3); }

/* ==========================================================================
   Informes
   ========================================================================== */
@media (min-width: 768px) { .report-tabs { flex-wrap: wrap; } }
.report-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding: 4px; background: #e9ecf3; border-radius: 14px; width: max-content; max-width: 100%; scrollbar-width: none; }
.report-tabs::-webkit-scrollbar { display: none; }
.report-tabs a { padding: 8px 14px; color: var(--ink-2); font-weight: 650; font-size: .88rem; text-decoration: none; border-radius: 11px; white-space: nowrap; display: flex; align-items: center; gap: 7px; transition: background-color .15s, color .15s, box-shadow .15s; }
.report-tabs a:hover { color: var(--ink); }
.report-tabs a.active { color: var(--conf-ink); background: var(--surface); box-shadow: 0 2px 8px rgba(22,28,45,.12); }
.report-controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin-bottom: 16px; }
.report-controls > div { min-width: 120px; }
.report-controls select { max-width: 240px; }
/* Tablas con grupos y subtotales (control de ingresos) */
.tbl-groups tr.grp td { background: var(--conf-soft); color: var(--conf-ink); padding-top: 9px; padding-bottom: 9px; border-bottom: 0; white-space: nowrap; }
.tbl-groups tr.grp td > i { margin-right: 8px; }
.tbl-groups tr.grp td span { font-weight: 500; opacity: .8; }
.tbl-groups tr.sub td { font-weight: 700; background: #fafbfe; border-bottom: 2px solid var(--line); color: var(--ink-2); }
.tbl-groups td.name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.tbl-groups td, .tbl-groups th { white-space: nowrap; padding-left: 11px; padding-right: 11px; }
@media (max-width: 575.98px) {
  .report-controls > div:not(.ms-auto) { flex: 1 1 calc(50% - 12px); min-width: 0; }
  .report-controls select, .report-controls input { width: 100%; max-width: none; }
  .report-controls > .ms-auto { width: 100%; justify-content: flex-end; }
  .report-controls #rp-clear { width: 100%; }
}
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 380px; }
.share { display: flex; align-items: center; gap: 10px; }
.share .track { flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.share .track > span { display: block; height: 100%; background: linear-gradient(90deg, var(--conf), var(--conf-2)); border-radius: 4px; transform-origin: left; animation: growX .8s var(--ease) backwards; }
.drill { animation: slideDown .3s var(--ease); }
.drill-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.drill-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.drill-sum .box { border-radius: var(--r); padding: 14px 16px; background: var(--t-soft); cursor: pointer; border: 2px solid transparent; text-align: left; transition: border-color .15s, transform .18s var(--ease); width: 100%; }
.drill-sum .box:hover { transform: translateY(-2px); }
.drill-sum .box.on { border-color: var(--t); }
.drill-sum .box .l { font-size: .8rem; color: var(--t-ink); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.drill-sum .box .v { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.drill-sum .box .s { font-size: .78rem; color: var(--ink-2); }

/* ==========================================================================
   Hotel, afiliados y configuración
   ========================================================================== */
.hab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hab-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .25s; }
.hab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.hab-card .top { position: relative; padding: 16px 16px 14px; color: #fff; background: linear-gradient(135deg, #2a3260, #171d38); overflow: hidden; }
.hab-card .top .bg-ico { position: absolute; right: -8px; bottom: -26px; font-size: 5.4rem; opacity: .1; line-height: 1; }
.hab-card .n { font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.hab-card .top .t { font-size: .84rem; color: #c3c9e0; margin-top: 2px; }
.hab-card .body { padding: 14px 16px 16px; }
.hab-card .beds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hab-card .beds span { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.hab-card .svc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hab-card .svc span { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--conf-soft); color: var(--conf-ink); font-size: .9rem; }
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 18px 20px; }
.price-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: center; transition: transform .2s var(--ease), border-color .2s; }
.price-card:hover { transform: translateY(-3px); border-color: var(--conf); }
.price-card i { font-size: 1.3rem; color: var(--conf); }
.price-card .n { font-weight: 700; margin: 4px 0 6px; }
.price-card .v { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.price-card .x { font-size: .78rem; color: var(--ink-3); }
tr.vigente td { background: #f4f6ff; }
.profile-head { display: flex; align-items: center; gap: 16px; padding: 20px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; font-weight: 600; text-decoration: none; margin-bottom: 10px; }

.cfg-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 991.98px) { .cfg-grid { grid-template-columns: 1fr; } }
.logo-drop { border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 22px; text-align: center; background: #fafbfe; transition: border-color .2s, background-color .2s, transform .2s var(--ease); cursor: pointer; }
.logo-drop:hover, .logo-drop.over { border-color: var(--conf); background: var(--conf-soft); }
.logo-drop.over { transform: scale(1.01); }
.logo-drop .preview { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow-1); }
.logo-drop .preview img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 8px; }
.logo-drop .preview i { font-size: 2.4rem; color: var(--ink-4); }
.letter-preview { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: #fff; display: flex; gap: 14px; align-items: center; }
.letter-preview img, .letter-preview .ph { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.letter-preview .ph { border-radius: 12px; background: var(--line-2); display: grid; place-items: center; color: var(--ink-4); font-size: 1.4rem; }
.letter-preview b { display: block; font-size: 1rem; }
.letter-preview span { display: block; font-size: .8rem; color: var(--ink-2); }
.sys-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sys-list li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.sys-list i.ok { color: var(--ok); } .sys-list i.no { color: var(--warn); }

/* ==========================================================================
   Formulario de reserva (modal)
   ========================================================================== */
.modal-content { border: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; }
.modal-backdrop.show { opacity: .45; }
#rf-content { display: flex; flex-direction: column; max-height: 100%; }
#rf-content form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rf-head { flex: 0 0 auto; padding: 18px 24px; color: #fff; display: flex; align-items: center; gap: 14px;
  background: radial-gradient(500px 240px at 100% 0%, rgba(122, 90, 245, .65), transparent 65%), linear-gradient(140deg, #252e57, #151b33); }
.rf-head .ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 1.3rem; }
.rf-head h2 { color: #fff; margin: 0; font-size: 1.2rem; }
.rf-head p { margin: 0; color: #b9c0d6; font-size: .84rem; }
.rf-head .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: .8; margin-left: auto; }
.rf-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; background: var(--paper); overflow-y: auto; flex: 1; min-height: 0; }
.rf-card[hidden] { display: none; }
.rf-main { padding: 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.rf-side { background: var(--surface); border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.rf-side { min-width: 0; }
.rf-side .sticky { position: sticky; top: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (max-width: 991.98px) { .rf-body { grid-template-columns: minmax(0, 1fr); } .rf-side { border-left: 0; border-top: 1px solid var(--line); } }
.rf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.rf-card > h3 { font-size: .95rem; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.rf-card > h3 .n { width: 26px; height: 26px; border-radius: 9px; background: var(--conf-soft); color: var(--conf-ink); display: grid; place-items: center; font-size: .82rem; font-weight: 800; }
.choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; border: 2px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, transform .18s var(--ease); display: flex; gap: 10px; align-items: center; width: 100%; }
.choice:hover { transform: translateY(-2px); border-color: #cdd3ea; }
.choice i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem; background: var(--t-soft); color: var(--t-ink); flex: 0 0 auto; }
.choice b { display: block; font-size: .88rem; }
.choice span { display: block; font-size: .74rem; color: var(--ink-3); line-height: 1.25; }
.choice.on { border-color: var(--t); background: var(--t-soft); }
@media (max-width: 575.98px) { .choice-row { grid-template-columns: 1fr; } }
.room-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.room-opt { border: 2px solid var(--line); border-radius: 12px; background: var(--surface); padding: 9px 6px; text-align: center; cursor: pointer; transition: border-color .15s, transform .18s var(--ease), background-color .15s; line-height: 1.2; }
.room-opt b { display: block; font-size: 1.05rem; font-weight: 800; }
.room-opt span { font-size: .68rem; color: var(--ink-3); display: block; }
.room-opt:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--conf); }
.room-opt.on { border-color: var(--conf); background: var(--conf-soft); box-shadow: 0 6px 14px rgba(79,91,213,.2); }
.room-opt.on b { color: var(--conf-ink); }
.room-opt:disabled { cursor: not-allowed; background: repeating-linear-gradient(135deg, #f6f7fa 0 6px, #eef0f5 6px 12px); border-color: var(--line-2); }
.room-opt:disabled b { color: var(--ink-4); text-decoration: line-through; }
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.type-opt { border: 2px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px 14px; cursor: pointer; text-align: left; line-height: 1.2; transition: border-color .15s, background-color .15s, transform .18s var(--ease); }
.type-opt b { display: block; font-size: .88rem; }
.type-opt span { font-size: .76rem; color: var(--ink-3); }
.type-opt:hover { transform: translateY(-2px); border-color: var(--conf); }
.type-opt.on { border-color: var(--conf); background: var(--conf-soft); }
.tit-results { border: 1px solid var(--line); border-radius: var(--r); margin-top: 6px; max-height: 230px; overflow: auto; background: var(--surface); animation: slideDown .18s var(--ease); }
.tit-results button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-2); }
.tit-results button:hover { background: var(--line-2); }
.min-w-0 { min-width: 0; }
.tit-picked { display: flex; align-items: center; gap: 12px; border: 2px solid var(--conf); background: var(--conf-soft); border-radius: var(--r); padding: 10px 12px; animation: pop .25s var(--ease); }
.comp-row { display: grid; grid-template-columns: 1.2fr 1.2fr .9fr 70px 130px 34px; gap: 8px; align-items: center; margin-bottom: 8px; animation: slideDown .2s var(--ease); }
@media (max-width: 767.98px) { .comp-row { grid-template-columns: 1fr 1fr; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r); } }
.sum-card { border-radius: var(--r-lg); padding: 16px; color: #fff; background: radial-gradient(300px 160px at 100% 0%, rgba(122, 90, 245, .6), transparent 65%), linear-gradient(140deg, #252e57, #151b33); }
.sum-card .l { font-size: .78rem; color: #aab2cf; }
.sum-card .total { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.sum-card .was { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); font-size: .8rem; color: #c9cfe6; }
.sum-changes { border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; font-size: .82rem; color: var(--ink-3); }
.sum-changes .t { display: flex; align-items: center; gap: 7px; font-weight: 650; }
.sum-changes.has { border-style: solid; border-color: #cfd4f6; background: var(--conf-soft); color: var(--conf-ink); }
.sum-changes .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sum-changes .chips span { background: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 650; font-size: .76rem; animation: pop .2s var(--ease); }
.choice:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.sum-lines { display: grid; gap: 8px; font-size: .86rem; margin: 0; }
.sum-lines div { display: flex; justify-content: space-between; gap: 10px; }
.sum-lines dt { color: var(--ink-3); font-weight: 500; }
.sum-lines dd { margin: 0; font-weight: 650; text-align: right; }
.rf-foot { flex: 0 0 auto; padding: 14px 24px; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.rf-error { margin-right: auto; color: var(--bad); font-size: .86rem; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.success-box { padding: 46px 24px; text-align: center; }
.success-box svg { width: 88px; height: 88px; }
.success-box circle { fill: var(--ok-soft); animation: pop .45s var(--ease); transform-origin: center; }
.success-box path { fill: none; stroke: var(--ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: checkDraw .5s .3s ease-out forwards; }
.success-box h2 { font-size: 1.35rem; margin: 16px 0 4px; }

/* ==========================================================================
   Ventana de formularios cortos: registro de pago y lista de precios
   ========================================================================== */
#fx-content { display: flex; flex-direction: column; max-height: 100%; }
#fx-content form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pay-head { background: radial-gradient(500px 240px at 100% 0%, rgba(85, 199, 154, .55), transparent 65%), linear-gradient(140deg, #14533d, #0e3b2c); }
.pay-head p { color: #cfe6dc; }
.pg-body { padding: 18px 20px; background: var(--paper); overflow-y: auto; flex: 1; min-height: 0; display: grid; gap: 14px; align-content: start; }
.pg-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pg-sum > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.pg-sum span { display: block; font-size: .74rem; color: var(--ink-3); }
.pg-sum b { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.pg-sum b.ok { color: var(--ok); }
.pg-sum .hl { background: #152038; border-color: #152038; }
.pg-sum .hl span { color: #aab2cf; }
.pg-sum .hl b { color: #fff; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 767.98px) { .pg-grid { grid-template-columns: minmax(0, 1fr); } .pg-body { padding: 14px; } }
.pg-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 150px 34px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.pg-row .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--t-soft); color: var(--t-ink); font-size: 1.05rem; }
.pg-row label { font-weight: 600; font-size: .9rem; margin: 0; line-height: 1.2; }
.pg-row input { text-align: right; font-weight: 700; }
.pg-fill { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); display: grid; place-items: center; transition: background-color .15s, color .15s, transform .18s var(--ease); }
.pg-fill:hover { background: var(--conf-soft); color: var(--conf-ink); transform: translateY(-1px); }
@media (max-width: 420px) { .pg-row { grid-template-columns: 32px minmax(0, 1fr) 122px 32px; gap: 7px; } .pg-row .ico { width: 32px; height: 32px; } }
.pg-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--ok-soft); color: #0f5d42; font-weight: 650; }
.pg-total b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.pg-conceptos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 420px) { .pg-conceptos { grid-template-columns: minmax(0, 1fr); } }
.pg-concepto { display: flex; align-items: center; gap: 8px; text-align: left; border: 2px solid var(--line); border-radius: 11px; background: var(--surface); padding: 7px 10px; font-size: .82rem; font-weight: 600; line-height: 1.2; color: var(--ink-2); transition: border-color .15s, background-color .15s; }
.pg-concepto i { color: var(--ink-4); flex: 0 0 auto; }
.pg-concepto:hover { border-color: #cdd3ea; }
.pg-concepto.on { border-color: var(--conf); background: var(--conf-soft); color: var(--conf-ink); }
.pg-concepto.on i { color: var(--conf); }
@media (max-width: 575.98px) {
  /* En el celular los importes necesitan todo el ancho: se quita el signo $ de adelante */
  .pg-row .input-group-text, .px-table .input-group-text { display: none; }
  .pg-row input, .px-table input { border-radius: 10px !important; padding-left: 8px; padding-right: 8px; }
  .px-table th, .px-table td { padding: 0 3px; }
  .pg-sum { gap: 6px; }
  .pg-sum > div { padding: 8px 10px; }
  .pg-sum b { font-size: .98rem; }
}
/* Casillas de servicios y tipos en el formulario de habitación */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; }
@media (max-width: 575.98px) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .check-pill { padding: 7px 9px; font-size: .82rem; } }
.check-pill { display: flex; align-items: center; gap: 9px; border: 2px solid var(--line); border-radius: 11px; background: var(--surface); padding: 7px 11px; font-size: .86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background-color .15s; margin: 0; }
.check-pill .form-check-input { margin: 0; flex: 0 0 auto; }
.check-pill:hover { border-color: #cdd3ea; }
.check-pill:has(input:checked) { border-color: var(--conf); background: var(--conf-soft); color: var(--conf-ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--conf-ink); font-weight: 600; font-size: .84rem; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { text-decoration: underline; }
/* Usuarios */
.user-list { display: grid; }
.user-row { display: grid; grid-template-columns: auto minmax(0, 1.2fr) auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.user-row .who b { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.user-row .who span:not(.chip) { font-size: .82rem; color: var(--ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .last { font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.user-row .last i { margin-right: 5px; }
.user-row .acts { display: flex; gap: 6px; }
@media (max-width: 767.98px) { .user-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 14px; gap: 10px; } .user-row > .chip { grid-column: 2; grid-row: 2; justify-self: start; } .user-row .acts { grid-column: 3; grid-row: 1 / span 2; } }
.choice-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 575.98px) { .choice-row.cols-2 { grid-template-columns: 1fr; } }
/* Auditoría */
.ac { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.ac-1 { background: var(--ok-soft); color: #0f6a4a; }
.ac-2 { background: var(--warn-soft); color: #7a5108; }
.ac-3 { background: var(--bad-soft); color: #a01f37; }
.au-desc { max-width: 520px; }
.au-cards { display: none; }
@media (max-width: 767.98px) {
  .au-cards { display: grid; }
  .au-card { padding: 11px 14px; border-bottom: 1px solid var(--line-2); display: grid; gap: 5px; }
  .au-card.click { cursor: pointer; }
  .au-card .top, .au-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-3); }
  .au-card .desc { font-size: .88rem; font-weight: 600; }
  .au-card .meta b { color: var(--ink-2); }
}
/* Informes: variación contra el año anterior */
.delta { font-weight: 700; white-space: nowrap; }
.delta.up { color: #0f7a55; }
.delta.down { color: var(--bad); }
/* Lista de precios */
.px-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.px-table th { font-size: .76rem; color: var(--ink-3); font-weight: 650; text-align: left; padding: 0 6px; }
.px-table td { padding: 0 6px; vertical-align: middle; }
.px-table td:first-child { font-weight: 700; white-space: nowrap; }
.px-table td:first-child i { color: var(--conf); margin-right: 6px; }
.px-table input { text-align: right; font-weight: 650; }

/* ==========================================================================
   Varios
   ========================================================================== */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 56px; color: var(--ink-3); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--conf); border-radius: 50%; animation: spin .7s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--line-2), #f8f9fc, var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
.toast-zone { position: fixed; right: 18px; bottom: 18px; z-index: 3000; display: grid; gap: 8px; }
@media (max-width: 767.98px) { .toast-zone { left: 12px; right: 12px; bottom: 84px; } }
/* Con la ficha abierta, los avisos no tapan su barra de acciones */
body:has(#detail.show) .toast-zone { bottom: auto; top: 76px; }
.toast-msg { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: .88rem; box-shadow: var(--shadow-3); display: flex; align-items: center; gap: 10px; animation: rise .3s var(--ease); max-width: 420px; }
.toast-msg i { font-size: 1.1rem; }
.toast-msg.err { background: var(--bad); }
.toast-msg.ok i { color: #6fe0b0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Impresión: membrete + documento
   ========================================================================== */
#print-area { display: none; }
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  html, body { background: #fff !important; height: auto; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; font-size: 10.5pt; color: #111; font-family: "Public Sans", Arial, sans-serif; }
  #print-area * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .p-letter { display: flex; align-items: center; gap: 14pt; padding-bottom: 10pt; border-bottom: 2.5pt solid #1d2433; }
  .p-letter img { width: 62pt; height: 62pt; object-fit: contain; }
  .p-letter .org { flex: 1; }
  .p-letter .org b { display: block; font-size: 15pt; letter-spacing: -.01em; }
  .p-letter .org span { display: block; font-size: 9pt; color: #444; line-height: 1.35; }
  .p-letter .doc { text-align: right; font-size: 9pt; color: #444; }
  .p-letter .doc b { display: block; font-size: 13pt; color: #111; }
  .p-title { display: flex; justify-content: space-between; align-items: baseline; margin: 14pt 0 10pt; }
  .p-title h1 { font-size: 15pt; margin: 0; color: #111; }
  .p-title span { font-size: 9pt; color: #555; }
  .p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; margin-bottom: 10pt; }
  .p-box { border: .8pt solid #c8ccd6; border-radius: 6pt; padding: 8pt 10pt; break-inside: avoid; }
  .p-box h2 { font-size: 8.5pt; color: #555; margin: 0 0 5pt; font-weight: 700; }
  .p-box dl { display: grid; grid-template-columns: auto 1fr; gap: 2.5pt 10pt; margin: 0; font-size: 10pt; }
  .p-box dt { color: #555; font-weight: 400; }
  .p-box dd { margin: 0; font-weight: 600; }
  .p-stay { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border: .8pt solid #c8ccd6; border-radius: 6pt; padding: 9pt 12pt; margin-bottom: 10pt; background: #f4f5f9; }
  .p-stay .v { font-size: 13pt; font-weight: 800; }
  .p-stay .l { font-size: 8.5pt; color: #555; }
  .p-stay .mid { text-align: center; padding: 0 16pt; font-size: 9pt; color: #555; }
  .p-stay .mid b { display: block; font-size: 15pt; color: #111; }
  .p-stay .p-salida { margin-top: 3pt; font-size: 9pt; font-weight: 800; color: #111; }
  .p-salida-txt { font-weight: 700; }
  .p-stay .end { text-align: right; }
  .p-table { width: 100%; border-collapse: collapse; margin: 4pt 0 10pt; font-size: 9.5pt; }
  .p-table th { text-align: left; font-size: 8.5pt; color: #444; border-bottom: 1.2pt solid #1d2433; padding: 4pt 6pt; }
  .p-table td { border-bottom: .6pt solid #d5d8e0; padding: 4pt 6pt; }
  .p-table .r { text-align: right; }
  .p-table tfoot td { font-weight: 800; border-top: 1.2pt solid #1d2433; border-bottom: 0; }
  .p-table tr { break-inside: avoid; }
  .p-table.compact { font-size: 8.5pt; }
  .p-table.compact th { font-size: 7.5pt; }
  .p-table.compact th, .p-table.compact td { padding: 3pt 4pt; }
  .p-table tr.grp td { font-weight: 800; background: #eceef4; border-bottom: .8pt solid #1d2433; padding-top: 5pt; }
  .p-table tr.grp { break-after: avoid; }
  .p-table tr.sub td { font-weight: 800; border-bottom: 1pt solid #8a90a0; }
  .p-cols { break-inside: avoid; margin-bottom: 10pt; font-size: 0; }
  .p-cols > .p-table { display: inline-table; width: 49.2%; vertical-align: top; margin: 0; break-inside: avoid; }
  .p-cols > .p-table + .p-table { margin-left: 1.6%; }
  #print-area.land { page: apaisada; }
  @page apaisada { size: A4 landscape; margin: 12mm 12mm 14mm; }
  .p-total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8pt; margin-bottom: 10pt; }
  .p-total > div { border: .8pt solid #c8ccd6; border-radius: 6pt; padding: 7pt 10pt; }
  .p-total .l { font-size: 8.5pt; color: #555; }
  .p-total .v { font-size: 13pt; font-weight: 800; }
  .p-total .hl { background: #1d2433; color: #fff; border-color: #1d2433; }
  .p-total .hl .l { color: #c9cfdb; }
  .p-note { font-size: 9pt; color: #333; border-left: 2.5pt solid #1d2433; padding: 2pt 0 2pt 8pt; margin: 8pt 0; white-space: pre-wrap; }
  .p-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 50pt; margin-top: 46pt; text-align: center; font-size: 9pt; break-inside: avoid; }
  .p-signs div { border-top: .8pt solid #111; padding-top: 4pt; }
  .p-foot { margin-top: 14pt; padding-top: 6pt; border-top: .6pt solid #c8ccd6; font-size: 8pt; color: #666; display: flex; justify-content: space-between; }
  .p-img { max-width: 100%; margin: 4pt 0 10pt; }
  .p-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8pt; margin-bottom: 10pt; }
  .p-kpis > div { border: .8pt solid #c8ccd6; border-radius: 6pt; padding: 6pt 9pt; }
  .p-kpis .l { font-size: 8pt; color: #555; }
  .p-kpis .v { font-size: 12pt; font-weight: 800; }
}
@media (hover: none) { .can-add .ag-cell::after { display: none; } }
body:has(#ag-selbar) .fab { opacity: 0; pointer-events: none; }

/* ===================================================================== Prereservas de los gremios */
:root { --pre: #c2417f; --pre-soft: #fbe6f0; --pre-ink: #8e2459; }
.tone-pink { --t-2: #e58bb5; --t: var(--pre); --t-soft: var(--pre-soft); --t-ink: var(--pre-ink); }
.chip-pre { background: var(--pre-soft); color: var(--pre-ink); border: 0; }
button.chip-pre:hover { background: #f7d3e4; }
button.chip-pre:disabled { opacity: .55; text-decoration: line-through; }
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--pre); color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }
body.nav-collapsed .nav-side .nav-badge { position: absolute; margin: 0; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; font-size: .66rem; }
.nav-side a.nav-item { position: relative; }
.tabbar a.has-badge { position: relative; }
.tabbar .nav-badge { position: absolute; top: 2px; left: 55%; margin: 0; min-width: 18px; height: 18px; font-size: .64rem; padding: 0 5px; }
body.modo-gremio .search, body.modo-gremio .search-toggle { display: none !important; }

/* Estado */
.pr-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: var(--t-soft); color: var(--t-ink); white-space: nowrap; }
.pr-state { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r-lg); background: var(--t-soft); color: var(--t-ink); }
.pr-state > i { font-size: 1.4rem; }
.pr-state b { display: block; }
.pr-state span { font-size: .85rem; opacity: .9; }
.note-ok { background: var(--ok-soft); color: #145c40; border-radius: var(--r); padding: 11px 14px; font-size: .86rem; display: flex; gap: 10px; }
.pr-head { background: linear-gradient(140deg, #1b2048, #4a2350) !important; }

/* Vista gremio */
.pr-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px 28px; color: #fff;
  background: radial-gradient(circle at 92% 10%, rgba(194,65,127,.55), transparent 42%), linear-gradient(135deg, #1b2048, #2c2f74 60%, #4a2350); box-shadow: var(--shadow-2, 0 10px 30px rgba(22,28,45,.18)); }
.pr-hero h2 { color: #fff; font-size: 1.55rem; margin: 4px 0 6px; }
.pr-hero p { color: #c9cde6; max-width: 640px; margin-bottom: 16px; font-size: .92rem; }
.pr-hero-k { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: #f3b6d3; font-weight: 700; }
.pr-hero .btn-outline-light { border-color: rgba(255,255,255,.35); }
.pr-alert { background: var(--surface); border: 1px solid #f3c7da; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.pr-alert-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-left: 5px solid var(--pre); }
.pr-alert-row + .pr-alert-row { border-top: 1px solid var(--line-2); }
.pr-alert-row .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--pre-soft); color: var(--pre-ink); display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 auto; }
.pr-alert-row b { display: block; }
.pr-alert-row span { font-size: .84rem; color: var(--ink-3); }
.pr-list { display: flex; flex-direction: column; }
.pr-card { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); border-left: 4px solid var(--t); animation: rise .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.pr-card:last-child { border-bottom: 0; }
.pr-card-l { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 132px; }
.pr-num { font-weight: 800; font-size: .95rem; color: var(--ink); white-space: nowrap; }
.pr-card-m { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pr-fechas { font-size: .98rem; }
.pr-fechas span { font-weight: 500; color: var(--ink-3); }
.pr-res { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.pr-coment, .pr-vence { font-size: .82rem; display: flex; gap: 6px; align-items: baseline; }
.pr-coment { color: var(--bad); }
.pr-vence { color: var(--pre-ink); font-weight: 650; }
.pr-card-r { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
label.btn.disabled { pointer-events: none; opacity: .6; }
@media (max-width: 767.98px) {
  .pr-hero { padding: 20px; }
  .pr-hero h2 { font-size: 1.25rem; }
  .pr-card { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .pr-card-l { flex-direction: row; align-items: center; min-width: 0; width: 100%; justify-content: space-between; }
  .pr-card-r { width: 100%; justify-content: stretch; }
  .pr-card-r > * { flex: 1; }
  .pr-alert-row { flex-wrap: wrap; }
  .pr-alert-row label { width: 100%; }
}
.pr-money { padding: 14px 16px; border-radius: var(--r); background: var(--pre-soft); color: var(--pre-ink); }
.pr-money span { font-size: .78rem; display: block; }
.pr-money b { font-size: 1.5rem; font-weight: 800; display: block; letter-spacing: -.01em; }
.pr-money small { font-size: .78rem; }
.pr-pay-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 575.98px) { .pr-pay-grid { grid-template-columns: 1fr; } }
.pr-cbu { white-space: pre-wrap; font-family: inherit; font-size: .9rem; font-weight: 600; background: #f7f8fc; border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; margin: 0; user-select: all; }
.pr-file { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); border: 1px solid var(--line-2); text-decoration: none; color: var(--ink); margin-bottom: 6px; }
.pr-file:hover { background: #f8f9fd; }
.pr-file > i:first-child { font-size: 1.4rem; color: var(--pre); }
.pr-file b { display: block; font-size: .85rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-file small { color: var(--ink-3); font-size: .74rem; }
.pr-danger { border-color: #f4c9d1; }
.pr-danger > h3 .n { background: var(--bad-soft); color: var(--bad); }
.pr-tl li::before { background: var(--t, var(--ok)); box-shadow: 0 0 0 4px var(--t-soft, var(--ok-soft)); }
.pr-tl li.is-mail::before { background: var(--ink-4); box-shadow: 0 0 0 4px var(--line-2); width: 8px; height: 8px; left: -20px; top: 6px; }
.pr-tl li.is-mail .tl-top { font-weight: 550; color: var(--ink-3); font-size: .82rem; }

/* Días disponibles */
.ds-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 14px 18px; }
.ds-ctl { display: flex; align-items: center; gap: 10px; }
.ds-lbl { font-size: .86rem; font-weight: 650; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.ds-lbl i { color: var(--conf); }
.stepper { display: inline-flex; align-items: center; background: #eef0f6; border-radius: 12px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--surface); font-size: 1.15rem; font-weight: 700; color: var(--ink); box-shadow: 0 1px 3px rgba(22,28,45,.1); }
.stepper button:active { transform: scale(.94); }
.stepper b { min-width: 40px; text-align: center; font-size: 1.05rem; }
.ds-lg-full { background: repeating-linear-gradient(135deg, #eceff4 0 3px, #dfe3ea 3px 6px); }
.ds-panel { padding: 16px 18px 20px; }
.ds-help { font-size: .86rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.ds-help i { color: var(--conf); }
.ds-cal { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; transition: opacity .2s; }
.ds-cal.is-loading { opacity: .5; }
.ds-month h3 { font-size: 1rem; margin: 0 0 10px; text-align: center; }
.ds-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.ds-wd { text-align: center; font-size: .72rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; padding-bottom: 4px; }
.ds-day { aspect-ratio: 1 / .86; border: 0; border-radius: 11px; font-weight: 700; font-size: .95rem; transition: transform .12s, background-color .15s, box-shadow .15s; position: relative; }
.ds-day.ok { background: var(--ok-soft); color: #145c40; box-shadow: inset 0 0 0 1px #b9e3cf; cursor: pointer; }
.ds-day.ok:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--ok); }
.ds-day.full { background: repeating-linear-gradient(135deg, #f1f3f7 0 5px, #e6e9ef 5px 10px); color: var(--ink-4); text-decoration: line-through; cursor: not-allowed; }
.ds-day.past { background: transparent; color: var(--ink-4); cursor: default; }
.ds-day.hoy::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--today); }
.ds-day.sel { background: var(--conf-soft); color: var(--conf-ink); box-shadow: inset 0 0 0 1px #c6cbf5; border-radius: 4px; }
.ds-day.ini, .ds-day.fin { background: linear-gradient(135deg, var(--conf), var(--conf-2)); color: #fff; box-shadow: 0 6px 14px rgba(79,91,213,.35); }
.ds-day.ini { border-radius: 11px 4px 4px 11px; }
.ds-day.fin { border-radius: 4px 11px 11px 4px; }
.ds-day.ini.fin { border-radius: 11px; }
.ds-bar { position: sticky; bottom: 16px; z-index: 20; margin-top: 16px; display: flex; align-items: center; gap: 10px; background: #151b33; color: #fff; border-radius: 16px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow-3); animation: rise .2s var(--ease); }
.ds-bar .txt { flex: 1; min-width: 0; line-height: 1.25; }
.ds-bar .txt b { display: block; font-size: .92rem; }
.ds-bar .txt span { font-size: .8rem; color: #c3c9de; }
@media (max-width: 767.98px) { .ds-bar { bottom: 76px; } .ds-cal { gap: 18px; } .ds-day { font-size: .88rem; } }

/* Administración */
.pr-search { min-width: 230px; }
.pr-search i { top: 50%; transform: translateY(-50%); }
.pr-tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.pr-tabs button { border: 0; background: none; padding: 8px 12px 10px; font-size: .86rem; font-weight: 650; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.pr-tabs button.on { color: var(--conf-ink); border-bottom-color: var(--conf); }
.pr-tabs button.on .count-pill { background: var(--conf-soft); color: var(--conf-ink); }
.show-mobile { display: none !important; }
@media (max-width: 767.98px) { .show-mobile { display: flex !important; } .pr-search { min-width: 0; flex: 1; } }
.pr-mcard { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-bottom: 1px solid var(--line-2); border-left: 4px solid var(--t); background: none; text-align: left; padding: 12px 14px; }
.pr-mcard b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-mcard span span, .pr-mcard > span > span { display: block; font-size: .78rem; color: var(--ink-3); }
.pa-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; padding: 18px 22px; overflow-y: auto; background: var(--paper); }
.pa-main, .pa-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 991.98px) { .pa-body { grid-template-columns: minmax(0, 1fr); padding: 14px; } }
.pa-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pa-room { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface); flex-wrap: wrap; transition: border-color .15s, background-color .15s; }
.pa-room:hover { border-color: #cdd3ea; }
.pa-room.on { border-color: var(--conf); background: #f7f8ff; }
.pa-room-n { width: 34px; height: 34px; border-radius: 10px; background: var(--conf-soft); color: var(--conf-ink); font-weight: 800; display: grid; place-items: center; flex: 0 0 auto; }
.pa-room b { display: block; font-size: .86rem; }
.pa-room span span { display: block; font-size: .74rem; color: var(--ink-3); }
.pa-room-f { display: flex; gap: 6px; width: 100%; padding-left: 70px; }
.pa-room-f input { width: 70px; flex: 0 0 auto; }
.pa-room-f select { flex: 1; min-width: 0; }
.pa-check { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .86rem; font-weight: 650; }
.pa-check .ok { color: var(--ok); }
.pa-check .bad { color: var(--warn); }
.pa-check i { margin-right: 5px; }
.pa-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pr-confirm { border-color: #bfe5d3; }

/* Agenda: reservas que vienen de una prereserva */
.ag-bar.pre { background: linear-gradient(135deg, #fdf0f6, var(--pre-soft)); box-shadow: inset 4px 0 0 var(--pre), 0 1px 2px rgba(142,36,89,.1); }
.ag-bar.pre:hover { box-shadow: inset 4px 0 0 var(--pre), 0 8px 18px rgba(194,65,127,.25); }
.ag-bar.pre.res { background: repeating-linear-gradient(135deg, var(--pre-soft) 0 8px, #f6d5e5 8px 16px); }
.ag-bar .pre-tag { font-size: .66rem; font-weight: 800; color: var(--pre-ink); text-transform: uppercase; letter-spacing: .03em; }

/* Habitaciones inactivas (sin camas) */
.hab-card.is-off { opacity: .72; }
.hab-card.is-off .top { background: linear-gradient(135deg, #6b7280, #3f4652); }
.chip-off { background: #eceef2; color: #4b5563; }
.ag-room.inactiva { opacity: .6; }
.ag-room.inactiva span { color: var(--warn); }

/* Gremio: listado y pago */
.gr-tbl td { vertical-align: top; }
.gr-tbl .nowrap, .nowrap { white-space: nowrap; }
.gr-mcard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); border-left: 4px solid var(--t); cursor: pointer; }
.gr-mtop { display: flex; align-items: center; gap: 8px; }
.gr-mtop .pr-chip { margin-left: auto; }
.gr-macts { display: flex; gap: 6px; margin-top: 6px; }
.gr-macts .btn { flex: 1; }
.gp-tit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--ok-soft); color: #145c40; }
.gp-tit i { font-size: 1.2rem; }
.gp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed #c9cfe4; border-radius: var(--r-lg); background: #fafbff; cursor: pointer; text-align: center; transition: border-color .15s, background-color .15s; margin: 0; }
.gp-drop:hover, .gp-drop.over { border-color: var(--conf); background: var(--conf-soft); }
.gp-drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.gp-drop > i { font-size: 2rem; color: var(--conf); }
.gp-drop.has-file > i::before { content: "\F26B"; color: var(--ok); }
.gp-drop b { font-size: .92rem; word-break: break-all; }
.gp-drop span { font-size: .78rem; color: var(--ink-3); }
.ds-cal.dragging, .ds-cal.dragging * { cursor: col-resize; user-select: none; }
.ds-day.ok { user-select: none; }

/* ===================================================================== Novedades */
.nv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.nv-head h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 2px; }
.nv-head p { color: var(--ink-3); margin: 0; }
.nv-head .pr-hero-k { color: var(--pre); }
.nv-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.nv-filters button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 650; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.nv-filters button.on { background: #1b2048; color: #fff; border-color: #1b2048; }
.nv-cat { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--t-ink); background: var(--t-soft); padding: 4px 9px; border-radius: 6px; }
.nv-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: .8rem; color: var(--ink-3); }
.nv-dest { color: #b7791f; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }

/* Destacada */
.nv-feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); border-radius: var(--r-xl); overflow: hidden; background: #12173a; color: #fff; box-shadow: 0 18px 40px rgba(18,23,58,.25); cursor: pointer; margin-bottom: 22px; min-height: 340px; transition: transform .3s var(--ease), box-shadow .3s; }
.nv-feature:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(18,23,58,.32); }
.nv-feature .nv-cover { height: 100%; aspect-ratio: auto; border-radius: 0; }
.nv-feature-text { padding: 34px 34px 30px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 100% 0%, rgba(194,65,127,.35), transparent 55%), linear-gradient(160deg, #1b2048, #12173a); }
.nv-feature-text h2 { color: #fff; font-size: 1.85rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.nv-feature-text p { color: #c9cde6; font-size: 1rem; margin: 0; }
.nv-feature-text .nv-meta { color: #c9cde6; }
.nv-feature-btn { align-self: flex-start; margin-top: 8px; display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
@media (max-width: 991.98px) { .nv-feature { grid-template-columns: 1fr; min-height: 0; } .nv-feature .nv-cover { aspect-ratio: 16 / 9; } .nv-feature-text { padding: 22px; } .nv-feature-text h2 { font-size: 1.4rem; } }

/* Tarjetas */
.nv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.nv-grid-adm { padding: 18px; }
.nv-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; }
.nv-card:hover, .nv-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-2); outline: none; }
.nv-card.is-dest { border-color: #f1d18a; box-shadow: 0 0 0 2px #fbe7b5, var(--shadow-1); }
.nv-cover { aspect-ratio: 16 / 9; overflow: hidden; background: #e8eaf2; position: relative; }
.nv-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.nv-card:hover .nv-cover img, .nv-feature:hover .nv-cover img { transform: scale(1.04); }
.nv-cover-empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--t-soft), #fff 140%); color: var(--t); font-size: 3rem; }
.nv-cover-empty::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.35) 18px 36px); }
.nv-body { padding: 16px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nv-body h3 { font-size: 1.08rem; font-weight: 750; line-height: 1.3; margin: 0; color: var(--ink); }
.nv-body p { font-size: .88rem; color: var(--ink-3); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nv-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 12px; font-size: .78rem; color: var(--ink-3); }
.nv-foot i { margin-right: 4px; }
.nv-more { margin-left: auto; font-weight: 700; color: var(--conf); display: inline-flex; gap: 2px; align-items: center; }
.nv-more i { transition: transform .2s; }
.nv-card:hover .nv-more i { transform: translateX(3px); }
.nv-new { position: absolute; top: 12px; left: 12px; background: var(--pre); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; box-shadow: 0 4px 12px rgba(194,65,127,.4); }
.nv-new.static { position: static; box-shadow: none; }
.nv-state { position: absolute; top: 12px; right: 12px; font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; background: var(--t-soft); color: var(--t-ink); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.nv-acts { display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); margin-top: 6px; }
.nv-card-prev { cursor: default; box-shadow: none; }
.nv-card-prev:hover { transform: none; box-shadow: none; }

/* Lectura */
.nv-reader { position: relative; background: var(--surface); overflow-y: auto; max-height: calc(100vh - 3.5rem); overscroll-behavior: contain; }
@media (max-width: 575.98px) { .nv-reader { max-height: calc(100vh - 1rem); } }
.nv-close { position: sticky; float: right; margin: 14px 14px -50px 0; top: 14px; right: 14px; z-index: 3; background-color: rgba(255,255,255,.92); border-radius: 50%; padding: 10px; opacity: 1; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.nv-gallery { background: #0e1230; }
.nv-gallery > img { display: block; width: 100%; max-height: 52vh; object-fit: contain; background: #0e1230; }
.nv-thumbs { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; background: #0e1230; }
.nv-thumbs button { flex: 0 0 auto; width: 92px; height: 56px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; opacity: .6; background: none; }
.nv-thumbs button.on { border-color: #fff; opacity: 1; }
.nv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.nv-band { height: 120px; display: grid; place-items: center; font-size: 3rem; color: var(--t); background: linear-gradient(135deg, var(--t-soft), #fff); }
.nv-text { max-width: 760px; margin: 0 auto; padding: 30px 28px 34px; }
.nv-text h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 12px 0 10px; color: var(--ink); }
.nv-lead { font-size: 1.15rem; color: var(--ink-2); line-height: 1.5; margin-bottom: 18px; }
.nv-content { font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.nv-content p { margin-bottom: 1em; }
.nv-content ul { padding-left: 1.2em; margin-bottom: 1em; }
.nv-content a { color: var(--conf); word-break: break-word; }
.nv-hasta { color: var(--pre-ink); font-weight: 650; display: inline-flex; gap: 5px; align-items: center; }
.nv-cta { display: inline-flex; gap: 10px; align-items: center; margin: 8px 0 14px; border-radius: 12px; font-weight: 700; }
.nv-files { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.nv-files h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 800; margin-bottom: 10px; }
.nv-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); margin-bottom: 8px; transition: border-color .15s, background-color .15s; }
.nv-file:hover { border-color: #e7a3a3; background: #fff7f7; }
.nv-file .ico { width: 40px; height: 40px; border-radius: 10px; background: #fde8e8; color: #c53030; display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 auto; }
.nv-file b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-file small { color: var(--ink-3); }
.nv-sign { margin-top: 26px; font-size: .78rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 767.98px) { .nv-text { padding: 20px 16px 24px; } .nv-text h1 { font-size: 1.45rem; } .nv-lead { font-size: 1.02rem; } .nv-head h2 { font-size: 1.45rem; } }

/* Editor */
.nv-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.nv-catbtn { border: 2px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-weight: 650; font-size: .86rem; display: inline-flex; gap: 7px; align-items: center; color: var(--ink-2); }
.nv-catbtn i { color: var(--t); }
.nv-catbtn.on { border-color: var(--t); background: var(--t-soft); color: var(--t-ink); }
.nv-files-ed { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.nv-fe { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 10px; }
.nv-fe.is-new { border-style: dashed; border-color: #c9cfe4; background: #fafbff; }
.nv-fe img, .nv-fe-pdf { width: 54px; height: 38px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.nv-fe-pdf { display: grid; place-items: center; background: #fde8e8; color: #c53030; font-size: 1.2rem; }
.nv-fe b { display: block; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-fe small { font-size: .72rem; color: var(--ink-3); }
.nv-fe .btn { flex: 0 0 auto; }
.nv-fe > span { flex: 1; }

/* Gremio: afiliados */
.ga-intro { display: flex; gap: 10px; align-items: flex-start; padding: 12px 20px; font-size: .85rem; color: var(--ink-3); border-bottom: 1px solid var(--line-2); background: #fafbff; }
.ga-intro i { color: var(--conf); margin-top: 2px; }
.ga-who { display: flex; align-items: center; gap: 10px; }
.ga-who b { display: block; }
.ga-flag, .ga-ok { display: inline-flex; gap: 4px; align-items: center; font-size: .74rem; font-weight: 650; }
.ga-flag { color: var(--pre-ink); }
.ga-ok { color: #167350; }
.ga-hist { display: flex; flex-direction: column; gap: 8px; }
.ga-h { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); text-decoration: none; color: var(--ink); font-size: .86rem; transition: border-color .15s, background-color .15s; }
.ga-h:hover { border-color: #cdd3ea; background: #f8f9fd; }
.ga-h-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rf-head .ico .avatar { width: 44px; height: 44px; font-size: 1rem; }
.dni-hint { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-3); }
.dni-hint.ok { color: #167350; }
.dni-hint .spinner-border { width: .8rem; height: .8rem; border-width: 2px; }
.form-control.is-filled { animation: filled 1.2s var(--ease); }
@keyframes filled { 0% { background-color: #e3f6ec; box-shadow: 0 0 0 3px rgba(22,115,80,.18); } 100% { background-color: var(--bs-body-bg); box-shadow: none; } }
.nv-cover img { opacity: 0; transition: opacity .35s ease, transform .5s var(--ease); }
.nv-cover img.ok { opacity: 1; }
.nv-card-prev .nv-cover img { opacity: 1; }

/* ===================================================================== Días disponibles (gremio) v2 */
.dv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dv-head h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; }
.dv-head p { color: var(--ink-3); margin: 0; max-width: 640px; }
.dv-head .pr-hero-k { color: var(--pre); }
.dv-stats { display: flex; gap: 10px; }
.dv-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; min-width: 104px; box-shadow: var(--shadow-1); }
.dv-stat b { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.dv-stat span { font-size: .76rem; color: var(--ink-3); }
.dv-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.dv-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.dv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px; box-shadow: var(--shadow-1); }
.dv-card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 800; display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.dv-card h3 i { color: var(--conf); font-size: 1rem; }
.dv-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.dv-step b { display: block; font-size: .95rem; }
.dv-step span { font-size: .76rem; color: var(--ink-3); }
.dv-stay { padding-top: 14px; }
.dv-dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; background: linear-gradient(135deg, #f3f4ff, #fdf2f8); border: 1px solid #e3e5fb; border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.dv-dates > div:not(.dv-n) span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 800; }
.dv-dates > div:not(.dv-n) b { display: block; font-size: 1.15rem; font-weight: 800; color: var(--conf-ink); }
.dv-dates > div:not(.dv-n) small { font-size: .74rem; color: var(--ink-3); }
.dv-dates > div:last-child { text-align: right; }
.dv-n { text-align: center; width: 54px; height: 54px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 8px rgba(79,91,213,.18); display: grid; place-content: center; line-height: 1; }
.dv-n b { font-size: 1.25rem; font-weight: 800; color: var(--conf); }
.dv-n small { font-size: .64rem; color: var(--ink-3); }
.dv-cta { padding: 11px; font-weight: 700; border-radius: 12px; }
.dv-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 10px; border: 2px dashed var(--line); border-radius: 14px; color: var(--ink-3); font-size: .84rem; }
.dv-empty i { font-size: 1.8rem; color: var(--conf); opacity: .7; }
.dv-empty b { color: var(--ink); font-size: .95rem; }
.dv-info ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .84rem; color: var(--ink-2); }
.dv-info li { display: flex; gap: 10px; align-items: flex-start; }
.dv-info li i { color: var(--pre); margin-top: 1px; }
.dv-cal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-1); padding: 16px 20px 22px; min-width: 0; }
.dv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.dv-toolbar .month-nav .label { min-width: 210px; text-align: center; font-weight: 800; }
.dv-legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--ink-3); }
.dv-legend span { display: inline-flex; gap: 6px; align-items: center; }
.dv-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg-ok { background: #e7f7ef; box-shadow: inset 0 0 0 1px #9fd8bc; }
.lg-few { background: #fff6e0; box-shadow: inset 0 0 0 1px #f0cf7c; }
.lg-full { background: repeating-linear-gradient(135deg, #eef0f4 0 3px, #e1e4ea 3px 6px); }
.lg-sel { background: linear-gradient(135deg, var(--conf), var(--conf-2)); }
.dv-help { display: flex; gap: 8px; align-items: center; font-size: .86rem; color: var(--ink-3); padding: 12px 0 4px; }
.dv-help i { color: var(--conf); }
.dv-cal-card .ds-cal { margin-top: 10px; gap: 34px; }
.dv-mhead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.dv-mhead h3 { font-size: 1.05rem; font-weight: 800; margin: 0; text-align: left; }
.dv-mhead span { font-size: .76rem; color: var(--ink-3); }
.dv-cal-card .ds-grid { gap: 4px; }
.dv-cal-card .ds-wd { font-size: .7rem; padding-bottom: 6px; color: var(--ink-3); }
.dv-cal-card .ds-wd.we { color: var(--pre); }
.dv-cal-card .ds-day { aspect-ratio: auto; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 10px; text-decoration: none; }
.dv-cal-card .ds-day b { font-size: 1rem; font-weight: 800; line-height: 1; }
.dv-cal-card .ds-day small { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .85; }
.dv-cal-card .ds-day.ok { background: #effaf4; color: #12603f; box-shadow: inset 0 0 0 1px #c6eada; }
.dv-cal-card .ds-day.ok.we { background: #e9f7f0; }
.dv-cal-card .ds-day.ok.few { }
.dv-cal-card .ds-day.ok:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--conf), 0 6px 14px rgba(79,91,213,.15); }
.dv-cal-card .ds-day.full { background: repeating-linear-gradient(135deg, #f4f5f8 0 6px, #eceef3 6px 12px); color: #a3a9b8; text-decoration: none; }
.dv-cal-card .ds-day.full b { text-decoration: line-through; }
.dv-cal-card .ds-day.past { color: #c3c8d4; }
.dv-cal-card .ds-day.past small { display: none; }
.dv-cal-card .ds-day.ok.pv, .dv-cal-card .ds-day.ok.pv.we, .dv-cal-card .ds-day.ok.pv.few { background: #e9ebff; color: var(--conf-ink); box-shadow: inset 0 0 0 1px #c6cbf5; }
.dv-cal-card .ds-day.ok.sel, .dv-cal-card .ds-day.ok.sel.we, .dv-cal-card .ds-day.ok.sel.few { background: #e3e6ff; color: var(--conf-ink); box-shadow: none; border-radius: 4px; }
.dv-cal-card .ds-day.ok.ini.ini, .dv-cal-card .ds-day.ok.fin.fin, .dv-cal-card .ds-day.ok.ini:hover, .dv-cal-card .ds-day.ok.fin:hover { background: linear-gradient(135deg, var(--conf), var(--conf-2)); color: #fff; box-shadow: 0 6px 16px rgba(79,91,213,.35); }
.dv-cal-card .ds-day.ok.ini { border-radius: 12px 4px 4px 12px; }
.dv-cal-card .ds-day.ok.fin { border-radius: 4px 12px 12px 4px; }
.dv-cal-card .ds-day.ok.ini.fin { border-radius: 12px; }
.dv-cal-card .ds-day.hoy::after { bottom: 4px; }
@media (max-width: 991.98px) {
  .dv-layout { grid-template-columns: minmax(0, 1fr); }
  .dv-side { position: static; }
  .dv-info { display: none; }
  .dv-stats { display: none; }
  .dv-stay .dv-cta, .dv-stay [data-limpiar] { display: none; }
}
@media (max-width: 767.98px) {
  .dv-head h2 { font-size: 1.45rem; }
  .dv-cal-card { padding: 12px 10px 16px; }
  .dv-toolbar .month-nav .label { min-width: 0; }
  .dv-legend { margin-left: 0; }
  .dv-cal-card .ds-day { height: 50px; }
  .dv-cal-card .ds-day small { font-size: .52rem; }
}

.dv-cal-card .ds-day:focus-visible { outline: 2px solid var(--conf); outline-offset: 2px; }
.dv-cal-card .ds-day:focus:not(:focus-visible) { outline: none; }
.dv-cal-card .ds-day.ini small, .dv-cal-card .ds-day.fin small { letter-spacing: 0; font-size: .56rem; }

/* Días disponibles: celdas simples (sólo el número; el color dice si hay lugar) */
.dv-cal-card .ds-day { height: 46px; font-size: 1rem; font-weight: 700; flex-direction: row; gap: 0; position: relative; }
.dv-cal-card .ds-day.ok.few::before { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #e0a000; }
.dv-cal-card .ds-day.ok.sel.few::before, .dv-cal-card .ds-day.ok.ini.few::before, .dv-cal-card .ds-day.ok.fin.few::before { display: none; }
.dv-cal-card .ds-day.full { text-decoration: line-through; }
.dv-cal-card .ds-day.hoy::after { bottom: 5px; }
.lg-few { background: #effaf4; box-shadow: inset 0 0 0 1px #c6eada; position: relative; }
.lg-few::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: #e0a000; }
@media (max-width: 767.98px) { .dv-cal-card .ds-day { height: 42px; font-size: .95rem; } }
/* Hoy: recuadro oscuro (no un punto, para no confundirlo con "últimos lugares") */
.dv-cal-card .ds-day.hoy::after { display: none; }
.dv-cal-card .ds-day.hoy { outline: 2px solid #1b2048; outline-offset: -2px; color: #1b2048; }
.lg-hoy { background: #fff; box-shadow: inset 0 0 0 2px #1b2048; }

/* Configuración: datos de prueba */
.cfg-danger { border-color: #f4c9d1; }
.cfg-danger-body { display: flex; align-items: center; gap: 18px; }
.cfg-danger-body p { margin: 4px 0 0; font-size: .86rem; color: var(--ink-3); max-width: 900px; }
.cfg-danger-body .btn { flex: 0 0 auto; }
@media (max-width: 767.98px) { .cfg-danger-body { flex-direction: column; align-items: stretch; } }
.rs-list { list-style: none; padding: 0; margin: 0 0 12px; }
.rs-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.rs-list li i { color: var(--bad); width: 18px; }
.rs-list li span { flex: 1; }
.rs-opts { display: flex; flex-direction: column; gap: 10px; }
.rs-opts .form-check { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); margin: 0; font-size: .86rem; }
.rs-opts .form-check-input { margin: 2px 0 0; flex: 0 0 auto; float: none; }
.rs-names { display: block; margin-top: 4px; font-size: .78rem; color: var(--ink-3); }

/* ---------- Configuración: módulos en prueba ---------- */
.cfg-mods { display: grid; gap: 10px; }
.cfg-mod { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s; margin: 0; }
.cfg-mod:hover { border-color: var(--t-2); }
.cfg-mod .hab { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--t-soft); color: var(--t-ink); font-size: 1.1rem; }
.cfg-mod .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cfg-mod .who b { font-size: .95rem; }
.cfg-mod .who span { font-size: .83rem; color: var(--ink-3); }
.cfg-mod-state { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: #edf0f5; padding: 3px 9px; border-radius: 99px; }
.cfg-mod:has(input:checked) { background: color-mix(in srgb, var(--t-soft) 45%, transparent); border-color: var(--t-2); }
.cfg-mod:has(input:checked) .cfg-mod-state { background: var(--t-soft); color: var(--t-ink); }
.cfg-mod .form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
fieldset:disabled .cfg-mod { cursor: default; opacity: .75; }
@media (max-width: 575px) { .cfg-mod-state { display: none; } }

/* ---------- Parámetros de estadía (Configuración) y aclaraciones del egreso ---------- */
.cfg-est-q + .cfg-est-q { margin-top: 18px; }
.cfg-est-t { font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.cfg-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cfg-op { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; transition: border-color .2s, background .2s; }
.cfg-op:hover { border-color: var(--conf); }
.cfg-op.on { border-color: var(--conf); background: var(--conf-soft); }
.cfg-op .form-check-input { margin-top: 3px; flex: 0 0 auto; }
.cfg-op span { display: flex; flex-direction: column; gap: 3px; }
.cfg-op b { font-size: .9rem; }
.cfg-op small { font-size: .8rem; color: var(--ink-3); }
@media (max-width: 767px) { .cfg-ops { grid-template-columns: 1fr; } }
.lbl-hint { font-weight: 400; color: var(--ink-3); font-size: .8em; }
.rf-salida { font-size: .78rem; font-weight: 600; color: var(--conf-ink); }
.rs-salida dd { font-size: .78rem; font-weight: 600; color: var(--conf-ink); margin: -4px 0 0; text-align: right; width: 100%; }
.dv-salida { text-align: center; font-size: .8rem; font-weight: 600; color: var(--conf-ink); background: var(--conf-soft); border-radius: 8px; padding: 5px 8px; margin: -4px 0 12px; }
.ds-day.out-ok { color: var(--ink-2); border: 1px dashed var(--conf); background: transparent; cursor: pointer; }
.ds-cal .ds-day.full.sel.fin { outline: 2px solid var(--conf); outline-offset: -2px; color: var(--conf-ink); font-weight: 800; }
