/* ===== Barberia · estilos (turnos) ===== */
:root {
  --bg: #F3F1EE;
  --paper: #FFFFFF;
  --ink: #1F1B18;
  --ink-2: #3A332D;
  --muted: #7A7068;
  --line: #E4DED6;
  --accent: #A44A26;
  --accent-ink: #fff;
  --accent-soft: #F5E4DA;
  --olive: #4F6B3A;
  --gold: #C9962F;
  --table: #2A2420;
  --mp: #009EE3;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(31, 27, 24, .06), 0 8px 24px rgba(31, 27, 24, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
a { color: inherit; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .9rem; }
[hidden] { display: none !important; }

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px); background: rgba(243, 241, 238, .88);
  backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.tagline { color: var(--muted); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 40px 16px 110px; color: var(--muted); font-size: .85rem; }
.foot-credit { opacity: .7; margin-left: 8px; }

/* ---- hero ---- */
.hero {
  position: relative; color: #FBF4EA; padding: clamp(48px, 9vw, 110px) clamp(20px, 6vw, 72px) clamp(56px, 8vw, 96px);
  background:
    linear-gradient(100deg, rgba(30, 17, 10, .92) 0%, rgba(30, 17, 10, .72) 45%, rgba(30, 17, 10, .25) 100%),
    url("https://images.unsplash.com/photo-1764436988814-4eff7322ee9c?w=1800&q=70&auto=format&fit=crop") center/cover no-repeat, #2b1a12;
}
.hero-inner { max-width: 620px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; margin: 0 0 12px; opacity: .85; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 500; }
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 500; }
.hero-sub { font-size: 1.08rem; max-width: 520px; opacity: .9; margin: 18px 0 26px; }
.steps-mini { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; font-size: .92rem; }
.steps-mini li { display: flex; align-items: center; gap: 8px; }
.steps-mini span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 700; font-size: .8rem; }

.notice { max-width: 1240px; margin: 20px auto; padding: 14px 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.notice-warn { background: #FFF4DC; border-color: #F0D79B; }

/* ---- layout armador ---- */
.builder {
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; align-items: start;
  max-width: 1320px; margin: -36px auto 0; padding: 0 clamp(16px, 3vw, 32px); position: relative;
}
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow); margin-bottom: 24px; }
.step h2 { font-size: 1.45rem; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.step-hint { color: var(--muted); margin: 0 0 14px; font-size: .92rem; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--sans); font-size: .95rem; flex: none; }

/* tamaños */
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.size-card {
  display: grid; gap: 2px; justify-items: start; text-align: left; padding: 16px 18px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 16px; background: #fff; font: inherit; color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.size-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.size-card.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(142, 42, 42, .12); }
.size-shape svg { width: 52px; height: 34px; fill: #C08A57; stroke: #8A5630; stroke-width: 2; margin-bottom: 6px; }
.size-card.is-active .size-shape svg { fill: #B97F4C; }
.size-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.size-people { font-weight: 500; }
.size-meta, .size-price { color: var(--muted); font-size: .86rem; }

/* catálogo */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 6px; scrollbar-width: none; position: sticky; top: 61px; z-index: 5; background: linear-gradient(var(--paper) 80%, transparent); }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: .92rem; transition: background .2s; }
.cat-tab:hover { background: var(--accent-soft); border-color: #E4C3BB; }

.cat { margin-top: 18px; }
.cat-head { position: relative; display: flex; align-items: flex-end; min-height: 52px; margin-bottom: 14px; border-radius: 14px; overflow: hidden; }
.cat-head h3 { font-size: 1.35rem; position: relative; z-index: 1; }
.cat-head.has-photo { min-height: 110px; padding: 16px 18px; }
.cat-head.has-photo h3 { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.cat-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.cat-head.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30, 17, 10, .7), rgba(30, 17, 10, .05) 70%); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.product {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product.in-cart { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(95, 111, 46, .14); }
.pc-media { position: relative; height: 128px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #FBF4E8, #F1E6D4); }
.pc-media svg { width: 104px; height: 104px; filter: drop-shadow(0 4px 6px rgba(43, 26, 18, .15)); }
.pc-media.has-photo svg { display: none; }
.pc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-check { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--olive); color: #fff; font-weight: 700; font-size: .9rem; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.pc-body h3 { font-size: 1.06rem; }
.pc-body p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.pc-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pc-price { font-weight: 700; }
.pc-price small { color: var(--muted); font-weight: 400; }
.pc-actions { display: flex; align-items: center; gap: 6px; }

/* botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 600 .98rem var(--sans); padding: 12px 20px; border-radius: 999px; transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: #8A3C1D; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-block { width: 100%; }
.btn-add { padding: 8px 16px; font-size: .9rem; background: var(--ink); color: #fff; }
.btn-add:hover:not(:disabled) { background: var(--accent); }
.btn-mp { background: var(--mp); color: #fff; font-size: 1.05rem; padding: 15px 20px; }
.btn-mp:hover:not(:disabled) { background: #0089C6; }
.btn.loading { position: relative; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .8s linear infinite; }
.icon-btn { border: 0; background: transparent; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); font-size: .95rem; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; font: inherit; font-size: .9rem; }

.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); }
.qty button { border: 0; background: transparent; padding: 5px 10px; border-radius: 999px; cursor: pointer; font: 500 .8rem var(--sans); color: var(--muted); }
.qty button.on { background: var(--olive); color: #fff; }

/* ---- panel lateral / tabla ---- */
.builder-main, .builder-side { min-width: 0; }
.builder-side { position: sticky; top: 76px; }
.board-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.board-head h2 { font-size: 1.3rem; }
.board-head .muted { font-family: var(--sans); font-size: .85rem; }
.board-wrap {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 640 / 460;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .07), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 6px),
    var(--table);
}
#board { width: 100%; height: 100%; display: block; }
.board-empty { position: absolute; inset: auto 0 18px; margin: 0; text-align: center; color: #F4E6D3; font-size: .92rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); pointer-events: none; }
.cluster-in { transform-box: fill-box; transform-origin: center; }
.cluster.pop .cluster-in { animation: pop .55s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { 0% { transform: scale(.2) translateY(-30px); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 6px; border-radius: 999px; background: var(--line); margin: 14px 0 6px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--olive), var(--gold)); border-radius: inherit; transition: width .35s ease; }
.counter { margin: 0 0 8px; font-size: .88rem; color: var(--muted); }

.summary { list-style: none; padding: 0; margin: 0 0 10px; max-height: 240px; overflow: auto; }
.summary li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.summary em { color: var(--olive); font-style: normal; font-weight: 700; font-size: .82rem; }
.sum-price { font-variant-numeric: tabular-nums; }
.summary-static { max-height: none; text-align: left; margin: 22px 0 12px; }
.summary-static li { grid-template-columns: 1fr auto; }
.summary-static .sum-head { font-weight: 600; }
.summary-static .sum-total { font-weight: 700; font-size: 1.08rem; border-bottom: 0; padding-top: 10px; }

.totals { margin: 6px 0 14px; }
.totals > div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .total { font-size: 1.25rem; font-weight: 700; padding-top: 8px; }
.totals .total dt { color: var(--ink); font-family: var(--serif); }
.fine { color: var(--muted); font-size: .8rem; text-align: center; margin: 10px 0 0; }

/* ---- barra móvil ---- */
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .builder { grid-template-columns: minmax(0, 1fr); margin-top: -28px; }
  .builder-side { position: static; }
  .mobile-bar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 8px;
    background: var(--ink); color: #fff; border-radius: 999px; box-shadow: 0 12px 30px rgba(43, 26, 18, .35);
  }
  .mobile-bar .btn { padding: 10px 16px; font-size: .9rem; }
  .mb-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .mini-board { width: 62px; height: 44px; flex: none; border-radius: 8px; background: var(--table); }
  .mb-count { font-size: .78rem; opacity: .75; }
  .mb-total { font-weight: 700; font-size: 1.1rem; }
  .mobile-bar.bump { animation: bump .45s ease; }
  .cat-tabs { top: 57px; }
}
@keyframes bump { 30% { transform: scale(1.04); } 60% { transform: scale(.98); } }
@media (max-width: 520px) {
  .products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pc-media { height: 100px; }
  .pc-media svg { width: 84px; height: 84px; }
  .pc-body { padding: 10px; }
  .pc-body p { display: none; }
  .pc-foot { flex-direction: column; align-items: stretch; }
  .pc-actions { justify-content: space-between; flex-wrap: nowrap; gap: 4px; }
  .pc-actions .qty { flex: 1; display: flex; }
  .pc-actions .qty button { flex: 1; padding: 5px 2px; }
  .pc-actions .remove { width: 28px; height: 28px; flex: none; }
  .btn-add { width: 100%; }
  .sizes { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .size-card { padding: 12px 10px; }
  .size-meta, .size-price { display: none; }
  .size-name { font-size: 1.1rem; }
  .size-people { font-size: .8rem; }
}

/* ---- diálogo checkout ---- */
.sheet {
  border: 0; padding: 0; border-radius: 22px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.sheet::backdrop { background: rgba(30, 17, 10, .55); backdrop-filter: blur(3px); }
.sheet[open] { animation: rise .3s ease; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet form { padding: 22px clamp(18px, 4vw, 28px) 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-head h2 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; }
@media (max-width: 640px) {
  .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; }
}

.field { display: grid; gap: 6px; margin-bottom: 14px; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field label, .field legend { font-weight: 600; font-size: .9rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(142, 42, 42, .18); border-color: var(--accent); }
.choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; margin-top: 6px; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.field .choice input { accent-color: var(--accent); width: auto; padding: 0; margin: 0; flex: none; }
.choice em { color: var(--muted); font-style: normal; font-weight: 400; }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; margin: 4px 0 12px; border-top: 1px solid var(--line); }
.checkout-total strong { font-size: 1.5rem; font-family: var(--serif); }
.form-error { background: #FCE8E6; color: #8E2A2A; border-radius: 10px; padding: 10px 14px; font-size: .92rem; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: min(92vw, 460px); font-size: .92rem;
  transition: opacity .25s, transform .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- estado del pedido / error ---- */
.status-page, .center-card { max-width: 620px; margin: 40px auto; padding: 0 16px; }
.status-card, .center-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 5vw, 40px); text-align: center; box-shadow: var(--shadow); }
.status-card h1, .center-card h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 6px 0 8px; }
.status-icon, .big-emoji { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.status-card .eyebrow { color: var(--muted); }
.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.center-card .btn { margin-top: 16px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.st-pending { background: #FFF1CF; color: #8A6212; }
.st-ok { background: #E6EEDA; color: #3F4E15; }
.st-done { background: #E2ECF3; color: #22506D; }
.st-bad { background: #FCE3E0; color: #8E2A2A; }

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

/* ===== Admin ===== */
.admin { background: #F4F1EC; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px clamp(16px, 4vw, 40px); background: var(--ink); }
.admin-nav a, .admin-nav button { color: #F4E6D3; text-decoration: none; padding: 8px 12px; border-radius: 8px; font: 500 .92rem var(--sans); background: none; border: 0; cursor: pointer; }
.admin-nav a:hover, .admin-nav a.on { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-nav form { margin-left: auto; }
.admin-wrap { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.admin-wrap h1 { font-size: 1.7rem; margin-bottom: 16px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .88rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #EFE8DD; font-size: .92rem; vertical-align: middle; }
.table th { background: #FAF6F0; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr.off td { opacity: .5; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.flash-ok { background: #E6EEDA; color: #3F4E15; }
.flash-err { background: #FCE3E0; color: #8E2A2A; }
.card { background: #fff; border-radius: 16px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.status-form { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.toggle { border: 0; border-radius: 999px; padding: 5px 12px; font: 600 .8rem var(--sans); cursor: pointer; }
.toggle.on { background: #E6EEDA; color: #3F4E15; }
.toggle.off { background: #EEE; color: #777; }
.login-card { max-width: 380px; margin: 60px auto; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.field-validation-error, .text-danger { color: var(--accent); font-size: .85rem; }
.thumb-sm svg { width: 40px; height: 40px; }

/* ---- Mis pedidos / Seguí tu pedido ---- */
.top-links { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top-links a { white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .92rem; padding: 8px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.top-links a:hover { background: var(--accent-soft); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; }
@media (max-width: 640px) { .tagline, .top-links .hide-sm { display: none; } .brand span { font-size: 1.1rem; } }
.page-narrow { max-width: 680px; margin: 32px auto; padding: 0 16px; }
.page-narrow > h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 6px; }
.mo-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.mo-link { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s; }
.mo-link:hover { transform: translateY(-1px); }
.mo-code { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.mo-meta { grid-column: 1; font-size: .88rem; }
.mo-pill { grid-column: 2; grid-row: 1 / span 2; }
.mo-empty { margin: 18px 0; }
.mo-empty h2 { font-size: 1.3rem; margin-bottom: 6px; }
.track-form { text-align: left; margin-top: 18px; }
.status-card .form-error { margin-top: 14px; }

/* ---- contador de porciones ---- */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: 2px; }
.stepper button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font: 700 1.1rem var(--sans); cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(43, 26, 18, .12); }
.stepper button:hover:not(:disabled) { background: var(--olive); color: #fff; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .pc-actions .stepper { flex: 1; justify-content: space-between; }
  .stepper button { width: 32px; height: 32px; }
}
.admin-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: #F3E9DA; }
.admin-photo { width: 100%; max-width: 420px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 6px; }
input[type=file] { font: inherit; padding: 8px 0; }
.field .check input { width: auto; padding: 0; }

/* ---- foto de ejemplo del tamaño ---- */
.size-photo { margin: 0; position: relative; border-radius: 14px; overflow: hidden; background: var(--table); aspect-ratio: 4 / 3; }
.size-photo img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fadein .35s ease; }
.size-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; font-size: .8rem; color: #FBF4EA;
  background: linear-gradient(0deg, rgba(30, 17, 10, .75), transparent); }
.size-photo-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #F4E6D3; padding: 20px; }
.size-photo-empty span { font-size: 2.6rem; }
.size-photo-empty p { margin: 6px 0 0; font-size: .95rem; opacity: .9; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.size-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; margin-bottom: 8px; background: #F3E9DA; }
.size-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-photo { width: 54px; height: 44px; object-fit: cover; border-radius: 10px; flex: none; }

/* ---- nota de envío ---- */
.delivery-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #FFF4DC; border: 1px solid #F0D79B; font-size: .9rem; white-space: pre-line; }
.checkout-lines { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .95rem; }
.checkout-lines + .checkout-total { border-top: 0; padding-top: 6px; }

/* ---- Usuarios del local ---- */
.code-input { font: 600 1.4rem ui-monospace, Consolas, monospace; letter-spacing: .2em; text-align: center; }
.qr { max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 8px; background: #fff; padding: 6px; }
.secret-key { font-size: 1rem; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; }
.recovery-codes code { font: 600 1.05rem ui-monospace, Consolas, monospace; letter-spacing: .05em; user-select: all; }
.temp-password { font: 700 1.5rem ui-monospace, Consolas, monospace; letter-spacing: .08em; margin: 8px 0; user-select: all; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-cell form { margin: 0; }

/* ---- plantilla: producto sin foto ---- */
.pc-placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2.2rem; opacity: .55; }
.danger-inline summary { list-style: none; cursor: pointer; }
.danger-inline summary::-webkit-details-marker { display: none; }
.danger-inline[open] summary { color: #A12D2D; }
.danger-inline form { margin-top: 6px; }
.btn-danger { background: #A12D2D; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #852222; }

/* ---- acciones con íconos + tooltip (panel) ---- */
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.row-actions form { margin: 0; }
.role-form { display: flex; gap: 6px; align-items: center; white-space: nowrap; margin: 0; }
.role-form select { width: auto; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; }
.icon-action { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; padding: 0; text-decoration: none; list-style: none; }
.icon-action::-webkit-details-marker { display: none; }
.icon-action:hover, .icon-action:focus-visible { border-color: var(--accent); color: var(--accent); }
.icon-action.danger:hover, .icon-action.danger:focus-visible, .danger-pop[open] > .icon-action { border-color: #A12D2D; color: #A12D2D; }
.icon-action[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); right: 50%; transform: translateX(50%);
  white-space: nowrap; background: #1E1A17; color: #fff; font: 500 .78rem var(--sans); padding: 5px 9px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20; }
.icon-action[data-tip]:hover::after, .icon-action[data-tip]:focus-visible::after { opacity: 1; }
.danger-pop { position: relative; }
.danger-pop[open] > .icon-action::after { opacity: 0; }
.pop-card { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 260px; display: grid; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.pop-card p { margin: 0; }
.pop-card input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; }
/* Tablas con tooltips y menús emergentes: no recortar lo que sobresale */
.table-scroll.table-pop, .table.table-pop { overflow: visible; }


/* ---- Productos: filtros y orden ---- */
.list-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.list-filters input, .list-filters select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; }
.list-filters input { flex: 1 1 220px; max-width: 360px; }
.cat-row th { background: var(--bg); text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); }
.col-grip { width: 44px; white-space: nowrap; }
.drag-handle { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); cursor: grab; border-radius: 8px; position: relative; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--ink); background: var(--paper); }
.drag-handle[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: #1E1A17; color: #fff; font: 500 .78rem var(--sans); padding: 5px 9px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20; }
.drag-handle:hover::after { opacity: 1; }
tr.dragging { opacity: .45; }
.products-table.is-filtered .drag-handle, .products-table.is-filtered .move-btns { visibility: hidden; }
.move-btns { display: none; }
.icon-mini { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 0; }
.grip-inline svg { vertical-align: middle; width: 14px; height: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (pointer: coarse) { .drag-handle { display: none; } .move-btns { display: inline-flex; flex-direction: column; gap: 4px; } }
.fine.center { text-align: center; margin-top: 14px; }

/* ---- Medio de pago ---- */
.field.paywith { border: 0; padding: 0; margin: 14px 0 4px; display: grid; gap: 8px; }
.field.paywith legend { font-weight: 600; margin-bottom: 6px; }
.pay-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.pay-option span { display: grid; gap: 2px; }
.pay-option small { color: var(--muted); font-weight: 400; }
/* Radios y casillas dentro de .field: tamaño propio (la regla de .field input los estiraba a todo el ancho) */
.field input[type="radio"], .field input[type="checkbox"] {
  width: auto; flex: none; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; accent-color: var(--accent);
}
.pay-option input { margin-top: 3px; }

/* ---- Transferencia: datos para el cliente y aviso en el panel ---- */
.transfer-box { margin: 18px 0 6px; padding: 16px; border: 2px dashed var(--accent); border-radius: var(--radius); text-align: left; display: grid; gap: 12px; }
.tb-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tb-amount strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.tb-data { margin: 0; display: grid; gap: 6px; }
.tb-data div { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.tb-data dt { color: var(--muted); font-size: .9rem; }
.tb-data dd { margin: 0; font-weight: 600; text-align: right; }
.tb-data code { font-size: 1.05rem; }
.btn-wa { background: #1FAF55; border-color: #1FAF55; color: #fff; }
.transfer-await { border: 2px solid #E6B54A; background: #FFF8E6; }

/* Ver la dirección del pedido desde otro dispositivo (últimos 4 números del teléfono) */
.unlock-form { margin: 4px 0 14px; text-align: left; }
.unlock-form label { display: block; margin-bottom: 6px; color: var(--muted); }
.unlock-row { display: flex; gap: 8px; align-items: center; }
.unlock-row input { width: 7.5em; letter-spacing: .2em; text-align: center; }

/* =========================================================================
   Vista de celular (30/11/2026, igual que Picadas): nada se sale de la pantalla,
   tablas como tarjetas, botones de guardar alineados, campos sin zoom en iPhone.
   ========================================================================= */
.mobile-only { display: none; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 8px; }
.card .form-actions { margin-bottom: 0; }
form:not(.card) > .form-actions { margin-bottom: 24px; }
.card > h3 { margin: 18px 0 10px; }
/* Tarjetas con formulario angosto (Mi cuenta, Agregar usuario): el padding de .page-narrow pisaba el de la tarjeta */
.card.page-narrow { padding: 20px; margin: 0 auto 16px; }
.card > h2 { margin-bottom: 12px; }
.field { grid-template-columns: minmax(0, 1fr); align-content: start; }
.kv { grid-template-columns: minmax(96px, 140px) minmax(0, 1fr); }
.kv dd { overflow-wrap: anywhere; min-width: 0; }
input[type=file] { max-width: 100%; color: var(--muted); }
input[type=file]::file-selector-button {
  font: 600 .88rem var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; margin-right: 10px; cursor: pointer;
}
@media (max-width: 960px) {
  .mb-info > div { min-width: 0; }
  .mb-count { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 640px) {
  .mobile-only { display: inline; }
  input, select, textarea { font-size: 16px !important; }
  .form-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  form:not(.card) > .form-actions {
    position: sticky; bottom: 0; z-index: 20; margin: 16px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  }
  .icon-action[data-tip]::after, .drag-handle[data-tip]::after { display: none; }
  .pop-card { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; z-index: 60; }

  .table-scroll:has(.table-cards) { overflow: visible; }
  .table.table-cards, .table-cards tbody { display: block; width: 100%; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .table-cards thead { display: none; }
  .table-cards tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; align-items: start;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow);
  }
  .table-cards td, .table-cards th { display: block; padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .table-cards td.num { text-align: left; }
  .table-cards td[data-label]::before {
    content: attr(data-label); display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px;
  }
  .table-cards td:empty { display: none; }
  .table-cards .c-wide, .table-cards .c-name, .table-cards .c-client, .table-cards .c-actions { grid-column: 1 / -1; }
  .table-cards .c-actions { display: flex; justify-content: flex-end; gap: 8px; }
  .table-cards tr.empty-row { display: block; }
  .table-cards tr.off { opacity: .6; }
  .table-cards tr.off td { opacity: 1; }

  .orders-table .c-code { grid-column: 1; font-size: 1.02rem; }
  .orders-table .c-status { grid-column: 2; justify-self: end; text-align: right; }
  .orders-table .c-total { font-weight: 700; }

  .products-table tr.cat-row { display: block; background: none; border: 0; box-shadow: none; padding: 14px 2px 4px; margin: 0; }
  .products-table tr.cat-row th { background: none; font-size: .8rem; }
  .products-table tr.prod-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .products-table .col-grip { grid-row: 1 / span 2; grid-column: 1; width: auto; align-self: center; }
  .products-table .c-name { grid-column: 2; grid-row: 1; }
  .products-table .c-image { display: none; }
  .products-table .c-price { grid-column: 2; grid-row: 2; align-self: center; }
  .products-table .c-status { grid-column: 3; grid-row: 2; justify-self: end; }
  .products-table .c-actions { grid-column: 3; grid-row: 1; }
}

/* Un texto sin espacios (un link, un CBU) corta línea en vez de ensanchar la tarjeta y la página */
.card { overflow-wrap: break-word; }


/* ================= Turnos: reserva pública ================= */
.book-page { max-width: 760px; margin: 24px auto 48px; padding: 0 16px; }
.book-title { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 8px 0 20px; }
.options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.option { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.option:hover { border-color: var(--ink-2); }
.option.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-soft); }
.option-desc { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
button.chip { cursor: pointer; font: inherit; font-size: .95rem; padding: 8px 16px; color: inherit; }
.week-nav { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 14px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.day strong { font-size: .95rem; }
.day-w { font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.day-n { color: var(--muted); }
.day.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.day.on .day-w, .day.on .day-n { color: rgba(255, 255, 255, .75); }
.day:disabled { opacity: .4; cursor: not-allowed; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.time { padding: 10px 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-weight: 600; color: inherit; }
.time:hover { border-color: var(--ink-2); }
.time.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.summary-line { background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.code-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.code-form .code-input { font-size: 1.6rem; letter-spacing: .35em; width: 10ch; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.status-card .kv { text-align: left; margin: 18px auto; max-width: 420px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.status-form { margin-top: 12px; }
.btn-danger { background: #B3261E; color: #fff; }
@media (max-width: 520px) {
  .days { grid-template-columns: repeat(7, minmax(40px, 1fr)); overflow-x: auto; }
  .day strong { font-size: .8rem; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ================= Turnos: panel ================= */
.agenda { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.agenda-col { padding: 16px; }
.agenda-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.agenda-head h2 { font-size: 1.2rem; }
.agenda-head p { margin: 0; flex-basis: 100%; }
.agenda-empty { margin: 4px 0; }
.appts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appt { display: grid; grid-template-columns: 56px 1fr; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--olive); background: #fff; }
.appt.st-pending { border-left-color: var(--gold); }
.appt.st-done { border-left-color: var(--muted); opacity: .8; }
.appt.st-bad { border-left-color: #B3261E; }
.appt:target { box-shadow: 0 0 0 2px var(--accent); }
.appt-time { display: flex; flex-direction: column; }
.appt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.appt-note { font-style: italic; }
.appt-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.appt-actions form { margin: 0; }
.appt-actions details form { display: grid; gap: 6px; margin-top: 8px; }
.appt-actions details input:not([type]) { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font: inherit; }
.cancelled { margin: 10px 0 0; padding-left: 18px; }
.plan-usage p { margin: 0 0 8px; }
.week { display: grid; gap: 8px; margin: 10px 0; }
.week-day { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.week-name { min-width: 120px; text-transform: capitalize; font-weight: 600; }
.week-range { display: inline-flex; align-items: center; gap: 6px; }
.week-range input, .inline-form input[type="date"] { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); font: inherit; }
.absences { list-style: none; padding: 0; margin: 0 0 16px; }
.absences li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.absences form { margin: 0; }
.absence-form h3 { margin: 8px 0 12px; }
.conflicts ul { margin: 6px 0 10px; padding-left: 18px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.move-btns { white-space: nowrap; }
.move-btns form { display: inline; margin: 0; }
span.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.step-head { justify-content: flex-start; align-items: center; gap: 12px; margin-bottom: 14px; }
.step-head h2 { margin: 0; }
.appt.st-ok, .appt.st-pending, .appt.st-done, .appt.st-bad { color: var(--ink); background: #fff; }
