/* RCXMOD-20260826-Z8T4-07 INICIO */
:root {
  --bg: #F6F3EA;
  --surface: #FFFFFF;
  --surface-2: #F1EBDD;
  --text: #241F16;
  --muted: #756C5C;
  --border: #E4DDCF;
  --brand: #A87E0A;
  --brand-2: #6D5210;
  --accent: #D9BE64;
  --danger: #C94444;
  --success: #16845B;
  --warning: #C98713;
  --chart-1: #A87E0A;
  --chart-2: #5C6F68;
  --chart-3: #D19C5A;
  --chart-4: #7C6A9B;
  --chart-5: #4F7C9A;
  --chart-6: #B76363;
  --chart-7: #8A9B59;
  --chart-8: #C7793F;
  --shadow: 0 10px 30px rgba(33, 39, 33, .08);
  --radius: 16px;
}
/* RCXMOD-20260826-Z8T4-07 FIN */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--text); background: var(--bg); }
body { line-height: 1.45; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.text-right { text-align: right; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 12% 10%, #e8ebe5, transparent 34%), var(--bg); }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 32px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--brand); color: white; display: grid; place-items: center; font-weight: 800; letter-spacing: .04em; }
.brand-title { font-weight: 800; font-size: 1.08rem; }
.brand-subtitle { color: var(--muted); font-size: .82rem; }
h1, h2, h3 { margin-top: 0; }
.auth-card h1 { font-size: 1.55rem; margin-bottom: 6px; }
.form-grid { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .86rem; font-weight: 700; }
.field input, .field select { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 11px; padding: 11px 12px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(96,118,97,.12); }
.btn { border: 0; border-radius: 11px; padding: 11px 15px; font-weight: 700; background: #e8ebe6; color: var(--text); }
.btn:hover { filter: brightness(.98); }
.btn-primary { background: var(--brand); color: white; }
.btn-danger { background: #f6e4e4; color: var(--danger); }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.error-box { background: #faeaea; color: #7e3232; padding: 11px 13px; border-radius: 10px; font-size: .88rem; }
.success-box { background: #e7f3ea; color: #2e6240; padding: 11px 13px; border-radius: 10px; font-size: .88rem; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 66px; background: var(--surface); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
/* RCXMOD-20260930-HDRCTX-M6R3-04 INICIO */
.topbar-context { position: absolute; left: 50%; transform: translateX(-50%); max-width: min(48vw, 760px); padding: 0 12px; color: var(--muted); font-size: .78rem; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
/* RCXMOD-20260930-HDRCTX-M6R3-04 FIN */
.topbar .brand-lockup { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 999px; background: var(--surface-2); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: white; display: grid; place-items: center; font-size: .78rem; font-weight: 800; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); padding: 8px 10px; border-radius: 10px; }

.content { width: min(1500px, calc(100% - 34px)); margin: 22px auto 44px; }
.page-heading { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.page-heading h1 { margin: 0 0 3px; font-size: clamp(1.55rem, 2vw, 2.15rem); }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; background: #edf2ed; color: #415443; border-radius: 999px; padding: 7px 10px; font-size: .82rem; font-weight: 700; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.filter-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(33,39,33,.04); padding: 14px; margin-bottom: 16px; display: grid; grid-template-columns: minmax(250px, 1.4fr) minmax(160px,.7fr) minmax(200px,1fr) auto; gap: 12px; align-items: end; }
.filter-group { display: grid; gap: 6px; min-width: 0; }
.filter-label { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.filter-control { border: 1px solid var(--border); border-radius: 10px; min-height: 41px; background: var(--surface); padding: 8px 10px; }
/* RCXMOD-20260923-V1583-A4K7-05 INICIO */
.restaurant-picker, .channel-picker { position: relative; }
/* RCXMOD-20260923-V1583-A4K7-05 FIN */
.picker-button { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; }
.picker-panel { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; width: min(420px, 90vw); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; max-height: 330px; overflow: auto; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; }
.check-row:hover { background: var(--surface-2); }
.period-inputs { display: flex; gap: 8px; }
.period-inputs input { min-width: 0; flex: 1; }
.quick-row { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 18px; }
.quick-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 11px; font-size: .82rem; }
.quick-chip.active { background: var(--brand); color: white; border-color: var(--brand); }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-height: 118px; box-shadow: 0 4px 14px rgba(33,39,33,.035); }
.kpi-label { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: clamp(1.35rem, 2vw, 2rem); font-weight: 800; margin: 8px 0 5px; white-space: nowrap; }
/* RCXMOD-20260826-CMP9X2-13 INICIO */
.kpi-compare { font-size: .78rem; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.kpi-compare-item { display: inline-flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.kpi-compare-item small { color: var(--muted); font-size: .68rem; font-weight: 500; white-space: nowrap; }
/* RCXMOD-20260826-CMP9X2-13 FIN */
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; box-shadow: 0 4px 14px rgba(33,39,33,.035); }
.panel-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.panel h2 { margin: 0; font-size: 1rem; }
.panel-note { color: var(--muted); font-size: .76rem; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }
.chart-host { min-height: 260px; position: relative; }
.chart-svg { width: 100%; height: 260px; overflow: visible; }
.chart-grid-line { stroke: var(--border); stroke-width: 1; }
.chart-axis-text { fill: var(--muted); font-size: 10px; }
.chart-value-label { fill: var(--text); font-size: 7.5px; font-weight: 800; paint-order: stroke; stroke: var(--surface); stroke-width: 2px; stroke-linejoin: round; pointer-events: none; }
.chart-value-label-grouped { font-size: 7px; }
.chart-value-label-multi { font-size: 6.5px; }
.chart-bar { fill: var(--chart-1); cursor: pointer; transition: opacity .15s, transform .15s; transform-origin: bottom; }
.chart-bar:hover { opacity: .78; }
.chart-line { fill: none; stroke: var(--chart-1); stroke-width: 2.4; }
.chart-point { fill: var(--surface); stroke: var(--chart-1); stroke-width: 2; }
.empty-state { min-height: 190px; display: grid; place-items: center; color: var(--muted); text-align: center; }

.rank-list { display: grid; gap: 10px; }
.rank-row { display: grid; grid-template-columns: minmax(130px, 1.4fr) minmax(100px, 2fr) auto; gap: 10px; align-items: center; font-size: .84rem; }
.rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 8px; border-radius: 999px; background: #eef0ed; overflow: hidden; }
.rank-fill { height: 100%; border-radius: inherit; background: var(--chart-1); }
.rank-value { font-weight: 800; white-space: nowrap; }
.turn-grid { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; min-height: 220px; }
.donut { width: 145px; aspect-ratio: 1; border-radius: 50%; position: relative; background: conic-gradient(var(--brand) 0 var(--pct,50%), #d8ded7 var(--pct,50%) 100%); }
.donut::after { content: ''; position: absolute; inset: 24px; background: var(--surface); border-radius: 50%; }
/* RCXMOD-20260923-PIEGR-Q4N7-07 INICIO */
.pie { width: 145px; aspect-ratio: 1; border-radius: 50%; position: relative; background: conic-gradient(var(--brand) 0 var(--pct,50%), #d8ded7 var(--pct,50%) 100%); }
/* RCXMOD-20260923-PIEGR-Q4N7-07 FIN */
.legend { display: grid; gap: 10px; }
.legend-row { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; }
.legend-key { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.legend-dot.alt { background: #d8ded7; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .84rem; }
th, td { padding: 10px 11px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { background: var(--surface-2); color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .035em; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tr.clickable:hover { background: #f8faf7; cursor: pointer; }

.loading-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(244,245,242,.72); backdrop-filter: blur(2px); display: grid; place-items: center; }
.spinner { width: 42px; height: 42px; border: 4px solid #dfe3dc; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(20,24,20,.42); display: grid; place-items: center; padding: 20px; }
.modal { width: min(1180px, 96vw); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: 0 24px 70px rgba(20,24,20,.24); }
.modal-header { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; }
.modal-body { padding: 18px 20px 24px; }
.modal-kpis { grid-template-columns: repeat(6, 1fr); }
.ticket-lines { background: var(--surface-2); }

.admin-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; }
.restaurant-checks { border: 1px solid var(--border); border-radius: 10px; padding: 7px; max-height: 230px; overflow: auto; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: .72rem; font-weight: 800; background: #edf0ec; }
.badge.ok { background: #e5f2e8; color: var(--success); }
.badge.off { background: #f3e8e8; color: var(--danger); }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .span-8, .span-4, .span-6 { grid-column: span 12; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* RCXMOD-20260930-HDRCTX-M6R3-05 INICIO */
  .topbar { height: auto; min-height: 66px; padding: 8px 12px 7px; flex-wrap: wrap; row-gap: 5px; }
  .topbar-context { position: static; transform: none; order: 3; flex: 0 0 100%; max-width: none; padding: 0 4px; font-size: .72rem; line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip; }
  /* RCXMOD-20260930-HDRCTX-M6R3-05 FIN */
  .topbar .brand-subtitle, .user-chip .user-name { display: none; }
  .content { width: min(100% - 20px, 1500px); margin-top: 12px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .filter-card { grid-template-columns: 1fr; }
  .kpi-grid, .modal-kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi-card { min-height: 104px; padding: 13px; }
  .rank-row { grid-template-columns: 1fr auto; }
  .rank-track { grid-column: 1 / -1; grid-row: 2; }
  .turn-grid { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
}
@media (max-width: 440px) {
  .kpi-grid, .modal-kpis { grid-template-columns: 1fr; }
  .auth-card { padding: 23px; }
}

/* RCXMOD-20260930-ARTCMP-J7N4-18 INICIO */
.article-compare-host{overflow-x:auto}.article-compare-list{display:grid;gap:0;min-width:620px}.article-compare-head,.article-compare-row{display:grid;grid-template-columns:minmax(210px,1.8fr) 105px 105px 105px 72px;gap:10px;align-items:center}.article-compare-head{padding:0 8px 8px 34px;color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em;border-bottom:1px solid var(--border)}.article-compare-row{position:relative;padding:9px 8px 9px 34px;border-bottom:1px solid var(--border);font-size:.82rem}.article-compare-row:last-child{border-bottom:0}.article-compare-rank{position:absolute;left:8px;color:var(--muted);font-size:.72rem;font-weight:800}.article-compare-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}.article-compare-value,.article-compare-diff,.article-compare-pct{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.article-compare-value.primary{font-weight:900}.article-compare-diff,.article-compare-pct{font-weight:800}.article-compare-diff.up,.article-compare-pct.up{color:var(--success)}.article-compare-diff.down,.article-compare-pct.down{color:var(--danger)}
/* RCXMOD-20261005-ARTALIGN-P3M7-01 INICIO */
.article-compare-head span:not(:first-child){text-align:right}
/* RCXMOD-20261005-ARTALIGN-P3M7-01 FIN */
/* RCXMOD-20261005-ARTALIGN-P3M7-02 INICIO */
.article-compare-head{position:sticky;top:0;z-index:3;background:var(--surface)}
/* RCXMOD-20261005-ARTALIGN-P3M7-02 FIN */
@media(max-width:760px){.article-compare-list{min-width:540px}.article-compare-head,.article-compare-row{grid-template-columns:minmax(170px,1.6fr) 90px 90px 90px 65px;font-size:.76rem}}
/* RCXMOD-20260930-ARTCMP-J7N4-18 FIN */

/* RCXMOD-20260826-PROFBLK-07 INICIO */
.brand-logo { width: 112px; max-height: 46px; object-fit: contain; object-position: left center; display: block; }
.brand-lockup-header { gap: 10px; }
.topbar .brand-logo { width: 96px; max-height: 40px; }
.auth-card .brand-logo { width: 150px; max-height: 66px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.panel-tall .chart-host { min-height: 360px; }
.field textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 11px; padding: 11px 12px; outline: none; resize: vertical; font: inherit; }
.field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(96,118,97,.12); }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.info-box { background: #eef2ed; color: #4d5d4f; border-radius: 11px; padding: 12px; margin-top: 16px; }
.section-rule { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.admin-tab { border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 9px 14px; font-weight: 800; color: var(--muted); }
.admin-tab.active { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: 0 3px 10px rgba(33,39,33,.04); }
.admin-grid-wide { grid-template-columns: minmax(330px, .8fr) minmax(0, 1.7fr); }
.stack-list, .block-catalog { display: grid; gap: 8px; }
.stack-item, .block-catalog-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; background: var(--surface); }
.stack-item:hover, .block-catalog-item:hover { background: var(--surface-2); }
.stack-item.selected { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(96,118,97,.12); }
.stack-item span:first-child, .block-catalog-item span:first-child { display: grid; gap: 2px; min-width: 0; }
.stack-item small, .block-catalog-item small { color: var(--muted); white-space: normal; }
.designer-help { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; color: var(--muted); font-size: .86rem; margin-bottom: 12px; }
.block-designer { display: grid; gap: 8px; min-height: 120px; }
/* RCXMOD-20260930-BGCOLOR-X7Q2-12 INICIO */
.designer-row { display: grid; grid-template-columns: 28px minmax(170px,1fr) 82px minmax(150px,.9fr) 76px minmax(230px,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 9px; opacity: .62; }
/* RCXMOD-20260930-BGCOLOR-X7Q2-12 FIN */
.designer-row.enabled { opacity: 1; background: #fbfcfa; }
.designer-row.dragging { opacity: .35; }
.drag-handle { color: var(--muted); font-weight: 900; cursor: grab; text-align: center; letter-spacing: -2px; }
.designer-enable { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.designer-enable small { grid-column: 2; color: var(--muted); }
.compact-field { gap: 4px; }
.compact-field label { font-size: .7rem; }
.compact-field select, .compact-field input { padding: 7px 8px; border-radius: 8px; }
.designer-actions { display: flex; gap: 4px; }
.mini-btn { width: 30px; height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; }
.preview-heading { margin-top: 22px; }
.designer-preview { padding: 10px; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px; }
.designer-preview-block { min-height: 76px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px; display: grid; align-content: center; gap: 3px; }
.designer-preview-block small { color: var(--muted); }

@media (max-width: 1180px) {
  .span-2, .span-3 { grid-column: span 6; }
  .admin-grid-wide { grid-template-columns: 1fr; }
  .designer-row { grid-template-columns: 24px minmax(150px,1fr) 82px minmax(140px,.9fr) 76px minmax(220px,1fr) auto; }
}
@media (max-width: 760px) {
  .brand-logo { width: 82px; }
  .topbar .brand-logo { width: 74px; }
  .span-2, .span-3 { grid-column: span 12; }
  .form-two { grid-template-columns: 1fr; }
  .admin-tabs { overflow-x: auto; }
  .designer-row { grid-template-columns: 24px 1fr auto; }
  .designer-row .compact-field { grid-column: 2 / -1; }
  .designer-title { grid-column: 2 / -1 !important; }
}
/* RCXMOD-20260826-PROFBLK-07 FIN */

/* RCXMOD-20260826-Z8T4-08 INICIO */
.chart-clickable { cursor: pointer; }
.theme-color-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
.theme-color-field { display:grid; grid-template-columns:42px 1fr; gap:9px; align-items:center; }
.theme-color-field input[type=color] { width:42px; height:38px; padding:2px; border:1px solid var(--border); border-radius:9px; background:var(--surface); }
.theme-color-field label { font-size:.78rem; font-weight:700; color:var(--muted); }
.theme-preview { border:1px solid var(--border); border-radius:14px; padding:14px; background:var(--bg); display:grid; gap:10px; }
.theme-preview-card { background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:12px; padding:13px; }
.theme-preview-button { display:inline-block; background:var(--brand); color:#fff; border-radius:9px; padding:7px 11px; font-weight:800; }
.theme-palette { display:flex; flex-wrap:wrap; gap:6px; }
.theme-palette-dot { width:25px; height:25px; border-radius:7px; border:1px solid rgba(0,0,0,.08); }
.granularity-note { margin-top:5px; }
@media (max-width:760px){ .theme-color-grid { grid-template-columns:1fr; } }
/* RCXMOD-20260826-Z8T4-08 FIN */

/* RCXMOD-20260827-PWDREC-K4N8-12 INICIO */
.auth-link { display:block; text-align:center; margin-top:2px; color:var(--brand-2); font-weight:800; text-decoration:none; }
.auth-link:hover { text-decoration:underline; }
/* RCXMOD-20260827-PWDREC-K4N8-12 FIN */

/* RCXMOD-20260827-CMPREST-Q7M4-15 INICIO */
.panel-heading-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; min-width:0; }
.chart-mode-switch { display:inline-flex; align-items:center; gap:2px; padding:2px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); }
.chart-mode-btn { border:0; background:transparent; color:var(--muted); border-radius:8px; padding:6px 9px; font:inherit; font-size:.72rem; font-weight:800; cursor:pointer; white-space:nowrap; }
.chart-mode-btn.active { background:var(--surface); color:var(--text); box-shadow:0 1px 5px rgba(0,0,0,.08); }
.chart-series-legend { display:flex; flex-wrap:wrap; gap:6px 8px; align-items:center; justify-content:center; margin-top:8px; }
.chart-series-legend-item { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:999px; padding:5px 8px; font:inherit; font-size:.7rem; font-weight:700; cursor:pointer; max-width:180px; }
.chart-series-legend-item span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chart-series-legend-item.disabled { opacity:.35; }
.chart-series-legend-item.static { cursor:default; }
.chart-series-swatch { width:10px; height:10px; border-radius:50%; flex:0 0 10px; }
.chart-series-empty { min-height:220px; display:grid; place-items:center; color:var(--muted); text-align:center; }
@media (max-width:760px){
  .panel-title-row { align-items:flex-start; }
  .panel-heading-tools { align-items:flex-end; }
  .chart-mode-switch { width:100%; }
  .chart-mode-btn { flex:1; }
}
/* RCXMOD-20260827-CMPREST-Q7M4-15 FIN */




/* RCXMOD-20260831-BRANDINGMFR-FTR9-03 INICIO */
/* Footer real: nunca flota ni se superpone sobre paneles, modales o graficos. */
.app-shell { min-height: calc(100vh - 58px); }
.auth-shell { min-height: calc(100vh - 58px); }
.manufacturer-footer {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 17px 10px;
  background: var(--bg);
}
.manufacturer-footer-inner {
  width: min(1500px, 100%);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.manufacturer-footer-logo {
  display: block;
  width: 112px;
  max-width: 28vw;
  height: auto;
  max-height: 36px;
  object-fit: contain;
}
@media (max-width:760px){
  .app-shell { min-height: calc(100vh - 52px); }
  .auth-shell { min-height: calc(100vh - 52px); }
  .manufacturer-footer { min-height:52px; padding:7px 10px 9px; }
  .manufacturer-footer-inner { justify-content:center; gap:5px; font-size:.60rem; }
  .manufacturer-footer-logo { width:88px; max-width:42vw; max-height:29px; }
}
/* RCXMOD-20260831-BRANDINGMFR-FTR9-03 FIN */


/* RCXMOD-20260902-Q4M8-05 INICIO */
/* Login: logo del cliente mas grande y centrado en la parte superior de la tarjeta. */
body[data-page-title="Acceso"] .brand-lockup {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 26px;
}
body[data-page-title="Acceso"] .auth-card .brand-logo {
  width: 230px;
  max-width: 85%;
  max-height: 110px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}
body[data-page-title="Acceso"] .brand-title,
body[data-page-title="Acceso"] .brand-subtitle { text-align: center; }
/* RCXMOD-20260902-Q4M8-05 FIN */


/* RCXMOD-20260921-MOBPY-C8R5-22 INICIO */
.designer-device-switch { display:inline-flex; gap:3px; margin-bottom:10px; padding:3px; border:1px solid var(--border); border-radius:11px; background:var(--surface-2); }
.designer-device-btn { border:0; background:transparent; color:var(--muted); border-radius:8px; padding:8px 12px; font:inherit; font-size:.78rem; font-weight:800; cursor:pointer; }
.designer-device-btn.active { background:var(--surface); color:var(--text); box-shadow:0 1px 5px rgba(0,0,0,.08); }
.classification-table-wrap { overflow:auto; }

@media (max-width:600px){
  /* El filtro no debe provocar scroll horizontal en 390 px. */
  .filter-card { gap:9px; padding:10px; }
  .period-inputs { display:grid; grid-template-columns:1fr; gap:7px; }
  .filter-control, .period-inputs input, .filter-card .btn { width:100%; min-width:0; }

  /* El layout móvil respeta el ancho configurado en el perfil. */
  .dashboard-grid > .span-2, .dashboard-grid > .span-3, .dashboard-grid > .span-4 { grid-column:span 6; }
  .dashboard-grid > .span-6 { grid-column:span 6; }
  .dashboard-grid > .span-8 { grid-column:span 8; }
  .dashboard-grid > .span-12 { grid-column:span 12; }
  .dashboard-grid { gap:9px; }
  .panel, .kpi-card { padding:10px; }
  .kpi-card { min-height:92px; }
  .kpi-label { font-size:.70rem; }
  .kpi-value { font-size:1.28rem; margin:6px 0 3px; }
  .kpi-compare { font-size:.70rem; gap:5px 8px; }
  .panel-title-row { margin-bottom:8px; }
  .panel h2 { font-size:.92rem; }
  .panel-note { font-size:.68rem; }
  .chart-host { min-height:220px; }
  .chart-svg { height:220px; }
  .chart-value-label { font-size:9.5px; stroke-width:2.4px; }
  .chart-value-label-grouped { font-size:8.8px; }
  .chart-value-label-multi { font-size:8.2px; }
  .chart-axis-text { font-size:9.5px; }
  .chart-series-legend-item { font-size:.68rem; padding:4px 7px; }

  /* Detalles más compactos: se prioriza la información útil en móvil. */
  .modal-body { padding:12px 10px 18px; }
  .modal-header { padding:13px 12px; }
  .mobile-detail-table th, .mobile-detail-table td { padding:8px 7px; font-size:.76rem; }
  .article-detail-table th:nth-child(1), .article-detail-table td:nth-child(1),
  .article-detail-table th:nth-child(3), .article-detail-table td:nth-child(3),
  .article-detail-table th:nth-child(5), .article-detail-table td:nth-child(5) { display:none; }
  .article-tickets-table th:nth-child(4), .article-tickets-table td:nth-child(4),
  .article-tickets-table th:nth-child(5), .article-tickets-table td:nth-child(5),
  .article-tickets-table th:nth-child(6), .article-tickets-table td:nth-child(6),
  .article-tickets-table th:nth-child(7), .article-tickets-table td:nth-child(7) { display:none; }
  .day-tickets-table th:nth-child(3), .day-tickets-table td:nth-child(3),
  .day-tickets-table th:nth-child(4), .day-tickets-table td:nth-child(4),
  .day-tickets-table th:nth-child(5), .day-tickets-table td:nth-child(5) { display:none; }
  .ticket-lines-table th:nth-child(1), .ticket-lines-table td:nth-child(1),
  .ticket-lines-table th:nth-child(4), .ticket-lines-table td:nth-child(4) { display:none; }
}
/* RCXMOD-20260921-MOBPY-C8R5-22 FIN */

/* RCXMOD-20260923-CHAN5-Y8P4-31 INICIO */
.channel-admin-card{border:1px solid var(--border);border-radius:14px;padding:16px;background:var(--surface-alt)}
.channel-admin-card+.channel-admin-card{margin-top:12px}.channel-checks{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.channel-admin-card table input[type=number],.channel-admin-card table select{min-width:110px;width:100%}
/* RCXMOD-20260923-CHAN5-Y8P4-31 FIN */
/* RCXMOD-20260923-CHLAY-R7M2-01 INICIO */
/* Canales necesita mas ancho que el resto de formularios de administracion.
   Se apila el panel informativo debajo y, si la tabla no cabe, se desplaza
   dentro de su propio contenedor en lugar de quedar cortada por la derecha. */
#tab-channels .admin-grid-wide { grid-template-columns: minmax(0, 1fr); }
#tab-channels .panel,
#tab-channels .channel-admin-card,
#tab-channels .panel-title-row > * { min-width: 0; }
#tab-channels .panel-title-row { flex-wrap: wrap; }
#tab-channels .channel-admin-card .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
#tab-channels .channel-admin-card table { min-width: 720px; }
/* RCXMOD-20260923-CHLAY-R7M2-01 FIN */



/* RCXMOD-20260923-V1583-A4K7-06 INICIO */
@media (max-width:600px){
  html, body { max-width:100%; overflow-x:hidden; }
  #dayModal, #dayModal .modal, #dayModal .modal-body { width:100%; max-width:100%; overflow-x:hidden; box-sizing:border-box; }
  #dayModal .modal-body > *, #dayModal .dashboard-grid, #dayModal .panel, #dayModal .kpi-grid { min-width:0; max-width:100%; }
  #dayModal .dashboard-grid > .span-2, #dayModal .dashboard-grid > .span-3, #dayModal .dashboard-grid > .span-4,
  #dayModal .dashboard-grid > .span-6, #dayModal .dashboard-grid > .span-8, #dayModal .dashboard-grid > .span-12 { grid-column:1 / -1; }
  #dayModal .table-wrap { width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; box-sizing:border-box; }
  #dayModal .mobile-detail-table { width:100%; max-width:100%; table-layout:fixed; }
  #dayModal .mobile-detail-table th, #dayModal .mobile-detail-table td { white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
  #dayModal .mobile-detail-table th:last-child, #dayModal .mobile-detail-table td:last-child { width:64px; }
  #dayModal .mobile-detail-table .btn { max-width:100%; padding:6px 7px; font-size:.70rem; white-space:nowrap; }
  #dayModal .kpi-value { white-space:normal; overflow-wrap:anywhere; }
}
/* RCXMOD-20260923-V1583-A4K7-06 FIN */

/* RCXMOD-20260928-V159-Q8M4-07 INICIO */
.page-view-switch{display:flex;justify-content:flex-start;gap:8px;margin:0 0 14px}.page-view-switch .chart-mode-btn{font-size:.85rem;padding:8px 14px;min-width:72px;text-transform:uppercase}.kpi-card.clickable{cursor:pointer}.kpi-card.clickable:hover{transform:translateY(-1px)}
@media(max-width:600px){.page-view-switch{justify-content:stretch}.page-view-switch .chart-mode-btn{flex:1}}
/* RCXMOD-20260928-V159-Q8M4-07 FIN */

/* RCXMOD-20260929-V160-F3K8-29 INICIO */
/* RCXMOD-20260930-BGCOLOR-X7Q2-11 INICIO */
.block-custom-color{background:var(--surface);color:var(--text)}
.block-color-custom{display:grid;grid-template-columns:88px 110px;gap:6px;margin-top:5px}.block-color-custom>span{display:grid;gap:2px}.block-color-custom small{font-size:.64rem;color:var(--muted)}.block-color-custom input[type=color]{width:100%;min-height:31px}.block-color-custom select{width:100%}
/* RCXMOD-20260930-BGCOLOR-X7Q2-11 FIN */
.block-scroll-host{max-height:360px;overflow-y:auto;overflow-x:hidden;padding-right:4px;scrollbar-gutter:stable}.panel-tall .block-scroll-host{max-height:520px}
.designer-preview{display:block}.designer-preview-page{border:1px solid var(--border);border-radius:14px;padding:12px;background:var(--surface-alt);margin-bottom:12px}.designer-preview-page-title{font-size:.76rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}.designer-preview-block{position:relative}.designer-preview-block .preview-order{position:absolute;top:6px;right:7px;min-width:20px;height:20px;border-radius:999px;background:var(--surface-alt);display:grid;place-items:center;font-size:.66rem;font-weight:900;color:var(--muted)}
#editError{margin:12px 16px 0}.designer-row input[type=color]{width:100%;min-height:32px;padding:2px;margin-top:4px}
@media(max-width:600px){.page-view-switch{justify-content:flex-start}.page-view-switch .chart-mode-btn{flex:0 1 auto}.block-scroll-host{max-height:320px}.waiter-detail-grid>.span-3{grid-column:span 6}}
/* RCXMOD-20260929-V160-F3K8-29 FIN */


/* RCXMOD-20261006-EXCPT-Q7N5-11 INICIO */
.exceptions-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.exception-card{appearance:none;width:100%;min-width:0;border:1px solid var(--border);border-radius:14px;background:var(--surface-alt);color:var(--text);padding:15px;text-align:left;display:grid;gap:5px;font:inherit}.exception-card.clickable{cursor:pointer}.exception-card.clickable:hover{border-color:var(--primary);transform:translateY(-1px)}.exception-card:disabled{opacity:1}.exception-title{font-size:.76rem;font-weight:900;letter-spacing:.03em;text-transform:uppercase;color:var(--muted)}.exception-primary{font-size:1.35rem;line-height:1.15}.exception-value{font-size:.86rem;font-weight:750}.exception-percent{font-size:.76rem;color:var(--muted)}.exception-detail-hint{font-size:.72rem;font-weight:800;color:var(--primary);margin-top:3px}.exception-loading{min-height:140px}.exception-detail-table .ticket-lines>td,.exception-articles-table .ticket-lines>td{background:var(--surface-alt);padding:12px}
@media(max-width:700px){.exceptions-grid{grid-template-columns:1fr}.exception-card{padding:12px}.exception-detail-table,.exception-articles-table,.exception-tickets-table{min-width:620px}}
/* RCXMOD-20261006-EXCPT-Q7N5-11 FIN */
