/* EL CHANCE · Administración con el tema «Salón Rubí», en versión sobria.
   Se carga al final del layout. Solo superficies, tipografía y estados de
   navegación: no cambia tablas, formularios ni flujos operativos. */
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-ExtraBold.woff") format("woff"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "EC Serif"; src: url("/fonts/ecserif-var.woff") format("woff"); font-weight: 400 700; font-display: swap; }
:root {
  --ec-admin-surface: #1e1213; --ec-admin-surface-soft: #281719; --ec-admin-field: #140e0e;
  --ec-admin-text: #f7efe4; --ec-admin-muted: #cdbfb2; --ec-admin-gold: #e1ba68; --ec-admin-line: #4a3434;
  --bg: #0e0a0a;
}
body { font-family: "EC Sans", "Segoe UI", system-ui, sans-serif; background: var(--bg); }
.topbar { background: #140e0e; border-bottom: 2px solid #c3060f; box-shadow: 0 6px 20px rgb(0 0 0 / .35); }
.brand__copy { font-family: "EC Serif", Georgia, serif; font-weight: 700; letter-spacing: .03em; }
.brand__copy small { font-family: "EC Sans", system-ui, sans-serif; }
.sidebar { background: #140e0e; border-right: 1px solid var(--ec-admin-line); }
.sidebar a:hover, .sidebar a:focus-visible { background: #2a1517; color: var(--ec-admin-text); box-shadow: inset 3px 0 #e30613; }
.sidebar .nav-link--active { background: rgb(195 6 15 / .22); color: #fff; box-shadow: inset 3px 0 #e30613; }
.content { background: var(--bg); }
.content .quick-action, .content .quick-action :is(strong, small) { text-decoration: none; }
.content .quick-action:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.content button, .content .button { white-space: nowrap; }
.content :is(input, select, textarea):focus-visible { outline: 3px solid rgb(248 220 159 / .5); outline-offset: 1px; }
.content table { font-variant-numeric: tabular-nums; }
.content .action-form button { white-space: nowrap; min-width: max-content; }
.sidebar .primary-nav:not(.nav-link--active) { background: #2a1517; box-shadow: inset 3px 0 #e1ba68; }
/* Tablas apiladas en móvil: todo el contenido de la celda va en la columna del valor,
   para que un segundo formulario (p. ej. «Rechazar y devolver saldo») no caiga bajo la etiqueta. */
@media (max-width: 760px) { .responsive-table td > * { grid-column: 2; min-width: 0; } }

/* Operación diaria: legibilidad sobre superficies oscuras, sin alterar permisos. */
@media screen {
  /* Superficies heredadas claras: definir fondo y texto juntos. No afecta impresión. */
  .content :is(.toolbar a, .raspas-preview, .vp-summary__totals, .vp-empty-state,
    .vp-check-field, .vp-result-stats > div, .vp-report-summary article,
    .vp-prize-payment .stack-form, .vp-bulk-guide li, .vp-current-values,
    .vp-bulk-draw, .vp-bulk-selection, .vp-change-field, .vp-restriction-editor,
    .vp-individual-restrictions, .vp-bulk-review-summary, .vp-config-section,
    .vp-current-rules > div, .vp-preview-stats > div, .vp-preview-reason,
    .vp-bulk-change-list li, .vp-bulk-target-list li) {
    background: var(--ec-admin-surface-soft); color: var(--ec-admin-text); border-color: var(--ec-admin-line);
  }
  .content :is(.toolbar a:hover, .toolbar a:focus-visible) { background:#432b30; color:#fff1cf; }
  .content :is(.raspas-preview, .vp-summary__totals, .vp-report-summary article,
    .vp-result-stats > div, .vp-current-rules > div, .vp-preview-stats > div,
    .vp-config-section, .vp-current-values, .vp-change-field, .vp-bulk-review-summary,
    .vp-empty-state, .vp-bulk-guide li, .vp-preview-reason) :is(p, span, small, label, strong, h2, h3) { color:inherit; }
  .global-balance--readonly small { color:#f1e0ba; font-size:.68rem; line-height:1.4; white-space:normal; }
  .content .daily-report-date strong { color:#f3d18c; }
  :root { --ec-admin-muted: #d4c7bc; --ec-admin-line: #705b58; }
  .content { color: var(--ec-admin-text); }
  .content a:not(.button):not(.primary-link):not(.quick-action):not(.whatsapp-action) {
    color: #f3d18c; text-underline-offset: .2em;
  }
  .content a:not(.button):not(.primary-link):not(.quick-action):not(.whatsapp-action):hover { color: #fff1cf; text-decoration: underline; }
  .content :is(.ticket, .form-subheading, .template-card h3, .section-title h2, .section-title h3) { color: #f3d18c; }
  .content :is(.template-card__preview, .template-card__preview small, .template-card__meta, .info-strip small, .message-guide small, .quick-action small, .field-help, .empty, .muted) { color: var(--ec-admin-muted); }
  .content :is(button, .button, .primary-link) { white-space: normal; overflow-wrap: normal; word-break: normal; max-width: 100%; min-height: 44px; line-height: 1.45; }
  .content .action-form button { min-width: 0; white-space: normal; }
  .content :is(.form-actions, .action-form, .filter, .toolbar) :is(button, .button):not(.primary):not(.danger-button):not(.active):not(.selected):not([aria-selected="true"]):not([aria-pressed="true"]):not(:disabled) { background: #352325; color: #fff1df; border-color: #a58b6b; }
  .content :is(.form-actions, .action-form, .filter, .toolbar) :is(button, .button):not(.primary):not(.danger-button):not(.active):not(.selected):not([aria-selected="true"]):not([aria-pressed="true"]):not(:disabled):hover { background: #4a3032; }
  .content .danger-button { color: #fff; background: #9f2030; border: 1px solid #ffabb5; }
  .content :is(button, .button):disabled { opacity: 1; color: #c9c2ba; background: #30292a; border-color: #817573; border-style: dashed; }
  .content :is(.status, .tag) { color: #eee6df; background: #383031; border: 1px solid #8a7772; white-space: normal; line-height: 1.4; }
  .content .status.ok { color: #c5f5da; background: #173c2d; border-color: #70b892; }
  .content .daily-kpi--ok { color: #c5f5da; background: #173c2d; border-color: #70b892; }
  .content .daily-kpi--warning { color: #ffe5a5; background: #493519; border-color: #cba458; }
  .content :is(.daily-kpi--ok, .daily-kpi--warning) :is(span, strong, small) { color: inherit; }
  .content .status.warn { color: #ffe5a5; background: #493519; border-color: #cba458; }
  .content :is(.status.danger, .tag.danger) { color: #ffd1d7; background: #501e29; border-color: #dc8797; }
  .content :is(.operational-section--urgent, .priority-alerts, .admin-inbox-banner) { background: #38191f; color: #fff0e8; border-color: #dd8991; }
  .content :is(.priority-alerts__heading h2, .admin-inbox-banner small, .priority-alert strong) { color: #ffd2d6; }
  .content .sensitive-admin-data { color: #f7efe4; background: #302126; border-color: #977775; }
  .content :is(.technical, pre, code) { color: #ece3d9; background-color: #211b1c; overflow-wrap: anywhere; }
  .content .mono { font-size: .8125rem; }
  .content th { color: #f3d18c; background: #241b1c; }
  .content td { color: var(--ec-admin-text); }
  .content :is(.filter, .action-form, .form-actions, .toolbar) { flex-wrap: wrap; }
  .content :is(.filter, .action-form, .form-actions, .toolbar) > * { min-width: 0; }
  .content :is(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #ffe4a1; outline-offset: 3px; }
  .content :is(input, textarea)::placeholder { color: #c9bbae; opacity: 1; }
}
