:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #eef3f6;
    --panel: #fff;
    --panel-soft: #f8fafc;
    --ink: #14212b;
    --muted: #667085;
    --line: #d9e2ea;
    --nav: #1b2a3d;
    --nav-soft: #2b3d52;
    --brand: #0f766e;
    --brand-2: #2563eb;
    --blue: var(--brand-2);
    --warning: #b7791f;
    --danger: #b42318;
    --success: #067647;
    --info: #175cd3;
    --shadow: 0 18px 55px rgba(20, 33, 43, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
img { max-width: 100%; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 288px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px; color: #e7edf4; background: var(--nav); transition: transform .2s ease; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 50px; margin-bottom: 22px; color: #fff; }
.brand img { width: 48px; height: 48px; border-radius: 8px; padding: 4px; object-fit: contain; background: #fff; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: #a9b8c7; font-size: 12px; }
.sidebar-menu { display: grid; gap: 4px; }
.menu-dropdown { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.menu-dropdown summary { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin: 8px 8px 2px; padding: 6px 4px; color: #94a3b8; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: 0; list-style: none; text-transform: uppercase; user-select: none; }
.menu-dropdown summary::-webkit-details-marker { display: none; }
.menu-dropdown summary:hover { color: #d6e0ea; background: transparent; }
.menu-chevron { width: 18px; height: 18px; transition: transform .2s ease; }
.menu-dropdown[open] .menu-chevron { transform: rotate(180deg); }
.menu-dropdown-items { display: grid; gap: 4px; border-top: 0; padding: 0; }
.sidebar-menu a { display: flex; align-items: center; gap: 11px; min-height: 42px; border-radius: 8px; padding: 10px 12px; color: #d6e0ea; font-weight: 650; }
.sidebar-menu a:hover, .sidebar-menu a.active { color: #fff; background: var(--nav-soft); }
.nav-icon { flex: 0 0 auto; width: 21px; height: 21px; color: #fff; }
.sidebar-menu a.active .nav-icon { color: #fff; }
.metric-icon, .quick-icon { display: grid; flex: 0 0 auto; place-items: center; border-radius: 8px; font-weight: 850; }
.main-shell { min-width: 0; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; gap: 14px; min-height: 76px; border-bottom: 1px solid var(--line); padding: 14px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-size: 20px; }
.current-scope span, .eyebrow { display: block; margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.current-scope strong { font-size: 17px; }
.user-chip { display: grid; margin-left: auto; text-align: right; }
.user-chip span { color: var(--muted); font-size: 13px; }
.logout-form { display: block; }
.content { padding: 26px; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-heading h1 { margin: 0 0 5px; font-size: clamp(26px, 3vw, 32px); line-height: 1.15; }
.page-heading p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); }
.panel, .metric-card, .filter-bar, .auth-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.panel { padding: 20px; }
.panel h2 { margin: 0; font-size: 19px; }
.panel-heading { display: flex; justify-content: space-between; margin-bottom: 16px; }
.profile-forms { display: grid; gap: 18px; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dashboard-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dashboard-charts, .dashboard-breakdowns { display: grid; grid-template-columns: 1.3fr minmax(260px, 1fr); gap: 14px; margin-bottom: 18px; }
.dashboard-week-chart { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 18px; }
.dashboard-breakdowns-single { grid-template-columns: 1fr; }
.dashboard-recent { margin-bottom: 8px; }
.dashboard-recent-head { padding: 16px 18px 12px; }
.rank-list { display: grid; gap: 12px; margin: 10px 0 0; padding: 0; list-style: none; }
.rank-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(72px, 1fr) auto; gap: 10px; align-items: center; }
.rank-label { overflow: hidden; color: #344054; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { display: block; width: 100%; height: 8px; }
.rank-track { fill: #edf2f7; }
.rank-fill { fill: var(--brand); }
.metric-card { display: grid; gap: 7px; padding: 18px; }
.metric-card > span:not(.metric-icon) { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-card strong { font-size: 26px; line-height: 1; }
.metric-card small { color: var(--muted); }
.metric-icon, .quick-icon { width: 38px; height: 38px; color: var(--brand); background: #e6f4f1; }
.chart-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 14px; margin-bottom: 18px; }
.chart-panel { min-width: 0; min-height: 330px; }
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chart-chip { border-radius: 999px; padding: 5px 9px; color: var(--brand); background: #e6f4f1; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.line-chart, .bar-chart { display: block; width: 100%; height: 245px; overflow: visible; }
.chart-grid-lines line { stroke: #e7edf2; stroke-width: 1; }
.chart-area-line { fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.chart-point { fill: #fff; stroke: var(--brand); stroke-width: 4; }
.chart-label { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.chart-label-range { font-size: 9px; }
.chart-value { fill: var(--ink); font-size: 10px; font-weight: 800; text-anchor: middle; }
.chart-bar { fill: var(--brand); }
.chart-bar:hover { fill: #0b5f59; }
.donut-layout { display: grid; align-items: center; grid-template-columns: minmax(130px, .85fr) minmax(120px, 1fr); gap: 14px; min-height: 245px; }
.donut-chart { display: block; width: 100%; max-width: 200px; margin: auto; }
.donut-track, .donut-segment { fill: none; stroke-width: 18; }
.donut-track { stroke: #edf2f7; }
.donut-segment { transition: opacity .2s ease; }
.donut-segment:hover { opacity: .78; }
.donut-total { fill: var(--ink); font-size: 17px; font-weight: 850; text-anchor: middle; }
.donut-caption { fill: var(--muted); font-size: 8px; text-anchor: middle; }
.chart-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: grid; align-items: center; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; color: var(--muted); font-size: 12px; }
.chart-legend strong { color: var(--ink); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot.color-0 { background: #0f766e; }
.legend-dot.color-1 { background: #2563eb; }
.legend-dot.color-2 { background: #f59e0b; }
.legend-dot.color-3 { background: #7c3aed; }
.legend-dot.color-4 { background: #dc2626; }
.legend-dot.color-5 { background: #0891b2; }
.bar-current { fill: #2563eb; rx: 4px; }
.bar-previous { fill: #94a3b8; rx: 4px; }
.bar-legend { display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: 12px; }
.bar-legend span { display: flex; align-items: center; gap: 6px; }
.bar-legend i { width: 10px; height: 10px; border-radius: 3px; }
.bar-legend i.current { background: #2563eb; }
.bar-legend i.previous { background: #94a3b8; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.quick-grid a { display: flex; align-items: center; gap: 12px; min-height: 72px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; color: var(--ink); background: var(--panel-soft); }
.quick-grid a:hover { border-color: var(--brand); background: #f0fdfa; }
.quick-grid strong, .quick-grid small { display: block; }
.quick-grid small { margin-top: 3px; color: var(--muted); }
.empty-copy { color: var(--muted); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 7px; padding: 9px 14px; font-weight: 750; text-decoration: none; }
.button.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.button.primary:hover { background: #0b5f59; }
.button:disabled,
.button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.button.outline { color: #344054; border-color: var(--line); background: #fff; }
.button.danger { color: var(--danger); border-color: #fecdca; background: #fff; }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.full-width { width: 100%; }

label { display: grid; gap: 7px; color: #344054; font-size: 14px; font-weight: 700; }
[hidden] { display: none !important; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid #b8c4cf; border-radius: 7px; padding: 9px 11px; color: var(--ink); background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; border-color: var(--blue); }
[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-weight: 650; }
.form-help, small { color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.resource-form { display: grid; gap: 18px; }
.status-field { align-self: start; }
.check-group { display: grid; grid-column: 1 / -1; gap: 10px; margin: 0; border: 0; padding: 0; min-width: 0; }
.check-group legend { padding: 0; color: #344054; font-size: 14px; font-weight: 700; }
.check-group-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel-soft); position: relative; }
.check-row input { width: 18px; min-height: 18px; accent-color: var(--brand); }
.check-row input[data-company-bundle-extra] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }

.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto; gap: 12px; align-items: end; margin-bottom: 14px; padding: 14px; }
.filter-bar.has-extra-filter { grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; }
.filter-bar.has-date-filter { grid-template-columns: minmax(160px, 1fr) minmax(128px, 148px) minmax(128px, 148px) minmax(130px, 1fr) minmax(130px, 1fr) minmax(92px, 118px) auto; }
.filter-bar .filter-narrow { min-width: 0; }
.filter-bar .filter-narrow select { max-width: 118px; }
.table-panel { overflow: hidden; padding: 0; }
.table-wrap { overflow-x: auto; }
.app-table { width: 100%; border-collapse: collapse; }
.app-table th, .app-table td { border-bottom: 1px solid #e4e8ee; padding: 13px 14px; text-align: left; }
.app-table th { color: #475467; background: #f8fafc; font-size: 12px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.app-table td { color: #344054; }
.app-table tbody tr:hover { background: #fbfdfd; }
.actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.actions form { display: inline; }
.empty-cell { padding: 32px !important; color: var(--muted) !important; text-align: center !important; }
.status-badge { display: inline-flex; min-height: 24px; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; }
.status-success { color: var(--success); background: #ecfdf3; }
.status-error { color: var(--danger); background: #fef3f2; }
.status-muted { color: #475467; background: #f2f4f7; }
.status-warning { color: #b54708; background: #fffaeb; }
.form-span { grid-column: 1 / -1; }
.app-table th.num, .app-table td.num { text-align: right; }
.evento-items { display: grid; gap: 14px; }
.evento-items-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.evento-items-head h2 { margin: 0; font-size: 18px; }
.evento-item-list { display: grid; gap: 12px; }
.evento-item { border: 1px solid #d9e2ea; border-radius: 8px; padding: 14px; background: #f8fbfc; }
.evento-item-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; grid-column: 1 / -1; }
.evento-grand-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; padding: 12px 14px; border: 1px solid #d9e2ea; border-radius: 8px; background: #e6f4f1; }
.evento-grand-total span { color: #0f766e; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.evento-grand-total strong { color: #14212b; font-size: 22px; }
input[readonly] { background: #eef3f6; color: #14212b; }
.evento-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.evento-line-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.evento-line-list li { display: grid; gap: 2px; }
.evento-line-list small { color: var(--muted); }
.soporte-history { margin-top: 18px; }
.soporte-history .panel-heading { padding: 16px 18px 8px; }
.pdf-download { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; border: 1px solid #fecdca; border-radius: 7px; padding: 4px 10px; color: #b42318; background: #fef3f2; font-size: 12px; font-weight: 800; }
.pdf-download:hover { background: #fee4e2; color: #912018; }
.pdf-download .nav-icon { width: 16px; height: 16px; color: #b42318; }
.table-pager-wrap { width: 100%; border-top: 1px solid #e4e8ee; background: #fff; }
table.table-pager { width: 100%; border-collapse: collapse; margin: 0; }
table.table-pager td { padding: 8px 16px !important; border: 0 !important; vertical-align: middle !important; white-space: nowrap !important; color: #475467; font-size: 13px; font-weight: 650; background: #fff; }
table.table-pager td.pager-end { text-align: right; }
table.table-pager .pager-size-text { display: inline !important; margin-right: 8px; }
table.table-pager select.pager-size-select { display: inline-block !important; width: auto !important; min-width: 56px !important; max-width: 72px !important; height: 28px !important; min-height: 28px !important; margin: 0 !important; padding: 0 8px !important; border-radius: 999px !important; }
table.table-pager .pager-range { display: inline !important; margin: 0 8px 0 0 !important; }
table.table-pager .pager-btn { display: inline-flex !important; align-items: center; justify-content: center; width: 32px !important; height: 32px !important; min-width: 32px !important; min-height: 32px !important; max-width: 32px !important; margin-left: 2px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; color: #667085; background: transparent; vertical-align: middle; text-decoration: none; }
table.table-pager .pager-btn svg { width: 18px !important; height: 18px !important; display: block; }
table.table-pager .pager-btn.is-disabled { color: #d0d5dd; pointer-events: none; }
table.table-pager a.pager-btn:hover { background: #f2f4f7; color: #344054; }

.consumos-stack { margin-top: 0; }
.table-panel .panel-heading { display: grid; gap: 4px; padding: 16px 18px 8px; margin-bottom: 0; }
.table-panel .panel-heading h2 { margin: 0; font-size: 18px; }
.table-panel .panel-heading p { margin: 0; color: var(--muted); font-weight: 500; }
.edition-history { margin-top: 0; }
.edition-history h2 { margin-bottom: 6px; }
.edition-history .panel-heading p { margin: 0 0 12px; color: var(--muted); }
.edition-entry { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: #344054; font-size: 14px; }
.edition-entry:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.edition-entry.is-deleted { background: #fef3f2; border: 1px solid #fecdca; border-radius: 8px; padding: 12px 14px; }
.edition-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 6px; font-weight: 650; }
.edition-meta span { color: var(--muted); font-weight: 600; }
.edition-summary { margin: 0 0 8px; }
.edition-changes { margin: 0; padding-left: 18px; }
.edition-changes li { margin: 0 0 4px; }
.edition-changes.compact { padding-left: 16px; }
.edition-link { margin-left: 8px; font-weight: 700; color: var(--brand); }
.alert { border: 1px solid transparent; border-radius: 8px; margin-bottom: 16px; padding: 13px 15px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert.success { color: var(--success); border-color: #abefc6; background: #ecfdf3; }
.alert.error { color: #8a1720; border-color: #fecdca; background: #fef3f2; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.report-card { display: grid; gap: 16px; align-content: start; min-height: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: var(--panel); box-shadow: var(--shadow); }
.report-card h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.report-card p:not(.eyebrow) { margin: 0; color: var(--muted); }
.report-card .button { justify-self: start; }
.report-card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; color: var(--brand); background: #e6f4f1; }
.report-card-icon .nav-icon { width: 22px; height: 22px; color: var(--brand); }
.report-preview { border: 1px solid #cce3de; border-radius: 8px; padding: 16px 18px; background: #f4faf8; }
.report-preview dl { display: grid; gap: 12px; margin: 12px 0 0; }
.report-preview dl > div { display: grid; gap: 3px; }
.report-preview dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.report-preview dd { margin: 0; color: var(--ink); font-weight: 700; }
.soporte-casino { display: grid; gap: 4px; align-content: start; }
.soporte-casino span { color: #344054; font-size: 14px; font-weight: 700; }
.soporte-casino strong { display: block; min-height: 42px; border: 1px solid #d9e2ea; border-radius: 7px; padding: 10px 12px; color: var(--nav); background: #f4faf8; }
.soporte-casino small { color: var(--muted); font-weight: 400; }
.consulta-stack { display: grid; gap: 18px; margin-top: 18px; }
.consulta-stack .panel-heading { padding: 16px 18px 8px; margin-bottom: 0; }
.consulta-stack .panel-heading h2 { margin: 0; font-size: 18px; }
.consulta-stack .panel-heading p { margin: 6px 0 0; color: var(--muted); font-weight: 500; }
.consulta-stack .app-table tfoot th { background: #e6f4f1; color: #0f766e; }
.consulta-stack .report-preview dl { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.consulta-matrix th:first-child, .consulta-matrix td:first-child { position: sticky; left: 0; min-width: 180px; background: #fff; z-index: 1; }
.consulta-matrix thead th:first-child { background: #f8fafc; z-index: 2; }
.consulta-matrix tfoot th:first-child { z-index: 2; }
.consulta-stack tbody tr.is-fequiba td { border-top: 2px solid #0f766e; background: #f4faf8; font-weight: 750; }
.consulta-stack tbody tr.is-fequiba td:first-child { background: #f4faf8; }
.soporte-preview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 16px; margin-top: 18px; }
.soporte-sheet { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.soporte-sheet-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #1b2a3d 0%, #0f766e 100%); }
.soporte-sheet-head h2 { margin: 0 0 4px; font-size: 24px; }
.soporte-sheet-head p:not(.eyebrow) { margin: 0; color: #d6e0ea; }
.soporte-sheet-head .eyebrow { color: #8fd7cf; }
.soporte-sheet-head strong { align-self: start; border-radius: 999px; padding: 6px 12px; color: #0f766e; background: #fff; font-size: 12px; }
.soporte-table th { color: #fff; background: #1b2a3d; }
.soporte-table td.num, .soporte-table th.num { text-align: right; }
.soporte-table tfoot th { color: #0f766e; background: #e6f4f1; }
.soporte-recipients { margin: 6px 0 0; padding-left: 18px; }
.soporte-recipients li { margin: 0 0 4px; }
.soporte-recipients span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
.evento-approval { margin: 0; padding: 12px 20px 18px; color: #0f766e; font-weight: 800; }
.soporte-switch { display: grid; gap: 8px; margin: 0; border: 0; padding: 0; }
.soporte-switch legend { padding: 0; color: #344054; font-size: 14px; font-weight: 700; }
.soporte-switch label { display: flex; align-items: center; gap: 10px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #f8fafc; font-weight: 750; }
.soporte-switch input { width: 18px; min-height: 18px; accent-color: var(--brand); }
.soporte-switch label:has(input:checked) { border-color: var(--brand); background: #e6f4f1; color: var(--nav); }
.report-preview form { margin-top: 16px; }
.report-preview .pdf-download { margin-top: 16px; width: fit-content; }
.report-preview .button { width: 100%; }
.person-search { align-content: start; }
.person-search-field { position: relative; display: grid; gap: 7px; }
.person-results { position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% - 2px); margin: 0; padding: 6px; list-style: none; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.person-results li { margin: 0; }
.person-results button { display: grid; width: 100%; min-height: 42px; justify-items: start; gap: 2px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.person-results button:hover, .person-results button:focus-visible { background: #e6f4f1; }
.person-results .person-meta { color: var(--muted); font-size: 12px; font-weight: 650; }
.person-results .person-empty { padding: 10px 12px; color: var(--muted); font-weight: 650; }
.person-selected { display: grid; gap: 10px; }
.person-selected .check-row { justify-content: space-between; }
.person-selected .check-row span { flex: 1; min-width: 0; }

.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-brand-panel, .login-access-panel { display: grid; min-height: 100vh; }
.login-brand-panel { position: relative; align-content: center; gap: 34px; overflow: hidden; padding: clamp(34px, 5vw, 70px); color: #fff; background: radial-gradient(circle, rgba(255,255,255,.11) 1px, transparent 1.5px) 0 0/24px 24px, linear-gradient(145deg,#111827 0%,#14243a 48%,#17406a 100%); }
.login-brand-panel::after { position: absolute; inset: 0; content: ""; background: linear-gradient(115deg,transparent 0 42%,rgba(37,99,235,.18) 42% 43%,transparent 43%), linear-gradient(115deg,transparent 0 54%,rgba(15,118,110,.16) 54% 55%,transparent 55%); pointer-events: none; }
.login-main-logo, .login-welcome, .login-footnote { position: relative; z-index: 1; }
.login-main-logo { width: clamp(160px, 18vw, 245px); height: clamp(160px, 18vw, 245px); justify-self: center; border: 1px solid rgba(255,255,255,.24); border-radius: 8px; padding: 14px; object-fit: contain; background: rgba(255,255,255,.95); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.login-welcome { max-width: 640px; }
.login-welcome h1 { margin: 0 0 18px; font-size: clamp(26px, 2.8vw, 40px); line-height: 1.16; }
.login-welcome p { margin: 0; color: #d9e6ec; font-size: 18px; line-height: 1.55; }
.login-trust-line { display: flex; gap: 10px; margin-top: 28px; color: #d9e6ec; font-weight: 650; }
.login-trust-line span { color: #8fd7cf; }
.login-footnote { margin: 0; }
.login-access-panel { align-content: center; justify-items: center; gap: 72px; padding: clamp(28px, 5vw, 64px); }
.login-companies-logo { width: min(82%, 470px); max-height: 116px; object-fit: contain; }
.auth-card { width: min(100%, 430px); padding: 28px; }
.auth-card h2 { margin: 0 0 6px; font-size: 28px; }
.auth-intro { margin: 0 0 20px; color: var(--muted); }
.auth-alt-link { margin: 16px 0 0; text-align: center; }
.auth-alt-link a { color: var(--blue); font-weight: 650; }
.auth-card form { display: grid; gap: 13px; }
.auth-card form > label { display: inline-flex; align-items: baseline; gap: 4px; justify-self: start; }
.required-mark { color: var(--danger); }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-toggle { width: 42px; min-width: 42px; padding: 8px; }
.password-eye { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-eye[hidden] { display: none; }

.kiosk-page { background: #e8eef3; min-height: 100%; height: auto; overflow: auto; }
.kiosk-shell {
    display: grid;
    grid-template-rows: auto minmax(480px, 1fr);
    width: 100%;
    min-height: max(700px, 100svh, 100vh);
    height: auto;
    overflow: auto;
}
.kiosk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 10px 22px; background: var(--nav); color: #fff; }
.kiosk-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kiosk-brand img { width: 44px; height: 44px; border-radius: 8px; padding: 4px; object-fit: contain; background: #fff; }
.kiosk-brand strong, .kiosk-brand span { display: block; }
.kiosk-brand strong { font-size: 17px; line-height: 1.2; }
.kiosk-brand span { color: #a9b8c7; font-size: 13px; }
.kiosk-status { display: grid; justify-items: end; gap: 2px; color: #c5d0db; font-size: 12px; font-weight: 650; }
.kiosk-status-row { display: inline-flex; align-items: center; gap: 8px; }
.kiosk-online { display: inline-flex; align-items: center; gap: 6px; color: #8fd7cf; font-weight: 700; }
.kiosk-online i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .16); }
.kiosk-logout { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; color: #d7e0ea; background: transparent; }
.kiosk-logout:hover { color: #fff; background: var(--nav-soft); }
.kiosk-exit { color: #fff; border-color: rgba(255,255,255,.28); background: transparent; }
.kiosk-exit:hover { background: var(--nav-soft); }
.kiosk-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 30%); gap: 18px; min-height: 0; padding: 18px; align-items: stretch; }
.kiosk-card, .kiosk-log { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(20, 33, 43, .06); }
.kiosk-card { display: grid; align-content: start; justify-items: center; min-height: 0; overflow: auto; padding: 28px 24px 24px; text-align: center; }
.kiosk-eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.kiosk-card h1 { margin: 0 0 8px; max-width: none; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.15; color: var(--nav); }
.kiosk-lead { max-width: 36ch; margin: 0 0 16px; color: var(--muted); font-size: 16px; line-height: 1.4; }
.kiosk-form { display: grid; gap: 14px; width: min(100%, 680px); }
.kiosk-select-field { display: grid; gap: 8px; text-align: left; }
.kiosk-select-field span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.kiosk-select { width: 100%; min-height: 64px; border: 2px solid #cfd8e3; border-radius: 14px; padding: 12px 16px; color: var(--nav); background: #f8fafc; font-size: clamp(18px, 2.2vw, 24px); font-weight: 800; }
.kiosk-select:focus { outline: 3px solid rgba(15, 118, 110, .18); border-color: var(--brand); background: #fff; }
[data-kiosk-after-casino] { display: grid; gap: 14px; }
[data-kiosk-after-casino][hidden] { display: none !important; }
.kiosk-input { width: 100%; min-height: 84px; border: 2px solid #cfd8e3; border-radius: 14px; padding: 12px 16px; color: var(--nav); background: #f8fafc; font-size: clamp(32px, 4vw, 44px); font-weight: 800; text-align: center; letter-spacing: .08em; }
.kiosk-input:focus { outline: 3px solid rgba(15, 118, 110, .18); border-color: var(--brand); background: #fff; }
.kiosk-desk { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(200px, 230px); gap: 16px; align-items: stretch; }
.kiosk-pad-wrap { display: grid; gap: 12px; min-width: 0; }
.kiosk-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kiosk-today { display: grid; align-content: center; justify-items: center; gap: 8px; min-height: 220px; border: 1px solid #cfe3df; border-radius: 16px; padding: 22px 16px; background: #f4faf8; box-shadow: inset 0 0 0 1px #fff; }
.kiosk-today span { color: var(--nav); font-size: 16px; font-weight: 800; }
.kiosk-today strong { color: var(--nav); font-size: clamp(56px, 6vw, 76px); font-weight: 800; line-height: .9; }
.kiosk-key { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 62px; border: 1px solid #d5dee7; border-radius: 12px; color: var(--nav); background: #fff; font-size: 22px; font-weight: 800; box-shadow: 0 1px 0 rgba(20, 33, 43, .04); touch-action: manipulation; user-select: none; }
.kiosk-key:hover { border-color: #9db0c0; background: #f4f8fb; }
.kiosk-key:active { transform: translateY(1px); background: #e8eef3; }
.kiosk-key.is-action { font-size: 15px; color: #3f5366; }
.kiosk-submit { width: 100%; min-height: 62px; border-radius: 12px; font-size: 20px; font-weight: 800; }
.kiosk-submit:hover:not(:disabled) { background: #0b5f59; }
.kiosk-submit:disabled { opacity: .42; cursor: not-allowed; }
.kiosk-choices { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; text-align: left; }
.kiosk-choices legend { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.kiosk-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #f8fafc; font-weight: 700; }
.kiosk-meal-box { display: grid; gap: 14px; margin: 2px 0 4px; border: 1px solid #cfe3df; border-radius: 20px; padding: 18px 16px 16px; background: linear-gradient(180deg, #f7fbfa 0%, #ffffff 72%); box-shadow: 0 10px 28px rgba(27, 42, 61, .08); }
.kiosk-meal-box-head { text-align: center; }
.kiosk-meal-box-head p { margin: 0 0 4px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.kiosk-meal-box-head h2 { margin: 0; color: var(--nav); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
.kiosk-meal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kiosk-meal-card { position: relative; display: grid; justify-items: center; gap: 8px; min-height: 168px; border: 2px solid #d5dee7; border-radius: 18px; padding: 18px 12px 16px; color: var(--nav); background: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(27, 42, 61, .05); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background .15s ease; }
.kiosk-meal-card input { position: absolute; opacity: 0; pointer-events: none; }
.kiosk-meal-card:hover { border-color: #9db0c0; transform: translateY(-2px); }
.kiosk-meal-card:has(input:focus-visible) { outline: 3px solid rgba(15, 118, 110, .28); outline-offset: 2px; }
.kiosk-meal-card:has(input:checked) { border-color: var(--brand); background: #e7f6f2; box-shadow: 0 10px 24px rgba(15, 118, 110, .18); }
.kiosk-meal-card[data-kind="cena"]:has(input:checked) { border-color: #1b2a3d; background: #eef3f8; box-shadow: 0 10px 24px rgba(27, 42, 61, .16); }
.kiosk-meal-icon { width: 72px; height: 72px; }
.kiosk-meal-icon svg { width: 72px; height: 72px; display: block; filter: drop-shadow(0 6px 10px rgba(27, 42, 61, .16)); }
.kiosk-meal-card strong { font-size: 20px; line-height: 1.1; }
.kiosk-meal-card em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 700; }
.kiosk-feedback { min-height: 24px; margin: 8px 0 0; font-weight: 750; }
.kiosk-feedback.is-error { color: var(--danger); }
.kiosk-feedback.is-ok { color: var(--success); }
.kiosk-side { display: grid; min-width: 0; min-height: 420px; height: auto; }
.kiosk-log { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 420px; height: auto; overflow: hidden; }
.kiosk-log-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.kiosk-log-head h2 { margin: 0; color: var(--nav); font-size: 16px; }
.kiosk-log-head p { margin: 0; color: var(--muted); font-size: 13px; }
.kiosk-log-list { list-style: none; margin: 0; padding: 10px; overflow: auto; }
.kiosk-log-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 8px; border: 1px solid #e8eef3; border-radius: 12px; padding: 10px 12px; background: #fff; }
.kiosk-log-list li.is-new { background: #e7f6f2; border-color: #b7e0d6; }
.kiosk-log-list li.is-selected { border-color: var(--brand); background: #e7f6f2; box-shadow: 0 0 0 2px rgba(15, 118, 110, .16); }
.kiosk-shell.is-reprint .kiosk-log { box-shadow: 0 0 0 2px rgba(15, 118, 110, .28); }
.kiosk-shell.is-reprint .kiosk-log-list li[data-kiosk-entry] { cursor: pointer; }
.kiosk-log-num { color: var(--brand); font-size: 13px; font-weight: 800; line-height: 1.4; font-variant-numeric: tabular-nums; }
.kiosk-log-mark { color: var(--brand); font-weight: 800; }
.kiosk-log-list strong, .kiosk-log-list span, .kiosk-log-list em { display: block; }
.kiosk-log-list strong { color: var(--nav); font-size: 14px; line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; }
.kiosk-log-list span { margin-top: 3px; color: #3f5366; font-size: 13px; font-weight: 700; }
.kiosk-log-list em { margin-top: 2px; color: var(--muted); font-size: 12px; font-style: normal; }
.kiosk-log-empty { display: block; grid-template-columns: 1fr; justify-content: center; border: 0; background: transparent; color: var(--muted); text-align: center; }
.kiosk-log-head p { margin: 4px 0 0; color: var(--brand); font-size: 12px; font-weight: 700; }
.kiosk-toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; display: grid; gap: 4px; min-width: 280px; max-width: min(420px, calc(100vw - 32px)); border: 1px solid #b7e0d6; border-radius: 14px; padding: 16px 18px; background: #fff; box-shadow: 0 16px 40px rgba(20, 33, 43, .16); }
.kiosk-toast.is-ok { border-color: #b7e0d6; }
.kiosk-toast.is-error { border-color: #fecdca; }
.kiosk-toast p { margin: 0; color: var(--success); font-weight: 800; }
.kiosk-toast.is-error p { color: var(--danger); }
.kiosk-toast strong { color: var(--nav); font-size: 18px; text-transform: uppercase; }
.kiosk-toast span { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.kiosk-ticket { display: none; }
.kiosk-report { display: none; }
.kiosk-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 32, .55); }
.kiosk-modal[hidden] { display: none !important; }
.kiosk-modal-card { display: grid; gap: 14px; width: min(100%, 520px); max-height: min(88dvh, 760px); border-radius: 16px; padding: 22px 22px 18px; background: #fff; box-shadow: 0 24px 60px rgba(20, 33, 43, .28); overflow: auto; }
.kiosk-modal-card h2 { margin: 0; color: var(--nav); font-size: 22px; }
.kiosk-modal-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.kiosk-modal-field { display: grid; gap: 6px; color: var(--nav); font-size: 13px; font-weight: 800; }
.kiosk-modal-field input { min-height: 52px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 18px; font-weight: 700; }
.kiosk-report-summary { color: var(--nav) !important; font-weight: 800; }
.kiosk-report-preview { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; }
.kiosk-report-preview li { display: grid; gap: 0; margin-bottom: 2px; border: 0; border-radius: 0; padding: 2px 0; background: transparent; }
.kiosk-report-preview strong { color: var(--nav); font-size: 13px; font-weight: 500; text-transform: uppercase; }
.kiosk-report-preview span, .kiosk-report-preview em { color: #3f5366; font-size: 12px; font-style: normal; font-weight: 700; }
.kiosk-report-preview em { color: #1f6b4a; }
.kiosk-report-preview .kiosk-report-group { margin: 8px 0 4px; color: #0f172a; font-size: 14px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.kiosk-report-preview .kiosk-report-total { margin-top: 8px; background: #eef6f3; border-color: #cfe3da; color: var(--nav); font-size: 14px; font-weight: 800; }
.kiosk-modal-card h2 { margin: 0; color: var(--nav); font-size: 22px; }
.kiosk-modal-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.kiosk-modal-field { display: grid; gap: 6px; color: var(--nav); font-size: 13px; font-weight: 800; }
.kiosk-modal-field input { min-height: 52px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 18px; font-weight: 700; }
.kiosk-modal-error { color: var(--danger); font-weight: 700; }
.kiosk-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.kiosk-modal-actions .button { min-height: 46px; }

@media (max-width: 1180px) {
    .metric-grid, .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .chart-grid, .dashboard-charts, .dashboard-breakdowns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-week-chart { grid-template-columns: 1fr; }
    .chart-grid .chart-panel:first-child { grid-column: 1 / -1; }
    .quick-grid, .report-grid, .soporte-preview { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .login-brand-panel, .login-access-panel { min-height: auto; }
    .login-brand-panel { padding: 30px 22px; text-align: center; }
    .login-welcome { justify-self: center; }
    .login-access-panel { gap: 28px; padding: 30px 18px; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 20; width: min(86vw, 310px); transform: translateX(-105%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .topbar { flex-wrap: wrap; }
    .content { padding: 18px; }
    .user-chip { margin-left: auto; }
    .kiosk-board { grid-template-columns: 1fr; }
    .kiosk-shell { height: auto; min-height: max(700px, 100svh); overflow: auto; }
    .kiosk-side { min-height: 420px; }
    .kiosk-desk { grid-template-columns: 1fr; }
    .kiosk-today { min-height: 140px; }
    .kiosk-meal-grid { grid-template-columns: 1fr; }
    .kiosk-toast { right: 16px; left: 16px; bottom: 16px; }
}
@media (max-width: 1180px) {
    .filter-bar.has-date-filter { grid-template-columns: minmax(160px, 1.2fr) minmax(128px, 160px) minmax(128px, 160px) minmax(140px, 1fr); }
    .filter-bar .filter-narrow select { max-width: none; }
}
@media (max-width: 620px) {
    .metric-grid, .dashboard-metrics, .chart-grid, .dashboard-charts, .dashboard-breakdowns, .quick-grid, .report-grid, .filter-bar, .filter-bar.has-extra-filter, .filter-bar.has-date-filter, .form-grid { grid-template-columns: 1fr; }
    .evento-item-amounts { grid-template-columns: 1fr; }
    .evento-items-head { flex-direction: column; align-items: stretch; }
    .chart-grid .chart-panel:first-child { grid-column: auto; }
    .donut-layout { grid-template-columns: 1fr; }
    .page-heading { flex-direction: column; }
    .current-scope { display: none; }
    .user-chip { max-width: 135px; overflow: hidden; text-align: left; }
    .login-welcome p { font-size: 16px; }
    .login-companies-logo { max-height: 84px; }
    .actions { flex-wrap: wrap; }
    .kiosk-board { grid-template-columns: 1fr; padding: 12px; }
    .kiosk-log { min-height: 240px; }
    .kiosk-card { padding: 20px 16px; }
    .kiosk-form { width: min(100%, 420px); }
    .kiosk-card h1 { max-width: none; }
}
