/* ===== Dyrcita · sistema de diseño =====
   Cada negocio personaliza --brand (botones y acentos) y --header (cabecera) desde su panel. */
:root {
  --brand: #6d4aff; --brand-ink: #ffffff; --header: #1c2230; --header-ink: #ffffff;
  --brand-strong: color-mix(in srgb, var(--brand) 82%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 11%, var(--card));
  --bg: #f3f4f8; --card: #ffffff; --text: #151a24; --muted: #667085; --line: #e5e7ee; --soft: #f0f1f6;
  --ok: #0e7a55; --ok-bg: #e0f5ec; --err: #b42318; --err-bg: #fde9e6; --info: #2a4bb5; --info-bg: #e5ecff;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 28px -14px rgba(16,24,40,.18);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218; --card: #181c25; --text: #eceff5; --muted: #98a2b3; --line: #2a303d; --soft: #202531;
    --ok: #5fd3a5; --ok-bg: #12332a; --err: #ff8f82; --err-bg: #3a1a17; --info: #9db4ff; --info-bg: #1b2547;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased;
  font: 16px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif; }
a { color: var(--brand-strong); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { a { color: color-mix(in srgb, var(--brand) 60%, #fff); } }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 72px; }
main.wide { max-width: 1040px; }
h1 { font-size: 1.65rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 6px; }
h2 { font-size: 1.1rem; letter-spacing: -.01em; margin: 0 0 14px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Cabecera de marca ----- */
.hero { background: var(--header); color: var(--header-ink); }
.hero-inner { max-width: 760px; margin: 0 auto; padding: 28px 16px 56px; display: flex; gap: 16px; align-items: center; }
.hero.compact .hero-inner { padding: 14px 16px; max-width: 1040px; }
.hero h1 { color: var(--header-ink); margin: 0; }
.hero p, .hero .small { color: color-mix(in srgb, var(--header-ink) 78%, transparent); margin: 2px 0 0; }
.hero a { color: inherit; }
.hero button { background: color-mix(in srgb, var(--header-ink) 14%, transparent); color: var(--header-ink); border-color: color-mix(in srgb, var(--header-ink) 28%, transparent); }
.hero button:hover { background: color-mix(in srgb, var(--header-ink) 22%, transparent); }
.logo-tile { flex: none; width: 64px; height: 64px; border-radius: 16px; background: #fff; display: grid; place-items: center;
  overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-tile.initial { background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; }
.hero.compact .logo-tile { width: 44px; height: 44px; border-radius: 12px; font-size: 1.1rem; }
.pull-up { margin-top: -32px; position: relative; }

/* ----- Tarjetas y formularios ----- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
label { display: block; font-size: .8125rem; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
input, select, textarea { width: 100%; padding: 11px 13px; font: inherit; color: inherit; background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--muted)); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); padding: 0; }
input[type=color] { padding: 3px; height: 44px; cursor: pointer; }
button { font: inherit; font-weight: 600; font-size: .9375rem; cursor: pointer; padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--muted)); background: var(--card); color: var(--text);
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; }
button:hover { background: var(--soft); }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
button.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
button.danger { color: var(--err); } button.danger:hover { background: var(--err-bg); }
button.lg { padding: 13px 22px; font-size: 1rem; width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; } .row > * { flex: 1 1 150px; }
.row.tight > * { flex: 0 0 auto; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.msg { display: none; padding: 11px 14px; border-radius: var(--radius-sm); margin: 14px 0; font-size: .9375rem; }
.msg.show { display: block; } .msg.err { background: var(--err-bg); color: var(--err); } .msg.ok { background: var(--ok-bg); color: var(--ok); }

/* ----- Reserva: pasos ----- */
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-head h2 { margin: 0; }
.step-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8125rem;
  font-weight: 700; background: var(--brand-soft); color: var(--brand-strong); }
@media (prefers-color-scheme: dark) { .step-num { color: color-mix(in srgb, var(--brand) 60%, #fff); } }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.option { text-align: left; padding: 14px; display: flex; flex-direction: column; gap: 2px; border-radius: var(--radius-sm); }
.option strong { font-weight: 650; }
.option.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.price { font-weight: 650; color: var(--text); }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px; scrollbar-width: thin; }
.day { flex: none; min-width: 62px; padding: 9px 6px; text-align: center; line-height: 1.25; }
.day small { display: block; font-weight: 500; color: var(--muted); text-transform: uppercase; font-size: .6875rem; letter-spacing: .04em; }
.day b { display: block; font-size: 1.15rem; }
.day.sel { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.day.sel small { color: color-mix(in srgb, var(--brand-ink) 75%, transparent); }
.slot-group { margin-top: 14px; }
.slot-group h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slots button { padding: 9px 4px; font-variant-numeric: tabular-nums; }
.slots button.sel { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.summary { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 4px; font-size: .9375rem; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }

/* ----- Panel ----- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 20px 0 12px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); padding: 10px 14px; }
.tabs button:hover { color: var(--text); background: none; }
.tabs button.on { border-bottom-color: var(--brand); color: var(--text); }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 650; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.confirmed { background: var(--info-bg); color: var(--info); } .badge.completed { background: var(--ok-bg); color: var(--ok); }
.badge.cancelled, .badge.no_show { background: var(--err-bg); color: var(--err); }
.hours { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; align-items: center; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.drop { border: 2px dashed color-mix(in srgb, var(--line) 60%, var(--muted)); border-radius: var(--radius); padding: 18px; display: flex; gap: 16px; align-items: center; background: var(--soft); }
.drop .logo-tile { width: 84px; height: 84px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.color-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.preview .hero-inner { padding: 16px; } .preview .hero h1 { font-size: 1.1rem; }
.preview-body { padding: 14px; display: grid; gap: 10px; }
.preview .slots { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1fr; gap: 16px; } @media (min-width: 820px) { .split { grid-template-columns: 1.1fr 1fr; align-items: start; } }

@media (max-width: 640px) {
  main { padding-top: 16px; } .hero-inner { padding: 20px 16px 48px; }
  .logo-tile { width: 56px; height: 56px; } h1 { font-size: 1.4rem; }
  .card { padding: 16px; }
  /* tablas como tarjetas en móvil */
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack td { display: block; padding: 3px 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
