/* VendixApp · sistema visual compartido (panel, acceso, formularios)
   Paleta tomada del logo: azul eléctrico, violeta, magenta, tinta índigo y blanco. */
:root {
  --blue: #1F5BFF;
  --violet: #7B2FF0;
  --magenta: #C21CF0;
  --ink: #13163F;
  --night: #0A0B2A;
  --night-2: #12143A;
  --paper: #F4F5FC;
  --surface: #FFFFFF;
  --line: #E1E3F2;
  --muted: #5F6390;
  --text: #13163F;
  --ok: #0F9D6B;
  --warn: #C77700;
  --danger: #D9304F;
  --grad: linear-gradient(120deg, var(--blue) 0%, var(--violet) 58%, var(--magenta) 100%);
  --ring: 0 0 0 3px rgba(31, 91, 255, .28);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0A0B2A;
  --surface: #14163D;
  --line: #262A5C;
  --muted: #9EA2D0;
  --text: #ECEDFF;
  --ink: #ECEDFF;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0B2A; --surface: #14163D; --line: #262A5C; --muted: #9EA2D0; --text: #ECEDFF; --ink: #ECEDFF;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--paper); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.ico { flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.15rem;
  border-radius: var(--r-sm); border: 1px solid transparent; font: 600 .95rem/1 var(--font-body); cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -8px rgba(91, 47, 240, .7); }
.btn-primary:hover { box-shadow: 0 10px 24px -10px rgba(91, 47, 240, .9); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); }
.btn-soft { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); color: var(--blue); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-wa { background: #1DA851; color: #fff; }
.btn-sm { min-height: 36px; padding: .4rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Formularios */
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: .65rem .85rem; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 500 1rem var(--font-body); }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.is-invalid .input, .input.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; margin: .3rem 0 0; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--violet); margin-top: 2px; flex: none; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pwd-wrap { position: relative; }
.pwd-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 8px; cursor: pointer; }
.hp { position: absolute; left: -9999px; }

/* Alertas */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r-md); margin-bottom: 1rem; font-size: .93rem;
  border: 1px solid transparent; }
.alert-success { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-info { background: color-mix(in srgb, var(--blue) 9%, var(--surface)); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.alert .btn { margin-left: auto; }

/* Insignias de estado */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-trial { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.b-active { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.b-expired { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.b-suspended, .b-disabled { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.b-neutral, .b-replaced, .b-cancelled { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }

/* Superficies */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.stack { display: grid; gap: 1rem; }
.split { display: grid; gap: 1rem; }
@media (min-width: 1000px) { .split { grid-template-columns: 1.6fr 1fr; align-items: start; } .split.even { grid-template-columns: 1fr 1fr; } }

/* Tablas: en móvil cada fila se vuelve una tarjeta */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 700; color: var(--muted); font-size: .8rem; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.table td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a.row-link { color: var(--text); font-weight: 700; text-decoration: none; }
.table a.row-link:hover { color: var(--blue); }
@media (max-width: 760px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .table.responsive td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .2rem 0; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; }
  .table.responsive td:first-child { display: block; text-align: left; }
  .table.responsive td:first-child::before { display: none; }
}
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty .ico { margin: 0 auto .6rem; color: var(--violet); }

/* ===== Layout del panel ===== */
.app { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .app { grid-template-columns: 264px 1fr; } }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; background: var(--night); color: #C9CBF2; display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .22s ease; z-index: 50; padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0); }
.sidebar.open { transform: none; }
@media (min-width: 1024px) { .sidebar { position: sticky; top: 0; height: 100vh; width: auto; transform: none; } }
.sidebar-brand { display: flex; align-items: center; padding: 1.1rem 1.2rem .9rem; }
.sidebar-brand img { height: 34px; width: auto; }
.sidebar-biz { margin: 0 .9rem .6rem; padding: .7rem .8rem; border-radius: var(--r-md); background: var(--night-2); display: flex; align-items: center; gap: .65rem; }
.sidebar-biz .avatar { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--grad); color: #fff; display: grid; place-items: center; font: 700 1rem var(--font-display); flex: none; }
.sidebar-biz strong { color: #fff; font-size: .9rem; display: block; line-height: 1.25; }
.sidebar-biz span { font-size: .75rem; color: #9093C8; }
.nav { flex: 1; overflow-y: auto; padding: .3rem .7rem 1rem; }
.nav-group { font-size: .72rem; color: #7174AE; padding: .9rem .6rem .35rem; font-weight: 700; }
.nav a, .nav .nav-disabled { display: flex; align-items: center; gap: .7rem; padding: .62rem .7rem; border-radius: var(--r-sm); color: #C9CBF2; text-decoration: none;
  font-weight: 600; font-size: .92rem; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(123, 47, 240, .22); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -.7rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.nav .nav-disabled { opacity: .45; cursor: default; }
.nav .tag { margin-left: auto; font-size: .66rem; padding: .1rem .45rem; border-radius: 6px; background: rgba(255, 255, 255, .08); color: #B4B7E8; font-weight: 700; }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--magenta); color: #fff; font-size: .72rem; display: grid; place-items: center; padding: 0 6px; }
.sidebar-foot { padding: .8rem .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar-foot form { margin: 0; }
.sidebar-foot button { width: 100%; justify-content: flex-start; color: #C9CBF2; background: none; border: 0; }
.scrim { position: fixed; inset: 0; background: rgba(5, 6, 25, .55); z-index: 40; display: none; }
.scrim.show { display: block; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; padding-top: calc(.7rem + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) { .topbar { padding: .9rem 2rem; } .menu-btn { display: none !important; } }
.topbar h1 { font-size: 1.15rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: inline-grid; place-items: center; cursor: pointer; position: relative; text-decoration: none; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); border: 2px solid var(--surface); }
.content { padding: 1.1rem 1rem 6rem; width: 100%; max-width: 1240px; }
@media (min-width: 1024px) { .content { padding: 1.6rem 2rem 3rem; } }
.page-intro { margin-bottom: 1.2rem; }
.page-intro p { color: var(--muted); max-width: 64ch; margin: 0; }

/* Tarjetas de indicadores */
.kpis { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .95rem 1rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; text-decoration: none; color: inherit; }
.kpi .k-label { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.kpi .k-label .ico { color: var(--violet); }
.kpi .k-value { font: 700 1.6rem/1.1 var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.kpi .k-foot { font-size: .78rem; color: var(--muted); }
.kpi.hero { background: var(--grad); border: 0; color: #fff; grid-column: span 2; }
.kpi.hero .k-label, .kpi.hero .k-foot, .kpi.hero .k-label .ico { color: rgba(255, 255, 255, .85); }
.kpi.hero .k-value { color: #fff; font-size: 2rem; }

/* Barras simples (sin librerías) */
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 150px; padding-top: .5rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 42px; border-radius: 8px 8px 4px 4px; background: var(--grad); min-height: 4px; }
.bars .bar span { font-size: .72rem; color: var(--muted); }
.bars .bar b { font-size: .75rem; }
.meter { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .done { color: var(--ok); }
.list .todo { color: var(--line); }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--violet); }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.toolbar .input { width: auto; flex: 1 1 200px; min-height: 42px; }
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--text); padding: 0 .6rem; }
.pager span.cur { background: var(--grad); color: #fff; border: 0; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; font-size: .92rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

dialog.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100% - 2rem)); background: var(--surface); color: var(--text); }
dialog.modal::backdrop { background: rgba(5, 6, 25, .6); }
.modal-body { padding: 1.4rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }

.hours-row { display: grid; grid-template-columns: 110px 1fr 1fr; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.hours-row .input { min-height: 40px; }
.img-pick { display: flex; gap: 1rem; align-items: center; }
.img-pick .thumb { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: var(--paper); border: 1px dashed var(--line); flex: none; display: grid; place-items: center; color: var(--muted); }
.img-pick .thumb.wide { width: 150px; }

/* ===== Pantallas de acceso ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--paper); }
@media (min-width: 980px) { .auth { grid-template-columns: 1fr 1.05fr; } }
.auth-art { display: none; position: relative; overflow: hidden; background: var(--night); color: #fff; padding: 3rem; }
@media (min-width: 980px) { .auth-art { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-art::after { content: ""; position: absolute; width: 620px; height: 620px; right: -220px; bottom: -260px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(194, 28, 240, .55), rgba(31, 91, 255, .25) 50%, transparent 70%); }
.auth-art .verbs { font: 800 clamp(2.6rem, 4.6vw, 4.2rem)/1.02 var(--font-display); letter-spacing: -.035em; position: relative; z-index: 1; }
.auth-art .verbs span { display: block; }
.auth-art .verbs span:nth-child(2) { color: #8FB0FF; }
.auth-art .verbs span:nth-child(3) { background: linear-gradient(90deg, #B98CFF, #F07CFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: #B9BCEB; max-width: 36ch; position: relative; z-index: 1; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 2rem 1.2rem 3rem; }
.auth-card { width: 100%; max-width: 460px; margin: 0 auto; }
.auth-card.wide { max-width: 720px; }
.auth-logo { height: 42px; width: auto; margin-bottom: 1.6rem; }
.auth-card h1 { font-size: 1.6rem; }
.auth-card .lead { color: var(--muted); margin-bottom: 1.4rem; }
.auth-foot { margin-top: 1.4rem; text-align: center; color: var(--muted); font-size: .92rem; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}

.plan-pick { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .plan-pick { grid-template-columns: repeat(3, 1fr); } }
.plan-pick label { border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem .9rem; cursor: pointer; background: var(--surface); display: block; }
.plan-pick input { position: absolute; opacity: 0; }
.plan-pick input:checked + label { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet) inset; }
.plan-pick input:focus-visible + label { box-shadow: var(--ring); }
.plan-pick strong { font-family: var(--font-display); display: block; }
.plan-pick span { font-size: .82rem; color: var(--muted); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .8rem; }
.steps li { counter-increment: s; display: flex; gap: .8rem; align-items: flex-start; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font: 700 .85rem var(--font-display); display: grid; place-items: center; flex: none; }

.qr-box { background: #fff; padding: 14px; border-radius: 16px; display: inline-block; border: 1px solid var(--line); }
.copy-row { display: flex; gap: .5rem; }
.copy-row .input { font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Logos: nunca se estiran dentro de contenedores flex */
.auth-art > img { align-self: flex-start; width: auto !important; max-width: 260px; height: 40px; object-fit: contain; }
.auth-logo, .sidebar-brand img { width: auto; max-width: 100%; object-fit: contain; }

/* ===== Fase 2: agenda ===== */
.b-progress { color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, transparent); }
.agenda-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.agenda-bar .date-nav { display: flex; align-items: center; gap: .3rem; }
.agenda-bar .date-label { font: 700 1.05rem var(--font-display); margin: 0 .4rem; }
.agenda-bar .input { width: auto; min-height: 42px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.seg a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .88rem; }
.seg a.on { background: var(--ink); color: var(--paper); }
.grow-1 { flex: 1; }

.cal-day { --ppm: 1.4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; max-height: calc(100vh - 210px); }
.cal-grid { display: grid; position: relative; min-width: max-content; }
.cal-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); padding: .6rem .5rem; font-weight: 700; font-size: .88rem;
  display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.cal-head .dotc { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cal-head.corner { left: 0; z-index: 4; }
.cal-times { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.cal-times span { position: absolute; right: 8px; font-size: .72rem; color: var(--muted); transform: translateY(-50%); }
.cal-col { position: relative; border-right: 1px solid var(--line); min-width: 170px; }
.cal-col:last-child { border-right: 0; }
.cal-col .hl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.cal-col .hl.half { border-top-style: dashed; opacity: .55; }
.cal-col .slot-link { position: absolute; left: 0; right: 0; display: block; z-index: 0; }
.cal-col .slot-link:hover { background: color-mix(in srgb, var(--blue) 7%, transparent); }
.ev { position: absolute; left: 4px; right: 4px; z-index: 1; border-radius: 10px; padding: .35rem .5rem; overflow: hidden; text-decoration: none; color: #fff;
  font-size: .78rem; line-height: 1.25; border-left: 4px solid rgba(0,0,0,.25); box-shadow: 0 2px 6px -3px rgba(0,0,0,.4); }
.ev b { display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev small { opacity: .9; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.pending { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.ev.cancelled, .ev.no_show { opacity: .45; text-decoration: line-through; }
.ev.completed { filter: saturate(.45); }
.ev .tag-online { position: absolute; top: 4px; right: 5px; font-size: .62rem; background: rgba(255,255,255,.25); padding: 0 .3rem; border-radius: 4px; }
.blk { position: absolute; left: 0; right: 0; z-index: 1; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--muted) 16%, transparent) 0 6px, transparent 6px 12px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .72rem; color: var(--muted); padding: .2rem .4rem; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--magenta); z-index: 2; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--magenta); }

.week { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .6rem; min-height: 120px; }
.week-day.today { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.week-day h3 { font-size: .88rem; display: flex; justify-content: space-between; margin-bottom: .5rem; }
.week-day h3 a { color: inherit; text-decoration: none; }
.chip-ev { display: block; border-left: 4px solid; border-radius: 8px; padding: .35rem .5rem; margin-bottom: .35rem; background: var(--paper); text-decoration: none; color: var(--text); font-size: .8rem; line-height: 1.3; }
.chip-ev b { display: block; }
.chip-ev.cancelled { opacity: .5; text-decoration: line-through; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .dow { text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; padding: .3rem 0; }
.month a.mday { min-height: 78px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .35rem .45rem; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: .2rem; }
.month a.mday.out { opacity: .4; }
.month a.mday.today { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.month .mday b { font-size: .85rem; }
.month .mday .cnt { margin-top: auto; font-size: .72rem; font-weight: 800; color: #fff; background: var(--grad); border-radius: 6px; padding: .1rem .35rem; align-self: flex-start; }
@media (max-width: 600px) { .month a.mday { min-height: 54px; } .month .mday .cnt { font-size: .66rem; } }

.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: .45rem; }
.slots-grid button { min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 700 .92rem var(--font-body); cursor: pointer; }
.slots-grid button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 4px; box-shadow: 0 16px 30px -18px rgba(0,0,0,.4); overflow: hidden; }
.suggest-list button { display: block; width: 100%; text-align: left; padding: .6rem .8rem; border: 0; background: none; color: var(--text); cursor: pointer; font: 500 .92rem var(--font-body); }
.suggest-list button:hover, .suggest-list button:focus { background: var(--paper); }
.sched-day { display: grid; grid-template-columns: 110px 1fr; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.sched-day .rows { display: grid; gap: .4rem; }
.sched-day .row { display: flex; gap: .4rem; align-items: center; }
.sched-day .row .input { min-height: 40px; max-width: 130px; }
.swatches { display: flex; gap: .4rem; flex-wrap: wrap; }
.swatches label { width: 34px; height: 34px; border-radius: 10px; cursor: pointer; position: relative; }
.swatches input { position: absolute; opacity: 0; }
.swatches input:checked + span { position: absolute; inset: -3px; border: 3px solid var(--ink); border-radius: 12px; }
.checks-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.avatar-sm { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; color: #fff; font: 700 .95rem var(--font-display); flex: none; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ===== Alerta de reserva ===== */
.vxa { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(6, 7, 30, .62); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s; }
.vxa.on { opacity: 1; }
.vxa[hidden] { display: none; }
.vxa-card { width: min(440px, 100%); background: var(--surface); color: var(--text); border-radius: 28px; padding: 1.8rem 1.5rem 1.4rem; text-align: center; position: relative;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); transform: scale(.9) translateY(12px); transition: transform .28s cubic-bezier(.2,1.4,.4,1); overflow: hidden; }
.vxa.on .vxa-card { transform: none; }
.vxa-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--grad); }
.vxa-ring { width: 84px; height: 84px; margin: .2rem auto 1rem; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; position: relative; }
.vxa-ring::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--magenta); animation: vxaPulse 1.4s ease-out infinite; }
.vxa-ring .ico { animation: vxaRing 1.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes vxaPulse { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@keyframes vxaRing { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-16deg); } 20%, 40% { transform: rotate(16deg); } }
.vxa-title { font-size: 1.7rem; font-weight: 800; margin-bottom: .6rem; letter-spacing: -.02em; }
.vxa-customer { font: 700 1.3rem var(--font-display); margin: 0 0 .3rem; color: var(--ink); }
.vxa-when { display: inline-block; font: 800 1.1rem var(--font-display); background: color-mix(in srgb, var(--violet) 12%, var(--surface)); color: var(--violet);
  padding: .4rem .9rem; border-radius: 12px; margin: .3rem 0 .6rem; }
.vxa-service { margin: 0 0 .2rem; font-weight: 600; }
.vxa-staff { margin: 0; color: var(--muted); font-size: .9rem; }
.vxa-staff::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--violet)); margin-right: .4rem; }
.vxa-actions { display: grid; gap: .5rem; margin-top: 1.3rem; }
.vxa-actions .btn { min-height: 52px; font-size: 1.02rem; }
.vxa-more { margin: .7rem 0 0; font-size: .82rem; color: var(--muted); }
.vxa-card.booking-cancelled .vxa-ring, .vxa-card.booking-cancelled::before { background: linear-gradient(120deg, #D9304F, #F06A3A); }
.vxa-card.booking-cancelled .vxa-ring::after { border-color: #D9304F; }
.vxa-card.booking-cancelled .vxa-when { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .vxa-ring::after, .vxa-ring .ico { animation: none; } }

.alert-setup { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; border-color: color-mix(in srgb, var(--violet) 35%, var(--line)); }
.alert-setup .as-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.alert-setup .as-body { flex: 1; min-width: 0; }
.alert-setup h2 { margin-bottom: .2rem; }
.alert-setup[data-state="on"] { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.alert-setup[data-state="on"] .as-ico { background: var(--ok); }
