/* ═══════════════════════════════════════════════════════════════════
   lk-rsv-create-v4.css · LUZOcrm V2 · Sprint RSV-C4-V4 · 2026-05-16
   Reemplaza lk-rsv-create-v3.css · compat con reservas-create.js v3
   Tokens via lk-tokens.css v2.4 (light + dark + midnight)
   ═══════════════════════════════════════════════════════════════════ */

.lk-rsv-shell,
.lk-rsv-shell *,
.lk-rsv-shell *::before,
.lk-rsv-shell *::after { box-sizing: border-box; }

/* ── Backdrop ── */
.lk-rsv-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal, 500);
}
[data-theme="dark"] .lk-rsv-backdrop,
[data-theme="midnight"] .lk-rsv-backdrop { background: rgba(0, 0, 0, .65); }

/* ── Shell ── */
.lk-rsv-shell {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 80px);
  max-width: 1180px;
  max-height: calc(100vh - 60px);
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: calc(var(--z-modal, 500) + 1);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--tx-base);
  -webkit-font-smoothing: antialiased;
  animation: lk-rsv-blade-in 0.42s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes lk-rsv-blade-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(0.985); }
  to   { opacity: 1; transform: translate(-50%, -50%)               scale(1); }
}

/* ═══ HERO ═══ */
.lk-rsv-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border-soft);
  background: linear-gradient(135deg, var(--c-brand-muted) 0%, transparent 60%);
  flex-shrink: 0;
}
.lk-rsv-hero-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--c-brand-muted);
  color: var(--c-brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(.34, 1.4, .64, 1);
}
.lk-rsv-hero-icon svg {
  width: 17px; height: 17px;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  fill: none; stroke: currentColor;
}
.lk-rsv-hero:hover .lk-rsv-hero-icon { transform: scale(1.06) rotate(-4deg); }
.lk-rsv-hero-left { flex: 1; min-width: 0; }
.lk-rsv-eyebrow {
  font-size: 10px;
  color: var(--tx-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 5px;
}
.lk-rsv-eyebrow svg {
  width: 11px; height: 11px;
  stroke-width: 1.8; fill: none; stroke: currentColor;
}
.lk-rsv-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--tx-base);
  letter-spacing: -0.01em;
  margin: 0;
}
.lk-rsv-sub {
  font-size: 11px;
  color: var(--tx-muted);
  margin: 2px 0 0 0;
}
.lk-rsv-folio-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-brand);
  letter-spacing: 0.02em;
  font-weight: 500;
}
.lk-rsv-folio-mono.is-assigned { font-weight: 600; }

.lk-rsv-hero-right {
  display: flex; gap: 4px;
  margin-left: 8px;
}
.lk-rsv-ctl {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 0.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--tx-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: all 0.14s cubic-bezier(.4, 0, .2, 1);
}
.lk-rsv-ctl:hover {
  background: var(--bg-hover);
  color: var(--tx-base);
  border-color: var(--c-brand-bd);
}
.lk-rsv-ctl svg {
  width: 11px; height: 11px;
  stroke-width: 1.8;
  fill: none; stroke: currentColor;
}

/* ═══ SMARTVIEW · 5 cards horizontales ═══ */
.lk-rsv-sv-section {
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-card) 100%);
  border-bottom: 0.5px solid var(--border-soft);
  flex-shrink: 0;
}
.lk-rsv-sv-head { display: none; }
.lk-rsv-sv-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.lk-rsv-kpi {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  transition:
    border-color 0.18s cubic-bezier(.4, 0, .2, 1),
    transform    0.18s cubic-bezier(.4, 0, .2, 1),
    box-shadow   0.18s cubic-bezier(.4, 0, .2, 1);
  animation: lk-rsv-sv-card-in 0.4s cubic-bezier(.4, 0, .2, 1) backwards;
}
.lk-rsv-kpi:hover {
  border-color: var(--c-brand-bd);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.lk-rsv-sv-grid > .lk-rsv-kpi:nth-child(1) { animation-delay: 0.10s; }
.lk-rsv-sv-grid > .lk-rsv-kpi:nth-child(2) { animation-delay: 0.16s; }
.lk-rsv-sv-grid > .lk-rsv-kpi:nth-child(3) { animation-delay: 0.22s; }
.lk-rsv-sv-grid > .lk-rsv-kpi:nth-child(4) { animation-delay: 0.28s; }
.lk-rsv-sv-grid > .lk-rsv-kpi:nth-child(5) { animation-delay: 0.34s; }
@keyframes lk-rsv-sv-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lk-rsv-kpi-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 9px;
  color: var(--tx-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.lk-rsv-kpi-label svg {
  width: 10px; height: 10px;
  stroke-width: 1.8;
  fill: none; stroke: currentColor;
}

.lk-rsv-kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--tx-base);
  font-family: var(--font-mono);
  line-height: 1;
  letter-spacing: -0.02em;
  display: inline-block;
}
.lk-rsv-kpi-value.is-empty {
  color: var(--tx-muted);
  font-size: 18px;
  opacity: 0.5;
  font-family: var(--font-sans);
}
.lk-rsv-kpi-value.is-green { color: var(--tx-green); }
.lk-rsv-kpi-value.is-amber { color: var(--tx-amber); }
.lk-rsv-kpi-value.is-red   { color: var(--tx-red); }

.lk-rsv-kpi-stats {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.lk-rsv-kpi-hint {
  font-size: 10.5px;
  color: var(--tx-muted);
  line-height: 1.3;
  display: block;
  margin-top: 2px;
}
.lk-rsv-kpi-hint strong {
  color: var(--tx-base);
  font-weight: 500;
}

.lk-rsv-kpi-bar {
  margin-top: 8px;
  height: 5px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}
.lk-rsv-kpi-bar-fill {
  height: 100%;
  background: var(--c-brand);
  border-radius: 3px;
  transform-origin: left center;
  animation: lk-rsv-bar-grow 0.9s cubic-bezier(.4, 0, .2, 1) 0.5s backwards;
}
.lk-rsv-kpi-bar-fill.is-green { background: var(--tx-green); }
.lk-rsv-kpi-bar-fill.is-amber { background: var(--tx-amber); }
.lk-rsv-kpi-bar-fill.is-red   { background: var(--tx-red); }
@keyframes lk-rsv-bar-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Insight card */
.lk-rsv-kpi[data-kind="insight"] {
  background: linear-gradient(135deg, var(--c-brand-muted) 0%, var(--bg-surface) 100%);
  border-color: var(--c-brand-bd);
  animation:
    lk-rsv-insight-breathe 3.6s cubic-bezier(.4, 0, .2, 1) infinite,
    lk-rsv-sv-card-in 0.4s cubic-bezier(.4, 0, .2, 1) 0.34s backwards;
}
@keyframes lk-rsv-insight-breathe {
  0%, 100% { border-color: var(--c-brand-bd); }
  50%      { border-color: var(--c-brand-soft); }
}
.lk-rsv-kpi-insight-body {
  font-size: 11px;
  color: var(--tx-base);
  line-height: 1.5;
}
.lk-rsv-kpi-insight-body strong {
  color: var(--c-brand);
  font-weight: 600;
}
.lk-rsv-kpi-insight-cta {
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--c-brand);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 3px;
  cursor: pointer;
}
.lk-rsv-kpi-insight-cta svg {
  width: 10px; height: 10px;
  stroke-width: 2;
  fill: none; stroke: currentColor;
}

/* ═══ BODY · 2 columnas alineadas con SmartView ═══ */
.lk-rsv-body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 16px 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.lk-rsv-col-form {
  grid-column: span 2;
  display: flex; flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
}
.lk-rsv-col-cal {
  grid-column: span 3;
  display: flex; flex-direction: column;
  gap: 6px;
  overflow: hidden;
  min-height: 0;
}
.lk-rsv-col-form::-webkit-scrollbar { width: 4px; }
.lk-rsv-col-form::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ═══ FORM ═══ */
.lk-rsv-field { display: flex; flex-direction: column; gap: 6px; }
.lk-rsv-flabel {
  font-size: 9.5px;
  color: var(--tx-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.lk-rsv-flabel .req { color: var(--tx-red); margin-left: 2px; }

.lk-rsv-input {
  width: 100%;
  padding: 7px 9px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 7px;
  color: var(--tx-base);
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.18s cubic-bezier(.4, 0, .2, 1);
}
.lk-rsv-input:focus {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2.5px var(--c-brand-muted);
}

.lk-rsv-results {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
}
.lk-rsv-result-item {
  display: flex; align-items: center;
  gap: 9px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.lk-rsv-result-item:hover { background: var(--bg-hover); }
.lk-rsv-result-item + .lk-rsv-result-item {
  border-top: 0.5px solid var(--border-soft);
}
.lk-rsv-field.is-filled .lk-rsv-result-item {
  background: var(--bg-active);
  border: 0.5px solid var(--c-brand-bd);
  border-radius: 8px;
  padding: 9px 10px;
}
.lk-rsv-result-item + .lk-rsv-result-item.lk-rsv-field-isfilled-noop {
  border-top: none;
}
.lk-rsv-result-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base);
}
.lk-rsv-result-sub {
  font-size: 10px;
  color: var(--tx-muted);
  font-family: var(--font-mono);
  margin-top: 1px;
}

.lk-rsv-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-brand-soft));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 10px;
  flex-shrink: 0;
}

/* Chips */
.lk-rsv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.lk-rsv-chip {
  padding: 5px 10px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  color: var(--tx-muted);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
  transition: all 0.14s cubic-bezier(.4, 0, .2, 1);
}
.lk-rsv-chip svg {
  width: 9px; height: 9px;
  stroke-width: 1.8;
  fill: none; stroke: currentColor;
}
.lk-rsv-chip:hover {
  color: var(--tx-base);
  border-color: var(--tx-dim);
}
.lk-rsv-chip.is-active,
.lk-rsv-chip[aria-pressed="true"] {
  background: var(--c-brand-muted);
  color: var(--c-brand);
  border-color: var(--c-brand-bd);
  animation: lk-rsv-chip-pop 0.32s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes lk-rsv-chip-pop {
  0%   { transform: scale(1); }
  55%  { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* Notas */
.lk-rsv-notes {
  width: 100%;
  min-height: 50px;
  padding: 7px 9px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 7px;
  color: var(--tx-base);
  font-size: 11.5px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: all 0.18s cubic-bezier(.4, 0, .2, 1);
}
.lk-rsv-notes:focus {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2.5px var(--c-brand-muted);
}

/* ═══ CALENDAR · grilla semanal v3 con look refinado ═══ */
.lk-rsv-col-cal > .lk-rsv-field { flex: 1; min-height: 0; }

.lk-rsv-cal-head {
  display: grid;
  grid-template-columns: 42px repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.lk-rsv-cal-hcell {
  text-align: center;
  font-size: 9px;
  color: var(--tx-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 0.5px solid var(--border-soft);
}
.lk-rsv-cal-hcell.is-today,
.lk-rsv-cal-hcell.is-today .lk-rsv-cal-dnum { color: var(--c-brand); }
.lk-rsv-cal-dow { display: block; font-size: 9px; }
.lk-rsv-cal-dnum {
  display: block;
  font-size: 13px;
  color: var(--tx-base);
  font-family: var(--font-mono);
  margin-top: 2px;
  font-weight: 600;
}

.lk-rsv-cal-grid {
  display: grid;
  grid-template-columns: 42px repeat(7, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 2px;
  flex: 1;
  min-height: 0;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.lk-rsv-cal-hour {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--tx-muted);
  display: flex; align-items: center; justify-content: center;
  border-right: 0.5px solid var(--border-soft);
  padding-right: 4px;
}
.lk-rsv-slot {
  background: var(--bg-card);
  border: 0.5px solid var(--border-soft);
  border-radius: 3px;
  cursor: pointer;
  min-height: 22px;
  transition: all 0.14s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}
.lk-rsv-slot[data-st="free"]:hover {
  background: var(--c-brand-muted);
  border-color: var(--c-brand-bd);
}
.lk-rsv-slot[data-st="busy"] {
  background: var(--tx-red-soft);
  border-color: color-mix(in srgb, var(--tx-red) 22%, transparent);
  cursor: not-allowed;
}
.lk-rsv-slot[data-st="busy"]::after {
  content: '×';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--tx-red);
  opacity: 0.6;
}
.lk-rsv-slot[data-st="off"] {
  background: transparent;
  border: 0.5px dashed var(--border-soft);
  cursor: not-allowed;
  opacity: 0.4;
}
.lk-rsv-slot[data-st="sel"] {
  background: var(--c-brand);
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2px var(--c-brand-muted);
  animation: lk-rsv-chip-pop 0.32s cubic-bezier(.34, 1.4, .64, 1);
}

/* Empty state */
.lk-rsv-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  background: var(--bg-surface);
  border: 0.5px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}
.lk-rsv-empty-art {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-muted);
}
.lk-rsv-empty-art svg { width: 28px; height: 28px; stroke-width: 1.5; fill: none; stroke: currentColor; }
.lk-rsv-empty-title { font-size: 13px; font-weight: 500; color: var(--tx-base); }
.lk-rsv-empty-sub   { font-size: 11px; color: var(--tx-muted); line-height: 1.4; max-width: 280px; }
.lk-rsv-empty-cta {
  margin-top: 6px;
  padding: 6px 12px;
  background: var(--c-brand);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
}
.lk-rsv-empty-cta svg { width: 11px; height: 11px; fill: none; stroke: currentColor; }

/* ═══ FOOTER ═══ */
.lk-rsv-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-top: 0.5px solid var(--border-soft);
  background: var(--bg-card);
  flex-shrink: 0;
}
.lk-rsv-footer-hint {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  color: var(--tx-muted);
  font-family: var(--font-mono);
}
.lk-rsv-footer-hint svg {
  width: 12px; height: 12px;
  stroke-width: 2;
  fill: none; stroke: currentColor;
}
.lk-rsv-footer-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--tx-dim);
  margin: 0 2px;
}

.lk-rsv-footer-acts { display: flex; gap: 8px; }
.lk-rsv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: 0.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--tx-base);
  transition: all 0.14s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  overflow: hidden;
}
.lk-rsv-btn:hover { border-color: var(--tx-dim); }
.lk-rsv-btn:active { transform: scale(0.97); }
.lk-rsv-btn svg {
  width: 12px; height: 12px;
  stroke-width: 2;
  fill: none; stroke: currentColor;
}
.lk-rsv-btn.is-primary {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
  font-weight: 600;
}
.lk-rsv-btn.is-primary:hover {
  filter: brightness(1.10);
  box-shadow: 0 4px 14px var(--c-brand-muted);
}
.lk-rsv-btn.is-primary[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}
.lk-rsv-btn.is-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
.lk-rsv-btn.is-primary:hover::before { transform: translateX(100%); }

/* ═══ A11y · prefers-reduced-motion ═══ */
@media (prefers-reduced-motion: reduce) {
  .lk-rsv-shell,
  .lk-rsv-shell *,
  .lk-rsv-shell *::before,
  .lk-rsv-shell *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}


/* FIX-RSV-DARK · summary styles + dark overrides */
/* ═══════════════════════════════════════════════════════════════════
   FIX-RSV-DARK · agregado tras fix-bus
   1. Estilos faltantes del .lk-rsv-summary (no existian en v4)
   2. Overrides de contraste para tema dark
      Tokens dark problematicos:
      - tx-dim = #5c5c5c sobre bg-surface = 3:1 ratio (ilegible)
      - c-brand-bd = c-brand-muted = rgba(139,92,246,.25) -> sin borde distinguible
      - border = rgba(255,255,255,.10) apenas visible
      - bg-surface vs bg-card: #181818 vs #1e1e1e (jerarquia minima)
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1 · SUMMARY · estilos que faltaban completamente ── */
.lk-rsv-summary {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 12px 20px;
  border-top: 0.5px solid var(--border-soft);
  background: var(--bg-surface);
  font-size: 11.5px;
  color: var(--tx-base);
  flex-shrink: 0;
}
.lk-rsv-summary-head {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600;
  color: var(--tx-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.lk-rsv-summary-head svg {
  width: 11px; height: 11px;
  stroke-width: 1.8;
  fill: none; stroke: currentColor;
  color: var(--c-brand);
}
.lk-rsv-summary-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 2px 0;
}
.lk-rsv-sl {
  font-size: 10.5px;
  color: var(--tx-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.lk-rsv-sv {
  font-size: 12px;
  color: var(--tx-base);
  font-weight: 500;
}
.lk-rsv-sv.is-empty {
  color: var(--tx-muted);
  font-style: italic;
  font-weight: 400;
}
.lk-rsv-sv-meta {
  font-size: 10.5px;
  color: var(--tx-muted);
  font-family: var(--font-mono);
  text-align: right;
}

/* ── 2 · DARK MODE · contraste mejorado ── */
[data-theme="dark"] .lk-rsv-shell .lk-rsv-flabel { color: #a0a0a0; }
[data-theme="dark"] .lk-rsv-shell .lk-rsv-footer-hint kbd { color: #a0a0a0; }

[data-theme="dark"] .lk-rsv-shell .lk-rsv-kpi {
  background: #242424;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-kpi-value.is-empty {
  opacity: 0.85;
}

[data-theme="dark"] .lk-rsv-shell .lk-rsv-chip {
  background: #262626;
  border-color: rgba(255,255,255,.15);
  color: #c0c0c0;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-chip:hover {
  background: #2e2e2e;
  border-color: rgba(255,255,255,.28);
  color: #e8e8e8;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-chip.is-active,
[data-theme="dark"] .lk-rsv-shell .lk-rsv-chip[aria-pressed="true"] {
  background: rgba(139,92,246,.20);
  border-color: #8b5cf6;
  color: #d4c4ff;
}

[data-theme="dark"] .lk-rsv-shell .lk-rsv-input,
[data-theme="dark"] .lk-rsv-shell .lk-rsv-notes {
  background: #242424;
  border-color: rgba(255,255,255,.14);
}

[data-theme="dark"] .lk-rsv-shell .lk-rsv-cal-grid {
  background: #1a1a1a;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-slot {
  background: #2a2a2a;
  border-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-slot[data-st="free"]:hover {
  background: rgba(139,92,246,.18);
  border-color: #8b5cf6;
}

[data-theme="dark"] .lk-rsv-summary {
  background: #1a1a1a;
}
[data-theme="dark"] .lk-rsv-summary-head { color: #b0b0b0; }
[data-theme="dark"] .lk-rsv-sl { color: #a0a0a0; }
[data-theme="dark"] .lk-rsv-sv-meta { color: #909090; }


/* FIX-RSV-SEG · segmented control · 2026-05-20 */
/* ═══════════════════════════════════════════════════════════════════
   FIX-RSV-SEG · estilos del segmented control que estaban huerfanos.
   
   El JS de reservas-create.js (lineas 419-450) renderiza:
     <div class="lk-rsv-seg" role="tablist">
       <button class="lk-rsv-seg-btn is-on">Visibles</button>
       <button class="lk-rsv-seg-btn">Centro de Salud</button>
     </div>
   
   pero ningun CSS definia .lk-rsv-seg-btn ni .is-on.
   Por eso los pills se veian sin estilos.
   
   Usado en: Programa, Modalidad, Duracion.
   ═══════════════════════════════════════════════════════════════════ */

.lk-rsv-shell .lk-rsv-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
}

.lk-rsv-shell .lk-rsv-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--tx-muted);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s cubic-bezier(.4, 0, .2, 1);
}

.lk-rsv-shell .lk-rsv-seg-btn svg {
  width: 12px; height: 12px;
  stroke-width: 1.8;
  fill: none; stroke: currentColor;
  flex-shrink: 0;
}

.lk-rsv-shell .lk-rsv-seg-btn:hover {
  color: var(--tx-base);
  background: var(--bg-hover);
}

.lk-rsv-shell .lk-rsv-seg-btn.is-on {
  background: var(--bg-card);
  color: var(--c-brand);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ── DARK MODE overrides ── */
[data-theme="dark"] .lk-rsv-shell .lk-rsv-seg {
  background: #141414;
  border-color: rgba(255,255,255,.10);
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-seg-btn {
  color: #a0a0a0;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-seg-btn:hover {
  color: #e8e8e8;
  background: rgba(255,255,255,.06);
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-seg-btn.is-on {
  background: rgba(139,92,246,.20);
  color: #d4c4ff;
  box-shadow: inset 0 0 0 1px #8b5cf6;
}

/* ── MIDNIGHT (mismo tratamiento que dark) ── */
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-seg {
  background: #0d0d18;
  border-color: rgba(255,255,255,.10);
}
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-seg-btn {
  color: #a0a0a0;
}
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-seg-btn.is-on {
  background: rgba(139,92,246,.22);
  color: #d4c4ff;
  box-shadow: inset 0 0 0 1px #8b5cf6;
}


/* FIX-RSV-GRAF · avatar img + sel slot dark · 2026-05-20 */
/* ═══════════════════════════════════════════════════════════════════
   FIX-RSV-GRAF · 3 bugs visuales detectados con analisis exhaustivo.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Avatar IMG sin estilos
   _avHTML retorna <img src=...> sin clase. El img desborda el .lk-rsv-avatar
   (que es 30x30 circular pero sin overflow:hidden). */
.lk-rsv-avatar {
  overflow: hidden;
}
.lk-rsv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ── 2. Slot seleccionado pisado por mi patch FIX-RSV-DARK
   Mi regla [data-theme=dark] .lk-rsv-shell .lk-rsv-slot tiene
   especificidad (0,3,1) y pisa .lk-rsv-slot[data-st="sel"] (0,2,0).
   Restauro el estado sel con la misma especificidad (0,3,2). */
[data-theme="dark"] .lk-rsv-shell .lk-rsv-slot[data-st="sel"],
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-slot[data-st="sel"] {
  background: var(--c-brand);
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2px var(--c-brand-muted);
}


/* FIX-RSV-MEGA-1779315257 · segmented + summary rediseno */
/* ═══ Segmented Apple-style ═══ */
.lk-rsv-shell .lk-rsv-seg {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.04);
  border: 0.5px solid var(--border);
  border-radius: 9px;
  width: auto; min-width: max-content;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-seg,
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-seg {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.lk-rsv-shell .lk-rsv-seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  background: transparent; border: none; border-radius: 6px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--tx-muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lk-rsv-shell .lk-rsv-seg-btn:hover:not(.is-on) {
  color: var(--tx-base); background: rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-seg-btn:hover:not(.is-on),
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-seg-btn:hover:not(.is-on) {
  background: rgba(255, 255, 255, 0.05);
}
.lk-rsv-shell .lk-rsv-seg-btn.is-on {
  background: var(--c-brand); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.lk-rsv-shell .lk-rsv-seg-btn svg {
  width: 14px; height: 14px; stroke-width: 1.8; flex-shrink: 0;
}

/* ═══ Summary 3-cards horizontales ═══ */
.lk-rsv-shell .lk-rsv-summary {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border-top: 0.5px solid var(--border);
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-summary,
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-summary {
  background: rgba(255, 255, 255, 0.02);
  border-top-color: rgba(255, 255, 255, 0.06);
}
.lk-rsv-shell .lk-rsv-summary-head {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-brand);
}
.lk-rsv-shell .lk-rsv-summary-head svg {
  width: 12px; height: 12px; stroke-width: 2;
}
.lk-rsv-shell .lk-rsv-summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.lk-rsv-shell .lk-rsv-summary-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-summary-card,
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.lk-rsv-shell .lk-rsv-summary-card-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--bbg);
  border-radius: 7px; flex-shrink: 0;
}
.lk-rsv-shell .lk-rsv-summary-card-icon svg {
  width: 14px; height: 14px; stroke-width: 1.8; color: var(--c-brand);
}
[data-theme="dark"] .lk-rsv-shell .lk-rsv-summary-card-icon,
[data-theme="midnight"] .lk-rsv-shell .lk-rsv-summary-card-icon {
  background: rgba(139, 92, 246, 0.15);
}
.lk-rsv-shell .lk-rsv-summary-card-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.lk-rsv-shell .lk-rsv-summary-card-label {
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--tx-muted);
}
.lk-rsv-shell .lk-rsv-summary-card-value {
  font-size: 12.5px; font-weight: 500; color: var(--tx-base);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lk-rsv-shell .lk-rsv-summary-card-value.is-empty {
  color: var(--tx-muted); font-weight: 400;
}
.lk-rsv-shell .lk-rsv-summary-card-meta {
  font-size: 10.5px; color: var(--tx-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .lk-rsv-shell .lk-rsv-summary-grid {
    grid-template-columns: 1fr;
  }
}
