/* ──────────────────────────────────────────────────────────────
   Naia Spa · Sistema POS — paleta tomada del logo
   rosa empolvado · oro rosado · malva
   ────────────────────────────────────────────────────────────── */
:root {
  --bg: #fbf4f0;
  --bg-2: #f6e9e2;
  --surface: #fffdfb;
  --surface-2: #fbf1ec;
  --blush: #f6e4dc;
  --blush-2: #efd3c8;
  --blush-3: #e7c9be;
  --gold: #b07a54;
  --gold-2: #d4a27e;
  --gold-3: #e9c8ac;
  --gold-deep: #8c5a3c;
  --rose: #aa6174;
  --rose-2: #c88396;
  --rose-soft: #f6e0e4;
  --rose-deep: #8a4a5c;
  --ink: #3b2a2f;
  --ink-2: #6b565c;
  --muted: #9a868b;
  --line: #eddcd3;
  --line-2: #e4cfc5;
  --ok: #3f7d5e; --ok-bg: #e3f1e9;
  --warn: #9c6d1c; --warn-bg: #faf0d9;
  --bad: #b4475a; --bad-bg: #f9e1e5;
  --info: #4f6a9a; --info-bg: #e4ebf6;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(120, 70, 60, .07);
  --shadow: 0 1px 2px rgba(120, 70, 60, .06), 0 12px 30px -16px rgba(120, 70, 60, .26);
  --shadow-lg: 0 24px 60px -20px rgba(90, 50, 45, .38);
  --grad-gold: linear-gradient(135deg, #cf9a74 0%, #b8825d 52%, #a06646 100%);
  --grad-rose: linear-gradient(135deg, #c88396 0%, #aa6174 60%, #94505f 100%);
  --font: 'Jost', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', 'Didot', 'Bodoni 72', Georgia, serif;
  --sidebar: 256px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background-image: radial-gradient(1100px 520px at 12% -10%, #f9e6df 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #f7e7e9 0%, transparent 55%);
  background-attachment: fixed;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
button { font-family: inherit; }
a { color: var(--rose-deep); }
::selection { background: var(--blush-2); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.bold { font-weight: 600; }
.serif { font-family: var(--serif); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.sm { gap: 8px; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hide { display: none !important; }
.gold-text { color: var(--gold-deep); }
.mauve-text { color: var(--rose-deep); }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .warn-text { color: var(--warn); }

/* ───────── arranque ───────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { border-radius: 50%; animation: pulse 1.8s ease-in-out infinite; box-shadow: var(--shadow); }
@keyframes pulse { 50% { transform: scale(1.04); opacity: .85; } }

/* ───────── botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border: 0; border-radius: 12px; background: var(--grad-gold); color: #fff; font-size: 15px; font-weight: 500; letter-spacing: .01em;
  cursor: pointer; box-shadow: 0 6px 16px -8px rgba(160, 102, 70, .65), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .12s, box-shadow .15s, filter .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); box-shadow: 0 10px 20px -10px rgba(160, 102, 70, .75), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; filter: none; transform: none; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.btn.lg { height: 54px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--blush); filter: none; }
.btn.soft { background: var(--blush); color: var(--gold-deep); box-shadow: none; }
.btn.soft:hover { background: var(--blush-2); filter: none; }
.btn.mauve { background: var(--grad-rose); box-shadow: 0 6px 16px -8px rgba(138, 74, 92, .65), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.danger { background: linear-gradient(135deg, #c9606f, #b4475a); box-shadow: 0 6px 16px -8px rgba(180, 71, 90, .6); }
.btn.link { background: none; box-shadow: none; color: var(--rose-deep); padding: 0 6px; height: auto; font-weight: 500; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--ink-2);
  border-radius: 50%; cursor: pointer; flex: none; transition: background .15s;
}
.icon-btn:hover { background: var(--blush); }
.icon-btn.danger:hover { background: var(--bad-bg); color: var(--bad); }

/* ───────── formularios ───────── */
.input {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 13px; resize: vertical; line-height: 1.4; }
select.input { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(170, 97, 116, .14); }
.input::placeholder { color: #bba8ad; }
.input.money { text-align: right; font-variant-numeric: tabular-nums; }
.input.sm { height: 34px; border-radius: 9px; font-size: 14px; }
.input-affix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; overflow: hidden; }
.input-affix .input { border: 0; box-shadow: none; border-radius: 0; }
.input-affix em { font-style: normal; color: var(--muted); padding: 0 12px; font-size: 14px; white-space: nowrap; }
.input-affix:focus-within { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(170, 97, 116, .14); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; grid-column: span 2; }
.field.half { grid-column: span 1; }
.field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }
.req { color: var(--rose); }
.field-hint { color: var(--muted); font-size: 12.5px; }
.field-error { color: var(--bad); font-size: 12.5px; min-height: 0; }
.field.has-error .input, .input.has-error { border-color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-heading { grid-column: span 2; font-family: var(--serif); font-size: 21px; color: var(--gold-deep); margin-top: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.form-note { grid-column: span 2; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 13px; }
.form-note.warn { background: var(--warn-bg); border-color: #ecd8a6; }
.field.check { flex-direction: row; align-items: flex-start; gap: 12px; cursor: pointer; }
.check-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; margin-top: 1px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + i { background: var(--grad-rose); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--rose); outline-offset: 2px; }

/* ───────── tarjetas / KPIs ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card.flat { box-shadow: none; }
.card.tint { background: linear-gradient(160deg, #fff8f4, #fbeee8); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-family: var(--serif); font-size: 23px; line-height: 1.1; color: var(--ink); }
.card-sub { color: var(--muted); font-size: 13px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -18px; top: -18px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, var(--blush) 0%, transparent 70%); }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.1; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kpi.gold .kpi-value { color: var(--gold-deep); }
.kpi.rose .kpi-value { color: var(--rose-deep); }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }

/* ───────── etiquetas / chips / tabs ───────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--blush); color: var(--gold-deep); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.gold { background: #f6e3cf; color: var(--gold-deep); }
.badge.mauve { background: var(--rose-soft); color: var(--rose-deep); }
.badge.muted { background: #efe7e3; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 14px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--gold-2); }
.chip.active { background: var(--blush); border-color: var(--gold-2); color: var(--gold-deep); font-weight: 500; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--blush); border-radius: 14px; max-width: 100%; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border: 0; background: transparent; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; color: var(--gold-deep); box-shadow: var(--shadow-sm); }
.tab-count { background: var(--rose); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 6px; line-height: 17px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-rose); color: #fff; font-weight: 500; font-size: 15px; flex: none; letter-spacing: .03em; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; font-family: var(--serif); }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ───────── tablas ───────── */
.table-wrap { overflow-x: auto; border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: transparent; position: sticky; top: 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fdf3ee; }
.table .right, .table th.right { text-align: right; }
.table .center { text-align: center; }
.table td.num, .num { font-variant-numeric: tabular-nums; }
tr.void td { color: var(--muted); text-decoration: line-through; }
tr.void td:last-child, tr.void td .badge { text-decoration: none; }

/* ───────── estados vacíos / carga ───────── */
.empty { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; color: var(--muted); text-align: center; }
.empty svg { color: var(--gold-2); }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--muted); }
.spin { width: 20px; height: 20px; border: 2.5px solid var(--blush-2); border-top-color: var(--rose); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── estructura ───────── */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 18px 14px 14px; background: linear-gradient(180deg, #f7e6de 0%, #f2dcd2 100%); border-right: 1px solid var(--blush-2); z-index: 40; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 16px; text-align: center; }
.brand img { width: 118px; height: 118px; border-radius: 50%; box-shadow: 0 10px 28px -12px rgba(140, 90, 60, .55); }
.brand-sub { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--rose-deep); margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--gold-deep); opacity: .7; padding: 14px 12px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.nav-item.active { background: #fff; color: var(--gold-deep); box-shadow: 0 6px 16px -10px rgba(140, 90, 60, .5); }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad-gold); }
.nav-item .nav-badge { margin-left: auto; background: var(--rose); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .6); cursor: pointer; border: 0; width: 100%; text-align: left; color: inherit; }
.user-chip:hover { background: #fff; }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; position: sticky; top: 0; z-index: 30; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(251, 244, 240, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.page { padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.01em; }
.page-sub { color: var(--muted); margin-top: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.page-actions .input { width: auto; }
.scrim { display: none; }
.star-divider { display: flex; align-items: center; gap: 12px; color: var(--gold-2); margin: 6px 0; }
.star-divider::before, .star-divider::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-3), transparent); }
.cash-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 500; text-decoration: none; }
.cash-pill.open { background: var(--ok-bg); color: var(--ok); }
.cash-pill.closed { background: var(--warn-bg); color: var(--warn); }

/* ───────── acceso (login / configuración inicial) ───────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: radial-gradient(900px 600px at 20% 10%, #fde9e2 0%, transparent 60%), radial-gradient(800px 600px at 90% 90%, #f3d6d9 0%, transparent 60%), linear-gradient(160deg, #f8e6de, #efd3c8); }
.auth .spark { position: absolute; color: var(--gold-2); opacity: .5; }
.auth-card { width: min(440px, 100%); background: rgba(255, 253, 251, .92); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .8); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 34px 34px 30px; position: relative; }
.auth-logo { display: grid; place-items: center; margin: -78px auto 6px; }
.auth-logo img { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 18px 40px -14px rgba(140, 90, 60, .6); border: 4px solid #fffdfb; }
.auth-title { font-family: var(--serif); font-size: 32px; text-align: center; margin: 12px 0 2px; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 20px; font-size: 14.5px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.code-input { text-align: center; font-size: 28px; letter-spacing: .4em; height: 60px; font-variant-numeric: tabular-nums; }
.pw-meter { height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }

/* ───────── modales y avisos ───────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(59, 42, 47, .42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal-backdrop.in { opacity: 1; }
.modal { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; transform: translateY(10px) scale(.985); transition: transform .2s; position: relative; border: 1px solid #fff; }
.modal-backdrop.in .modal { transform: none; }
.modal.sm { max-width: 440px; } .modal.md { max-width: 680px; } .modal.lg { max-width: 940px; } .modal.xl { max-width: 1180px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 26px 6px; }
.modal-title { font-family: var(--serif); font-size: 29px; line-height: 1.1; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.modal-head .modal-x { position: static; margin: -4px -8px 0 0; }
.modal-body { padding: 14px 26px 22px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 26px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dialog-msg { line-height: 1.55; color: var(--ink-2); margin-bottom: 14px; }
#toast-root { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: #3b2a2f; color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14.5px; opacity: 0; transform: translateY(12px); transition: all .22s; pointer-events: auto; }
.toast.in { opacity: 1; transform: none; }
.toast.ok svg { color: #8fd3b0; } .toast.error { background: #7d2f3d; } .toast.error svg { color: #ffc9d0; } .toast.info svg { color: #bfd2f5; }

/* ───────── POS ───────── */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.pos-left { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pos-right { position: sticky; top: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 28px); }
.pos-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 40px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.tile { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 108px; position: relative; overflow: hidden; transition: transform .12s, box-shadow .15s, border-color .15s; color: inherit; font: inherit; box-shadow: var(--shadow-sm); }
.tile:hover { border-color: var(--gold-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile:active { transform: scale(.985); }
.tile::after { content: ''; position: absolute; right: -22px; bottom: -22px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, var(--blush) 0%, transparent 70%); }
.tile-name { font-weight: 500; font-size: 15px; line-height: 1.25; z-index: 1; }
.tile-meta { color: var(--muted); font-size: 12.5px; z-index: 1; }
.tile-price { margin-top: auto; font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--gold-deep); z-index: 1; font-variant-numeric: lining-nums; }
.tile.out { opacity: .55; }
.tile .stock-tag { position: absolute; top: 10px; right: 10px; z-index: 1; }
.cart { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cart-head { padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff9f6, #fff); }
.cart-lines { overflow-y: auto; padding: 6px 12px; min-height: 120px; max-height: 40vh; flex: 1; }
.cart-line { padding: 11px 4px; border-bottom: 1px dashed var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
.cart-line:last-child { border-bottom: 0; }
.cl-name { font-weight: 500; line-height: 1.25; }
.cl-price { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cl-price s { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.cl-sub { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cl-sub select.input { height: 32px; font-size: 13.5px; width: 138px; min-width: 0; border-radius: 9px; padding-right: 26px; background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; }
.cl-sub .icon-btn { width: 32px; height: 32px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.qty button:hover { background: var(--blush); }
.qty span { min-width: 26px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.pkg-use { font-size: 12.5px; }
.totals { padding: 12px 18px 8px; border-top: 1px solid var(--line); background: #fffaf7; }
.totals .line { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-2); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.totals .grand { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 4px; font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--ink); }
.cart-actions { padding: 8px 16px 16px; display: grid; grid-template-columns: auto 1fr; gap: 10px; background: #fffaf7; }
.tip-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px 0; }
.tip-row .chip { height: 30px; padding: 0 11px; font-size: 13px; }
.cart-empty { display: grid; place-items: center; padding: 34px 10px; color: var(--muted); text-align: center; gap: 6px; }
.client-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px dashed var(--gold-2); background: #fffaf7; border-radius: 12px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.client-pick:hover { background: var(--blush); }
.client-pick.set { border-style: solid; border-color: var(--line-2); background: #fff; }
.open-tickets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ticket-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; color: inherit; font-family: inherit; }
.ticket-chip:hover { border-color: var(--rose-2); }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pay-method { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: var(--ink-2); font-size: 14px; transition: all .15s; }
.pay-method:hover { border-color: var(--gold-2); background: var(--blush); color: var(--gold-deep); transform: translateY(-1px); }
.pay-line { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pay-line .method { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 130px; }
.pay-line .input { width: 150px; }
.pay-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; text-align: center; }
.pay-summary > div { background: var(--surface-2); border-radius: 14px; padding: 12px 8px; }
.pay-summary b { display: block; font-family: var(--serif); font-size: 26px; font-variant-numeric: lining-nums; }
.pay-summary span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-cash .chip { height: 30px; font-size: 13px; padding: 0 10px; }

.cart-fab { display: none; position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 50; height: 54px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--grad-rose); color: #fff; font: inherit; font-size: 15.5px; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); cursor: pointer; }
.cart-fab b { margin-left: auto; font-family: var(--serif); font-size: 22px; }
@media (max-width: 1060px) { .cart-fab:not(.hide) { display: flex; } }

/* ───────── Agenda ───────── */
.agenda { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.agenda-scroll { overflow: auto; max-height: calc(100vh - 230px); min-height: 380px; position: relative; }
.agenda-grid { display: grid; position: relative; min-width: max-content; }
.agenda-corner, .agenda-head { position: sticky; top: 0; z-index: 6; background: #fff8f4; border-bottom: 1px solid var(--line-2); padding: 10px; height: 64px; display: flex; align-items: center; gap: 10px; }
.agenda-corner { left: 0; z-index: 8; }
.agenda-head .avatar { width: 34px; height: 34px; font-size: 13px; }
.agenda-head b { display: block; font-size: 14.5px; line-height: 1.2; }
.agenda-head span { font-size: 12px; color: var(--muted); }
.agenda-hours { position: sticky; left: 0; z-index: 5; background: #fffaf7; border-right: 1px solid var(--line-2); }
.agenda-hour { white-space: nowrap; position: absolute; right: 8px; font-size: 12px; color: var(--muted); transform: translateY(-8px); font-variant-numeric: tabular-nums; }
.agenda-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); cursor: cell; }
.agenda-col.closed { background-color: #f7efeb; cursor: not-allowed; }
.slot-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #f3e6df; pointer-events: none; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--rose); z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 12px; padding: 6px 9px; overflow: hidden; cursor: pointer; border-left: 4px solid var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 16%, #fff); box-shadow: 0 2px 6px -2px rgba(90, 50, 45, .22); z-index: 3; font-size: 12.5px; line-height: 1.25; transition: transform .1s, box-shadow .15s; border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 30%, #fff); border-left-width: 4px; }
.appt:hover { z-index: 5; box-shadow: 0 8px 18px -6px rgba(90, 50, 45, .35); transform: translateY(-1px); }
.appt b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt .t { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.appt .s { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.st-cancelada, .appt.st-no_asistio { opacity: .5; background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f6ece8 6px, #f6ece8 12px); }
.appt.st-completada { opacity: .78; }
.appt.st-en_curso { box-shadow: 0 0 0 2px var(--rose), 0 8px 18px -8px rgba(138, 74, 92, .5); }
.appt.block { background: repeating-linear-gradient(45deg, #f4e9e4, #f4e9e4 8px, #fbf3ef 8px, #fbf3ef 16px); border-color: var(--line-2); border-left-color: var(--muted); color: var(--ink-2); }
.appt-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--info); }
.appt-status.confirmada { background: var(--ok); } .appt-status.en_curso { background: var(--rose); } .appt-status.agendada { background: var(--info); }
.svc-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.svc-pick h4 { grid-column: 1 / -1; font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-deep); margin: 8px 4px 0; }
.svc-opt { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.svc-opt:hover { background: var(--blush); }
.svc-opt input { accent-color: var(--rose); width: 16px; height: 16px; }
.svc-opt small { color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ───────── varios ───────── */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 500; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar-track { height: 12px; background: var(--blush); border-radius: 99px; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--grad-gold); }
.bar-row.rose .bar-track i { background: var(--grad-rose); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover { opacity: .8; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-bottom: 14px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); color: #6f4d0f; font-size: 14px; }
.banner.info { background: var(--info-bg); color: #36507d; } .banner.bad { background: var(--bad-bg); color: #8c2f3f; } .banner.ok { background: var(--ok-bg); color: #2b5c43; }
.banner svg { flex: none; margin-top: 2px; }
.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 8px; letter-spacing: .06em; }
.secret-box { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 20px; letter-spacing: .12em; text-align: center; padding: 16px; background: var(--surface-2); border: 1px dashed var(--gold-2); border-radius: 14px; user-select: all; word-break: break-all; }
.denoms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.denom { display: grid; grid-template-columns: 90px 1fr 100px; gap: 8px; align-items: center; font-size: 14px; }
.denom .input { height: 34px; text-align: center; }
.sec-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sec-check:last-child { border-bottom: 0; }
.sec-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.sec-dot.ok { background: var(--ok); } .sec-dot.warn { background: #d49a2e; } .sec-dot.bad { background: var(--bad); }

/* ───────── tiquete ───────── */
.paper { background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 18px 16px; box-shadow: var(--shadow); max-width: 340px; margin: 0 auto; }
.receipt { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; line-height: 1.38; color: #000; width: 100%; }
.receipt .c { text-align: center; }
.receipt .logo { display: block; margin: 0 auto 4px; width: 38mm; height: auto; max-width: 70%; }
.receipt h4 { font-size: 15px; margin: 2px 0; letter-spacing: .02em; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt td.r { text-align: right; white-space: nowrap; padding-left: 6px; }
.receipt .big { font-size: 15px; font-weight: 700; }
.receipt .sm { font-size: 10.5px; }
#print-area { display: none; }

/* ───────── responsive ───────── */
@media (max-width: 1280px) {
  .pos { grid-template-columns: minmax(0, 1fr) 380px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(59, 42, 47, .4); }
  .topbar { display: flex; }
  .nav-item.active::before { left: -14px; }
  .pos { grid-template-columns: 1fr; }
  .pos-right { position: static; max-height: none; }
  .cart-lines { max-height: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .page { padding: 18px 14px 50px; }
  .page-title { font-size: 32px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field, .field.half, .form-heading, .form-note { grid-column: span 1; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { max-height: 94vh; border-radius: 22px 22px 0 0; max-width: 100% !important; }
  .modal-body { padding: 12px 18px 18px; } .modal-head { padding: 18px 18px 4px; } .modal-foot { padding: 12px 18px 18px; }
  .svc-pick { grid-template-columns: 1fr; }
  .pay-line { grid-template-columns: 1fr auto; } .pay-line .input { width: 100%; }
  .denoms { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .kpi-value { font-size: 28px; }
  .bar-row { grid-template-columns: 90px 1fr auto; }
  .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; }
}

/* ───────── impresión (tiquetes 58/80 mm y reportes) ───────── */
@media print {
  @page { margin: 4mm; }
  body { background: #fff !important; background-image: none !important; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; width: var(--paper, 80mm); margin: 0 auto; color: #000; background: #fff; }
  #print-area .receipt { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
