/* Las páginas propias de call.logicai.es (reservar, panel, cancelar): el mismo mundo que logicai.es. Fondo negro con
   rejilla tenue y el resplandor verde, Archivo en los títulos, Public Sans en el texto y JetBrains Mono en etiquetas. */

.brand { font-family: var(--head); font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--violet); }
.kicker { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }
.muted { color: var(--muted); }
.hint { margin: 0; color: var(--placeholder); font-size: 13px; line-height: 1.5; }

.site { position: relative; min-height: 100dvh; overflow-x: hidden; isolation: isolate; }
.site::before { content: ''; position: fixed; inset: 0; z-index: -2; background-image: linear-gradient(rgba(242, 244, 241, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(242, 244, 241, .04) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 75%); }
.site::after { content: ''; position: fixed; left: -20vw; bottom: -30vh; z-index: -1; width: 80vw; height: 80vh; background: radial-gradient(closest-side, rgba(67, 232, 101, .16), rgba(67, 232, 101, 0)); pointer-events: none; }

.site-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1160px, 100%); margin: 0 auto; padding: 22px clamp(16px, 4vw, 32px); }
.site-top .brand { font-size: 26px; }
.site-top nav { display: flex; align-items: center; gap: 8px; }
.site-link { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.site-link:hover { color: var(--ink); background: rgba(var(--fg-rgb), .05); }
.site-foot { width: min(1160px, 100%); margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 40px; color: var(--placeholder); font-size: 13px; }
.site-foot a { color: var(--muted); }

.btn { font-family: inherit; }
.btn-primary:disabled { opacity: .5; cursor: default; translate: none; }
.btn-big { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-danger { background: #d8473c; color: #fff; }
.btn-danger:hover { background: #c23b31; }
.btn.is-small { height: 30px; padding: 0 10px; font-size: 12px; }
.btn svg, .icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.field .opt { color: var(--placeholder); font-weight: 400; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(var(--fg-rgb), .14); border-radius: 12px; background: var(--sunken); color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(67, 232, 101, .18); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.5; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--violet); }
.check a { color: var(--ink); }
.trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.error { margin: 0; padding: 10px 12px; border: 1px solid var(--danger-line); border-radius: 12px; background: var(--danger-bg); color: var(--danger-ink); font-size: 14px; }
.ok { margin: 0; padding: 10px 12px; border: 1px solid rgba(67, 232, 101, .4); border-radius: 12px; background: rgba(67, 232, 101, .08); color: var(--ink); font-size: 14px; }

/* --- Reservar --- */
.book { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 64px); align-items: start; width: min(1160px, 100%); margin: 0 auto; padding: clamp(12px, 4vh, 48px) clamp(16px, 4vw, 32px); }
.book-intro { display: grid; gap: 18px; padding-top: 12px; }
.book-intro h1 { margin: 0; font-family: var(--head); font-size: clamp(36px, 5vw, 58px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.book-intro h1 em { font-style: normal; color: var(--violet); }
.book-intro p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 46ch; }
.book-facts { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.book-facts li { display: flex; gap: 12px; align-items: center; color: var(--ink); font-size: 15px; }
.book-facts svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.book-team { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.book-team img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ground); }
.book-team p { font-size: 14px; }

.book-card { position: relative; display: grid; gap: 18px; padding: clamp(18px, 3vw, 28px); border: 1px solid rgba(var(--fg-rgb), .1); border-radius: 22px; background: rgba(17, 19, 17, .86); backdrop-filter: blur(10px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.book-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder); }
.book-steps li { flex: 1; padding-top: 8px; border-top: 2px solid var(--line); }
.book-steps li.is-on { color: var(--violet); border-color: var(--violet); }
.book-steps li.is-done { color: var(--muted); border-color: rgba(67, 232, 101, .45); }
.book-pane { display: grid; gap: 16px; }
.book-pane h2 { margin: 0; font-family: var(--head); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.book-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; }

.cal { display: grid; gap: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-family: var(--head); font-size: 16px; }
.cal-nav { display: flex; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--hairline); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: rgba(var(--fg-rgb), .06); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: 4px 0; color: var(--placeholder); font-family: var(--mono); font-size: 11px; text-align: center; text-transform: uppercase; }
.cal-day { position: relative; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--placeholder); font: inherit; font-size: 14px; font-weight: 600; }
.cal-day.has-slots { background: rgba(67, 232, 101, .08); border-color: rgba(67, 232, 101, .22); color: var(--ink); cursor: pointer; }
.cal-day.has-slots::after { content: ''; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--violet); }
.cal-day.has-slots:hover { border-color: var(--violet); }
.cal-day.is-picked { background: var(--violet); border-color: var(--violet); color: var(--accent-ink); }
.cal-day.is-picked::after { background: var(--accent-ink); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px rgba(var(--fg-rgb), .25); }
.cal-day:focus-visible { outline: 3px solid rgba(67, 232, 101, .55); outline-offset: 1px; }

.times { display: grid; gap: 10px; align-content: start; }
.times-head { margin: 0; font-weight: 700; }
.times-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; max-height: 330px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.time { min-height: 42px; border: 1px solid rgba(var(--fg-rgb), .16); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-family: var(--mono); font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.time:hover { border-color: var(--violet); }
.time.is-picked { background: var(--violet); border-color: var(--violet); color: var(--accent-ink); }
.times-empty { margin: 0; padding: 20px 0; color: var(--placeholder); font-size: 14px; }

.picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid rgba(67, 232, 101, .3); border-radius: 14px; background: rgba(67, 232, 101, .06); }
.picked b { display: block; font-size: 15px; }
.picked span { color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }

.done { display: grid; gap: 14px; justify-items: start; padding: 8px 0; }
.done-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--violet); color: var(--accent-ink); }
.done-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done h2 { font-size: 26px; }
.done p { margin: 0; color: var(--muted); line-height: 1.6; }

/* --- Cancelar / mensajes centrados --- */
.center-card { display: grid; gap: 16px; width: min(520px, calc(100% - 32px)); margin: clamp(24px, 10vh, 120px) auto; padding: 28px; border: 1px solid rgba(var(--fg-rgb), .1); border-radius: 22px; background: rgba(17, 19, 17, .9); }
.center-card h1 { margin: 0; font-family: var(--head); font-size: 26px; font-weight: 800; }
.center-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.center-card .row { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Panel --- */
.panel { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.panel-top { display: flex; align-items: center; gap: 14px; padding: 14px clamp(14px, 3vw, 28px); border-bottom: 1px solid var(--line); background: rgba(11, 12, 11, .9); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.panel-top .brand { font-size: 22px; }
.panel-tabs { display: flex; gap: 4px; margin-left: 12px; }
.panel-tab { height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.panel-tab.is-on { background: rgba(var(--fg-rgb), .08); color: var(--ink); }
.panel-user { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.panel-body { width: min(1280px, 100%); margin: 0 auto; padding: 22px clamp(14px, 3vw, 28px) 48px; display: grid; gap: 20px; align-content: start; }
.panel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.panel-bar h1 { margin: 0 auto 0 0; font-family: var(--head); font-size: 24px; font-weight: 800; }
.panel-live { display: flex; flex-wrap: wrap; gap: 10px; }
.live-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid rgba(67, 232, 101, .45); border-radius: 999px; background: rgba(67, 232, 101, .1); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.live-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 0 rgba(67, 232, 101, .6); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(67, 232, 101, 0); } 100% { box-shadow: 0 0 0 0 rgba(67, 232, 101, 0); } }

.week { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--raised); }
.week-head { padding: 10px 8px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.week-head b { display: block; font-family: var(--head); font-size: 20px; color: var(--ink); }
.week-head.is-today b { color: var(--violet); }
.week-corner { border-bottom: 1px solid var(--line); }
.week-hours { position: relative; }
.week-hour { position: absolute; right: 8px; translate: 0 -50%; font-family: var(--mono); font-size: 11px; color: var(--placeholder); }
.week-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour-h, 56px); }
.week-free { position: absolute; left: 0; right: 0; background: rgba(67, 232, 101, .045); border-left: 2px solid rgba(67, 232, 101, .35); pointer-events: none; }
.week-block { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(var(--fg-rgb), .06) 0 6px, transparent 6px 12px); pointer-events: none; }
.week-event { position: absolute; left: 3px; right: 3px; display: grid; align-content: start; gap: 0; overflow: hidden; padding: 3px 6px; border: 0; border-left: 3px solid var(--violet); border-radius: 8px; background: color-mix(in srgb, var(--violet) 22%, var(--panel)); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.25; text-align: left; cursor: pointer; }
.week-event b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-event span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-event.is-cancelled { border-left-color: var(--placeholder); background: rgba(var(--fg-rgb), .04); color: var(--placeholder); text-decoration: line-through; }
.week-event.is-adhoc { border-left-color: #8ff3a4; background: rgba(143, 243, 164, .1); }
.week-event.is-live { box-shadow: 0 0 0 1px var(--violet); }
.week-now { position: absolute; left: 0; right: 0; height: 2px; background: #d8473c; z-index: 2; pointer-events: none; }

.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.side-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--raised); }
.side-card h2 { margin: 0; font-family: var(--head); font-size: 16px; font-weight: 800; }
.up-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.up-item { display: grid; width: 100%; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.up-item:hover { border-color: rgba(67, 232, 101, .4); }
.up-item b { font-size: 14px; }
.up-item span { color: var(--muted); font-size: 12.5px; }

.drawer { position: fixed; inset: 0 0 0 auto; z-index: 20; width: min(520px, 100%); display: grid; grid-template-rows: auto 1fr; border-left: 1px solid var(--line); background: var(--ground); box-shadow: -30px 0 80px rgba(0, 0, 0, .45); animation: drawer-in .25s var(--ease-out) both; }
@keyframes drawer-in { from { translate: 30px 0; opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--head); font-size: 19px; font-weight: 800; }
.drawer-body { overflow-y: auto; padding: 18px 20px 32px; display: grid; gap: 16px; align-content: start; }
.facts { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.facts div { display: grid; gap: 2px; padding: 10px 14px; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder); }
.facts dd { margin: 0; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.facts a { color: var(--violet-soft); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.rules { display: grid; gap: 10px; }
.rule-day { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.rule-day:first-child { border-top: 0; }
.rule-day > b { padding-top: 7px; font-size: 14px; }
.rule-ranges { display: grid; gap: 6px; }
.rule-range { display: flex; align-items: center; gap: 6px; }
.rule-range .input { width: 110px; min-height: 36px; padding: 6px 10px; font-family: var(--mono); font-size: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.blocks-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.blocks-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }

.login { display: grid; gap: 16px; width: min(400px, calc(100% - 32px)); margin: clamp(32px, 14vh, 160px) auto; padding: 30px; border: 1px solid rgba(var(--fg-rgb), .1); border-radius: 22px; background: rgba(17, 19, 17, .92); }
.login .brand { font-size: 30px; }
.login h1 { margin: 0; font-family: var(--head); font-size: 22px; font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; translate: -50% 0; max-width: min(520px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--pop); color: var(--ink); font-size: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }

.guest-brand .brand { font-size: 22px; }
.guest-brand-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--placeholder); }

.prose { width: min(760px, calc(100% - 32px)); margin: 24px auto 60px; color: var(--muted); line-height: 1.7; }
.prose h1 { color: var(--ink); font-family: var(--head); font-size: 34px; }
.prose h2 { color: var(--ink); font-family: var(--head); font-size: 20px; margin-top: 28px; }
.prose a { color: var(--violet-soft); }

@media (max-width: 980px) {
  .book { grid-template-columns: minmax(0, 1fr); }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .book-split, .form-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .book-intro h1 { font-size: 36px; }
  .panel-tabs { margin-left: 0; }
  .panel-user span { display: none; }
  .week { grid-template-columns: 40px repeat(7, minmax(44px, 1fr)); overflow-x: auto; }
  .rule-day { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.panel-loading { padding: 24px; }

/* Rejilla de la semana: las posiciones van en variables CSS (la política de contenido no deja estilos en línea). */
.week-scroll { grid-column: 1 / -1; max-height: min(72vh, 820px); overflow-y: auto; scrollbar-width: thin; }
.week-rows { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.week-hour, .week-free, .week-block, .week-event, .week-now { top: var(--top, 0); }
.week-free, .week-block, .week-event { height: var(--h, 0); }
.panel-side { display: grid; gap: 20px; align-content: start; }
@media (max-width: 640px) { .week-rows { grid-template-columns: 40px repeat(7, minmax(44px, 1fr)); } }
