/* Qrelay · App UI */
:root {
  --ink: #0B1020;
  --ink-2: #151B30;
  --ink-3: #232A44;
  --violet: #5B3DF5;
  --violet-600: #4A2EE0;
  --violet-50: #EFEBFF;
  --lime: #C6FF3D;
  --lime-600: #A6E01A;
  --bg: #F6F5FF;
  --surface: #FFFFFF;
  --text: #0B1020;
  --muted: #5B6178;
  --border: #E6E4F5;
  --success: #16A34A;
  --success-bg: #E8F8EE;
  --danger: #DC2626;
  --danger-bg: #FDECEC;
  --warning: #B45309;
  --warning-bg: #FFF4DE;
  --info-bg: #EFEBFF;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11,16,32,.04), 0 8px 24px -12px rgba(11,16,32,.12);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-600); }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--violet-50); color: var(--violet-600); padding: 2px 6px; border-radius: 6px; }
pre { background: var(--ink); color: #E8E9F3; padding: 16px; border-radius: var(--radius-sm); overflow: auto; font-size: 13px; }
pre code { background: none; color: inherit; padding: 0; }
.ic { flex: none; vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
:focus-visible { outline: 3px solid rgba(91,61,245,.35); outline-offset: 2px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #C9CCE0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.03em; padding: 4px 8px 18px; }
.brand:hover { color: #fff; }
.brand .tag { font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--lime); color: var(--ink); padding: 2px 6px; border-radius: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6E7491; padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #C9CCE0; font-weight: 500; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.nav a .count { margin-left: auto; font-size: 11px; background: var(--ink-3); color: #fff; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.usage { background: var(--ink-2); border-radius: 12px; padding: 12px; font-size: 12.5px; }
.usage strong { color: #fff; }
.usage .bar { height: 6px; background: var(--ink-3); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.usage .bar span { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.usage .bar.warn span { background: #FFB020; }
.usage .bar.full span { background: #FF5A5A; }
.usage a.btn { width: 100%; justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(246,245,255,.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lime { background: var(--lime); color: var(--ink); }
.content { padding: 28px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }

.impersonating { background: var(--lime); color: var(--ink); padding: 8px 28px; display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 13px; }
.impersonating form { margin-left: auto; }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font: 600 14px/1.2 var(--font); cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; text-decoration: none; background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn:hover { background: #FAF9FF; color: var(--ink); border-color: #D6D2EF; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--violet); color: #fff; border-color: var(--violet); box-shadow: 0 6px 16px -8px rgba(91,61,245,.7); }
.btn-primary:hover { background: var(--violet-600); color: #fff; border-color: var(--violet-600); }
.btn-lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.btn-lime:hover { background: var(--lime-600); border-color: var(--lime-600); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-3); color: #fff; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #F5C2C2; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #F5C2C2; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--violet-50); color: var(--violet); border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.inline { display: inline; margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card + .card { margin-top: 20px; }
.card.dark { background: var(--ink); color: #E8E9F3; border-color: var(--ink); }
.card.dark h2, .card.dark h3 { color: #fff; }

.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.right { text-align: right; } .center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; display: inline-block; vertical-align: bottom; }

.kpi { padding: 18px 20px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi .ic-wrap { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--violet-50); color: var(--violet); }
.kpi.accent { background: var(--violet); color: #fff; border-color: var(--violet); }
.kpi.accent .label, .kpi.accent .sub { color: #DCD4FF; }
.kpi.accent .ic-wrap { background: rgba(255,255,255,.15); color: var(--lime); }
.delta { font-weight: 600; font-size: 12px; padding: 1px 6px; border-radius: 6px; }
.delta.up { color: var(--success); background: var(--success-bg); }
.delta.down { color: var(--danger); background: var(--danger-bg); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #F0F0F6; color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--success-bg); color: var(--success); }
.badge.red { background: var(--danger-bg); color: var(--danger); }
.badge.amber { background: var(--warning-bg); color: var(--warning); }
.badge.violet { background: var(--violet-50); color: var(--violet); }
.badge.lime { background: var(--lime); color: var(--ink); }
.badge.dark { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; font-weight: 500; border: 1px solid transparent; }
.alert.success { background: var(--success-bg); color: #11692F; border-color: #C6EBD3; }
.alert.error { background: var(--danger-bg); color: #9B1C1C; border-color: #F5C2C2; }
.alert.info { background: var(--info-bg); color: #3B25B8; border-color: #DCD4FF; }
.alert.warning { background: var(--warning-bg); color: #8A4108; border-color: #F6DDAF; }
.alert .btn { margin-left: auto; }

/* Tablas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #FBFAFF; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FBFAFF; }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-title:hover { color: var(--violet); }
.cell-sub { font-size: 12.5px; color: var(--muted); }

.qr-thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--violet-50); color: var(--violet); display: grid; place-items: center; flex: none; }
.qr-thumb.lime { background: #F1FFD1; color: #4C6B00; }
.qr-cell { display: flex; align-items: center; gap: 12px; }

/* Formularios */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }
.form-grid .field + .field { margin-top: 0; }
label, .label { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.error-text { font-size: 12.5px; color: var(--danger); font-weight: 500; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #D9D6EE; border-radius: 10px; font: 14.5px var(--font); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91,61,245,.12); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--danger); }
input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid #D9D6EE; border-radius: 10px; background: #fff; cursor: pointer; }
.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type=text] { font-family: ui-monospace, monospace; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--violet); flex: none; }
.input-group { display: flex; }
input[type=file] { font: 13.5px var(--font); color: var(--muted); }
.input-group input { border-radius: 10px 0 0 10px; }
.input-group .btn { border-radius: 0 10px 10px 0; border-left: 0; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; background: #D9D6EE; border-radius: 99px; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--violet); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(91,61,245,.35); outline-offset: 2px; }

/* Segmentado */
.segmented { display: inline-flex; background: #ECEAF8; border-radius: 10px; padding: 3px; gap: 2px; }
.segmented a, .segmented label { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented a.active, .segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented label { padding: 0; }
.segmented label span { display: block; padding: 6px 12px; border-radius: 8px; }
.segmented input:focus-visible + span { outline: 3px solid rgba(91,61,245,.35); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.tabs button.active { color: var(--violet); border-bottom-color: var(--violet); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Selector de tipo */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.type-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.type-card:hover { border-color: var(--violet); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(91,61,245,.5); color: var(--ink); }
.type-card .qr-thumb { width: 42px; height: 42px; }
.type-card strong { font-family: var(--display); font-size: 16px; }
.type-card span { color: var(--muted); font-size: 13px; }

/* Vista previa QR */
.qr-preview { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; display: grid; place-items: center; }
.qr-canvas { width: 100%; max-width: 260px; aspect-ratio: 1; display: grid; place-items: center; }
.qr-canvas canvas, .qr-canvas svg { width: 100% !important; height: auto !important; }
.qr-frame { background: var(--frame-color, var(--ink)); border-radius: 22px; padding: 14px 14px 0; display: inline-block; width: 100%; max-width: 280px; }
.qr-frame .qr-canvas { background: #fff; border-radius: 12px; padding: 10px; max-width: none; }
.qr-frame .frame-text { color: #fff; text-align: center; font: 800 18px var(--display); letter-spacing: .08em; padding: 10px 0 12px; }
.sticky-side { position: sticky; top: 84px; }
.short-url { display: flex; align-items: center; gap: 8px; background: var(--violet-50); border-radius: 10px; padding: 8px 8px 8px 12px; font-family: ui-monospace, monospace; font-size: 13px; color: var(--violet-600); }
.short-url span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Flujo (hero del QR) */
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.flow .step { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; display: flex; gap: 6px; align-items: center; max-width: 100%; }
.flow .arrow { color: var(--violet); font-weight: 800; }

/* Listas simples */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.bar-list .item { margin-bottom: 12px; }
.bar-list .item .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.bar-list .track { height: 8px; background: #EFEDF9; border-radius: 99px; overflow: hidden; }
.bar-list .track span { display: block; height: 100%; background: var(--violet); border-radius: 99px; }

.empty { text-align: center; padding: 48px 20px; }
.empty .art { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; background: var(--violet-50); color: var(--violet); display: grid; place-items: center; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 16px; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; padding: 0 8px; }
.pagination .current { background: var(--violet); border-color: var(--violet); color: #fff; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filters input, .filters select { width: auto; min-width: 160px; padding: 8px 10px; }
.filters .grow { flex: 1; min-width: 200px; }

.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--border); border-radius: 18px; padding: 22px; background: #fff; display: flex; flex-direction: column; position: relative; }
.plan.current { border: 2px solid var(--violet); }
.plan.popular { background: var(--ink); color: #E8E9F3; border-color: var(--ink); }
.plan.popular h3, .plan.popular .price { color: #fff; }
.plan .ribbon { position: absolute; top: -11px; right: 18px; }
.plan .price { font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 500; font-family: var(--font); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .ic { color: var(--success); margin-top: 2px; }
.plan.popular li .ic { color: var(--lime); }
.plan li.off { opacity: .45; }
.plan li.off .ic { color: var(--muted); }
.plan form, .plan .cta { margin-top: auto; }
[data-cycle="yearly"] .p-monthly, [data-cycle="monthly"] .p-yearly { display: none; }

.integration-card { display: flex; gap: 14px; align-items: flex-start; }
.integration-logo { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font: 800 18px var(--display); color: #fff; flex: none; }
.integration-logo.activecampaign { background: #356AE6; }
.integration-logo.hubspot { background: #FF7A59; }
.integration-logo.webhook { background: var(--ink); color: var(--lime); }

.callout { border-radius: var(--radius); padding: 18px 20px; background: linear-gradient(120deg, var(--violet) 0%, #7B5CFF 100%); color: #fff; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.callout p { margin: 0; color: #E4DEFF; }
.callout h3 { margin: 0 0 2px; color: #fff; }
.callout .btn { margin-left: auto; }

details.box { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
details.box summary { padding: 14px 16px; cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.box summary::-webkit-details-marker { display: none; }
details.box summary::after { content: '+'; margin-left: auto; font-size: 18px; color: var(--muted); }
details.box[open] summary::after { content: '–'; }
details.box .inner { padding: 0 16px 16px; }

.lock { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--violet); background: var(--violet-50); padding: 3px 8px; border-radius: 6px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art .brand { padding: 0; font-size: 26px; }
.auth-art h1 { font-size: 46px; color: #fff; max-width: 480px; margin-top: auto; }
.auth-art h1 em { font-style: normal; color: var(--lime); }
.auth-art p { color: #A9AECB; max-width: 440px; font-size: 16px; }
.auth-art .hop { position: absolute; right: -60px; top: 80px; width: 420px; opacity: .9; }
.auth-art .proof { display: flex; gap: 28px; margin-top: 28px; }
.auth-art .proof strong { display: block; font: 800 26px var(--display); color: var(--lime); }
.auth-art .proof span { color: #A9AECB; font-size: 13px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 30px; font-weight: 800; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-card .foot { margin-top: 20px; text-align: center; color: var(--muted); }
.auth-mobile-brand { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-side { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(11,16,32,.5); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 24px; }
  .auth-mobile-brand .brand { color: var(--ink); }
  .hide-sm { display: none !important; }
  .user-chip .who { display: none; }
  h1 { font-size: 24px; }
}
@media (max-width: 520px) {
  .g-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 24px; }
  .filters input, .filters select { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===================== Qrelay Carta (panel) ===================== */
.input-group > span { display: flex; align-items: center; padding: 0 12px; background: #F3F2FB; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.input-group > span:first-child { border-left: 1px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px; }
.input-group > span:first-child + input { border-radius: 0 10px 10px 0; }
.bar-list > div { margin-bottom: 12px; }
.bar-list .bar, .menu-onboard .bar { height: 8px; background: #EFEDF9; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar-list .bar span, .menu-onboard .bar span { display: block; height: 100%; background: var(--violet); border-radius: 99px; }
.menu-onboard .checklist { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--muted); }
.menu-onboard .checklist li { display: flex; gap: 6px; align-items: center; }
.menu-onboard .checklist li.ok { color: var(--success); text-decoration: line-through; }
.menu-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.menu-tabs > a { padding: 8px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.menu-tabs > a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu-tabs > a.off { opacity: .55; text-decoration: line-through; }
details.pop { position: relative; }
details.pop > summary { list-style: none; cursor: pointer; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop .pop-body { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 340px; max-width: 86vw; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(11,16,32,.35); padding: 16px; }
details.pop.pop-right .pop-body { left: auto; right: 0; }
details.menu-settings > summary { list-style: none; cursor: pointer; }
details.menu-settings > summary::-webkit-details-marker { display: none; }
.days { display: flex; gap: 6px; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; }
.day span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.day input:checked + span { background: var(--violet); border-color: var(--violet); color: #fff; }
.sec-head { gap: 10px; }
.sec-head h3 { margin: 0; }
.drag { cursor: grab; color: #A9ADC4; display: inline-flex; padding: 4px; }
.drag:active { cursor: grabbing; }
.items { list-style: none; margin: 0; padding: 0 8px 8px; }
.items .item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid #F0EEF9; }
.items .item:first-child { border-top: 0; }
.items .item.sortable-ghost { opacity: .4; background: var(--violet-50); }
.items .item.soldout .info strong { text-decoration: line-through; color: var(--muted); }
.items .item.inactive { opacity: .55; }
.items .thumb { width: 52px; height: 52px; border-radius: 10px; background: #F3F2FB; display: grid; place-items: center; overflow: hidden; flex: none; color: #B8BBD0; }
.items .thumb img { width: 100%; height: 100%; object-fit: cover; }
.items .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; color: inherit; }
.items .info strong { font-size: 14.5px; }
.items .algs { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.items .price { font-weight: 700; white-space: nowrap; }
.items .avail .avail-label { font-size: 12px; color: var(--muted); font-weight: 600; min-width: 64px; }
.items .empty-row { padding: 14px 8px; color: var(--muted); font-size: 14px; }
.new-sec .field { margin-bottom: 0; }
.tr-field .tr-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.tr-field .tr-row > input, .tr-field .tr-row > textarea { flex: 1; }
.tr-lang { flex: none; width: 34px; height: 38px; display: grid; place-items: center; background: var(--violet-50); color: var(--violet); border-radius: 8px; font: 700 11px var(--font); }
.alg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.alg-opt { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; background: #fff; transition: border-color .15s, background .15s; }
.alg-opt input { position: absolute; opacity: 0; }
.alg-opt svg { flex: none; filter: grayscale(1) opacity(.35); transition: filter .15s; }
.alg-opt:has(input:checked) { border-color: var(--violet); background: var(--violet-50); }
.alg-opt:has(input:checked) svg { filter: none; }
.alg-opt .auto-flag { display: none; position: absolute; top: -8px; right: 8px; background: var(--lime); color: var(--ink); font: 700 10px var(--font); font-style: normal; padding: 1px 6px; border-radius: 99px; }
.alg-opt.is-auto .auto-flag { display: block; }
.auto-msg { background: #F6FFE0; border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; color: #3d5a00; }
.tag-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-opt { position: relative; }
.tag-opt input { position: absolute; opacity: 0; }
.tag-opt span { display: inline-block; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tag-opt input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.variant-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.variant-row > input { flex: 1; min-width: 140px; }
.variant-row .input-group { width: 140px; }
.photo-drop { aspect-ratio: 4 / 3; border-radius: 12px; background: #F3F2FB; display: grid; place-items: center; overflow: hidden; margin-bottom: 10px; }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.up-prev { display: block; max-height: 80px; border-radius: 10px; margin-bottom: 6px; background: #F3F2FB; }
.up-prev.wide { max-height: 110px; width: 100%; object-fit: cover; }
.phone { width: 300px; max-width: 100%; height: 600px; margin: 0 auto; border: 10px solid var(--ink); border-radius: 36px; overflow: hidden; background: #fff; }
.phone iframe { width: 100%; height: 100%; border: 0; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.lang-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.lang-opt:has(input:checked) { border-color: var(--violet); background: var(--violet-50); }
.qr-mini { width: 72px; height: 72px; }
.qr-mini canvas { width: 72px !important; height: 72px !important; }
.venue-card { color: inherit; transition: transform .15s; }
.venue-card:hover { transform: translateY(-2px); }
.venue-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; }
.venue-logo.ph { display: grid; place-items: center; background: var(--violet); color: #fff; font-weight: 800; }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #16A34A; animation: livep 1.6s infinite; vertical-align: middle; }
@keyframes livep { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6); } 70% { box-shadow: 0 0 0 10px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.board .col { background: #ECEAF8; border-radius: 16px; padding: 12px; min-height: 300px; }
.board .col h3 { margin: 2px 4px 12px; font-size: 14px; display: flex; justify-content: space-between; }
.board .col.done { opacity: .7; }
.ocard { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--violet); font-size: 14px; }
.ocard.preparing { border-left-color: #F2B01E; }
.ocard.ready { border-left-color: #16A34A; }
.ocard.late { box-shadow: 0 0 0 2px #E2574C; }
.ocard.alertc { border-left-color: #E2574C; background: #FFF5F4; }
.ocard .t { color: var(--muted); font-size: 12px; }
.ocard .tbl { font: 800 20px var(--display); margin: 6px 0 10px; }
.ocard ul { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.ocard .note { font-size: 12.5px; color: #8a5a00; background: #FFF6E0; border-radius: 8px; padding: 4px 8px; margin: 4px 0; }
.ocard em { color: var(--muted); font-style: normal; }
@media (max-width: 760px) { .items .avail .avail-label { display: none; } .items .item { gap: 8px; } .items .thumb { width: 44px; height: 44px; } }

.promo-price { margin-top: 6px; font-size: 12.5px; background: #F6FFE0; color: #3d5a00; border-radius: 8px; padding: 6px 8px; }
.plan.popular .promo-price { background: rgba(198,255,61,.15); color: #E8FFB0; }
.promo-box input { height: 38px; }

/* Ayuda y contacto */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp-list { display: grid; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; transition: background .15s; }
.sp-row:last-child { border-bottom: 0; }
.sp-row:hover { background: #FAFAFE; }
.sp-row.unread strong { color: var(--violet); }
.sp-main { display: grid; gap: 3px; min-width: 0; }
.sp-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-chat-card { display: flex; flex-direction: column; }
.sp-chat { display: grid; gap: 16px; padding: 22px 20px; max-height: 62vh; overflow-y: auto; }
.sp-msg { display: grid; gap: 5px; max-width: 82%; }
.sp-msg.me { justify-self: end; }
.sp-msg.me .sp-meta { text-align: right; }
.sp-meta { font-size: 12px; color: var(--muted); }
.sp-bubble { padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: #F3F2F8; line-height: 1.55; overflow-wrap: anywhere; }
.sp-msg.me .sp-bubble { background: var(--violet); color: #fff; border-radius: 16px 16px 4px 16px; }
.sp-reply { display: grid; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); background: #FBFBFE; border-radius: 0 0 var(--radius, 16px) var(--radius, 16px); }
.sp-reply:not(.sp-reply-admin) { grid-template-columns: 1fr auto; align-items: end; }
.sp-reply textarea { width: 100%; resize: vertical; }
.sp-unread td { background: #FAF8FF; }
.sp-unread .cell-title { font-weight: 700; }
.sp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E2574C; margin-right: 8px; vertical-align: middle; }
@media (max-width: 640px) { .sp-msg { max-width: 94%; } .sp-reply:not(.sp-reply-admin) { grid-template-columns: 1fr; } }
