/* ORQUIDEA unified visual theme
   Source of truth: public portal purple identity.
   Brand color is purple. Gold is a secondary accent only.
   Green, amber and red remain reserved for semantic states. */

:root {
  --oq-brand: #5b39bd;
  --oq-brand-hover: #4e2fb0;
  --oq-brand-light: #7658d8;
  --oq-brand-dark: #2f1c70;
  --oq-brand-deep: #21164c;
  --oq-brand-soft: #f1edff;
  --oq-brand-soft-2: #f7f4ff;
  --oq-gold: #c6a453;
  --oq-gold-soft: #f7f0dc;
  --oq-bg: #fbfafe;
  --oq-surface: #ffffff;
  --oq-text: #17142a;
  --oq-muted: #6f6a7f;
  --oq-line: #e7e1f1;
  --oq-shadow: 0 12px 34px rgba(47, 28, 112, .08);
  --oq-focus: 0 0 0 3px rgba(91, 57, 189, .16);

  /* Legacy site aliases */
  --bg: var(--oq-bg);
  --background: var(--oq-bg);
  --card: var(--oq-surface);
  --card-bg: var(--oq-surface);
  --panel-bg: var(--oq-surface);
  --surface: var(--oq-surface);
  --surface-soft: var(--oq-bg);
  --surface-muted: var(--oq-brand-soft-2);
  --input-bg: var(--oq-surface);
  --text: var(--oq-text);
  --text-primary: var(--oq-text);
  --text-secondary: var(--oq-muted);
  --text-muted: var(--oq-muted);
  --muted: var(--oq-muted);
  --muted-text: var(--oq-muted);
  --border: var(--oq-line);
  --border-color: var(--oq-line);
  --accent: var(--oq-brand);

  /* Main design system */
  --g-primary: var(--oq-brand);
  --g-primary-hover: var(--oq-brand-hover);
  --g-secondary: var(--oq-brand-light);
  --g-accent: #6d50c8;
  --g-navy: var(--oq-brand-dark);
  --g-blue-700: #5134a4;
  --g-info: var(--oq-brand-light);
  --g-surface: var(--oq-surface);
  --g-surface-soft: var(--oq-bg);
  --g-surface-muted: var(--oq-brand-soft-2);
  --g-text: var(--oq-text);
  --g-text-muted: var(--oq-muted);
  --g-border: var(--oq-line);
  --g-shadow-sm: 0 1px 2px rgba(47, 28, 112, .05);
  --g-shadow: var(--oq-shadow);

  /* Public portal - canonical palette */
  --oqp-purple: var(--oq-brand);
  --oqp-purple-dark: var(--oq-brand-dark);
  --oqp-purple-soft: var(--oq-brand-soft);
  --oqp-gold: var(--oq-gold);
  --oqp-gold-soft: var(--oq-gold-soft);
  --oqp-ink: var(--oq-text);
  --oqp-muted: var(--oq-muted);
  --oqp-line: var(--oq-line);
  --oqp-bg: var(--oq-bg);

  /* Commercial portal */
  --oqc-purple: var(--oq-brand);
  --oqc-purple-dark: var(--oq-brand-dark);
  --oqc-deep: var(--oq-brand-deep);
  --oqc-gold: var(--oq-gold);
  --oqc-ink: var(--oq-text);
  --oqc-muted: var(--oq-muted);
  --oqc-line: var(--oq-line);
  --oqc-bg: var(--oq-bg);

  /* Employee portal */
  --ep-bg: var(--oq-bg);
  --ep-card: var(--oq-surface);
  --ep-text: var(--oq-text);
  --ep-muted: var(--oq-muted);
  --ep-border: var(--oq-line);
  --ep-primary: var(--oq-brand);
  --ep-primary2: var(--oq-brand-hover);

  /* Older module aliases that used blue as a brand color */
  --ecc-primary: var(--oq-brand);
  --ecc-primary-dark: var(--oq-brand-dark);
  --ecc-info: var(--oq-brand-light);
  --cr-blue: var(--oq-brand);
  --cra-blue: var(--oq-brand);
  --gdoc-blue: var(--oq-brand);
  --gdoc-blue-dark: var(--oq-brand-dark);
  --gl-blue: var(--oq-brand);
  --hw-blue: var(--oq-brand);
  --hw-blue-soft: var(--oq-brand-soft);
  --kx-blue: var(--oq-brand);
  --kx-blue-dark: var(--oq-brand-dark);
  --kx-cyan: var(--oq-brand-light);
  --oc-blue: var(--oq-brand);
  --oc-purple: var(--oq-brand);
  --oc-sky: var(--oq-brand-light);
  --trace-primary: var(--oq-brand);
  --trace-primary-2: var(--oq-brand-light);
  --plan-accent: var(--oq-brand);
  --plan-soft: var(--oq-brand-soft);
  --forgot: var(--oq-brand);
}

html[data-theme="dark"] {
  --oq-bg: #151025;
  --oq-surface: #1d1733;
  --oq-text: #f5f1ff;
  --oq-muted: #bcb3d0;
  --oq-line: #3a2f59;
  --oq-brand-soft: #2c214b;
  --oq-brand-soft-2: #241b3e;
  --g-surface: var(--oq-surface);
  --g-surface-soft: var(--oq-bg);
  --g-surface-muted: var(--oq-brand-soft-2);
  --g-text: var(--oq-text);
  --g-text-muted: var(--oq-muted);
  --g-border: var(--oq-line);
  --surface: var(--oq-surface);
  --surface-soft: var(--oq-bg);
  --surface-muted: var(--oq-brand-soft-2);
  --card: var(--oq-surface);
  --card-bg: var(--oq-surface);
  --panel-bg: var(--oq-surface);
  --input-bg: #211a39;
  --bg: var(--oq-bg);
  --background: var(--oq-bg);
  --border: var(--oq-line);
  --border-color: var(--oq-line);
  --text: var(--oq-text);
  --text-primary: var(--oq-text);
  --text-secondary: var(--oq-muted);
  --text-muted: var(--oq-muted);
  --muted: var(--oq-muted);
}

/* Global visual language */
body.admin-body,
body.employee-portal-admin,
body.employee-portal-login {
  background: var(--oq-bg);
  color: var(--oq-text);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid rgba(91, 57, 189, .58);
  outline-offset: 2px;
}

:where(input, select, textarea):focus {
  border-color: var(--oq-brand-light) !important;
  box-shadow: var(--oq-focus) !important;
}

/* Main administration */
.admin-shell { background: var(--oq-bg) !important; }
.admin-sidebar {
  background: linear-gradient(180deg, #21164c 0%, #2f1c70 54%, #19132f 100%) !important;
  border-right-color: rgba(255, 255, 255, .08) !important;
  box-shadow: 8px 0 30px rgba(35, 22, 79, .18) !important;
}
.brand-mark {
  background: linear-gradient(135deg, var(--oq-brand-light), var(--oq-brand)) !important;
  box-shadow: 0 8px 20px rgba(91, 57, 189, .26) !important;
}
.brand-copy small,
.nav-section-label { color: #c8baf0 !important; }
.admin-sidebar .sidebar-nav .nav-item,
.admin-sidebar-footer .sidebar-footer-link { color: #eee9fb !important; }
.admin-sidebar .sidebar-nav .nav-item:hover {
  background: rgba(118, 88, 216, .18) !important;
  color: #fff !important;
}
.admin-sidebar .sidebar-nav .nav-item.is-active {
  background: linear-gradient(90deg, rgba(118, 88, 216, .34), rgba(91, 57, 189, .16)) !important;
  color: #fff !important;
}
.admin-sidebar .sidebar-nav .nav-item.is-active::before { background: #d8ccff !important; }
.admin-sidebar .sidebar-nav > .nav-item .nav-icon,
.nav-group-icon { color: #c8baf0 !important; }
.admin-sidebar .sidebar-nav > .nav-item.is-active .nav-icon,
.nav-group.is-open .nav-group-icon,
.nav-group.has-active .nav-group-icon { color: #f4f0ff !important; }

.sidebar-nav .nav-group-toggle { color: rgba(238, 233, 251, .88) !important; }
.sidebar-nav .nav-group-toggle:hover,
.sidebar-nav .nav-group.is-open > .nav-group-toggle {
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
}
.sidebar-nav .nav-group.has-active > .nav-group-toggle {
  background: linear-gradient(90deg, rgba(118, 88, 216, .22), rgba(91, 57, 189, .07)) !important;
  border-color: rgba(200, 186, 240, .14) !important;
  color: #fff !important;
}
.sidebar-nav .nav-group.has-active > .nav-group-toggle::before,
.admin-sidebar .sidebar-nav > .nav-item.is-active::before,
.admin-sidebar .sidebar-nav .nav-group-items .nav-item.is-active::before { background: #cbbcff !important; }
.sidebar-nav .nav-group-toggle:focus-visible { outline-color: rgba(203, 188, 255, .9) !important; }
.nav-group-chevron::before {
  border-right-color: rgba(218, 207, 250, .82) !important;
  border-bottom-color: rgba(218, 207, 250, .82) !important;
}
.nav-group-items::before {
  background: linear-gradient(180deg, rgba(188, 169, 239, .42), rgba(188, 169, 239, .07)) !important;
}
.admin-sidebar .sidebar-nav .nav-group-items .nav-item.is-active {
  background: rgba(118, 88, 216, .22) !important;
}
.admin-sidebar .sidebar-nav .nav-group-items .nav-item::after { background: rgba(200, 186, 240, .34) !important; }
.admin-sidebar .sidebar-nav .nav-group-items .nav-item:hover::after,
.admin-sidebar .sidebar-nav .nav-group-items .nav-item.is-active::after { background: #cbbcff !important; }

.admin-topbar {
  background: color-mix(in srgb, var(--oq-surface) 95%, transparent) !important;
  border-bottom-color: var(--oq-line) !important;
}
.topbar-icon-button:hover {
  border-color: #c7b8ee !important;
  color: var(--oq-brand) !important;
}
.user-avatar { background: linear-gradient(135deg, var(--oq-brand), var(--oq-brand-light)) !important; }

/* Generic controls and reusable cards */
.btn.primary,
.primary.btn,
button.primary,
a.btn.primary {
  background: var(--oq-brand) !important;
  border-color: var(--oq-brand) !important;
  color: #fff !important;
}
.btn.primary:hover,
.primary.btn:hover,
button.primary:hover,
a.btn.primary:hover {
  background: var(--oq-brand-hover) !important;
  border-color: var(--oq-brand-hover) !important;
}

.admin-card,
.metric-card,
.dashboard-panel,
.dashboard-kpi,
.table-wrap,
.auth-card,
.empty-state,
.card,
.panel {
  border-color: var(--oq-line);
}

.back-link,
.auth-link--forgot,
.report-catalog__grid article > a:hover,
.report-catalog__grid article > a::before { color: var(--oq-brand) !important; }

/* Legacy reporting and analytics brand blues */
.bar-row i,
.module-bar i { background: linear-gradient(90deg, var(--oq-brand-light), var(--oq-brand)) !important; }
.statement .total { color: var(--oq-brand) !important; border-top-color: var(--oq-brand-dark) !important; }
.module-report-nav a.active,
.module-report-tabs a.active,
.module-report-nav a:hover,
.module-report-tabs a:hover {
  color: var(--oq-brand) !important;
  background: var(--oq-brand-soft) !important;
}
.report-catalog__grid header { background: var(--oq-brand-soft) !important; }
.report-catalog__grid header span,
.import-steps article > b { background: var(--oq-brand) !important; color: #fff !important; }
.import-summary strong { color: var(--oq-brand) !important; }
.report-brand-header {
  background: linear-gradient(120deg, var(--oq-brand-dark), var(--oq-brand-light)) !important;
  box-shadow: 0 12px 30px rgba(47, 28, 112, .18) !important;
}
.report-brand-logo { color: var(--oq-brand-dark) !important; }
.report-brand-company span,
.report-brand-company small,
.report-brand-meta small { color: #e6defa !important; }
.invoice-share { border-left-color: var(--oq-brand) !important; }
.share-actions .email { background: var(--oq-brand) !important; border-color: var(--oq-brand) !important; }
.movement-adjustment-positive { background: var(--oq-brand-soft) !important; color: var(--oq-brand-dark) !important; }
.reference-code { background: var(--oq-brand-soft-2) !important; }

/* Loader uses the same brand color instead of cyan/blue */
.global-loading-spinner {
  border-color: rgba(91, 57, 189, .20) !important;
  border-top-color: var(--oq-brand) !important;
}

/* Info is brand-purple. Semantic success/warning/danger keep their meaning. */
.status.info,
.badge.info,
.orb-badge.info,
.alert.info,
.info-badge {
  background: var(--oq-brand-soft) !important;
  color: var(--oq-brand-dark) !important;
  border-color: #d8cfee !important;
}

/* Employee portal */
.ep-sidebar {
  background: linear-gradient(180deg, #21164c 0%, #2f1c70 54%, #19132f 100%) !important;
  box-shadow: 18px 0 45px rgba(35, 22, 79, .22) !important;
}
.ep-sidebar-brand-mark,
.ep-brand-mark {
  background: linear-gradient(135deg, var(--oq-brand-light), var(--oq-brand)) !important;
  box-shadow: 0 8px 20px rgba(91, 57, 189, .26) !important;
}
.ep-sidebar-brand-copy small,
.ep-nav-section { color: #c8baf0 !important; }
.ep-nav-item { color: #eee9fb !important; }
.ep-nav-item:hover { background: rgba(118, 88, 216, .18) !important; color: #fff !important; }
.ep-nav-item.is-active {
  background: linear-gradient(90deg, rgba(118, 88, 216, .36), rgba(91, 57, 189, .18)) !important;
  color: #fff !important;
}
.ep-menu-toggle {
  border-color: var(--oq-brand) !important;
  background: var(--oq-brand) !important;
  color: #fff !important;
}
.ep-menu-toggle:hover { border-color: var(--oq-brand-hover) !important; background: var(--oq-brand-hover) !important; }
.ep-user-avatar { background: linear-gradient(135deg, var(--oq-brand), var(--oq-brand-light)) !important; }
.ep-kicker,
.ep-development-list header b { color: var(--oq-brand) !important; }
.ep-btn.primary { background: var(--oq-brand) !important; border-color: var(--oq-brand) !important; color: #fff !important; }
.ep-quick-grid a:hover { border-color: #c8baf0 !important; }
.ep-file-icon { background: var(--oq-brand-soft) !important; color: var(--oq-brand) !important; }
.ep-progress i { background: linear-gradient(90deg, var(--oq-brand), var(--oq-brand-light)) !important; }

/* Careers */
.career-hero,
.career-detail-hero {
  background: linear-gradient(135deg, var(--oq-brand-deep), var(--oq-brand)) !important;
}
.career-eyebrow,
.career-section-head > a,
.career-status-result > strong { color: var(--oq-brand) !important; }
.career-hero .career-eyebrow,
.career-detail-hero .career-eyebrow,
.career-back { color: #d8ccff !important; }
.career-hero p { color: #e6defa !important; }
.career-search button,
.career-btn { background: var(--oq-brand) !important; color: #fff !important; }
.career-search button:hover,
.career-btn:hover { background: var(--oq-brand-hover) !important; }
.career-pill,
.career-comp { background: var(--oq-brand-soft) !important; color: var(--oq-brand-dark) !important; }
.career-job-card,
.career-content-card,
.career-apply-card,
.career-confirm,
.career-status-card { border-color: var(--oq-line) !important; box-shadow: var(--oq-shadow) !important; }
.career-salary { color: var(--oq-brand-dark) !important; }
.career-code { background: var(--oq-brand-soft-2) !important; border-color: #cfc2ec !important; }

/* Public site stays as the visual reference */
body.orquidea-public-site { background: var(--oq-bg) !important; color: var(--oq-text) !important; }
.oq-public-header { border-bottom-color: rgba(83, 59, 145, .12) !important; }
.oq-public-nav > a:hover { color: var(--oq-brand) !important; }
.oq-public-login { background: var(--oq-brand) !important; color: #fff !important; }
.oq-public-menu-toggle { background: var(--oq-brand-soft) !important; color: var(--oq-brand) !important; }

/* Keep destructive and state colors semantic. Do not recolor WhatsApp. */
.alert.success,
.success:not(.btn):not(button),
.ep-alert.success { color: var(--g-success, #16a34a); }
.alert.error,
.alert.danger,
.ep-alert.danger { color: var(--g-danger, #dc2626); }
.floating-whatsapp { color: inherit; }

@media (max-width: 900px) {
  .sidebar-backdrop,
  .ep-sidebar-backdrop { background: rgba(25, 19, 47, .58) !important; }
}

/* ========================================================================
   ORQUÍDEA BRAND SYSTEM v2 · 2026-09-19
   Objetivo: una sola identidad visual en TODO el proyecto.
   Referencia visual: portal público ORQUÍDEA.
   - Morado/violeta = identidad y acciones principales.
   - Blanco/lila = superficies y acciones secundarias.
   - Verde/amarillo/rojo = únicamente estados semánticos.
   ======================================================================== */

:root {
  --oq-brand: #5b39bd !important;
  --oq-brand-hover: #4e2fb0 !important;
  --oq-brand-light: #7658d8 !important;
  --oq-brand-violet: #8b5cf6 !important;
  --oq-brand-rose: #b65ac7 !important;
  --oq-brand-dark: #2f1c70 !important;
  --oq-brand-deep: #21164c !important;
  --oq-brand-soft: #f1edff !important;
  --oq-brand-soft-2: #f8f5ff !important;
  --oq-bg: #fbfafe !important;
  --oq-surface: #ffffff !important;
  --oq-text: #21163f !important;
  --oq-muted: #706783 !important;
  --oq-line: #e5def1 !important;
  --oq-brand-gradient: linear-gradient(135deg,#2b174e 0%,#5b39bd 58%,#8b5cf6 100%);
  --oq-brand-gradient-deep: linear-gradient(135deg,#21164c 0%,#3d277f 46%,#5b39bd 100%);

  /* Nombres usados por módulos heredados. Todos apuntan a ORQUÍDEA. */
  --primary: var(--oq-brand) !important;
  --primary-color: var(--oq-brand) !important;
  --brand: var(--oq-brand) !important;
  --brand-primary: var(--oq-brand) !important;
  --accent: var(--oq-brand) !important;
  --info: var(--oq-brand-light) !important;
  --ds-primary: var(--oq-brand) !important;
  --ds-accent: var(--oq-brand) !important;
  --ds-info: var(--oq-brand-light) !important;
  --ds-link: var(--oq-brand) !important;
  --eic-primary: var(--oq-brand) !important;

  --g-primary: var(--oq-brand) !important;
  --g-primary-hover: var(--oq-brand-hover) !important;
  --g-secondary: var(--oq-brand-light) !important;
  --g-accent: var(--oq-brand) !important;
  --g-navy: var(--oq-brand-dark) !important;
  --g-blue-700: var(--oq-brand) !important;
  --g-info: var(--oq-brand-light) !important;
  --g-surface-muted: var(--oq-brand-soft-2) !important;
}

::selection {
  background: rgba(91,57,189,.22);
  color: var(--oq-brand-deep);
}

/* ---------- Cabeceras / HERO del área administrativa ----------
   Cualquier módulo que tenga un contenedor cuyo token termine en -hero
   adopta la firma visual ORQUÍDEA. Esto alcanza módulos antiguos y nuevos. */
body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) {
  background: var(--oq-brand-gradient) !important;
  border-color: rgba(91,57,189,.34) !important;
  color: #fff !important;
  box-shadow: 0 18px 44px rgba(47,28,112,.18) !important;
}

body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) :is(h1,h2,h3,h4) {
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(31,19,65,.12);
}

body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) p {
  color: #eee9ff !important;
}

body.admin-body .admin-content :where(
  .oq-kicker,
  .ocp-kicker,
  .osaas-kicker,
  .oq-onboarding-eyebrow,
  .oqpa-hero > div > span,
  [class$="-hero"] [class$="-eyebrow"],
  [class*="-hero "] [class$="-eyebrow"],
  [class$="-hero"] [class$="-kicker"],
  [class*="-hero "] [class$="-kicker"]
) {
  color: #e7ddff !important;
}

/* Botones situados dentro de una cabecera morada: blancos y de alto contraste. */
body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "])
  :is(.btn,.oq-btn,.ocp-btn,.osaas-btn,.oq-onboarding-btn,.oqpa-preview):not(.danger):not(.success) {
  background: #fff !important;
  border-color: rgba(255,255,255,.92) !important;
  color: var(--oq-brand-dark) !important;
  box-shadow: 0 8px 22px rgba(31,19,65,.13) !important;
}
body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "])
  :is(.btn,.oq-btn,.ocp-btn,.osaas-btn,.oq-onboarding-btn,.oqpa-preview):not(.danger):not(.success):hover {
  background: var(--oq-brand-soft) !important;
  border-color: #fff !important;
  color: var(--oq-brand-deep) !important;
}

/* Casos visibles reportados por el usuario. */
.oq-hero,
.ocp-hero,
.osaas-hero,
.oq-onboarding-hero,
.oqpa-hero {
  background: var(--oq-brand-gradient) !important;
  border-color: rgba(91,57,189,.32) !important;
  color: #fff !important;
}
.oq-hero :is(h1,h2),
.ocp-hero :is(h1,h2),
.osaas-hero :is(h1,h2),
.oq-onboarding-hero :is(h1,h2),
.oqpa-hero :is(h1,h2) {
  color: #fff !important;
}
.oq-hero p,
.ocp-hero p,
.osaas-hero p,
.oq-onboarding-hero p,
.oqpa-hero p {
  color: #eee9ff !important;
}
.oq-kicker,
.ocp-kicker,
.osaas-kicker,
.oq-onboarding-eyebrow,
.oqpa-hero span {
  color: #e5dbff !important;
}

.oq-onboarding-plan {
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  color: #fff !important;
  backdrop-filter: blur(10px);
}

/* ---------- Pantalla /acceso ---------- */
.access-hero {
  background: var(--oq-brand-gradient-deep) !important;
  color: #fff !important;
}
.access-hero h1 { color:#fff !important; }
.access-hero p,
.access-back { color:#eee9ff !important; }
.access-eyebrow { color:#d9ccff !important; }
.access-card-primary {
  border-color:#cbbcf0 !important;
  box-shadow:0 18px 42px rgba(91,57,189,.14) !important;
}
.access-icon {
  background:var(--oq-brand-soft) !important;
  color:var(--oq-brand) !important;
}
.access-card-primary .access-icon {
  background:var(--oq-brand) !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(91,57,189,.23) !important;
}
.access-type { color:#6c55a8 !important; }
.access-card h2,
.access-help strong { color:var(--oq-brand-deep) !important; }
.access-card p,
.access-card ul,
.access-help { color:var(--oq-muted) !important; }
.access-button {
  border-color:#cfc2ee !important;
  background:#fff !important;
  color:var(--oq-brand-dark) !important;
}
.access-button:hover {
  border-color:var(--oq-brand) !important;
  background:var(--oq-brand-soft) !important;
  color:var(--oq-brand-dark) !important;
}
.access-button.primary {
  border-color:var(--oq-brand) !important;
  background:linear-gradient(135deg,var(--oq-brand-light),var(--oq-brand)) !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(91,57,189,.20) !important;
}
.access-button.primary:hover {
  background:var(--oq-brand-hover) !important;
  color:#fff !important;
}
.access-help {
  border-color:var(--oq-line) !important;
  background:var(--oq-brand-soft-2) !important;
}

/* ---------- Botonería global ORQUÍDEA ---------- */
body.admin-body .admin-content :is(
  .btn.primary,
  .btn-primary,
  button.primary,
  a.primary,
  .oq-btn.primary,
  .ocp-btn.primary,
  .osaas-btn.primary,
  .oq-onboarding-btn.primary,
  .mini.primary,
  .oqpa-save,
  input[type="submit"].primary
) {
  background:linear-gradient(135deg,var(--oq-brand-light),var(--oq-brand)) !important;
  border-color:var(--oq-brand) !important;
  color:#fff !important;
  box-shadow:0 8px 20px rgba(91,57,189,.17) !important;
}
body.admin-body .admin-content :is(
  .btn.primary,
  .btn-primary,
  button.primary,
  a.primary,
  .oq-btn.primary,
  .ocp-btn.primary,
  .osaas-btn.primary,
  .oq-onboarding-btn.primary,
  .mini.primary,
  .oqpa-save,
  input[type="submit"].primary
):hover {
  background:var(--oq-brand-hover) !important;
  border-color:var(--oq-brand-hover) !important;
  color:#fff !important;
}

body.admin-body .admin-content :is(
  .btn-outline-primary,
  .oq-btn.secondary,
  .ocp-btn:not(.primary):not(.danger),
  .osaas-btn.secondary,
  .oq-onboarding-btn.secondary
) {
  background:#fff !important;
  border-color:#cbbce9 !important;
  color:var(--oq-brand-dark) !important;
}
body.admin-body .admin-content :is(
  .btn-outline-primary,
  .oq-btn.secondary,
  .ocp-btn:not(.primary):not(.danger),
  .osaas-btn.secondary,
  .oq-onboarding-btn.secondary
):hover {
  background:var(--oq-brand-soft) !important;
  border-color:var(--oq-brand-light) !important;
  color:var(--oq-brand-deep) !important;
}

/* Botones custom cuyo nombre termina en -btn reciben por lo menos el mismo borde/radio/texto. */
body.admin-body .admin-content :is(a,button)[class$="-btn"]:not(.danger):not(.success),
body.admin-body .admin-content :is(a,button)[class*="-btn "]:not(.danger):not(.success) {
  border-color:#cfc3ed !important;
  border-radius:11px !important;
}

/* ---------- Links, etiquetas y acentos ---------- */
body.admin-body .admin-content a:not(.btn):not([class*="danger"]):not([class*="success"]):not([class*="whatsapp"]) {
  --link-brand: var(--oq-brand);
}
body.admin-body .admin-content :where(
  .back-link,
  .oq-link,
  .ocp-link,
  .oqpa-tabs a:hover,
  .osaas-card-head > a,
  .osaas-table td a,
  .page-head .eyebrow,
  [class$="-eyebrow"],
  [class*="-eyebrow "],
  [class$="-kicker"],
  [class*="-kicker "]
) {
  color:var(--oq-brand) !important;
}

/* Los kickers dentro de un HERO vuelven a claro por contraste. */
body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "])
  :where([class$="-eyebrow"],[class*="-eyebrow "],[class$="-kicker"],[class*="-kicker "]) {
  color:#e7ddff !important;
}

/* ---------- Tablas y filtros ---------- */
@media screen {
  body.admin-body .admin-content table th {
    background:var(--oq-brand-soft-2) !important;
    color:var(--oq-brand-dark) !important;
    border-color:var(--oq-line) !important;
  }
  body.admin-body .admin-content table tbody tr:hover {
    background:rgba(91,57,189,.055) !important;
  }
}

body.admin-body .admin-content :is(input,select,textarea):focus {
  border-color:var(--oq-brand-light) !important;
  box-shadow:0 0 0 3px rgba(91,57,189,.14) !important;
}
body.admin-body .admin-content :is(input[type="checkbox"],input[type="radio"]) {
  accent-color:var(--oq-brand) !important;
}

/* Tabs, paginación y opciones activas. */
body.admin-body .admin-content :is(
  .nav-tabs .nav-link.active,
  .nav-pills .nav-link.active,
  .pagination a.active,
  .module-report-nav a.active,
  .module-report-tabs a.active
) {
  background:var(--oq-brand) !important;
  border-color:var(--oq-brand) !important;
  color:#fff !important;
}

/* ---------- Operación ORQUÍDEA (antes oro/café/azul) ---------- */
body.admin-body .admin-content :is(.oq-panel-head span,.oq-subtitle,.oq-link) {
  color:var(--oq-brand) !important;
}
body.admin-body .admin-content .oq-field :is(input,select,textarea):focus {
  border-color:var(--oq-brand) !important;
  outline-color:rgba(91,57,189,.16) !important;
}
body.admin-body .admin-content :is(.oq-unit-note,.oq-live-calc>div,.oq-total-preview) {
  background:var(--oq-brand-soft-2) !important;
  border-color:#ddd2f3 !important;
}
body.admin-body .admin-content .oq-status:not(.success):not(.warning):not(.danger) {
  background:var(--oq-brand-soft) !important;
  color:var(--oq-brand-dark) !important;
}

/* Azul informativo pasa a violeta. Estados de negocio conservan verde/amarillo/rojo. */
body.admin-body .admin-content :is(
  .alert.info,
  .badge.info,
  .status.info,
  .info-badge,
  .oq-alert-badge.info,
  .oq-alert-stripe.info
) {
  background:var(--oq-brand-soft) !important;
  color:var(--oq-brand-dark) !important;
  border-color:#d8cfee !important;
}
body.admin-body .admin-content .oq-alert-stripe.info {
  background:var(--oq-brand) !important;
}

/* ---------- SaaS / plataforma ---------- */
.ocp-kpis article:not(.warn),
.osaas-kpis article:not(.success):not(.warning) {
  border-color:var(--oq-line) !important;
}
.ocp-kpis strong,
.osaas-kpis strong {
  color:var(--oq-brand-deep) !important;
}
.ocp-filters :is(input,select):focus,
.oqpa-form :is(input,select,textarea):focus {
  border-color:var(--oq-brand-light) !important;
  box-shadow:0 0 0 3px rgba(91,57,189,.12) !important;
}
.osaas-progress i,
.ocp-meter i,
.oq-onboarding-progress span {
  background:linear-gradient(90deg,var(--oq-brand),var(--oq-brand-violet)) !important;
}

/* ---------- Portal del empleado ---------- */
body.employee-portal-admin :where(.ep-hero,.ep-career-hero,.ep-comp-hero,.ep-org-hero) {
  background:var(--oq-brand-gradient) !important;
  border-color:rgba(91,57,189,.32) !important;
  color:#fff !important;
  box-shadow:0 18px 44px rgba(47,28,112,.16) !important;
}
body.employee-portal-admin :where(.ep-hero,.ep-career-hero,.ep-comp-hero,.ep-org-hero) :is(h1,h2,h3) {
  color:#fff !important;
}
body.employee-portal-admin :where(.ep-hero,.ep-career-hero,.ep-comp-hero,.ep-org-hero) p {
  color:#eee9ff !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) {
    border-radius:20px !important;
  }
}

/* ---------- Impresión ----------
   La identidad de pantalla no debe convertir comprobantes impresos en fondos morados. */
@media print {
  body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) {
    background:#fff !important;
    color:#000 !important;
    box-shadow:none !important;
    border-color:#ddd !important;
  }
  body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) :is(h1,h2,h3,h4,p) {
    color:#000 !important;
    text-shadow:none !important;
  }
}

/* ========================================================================
   ORQUIDEA BRAND SYSTEM v3 - correccion Usuarios + modo oscuro real
   2026-09-19
   ======================================================================== */

/* El bloque V2 de :root usa !important. Estas variables oscuras deben estar
   despues y usar la misma prioridad para que el tema oscuro pueda resolver
   realmente toda la interfaz. */
html[data-theme="dark"] {
  --oq-bg: #100b1d !important;
  --oq-surface: #19122b !important;
  --oq-text: #f8f5ff !important;
  --oq-muted: #bdb4cf !important;
  --oq-line: #3b2d57 !important;
  --oq-brand: #8b6df0 !important;
  --oq-brand-hover: #9a7ff5 !important;
  --oq-brand-light: #a88ff7 !important;
  --oq-brand-violet: #9b75ff !important;
  --oq-brand-dark: #d6c9ff !important;
  --oq-brand-deep: #efe9ff !important;
  --oq-brand-soft: #2b2047 !important;
  --oq-brand-soft-2: #211936 !important;
  --oq-gold-soft: #332b1c !important;
  --oq-shadow: 0 16px 38px rgba(0, 0, 0, .24) !important;
  --oq-focus: 0 0 0 3px rgba(155, 117, 255, .24) !important;

  --bg: var(--oq-bg) !important;
  --background: var(--oq-bg) !important;
  --card: var(--oq-surface) !important;
  --card-bg: var(--oq-surface) !important;
  --panel-bg: var(--oq-surface) !important;
  --surface: var(--oq-surface) !important;
  --surface-soft: var(--oq-bg) !important;
  --surface-muted: var(--oq-brand-soft-2) !important;
  --input-bg: #201733 !important;
  --text: var(--oq-text) !important;
  --text-primary: var(--oq-text) !important;
  --text-secondary: var(--oq-muted) !important;
  --text-muted: var(--oq-muted) !important;
  --muted: var(--oq-muted) !important;
  --muted-text: var(--oq-muted) !important;
  --border: var(--oq-line) !important;
  --border-color: var(--oq-line) !important;
  --accent: var(--oq-brand) !important;

  --g-primary: var(--oq-brand) !important;
  --g-primary-hover: var(--oq-brand-hover) !important;
  --g-secondary: var(--oq-brand-light) !important;
  --g-accent: var(--oq-brand) !important;
  --g-navy: #d7ccff !important;
  --g-blue-700: var(--oq-brand) !important;
  --g-info: var(--oq-brand-light) !important;
  --g-surface: var(--oq-surface) !important;
  --g-surface-soft: var(--oq-bg) !important;
  --g-surface-muted: var(--oq-brand-soft-2) !important;
  --g-text: var(--oq-text) !important;
  --g-text-muted: var(--oq-muted) !important;
  --g-border: var(--oq-line) !important;
}

/* Base oscura global. La firma sigue siendo morada, no azul. */
html[data-theme="dark"] body.admin-body,
html[data-theme="dark"] .admin-shell,
html[data-theme="dark"] .admin-main,
html[data-theme="dark"] .admin-content {
  background: var(--oq-bg) !important;
  color: var(--oq-text) !important;
}

html[data-theme="dark"] .admin-topbar {
  background: rgba(25, 18, 43, .96) !important;
  border-bottom-color: var(--oq-line) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16) !important;
}

html[data-theme="dark"] :is(.topbar-title strong,.user-copy strong,.admin-footer) {
  color: var(--oq-text) !important;
}
html[data-theme="dark"] :is(.topbar-title span,.user-copy small,.admin-footer small) {
  color: var(--oq-muted) !important;
}
html[data-theme="dark"] :is(.topbar-icon-button,.user-chip) {
  background: #1d1530 !important;
  border-color: #3d2e5b !important;
  color: #eee8ff !important;
}
html[data-theme="dark"] .topbar-icon-button:hover {
  background: #2a1e46 !important;
  border-color: #7a5ed4 !important;
  color: #fff !important;
}

/* Controles generales oscuros. */
html[data-theme="dark"] body.admin-body .admin-content :is(input,select,textarea,.form-control) {
  background: #201733 !important;
  border-color: #493762 !important;
  color: #f8f5ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(input,textarea)::placeholder {
  color: #9e94b1 !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(input,select,textarea,.form-control):focus {
  border-color: #9b75ff !important;
  box-shadow: 0 0 0 3px rgba(155,117,255,.19) !important;
}

/* Tablas oscuras: eliminamos el azul heredado y conservamos el violeta. */
@media screen {
  html[data-theme="dark"] body.admin-body .admin-content table {
    background: var(--oq-surface) !important;
    color: var(--oq-text) !important;
  }
  html[data-theme="dark"] body.admin-body .admin-content table th {
    background: #261b3d !important;
    color: #d9ceef !important;
    border-color: var(--oq-line) !important;
  }
  html[data-theme="dark"] body.admin-body .admin-content table td {
    color: #eee9f7 !important;
    border-color: #352847 !important;
  }
  html[data-theme="dark"] body.admin-body .admin-content table tbody tr:hover {
    background: rgba(139,109,240,.09) !important;
  }
}

html[data-theme="dark"] body.admin-body .admin-content .btn:not(.primary):not(.danger):not(.success):not(.btn-primary):not(.btn-danger),
html[data-theme="dark"] body.admin-body .admin-content .btn-secondary {
  background: #211735 !important;
  border-color: #4b3865 !important;
  color: #eee8ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .btn:not(.primary):not(.danger):not(.success):hover,
html[data-theme="dark"] body.admin-body .admin-content .btn-secondary:hover {
  background: #302047 !important;
  border-color: #775ac8 !important;
  color: #fff !important;
}

/* ------------------------------------------------------------------------
   Usuarios y permisos
   El hero viejo no tenia padding porque originalmente no era una tarjeta.
   Ahora se convierte deliberadamente en una cabecera ORQUIDEA completa.
   ------------------------------------------------------------------------ */
body.admin-body .admin-content .users-page {
  max-width: 1500px !important;
  margin: 0 auto !important;
  padding: 12px 0 30px !important;
  color: var(--oq-text) !important;
}

body.admin-body .admin-content .users-hero {
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 28px !important;
  min-height: 176px !important;
  margin: 0 0 20px !important;
  padding: 28px 30px !important;
  border: 1px solid rgba(91,57,189,.28) !important;
  border-radius: 24px !important;
  background: var(--oq-brand-gradient) !important;
  box-shadow: 0 18px 44px rgba(47,28,112,.18) !important;
}
body.admin-body .admin-content .users-hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -90px;
  top: -150px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 50px rgba(255,255,255,.025);
  pointer-events: none;
}
body.admin-body .admin-content .users-hero > * {
  position: relative;
  z-index: 1;
}
body.admin-body .admin-content .users-eyebrow {
  margin-bottom: 7px !important;
  color: #e7ddff !important;
  font-size: .76rem !important;
  font-weight: 850 !important;
  letter-spacing: .09em !important;
}
body.admin-body .admin-content .users-title-line {
  gap: 12px !important;
}
body.admin-body .admin-content .users-title-line h1 {
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(2rem,3vw,2.8rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.03em !important;
}
body.admin-body .admin-content .users-hero p {
  max-width: 840px !important;
  margin: 10px 0 0 !important;
  color: #eee9ff !important;
  font-size: .98rem !important;
  line-height: 1.55 !important;
}
body.admin-body .admin-content .users-version {
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
  backdrop-filter: blur(8px);
}
body.admin-body .admin-content .users-new,
body.admin-body .admin-content .users-hero .btn.primary {
  min-height: 48px !important;
  padding: 0 19px !important;
  border: 1px solid rgba(255,255,255,.9) !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #342070 !important;
  box-shadow: 0 10px 24px rgba(30,18,64,.17) !important;
  font-weight: 850 !important;
}
body.admin-body .admin-content .users-new:hover,
body.admin-body .admin-content .users-hero .btn.primary:hover {
  background: #f0ebff !important;
  border-color: #fff !important;
  color: #251653 !important;
  transform: translateY(-1px);
}

/* Superficies de Usuarios: mismos radios, lineas y morado de la plataforma. */
body.admin-body .admin-content :is(
  .users-stat,
  .users-toolbar,
  .users-table-card,
  .users-form-card,
  .users-reset-card,
  .users-permission-card,
  .users-permission-area
) {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
  color: var(--oq-text) !important;
  box-shadow: var(--oq-shadow) !important;
}
body.admin-body .admin-content .users-stat span,
body.admin-body .admin-content .users-stat small,
body.admin-body .admin-content .users-person small,
body.admin-body .admin-content .users-empty,
body.admin-body .admin-content .users-table-footer,
body.admin-body .admin-content .users-form-section-title small,
body.admin-body .admin-content .users-profile-help,
body.admin-body .admin-content .users-permission-card header small,
body.admin-body .admin-content .users-permission-action small,
body.admin-body .admin-content .users-you {
  color: var(--oq-muted) !important;
}
body.admin-body .admin-content .users-stat strong,
body.admin-body .admin-content .users-person strong,
body.admin-body .admin-content .users-form-section-title strong,
body.admin-body .admin-content .users-permission-card h3 {
  color: var(--oq-text) !important;
}
body.admin-body .admin-content .users-stat--info strong {
  color: var(--oq-brand) !important;
}
body.admin-body .admin-content .users-avatar,
body.admin-body .admin-content .users-reset-icon,
body.admin-body .admin-content .users-form-section-title > span,
body.admin-body .admin-content .users-form-section-title-copy > span {
  background: var(--oq-brand-soft) !important;
  color: var(--oq-brand) !important;
}
body.admin-body .admin-content .users-profile-badge,
body.admin-body .admin-content .users-permission-count,
body.admin-body .admin-content .users-version {
  border-color: #d7ccf0 !important;
}
body.admin-body .admin-content :is(.users-profile-badge,.users-permission-count) {
  background: var(--oq-brand-soft) !important;
  color: var(--oq-brand-dark) !important;
}
body.admin-body .admin-content .users-toolbar :is(input,select),
body.admin-body .admin-content .users-form-grid :is(input,select),
body.admin-body .admin-content .users-profile-select select,
body.admin-body .admin-content .users-reset-form input {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
  color: var(--oq-text) !important;
}
body.admin-body .admin-content .users-search span {
  color: var(--oq-muted) !important;
}
body.admin-body .admin-content .users-table th {
  background: var(--oq-brand-soft-2) !important;
  color: var(--oq-brand-dark) !important;
  border-color: var(--oq-line) !important;
}
body.admin-body .admin-content .users-table td {
  border-color: var(--oq-line) !important;
}
body.admin-body .admin-content .users-table tbody tr:hover {
  background: rgba(91,57,189,.055) !important;
}
body.admin-body .admin-content .users-table-footer,
body.admin-body .admin-content .users-form-actions,
body.admin-body .admin-content .users-permission-card > header,
body.admin-body .admin-content .users-profile-help,
body.admin-body .admin-content .users-security-note,
body.admin-body .admin-content .users-permission-legend {
  background: var(--oq-brand-soft-2) !important;
  border-color: var(--oq-line) !important;
}
body.admin-body .admin-content .users-action,
body.admin-body .admin-content .users-secondary-button,
body.admin-body .admin-content .users-cancel-button {
  background: var(--oq-surface) !important;
  border-color: #cfc3e8 !important;
  color: var(--oq-brand-dark) !important;
}
body.admin-body .admin-content .users-action:hover,
body.admin-body .admin-content .users-secondary-button:hover,
body.admin-body .admin-content .users-cancel-button:hover {
  background: var(--oq-brand-soft) !important;
  border-color: var(--oq-brand-light) !important;
}
body.admin-body .admin-content .users-permission-area-head small,
body.admin-body .admin-content .users-permission-legend strong,
body.admin-body .admin-content .users-back,
body.admin-body .admin-content .users-super {
  color: var(--oq-brand) !important;
}
body.admin-body .admin-content .users-permission-area-head h2 {
  color: var(--oq-text) !important;
}
body.admin-body .admin-content .users-permission-area-head > span {
  background: var(--oq-brand-soft) !important;
  color: var(--oq-brand-dark) !important;
}
body.admin-body .admin-content .users-permission-actions {
  background: var(--oq-line) !important;
}
body.admin-body .admin-content .users-permission-action {
  background: var(--oq-surface) !important;
}
body.admin-body .admin-content .users-permission-indicator {
  border-color: #ab9bc9 !important;
}
body.admin-body .admin-content .users-permission-action input:checked + .users-permission-indicator {
  background: var(--oq-brand) !important;
  border-color: var(--oq-brand) !important;
  box-shadow: inset 0 0 0 3px var(--oq-surface) !important;
}

/* Usuarios en oscuro: anulamos todos los blancos y azules codificados en el
   CSS historico sin tocar verde/amarillo/rojo de estados. */
html[data-theme="dark"] body.admin-body .admin-content .users-hero {
  background: linear-gradient(135deg,#21143f 0%,#4f31a0 58%,#724fd1 100%) !important;
  border-color: #503b73 !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .users-stat,
  .users-toolbar,
  .users-table-card,
  .users-form-card,
  .users-reset-card,
  .users-permission-card,
  .users-permission-area,
  .users-permission-action
) {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-table th,
html[data-theme="dark"] body.admin-body .admin-content :is(
  .users-table-footer,
  .users-form-actions,
  .users-permission-card > header,
  .users-profile-help,
  .users-security-note,
  .users-permission-legend
) {
  background: #241a3a !important;
  color: var(--oq-text) !important;
  border-color: var(--oq-line) !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-table td {
  color: #eee9f7 !important;
  border-color: #352847 !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-table tbody tr:hover {
  background: rgba(139,109,240,.09) !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .users-toolbar input,
  .users-toolbar select,
  .users-form-grid input,
  .users-form-grid select,
  .users-profile-select select,
  .users-reset-form input
) {
  background: #201733 !important;
  border-color: #493762 !important;
  color: #f8f5ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .users-profile-badge,
  .users-permission-count,
  .users-avatar,
  .users-reset-icon,
  .users-form-section-title > span,
  .users-form-section-title-copy > span,
  .users-permission-area-head > span
) {
  background: #2b2047 !important;
  color: #cfbfff !important;
  border-color: #4b3968 !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .users-action,
  .users-secondary-button,
  .users-cancel-button
) {
  background: #211735 !important;
  border-color: #4b3865 !important;
  color: #d9ceff !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .users-action,
  .users-secondary-button,
  .users-cancel-button
):hover {
  background: #302047 !important;
  border-color: #775ac8 !important;
  color: #fff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-permission-area {
  background: linear-gradient(180deg,#1b142e,#181127) !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-permission-actions {
  background: #3a2d50 !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-capacity:not(.is-full) {
  background: #332a16 !important;
  border-color: #6b5727 !important;
  color: #f2d387 !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-capacity.is-full {
  background: #381d29 !important;
  border-color: #6f3347 !important;
  color: #ffb5c5 !important;
}
html[data-theme="dark"] body.admin-body .admin-content .users-capacity .btn {
  background: rgba(255,255,255,.04) !important;
}

@media (max-width: 680px) {
  body.admin-body .admin-content .users-hero {
    min-height: 0 !important;
    padding: 24px 20px !important;
    align-items: stretch !important;
  }
}

/* ========================================================================
   ORQUIDEA BRAND SYSTEM v4 - modo oscuro integral de módulos administrativos
   2026-09-19

   Objetivo:
   - Ninguna tarjeta/panel/formulario administrativo debe quedar blanco al
     activar el tema oscuro.
   - Los heroes conservan la firma violeta ORQUIDEA.
   - Verde / amarillo / rojo se reservan para estados semánticos.
   - Compatibilidad con módulos antiguos que usan variables --ds-* y --oc-*.
   ======================================================================== */

html[data-theme="dark"] {
  color-scheme: dark;

  /* Módulos ORQUÍDEA históricos (oro/dashboard). */
  --ds-surface: var(--oq-surface) !important;
  --ds-border: var(--oq-line) !important;
  --ds-text: var(--oq-text) !important;
  --ds-muted: var(--oq-muted) !important;

  /* Tesorería / Caja. */
  --oc-bg: var(--oq-bg) !important;
  --oc-card: var(--oq-surface) !important;
  --oc-border: var(--oq-line) !important;
  --oc-muted: var(--oq-muted) !important;
  --oc-blue: var(--oq-brand) !important;
  --oc-sky: var(--oq-brand-light) !important;
  --oc-purple: var(--oq-brand) !important;

  /* Comercial y portales internos. */
  --oqc-bg: var(--oq-bg) !important;
  --oqc-ink: var(--oq-text) !important;
  --oqc-muted: var(--oq-muted) !important;
  --oqc-line: var(--oq-line) !important;
  --oqc-purple: var(--oq-brand) !important;
  --oqc-purple-dark: #d8ccff !important;

  /* Seguridad y módulos que usan aliases sencillos. */
  --primary: var(--oq-brand) !important;
  --surface: var(--oq-surface) !important;
  --surface-muted: var(--oq-brand-soft-2) !important;
  --text-primary: var(--oq-text) !important;
  --text-secondary: var(--oq-muted) !important;
}

/* ------------------------------------------------------------------------
   Compatibilidad universal de superficies.
   Muchos módulos antiguos tienen nombres distintos, pero comparten sufijos
   card/panel/kpi. Se resuelven aquí sin modificar cada vista por separado.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :where(
  [class$="-card"], [class*="-card "],
  [class$="-panel"], [class*="-panel "],
  [class$="-kpi"], [class*="-kpi "],
  [class$="-tile"], [class*="-tile "],
  [class$="-box"], [class*="-box "],
  [class$="-modal-dialog"], [class*="-modal-dialog "],
  [class$="-modal-head"], [class*="-modal-head "]
) {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
  color: var(--oq-text) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.16) !important;
}

/* Los grupos KPI que usan article/div sin clase propia también pasan a oscuro. */
html[data-theme="dark"] body.admin-body .admin-content :where([class*="kpis"],[class*="metrics"],[class*="stats"]) > :is(article,div,a,section) {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
  color: var(--oq-text) !important;
}

/* Encabezados y datos principales sobre superficies oscuras. */
html[data-theme="dark"] body.admin-body .admin-content :where(
  [class$="-card"], [class*="-card "],
  [class$="-panel"], [class*="-panel "],
  [class$="-kpi"], [class*="-kpi "],
  [class$="-box"], [class*="-box "]
) :is(h1,h2,h3,h4,h5,h6,strong,b,label,dt,dd) {
  color: var(--oq-text) !important;
}
html[data-theme="dark"] body.admin-body .admin-content :where(
  [class$="-card"], [class*="-card "],
  [class$="-panel"], [class*="-panel "],
  [class$="-kpi"], [class*="-kpi "],
  [class$="-box"], [class*="-box "]
) :is(p,small) {
  color: var(--oq-muted) !important;
}

/* ------------------------------------------------------------------------
   Heroes: siempre morado ORQUÍDEA con contraste alto.
   Corrige subtítulos heredados que quedaban gris/verde oscuro sobre violeta.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) {
  background: linear-gradient(135deg,#2d1857 0%,#5736b8 57%,#8058ef 100%) !important;
  border-color: #5a4385 !important;
  color: #fff !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.22) !important;
}
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) :is(h1,h2,h3,h4,p,small,span,strong,.oq-kicker,.oc-kicker,.col-kicker,.sch-kicker,.gd-kicker,.ap24-kicker,.op-kicker,.ob-kicker,.security-kicker,.orb-kicker,.ors-kicker) {
  color: #fff !important;
}
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) p {
  opacity: .88 !important;
}

/* Botonería personalizada de los módulos antiguos. */
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-btn"],[class*="-btn "]):not(.primary):not(.approve):not(.reject):not(.danger):not(.success) {
  background: #211735 !important;
  border-color: #4b3865 !important;
  color: #eee8ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-btn"],[class*="-btn "]).primary {
  background: var(--oq-brand) !important;
  border-color: var(--oq-brand) !important;
  color: #fff !important;
}
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) :where([class$="-btn"],[class*="-btn "],.btn,.oq-btn,.oc-btn,.ors-btn,.orb-btn) {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.34) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-theme="dark"] body.admin-body .admin-content :where([class$="-hero"],[class*="-hero "]) :where([class$="-btn"],[class*="-btn "],.btn,.oq-btn,.oc-btn,.ors-btn,.orb-btn):hover {
  background: rgba(255,255,255,.20) !important;
  border-color: rgba(255,255,255,.55) !important;
  color: #fff !important;
}

/* Links operativos: la identidad es violeta, no azul. */
html[data-theme="dark"] body.admin-body .admin-content a:not(.btn):not([class*="danger"]):not([class*="success"]) {
  color: #a98cff !important;
}

/* ------------------------------------------------------------------------
   Oro / Dashboard / Alertas.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content .oq-focus-card {
  background: linear-gradient(135deg,#35206f,#5b39bd) !important;
  border-color: #684bc3 !important;
  color: #fff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .oq-focus-card :is(span,strong,small,div) { color:#fff !important; }
html[data-theme="dark"] body.admin-body .admin-content :is(.oq-dashboard-status a,.oq-alert-kpis article,.oq-alert-item,.oq-report-kpis article) {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
  color: var(--oq-text) !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.oq-dashboard-status a,.oq-alert-item,.oq-alert-kpis article) :is(h2,h3,strong,b) { color:var(--oq-text)!important; }
html[data-theme="dark"] body.admin-body .admin-content :is(.oq-dashboard-status a,.oq-alert-item,.oq-alert-kpis article) :is(p,span,small) { color:var(--oq-muted)!important; }
html[data-theme="dark"] body.admin-body .admin-content .oq-metal-symbol {
  background:#2b2047 !important;
  color:#d4c5ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .oq-metal-card.platinum .oq-metal-symbol,
html[data-theme="dark"] body.admin-body .admin-content .oq-metal-card.pending .oq-metal-symbol {
  background:#2b2047 !important;
  color:#d4c5ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .oq-line-preview,
html[data-theme="dark"] body.admin-body .admin-content .oq-loose-summary,
html[data-theme="dark"] body.admin-body .admin-content .oq-total-preview,
html[data-theme="dark"] body.admin-body .admin-content .oq-selected-rate,
html[data-theme="dark"] body.admin-body .admin-content .oq-weight-equivalent {
  background:#211936 !important;
  border-color:var(--oq-line) !important;
  color:var(--oq-text) !important;
}

/* ------------------------------------------------------------------------
   Tesorería / caja / cuentas / cierres.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :is(
  .oc-account-rules>div,
  .oc-initial-account,
  .oc-summary>div,
  .oc-close-box,
  .oc-setup-card
) {
  background: var(--oq-surface) !important;
  border-color: var(--oq-line) !important;
  color: var(--oq-text) !important;
}
html[data-theme="dark"] body.admin-body .admin-content .oc-date {
  background:#241a3a !important;
  border:1px solid #4b3865 !important;
  color:#fff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .oc-account-card.major,
html[data-theme="dark"] body.admin-body .admin-content .oc-card.oc-available {
  background:var(--oq-surface) !important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.oc-account-card,.oc-account-rules>div,.oc-initial-account,.oc-panel,.oc-card) :is(h2,h3,strong,b) {
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.oc-account-card,.oc-account-rules>div,.oc-initial-account,.oc-panel,.oc-card) :is(p,span,small) {
  color:var(--oq-muted)!important;
}
html[data-theme="dark"] body.admin-body .admin-content .oc-account-balance,
html[data-theme="dark"] body.admin-body .admin-content .oc-money-preview {
  color:#b9a8ff !important;
}
html[data-theme="dark"] body.admin-body .admin-content .oc-modal-close {
  background:#2b2047 !important;
  color:#eee8ff !important;
}

/* ------------------------------------------------------------------------
   Préstamos, cartera, garantías, autorizaciones, obligaciones y presupuesto.
   Estas vistas tenían CSS inline con #fff y colores azules oscuros.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :is(
  .col-kpi,.col-age,.col-panel,
  .sch-kpi,.sch-card,
  .gd-kpi,.gd-card,
  .ap24-kpi,.ap24-card,
  .op-kpi,.op-panel,
  .ob-kpi,.ob-panel
) {
  background:var(--oq-surface)!important;
  border-color:var(--oq-line)!important;
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .col-tools,.sch-filter,.gd-filters,.ap24-filter,.op-tools,.ob-period,
  .ob-panel-head,.ob-note,.ap24-note
) {
  background:#211936!important;
  border-color:var(--oq-line)!important;
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content .ob-period strong,
html[data-theme="dark"] body.admin-body .admin-content .ob-proj article {
  background:#211936!important;
  border-color:var(--oq-line)!important;
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(
  .col-kpi,.col-age,.sch-kpi,.gd-kpi,.ap24-kpi,.op-kpi,.ob-kpi,
  .col-panel,.sch-card,.gd-card,.ap24-card,.op-panel,.ob-panel
) :is(h1,h2,h3,h4,strong,b) { color:var(--oq-text)!important; }
html[data-theme="dark"] body.admin-body .admin-content :is(
  .col-kpi,.col-age,.sch-kpi,.gd-kpi,.ap24-kpi,.op-kpi,.ob-kpi,
  .col-panel,.sch-card,.gd-card,.ap24-card,.op-panel,.ob-panel
) :is(p,span,small) { color:var(--oq-muted)!important; }
html[data-theme="dark"] body.admin-body .admin-content :is(.col-table,.sch-table,.gd-table,.ap24-table,.op-table,.ob-table) th {
  background:#261b3d!important;
  color:#d9ceef!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.col-table,.sch-table,.gd-table,.ap24-table,.op-table,.ob-table) td {
  color:#eee9f7!important;
  border-color:#352847!important;
}

/* ------------------------------------------------------------------------
   Seguridad.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :is(.security-card,.security-kpis article,.security-score) {
  background:var(--oq-surface)!important;
  border-color:var(--oq-line)!important;
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.security-card,.security-kpis article,.security-score) :is(h1,h2,h3,strong) { color:var(--oq-text)!important; }
html[data-theme="dark"] body.admin-body .admin-content :is(.security-card,.security-kpis article,.security-score) :is(p,span,small) { color:var(--oq-muted)!important; }
html[data-theme="dark"] body.admin-body .admin-content .security-audit-retention {
  background:#2b2047!important;
  color:#d7ccff!important;
}
html[data-theme="dark"] body.admin-body .admin-content .security-check { border-color:var(--oq-line)!important; }

/* ------------------------------------------------------------------------
   Plataforma / SaaS / suscripciones / facturación.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :is(
  .oqpa-tabs,.oqpa-new,.oqpa-item,.oqpa-community-reply,.oqpa-community-topic,
  .oqpa-lead,.oqpa-lead-detail,.oqpa-official-reply,
  .ors-policy-option,.ors-history-item,.ors-check,
  .orb-renewal,.orb-empty-box,.oqprov-source
) {
  background:var(--oq-surface)!important;
  border-color:var(--oq-line)!important;
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content .oqpa-section { border-color:var(--oq-line)!important; }
html[data-theme="dark"] body.admin-body .admin-content :is(.oqpa-section-head h2,.oqpa-item>summary,.oqpa-new>summary,.ors-section-head h2,.ors-company-head h3,.ors-policy-option strong,.ors-company-data strong,.ors-history-item p) {
  color:var(--oq-text)!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.oqpa-section-head p,.oqpa-item small,.oqpa-form label,.oqpa-form label>small,.ors-section-head p,.ors-policy-option small,.ors-company-data span,.ors-company-head small,.ors-history-item small) {
  color:var(--oq-muted)!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.ors-company-data>div,.ors-history-diff span) {
  background:#211936!important;
  color:var(--oq-muted)!important;
}
html[data-theme="dark"] body.admin-body .admin-content .ors-policy-card {
  background:var(--oq-surface)!important;
}
html[data-theme="dark"] body.admin-body .admin-content .oqpa-tabs a:hover,
html[data-theme="dark"] body.admin-body .admin-content .oqpa-tabs a.active {
  background:#2b2047!important;
  color:#d7ccff!important;
}

/* ------------------------------------------------------------------------
   Estados semánticos. Se reaplican al final para no perder su significado.
   ------------------------------------------------------------------------ */
html[data-theme="dark"] body.admin-body .admin-content :is([class*="alert"],[class*="note"],[class*="banner"]).success {
  background:#132c25!important;
  border-color:#285d49!important;
  color:#9be0bd!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is([class*="alert"],[class*="note"],[class*="banner"]).warning {
  background:#332a16!important;
  border-color:#6b5727!important;
  color:#f2d387!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is([class*="alert"],[class*="note"],[class*="banner"]).danger,
html[data-theme="dark"] body.admin-body .admin-content :is([class*="alert"],[class*="note"],[class*="banner"]).error {
  background:#381d29!important;
  border-color:#6f3347!important;
  color:#ffb5c5!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is([class*="alert"],[class*="note"],[class*="banner"]).info {
  background:#241f42!important;
  border-color:#55437c!important;
  color:#d8ccff!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.good,.positive) strong,
html[data-theme="dark"] body.admin-body .admin-content strong.good,
html[data-theme="dark"] body.admin-body .admin-content strong.positive {
  color:#70d6a2!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.bad,.danger,.negative) strong,
html[data-theme="dark"] body.admin-body .admin-content strong.bad,
html[data-theme="dark"] body.admin-body .admin-content strong.danger,
html[data-theme="dark"] body.admin-body .admin-content strong.negative {
  color:#ff8f9d!important;
}
html[data-theme="dark"] body.admin-body .admin-content :is(.warn,.warning) strong,
html[data-theme="dark"] body.admin-body .admin-content strong.warn,
html[data-theme="dark"] body.admin-body .admin-content strong.warning {
  color:#f3cc72!important;
}

/* Barra inferior / pie: integración total con el fondo oscuro. */
html[data-theme="dark"] body.admin-body .admin-footer {
  background:var(--oq-bg)!important;
  border-top-color:var(--oq-line)!important;
  color:var(--oq-muted)!important;
}

/* En impresión siempre se conserva fondo claro, aun si el usuario trabaja oscuro. */
@media print {
  html[data-theme="dark"] body.admin-body .admin-content :where(
    [class$="-card"],[class*="-card "],
    [class$="-panel"],[class*="-panel "],
    [class$="-kpi"],[class*="-kpi "],
    [class$="-box"],[class*="-box "]
  ) {
    background:#fff!important;
    color:#000!important;
    border-color:#ddd!important;
    box-shadow:none!important;
  }
}

/* =====================================================================
   FASE 77 · CIERRE DE IDENTIDAD VISUAL INTERNA
   Este bloque se carga al final de _AdminLayout para neutralizar hojas
   antiguas que todavia definan azul/cian como color de marca.
   ===================================================================== */
:root{
  --primary:var(--oq-brand)!important;
  --primary-color:var(--oq-brand)!important;
  --primary-hover:var(--oq-brand-hover)!important;
  --accent-color:var(--oq-brand)!important;
  --brand:var(--oq-brand)!important;
  --brand-primary:var(--oq-brand)!important;
  --ds-primary:var(--oq-brand)!important;
  --ds-primary-600:var(--oq-brand)!important;
  --ds-primary-700:var(--oq-brand-dark)!important;
  --ds-accent:var(--oq-brand-light)!important;
  --ds-info:var(--oq-brand-light)!important;
}

/* Heroes, encabezados y botones de módulos internos: identidad morada. */
body.admin-body :is(.oq-hero,.page-hero,.admin-hero,.module-hero,.hero-card):not(.status):not(.success):not(.warning):not(.danger){
  --hero-accent:var(--oq-brand);
}
body.admin-body :is(.oq-btn.primary,.btn-primary,.btn.primary,.button-primary,button.primary,a.primary){
  background:var(--oq-brand)!important;
  border-color:var(--oq-brand)!important;
  color:#fff!important;
}
body.admin-body :is(.oq-btn.primary,.btn-primary,.btn.primary,.button-primary,button.primary,a.primary):hover{
  background:var(--oq-brand-hover)!important;
  border-color:var(--oq-brand-hover)!important;
}
body.admin-body :is(.oq-panel-head a,.oq-kicker,.section-kicker,.eyebrow,.metric-link,.admin-content a:not(.btn):not(.oq-btn):not(.status):not(.badge)){
  accent-color:var(--oq-brand);
}
body.admin-body :is(.oq-panel-head a,.section-kicker,.eyebrow,.metric-link){color:var(--oq-brand)!important}

/* Clases heredadas cuyo nombre conserva blue/cyan pero ya no deben pintar azul. */
body.admin-body :is(.text-blue,.text-info,.blue-text,.cyan-text){color:var(--oq-brand)!important}
body.admin-body :is(.bg-blue,.bg-info,.blue-bg,.cyan-bg){background:var(--oq-brand-soft)!important;color:var(--oq-brand-dark)!important}
body.admin-body :is(.border-blue,.border-info){border-color:#cbbcf1!important}
body.admin-body :is(.progress-bar,.progress-fill,.bar-fill):not(.success):not(.warning):not(.danger){background:linear-gradient(90deg,var(--oq-brand-dark),var(--oq-brand-light))!important}

/* Tablas y formularios: foco y encabezado coherentes con ORQUÍDEA. */
body.admin-body :is(table thead th,.table thead th,.oq-table thead th){border-bottom-color:var(--oq-line)}
body.admin-body :is(input,select,textarea):focus{border-color:var(--oq-brand-light)!important;box-shadow:var(--oq-focus)!important}
body.admin-body :is(.tabs a.active,.tab.active,.nav-tabs .active,.pill.active){color:var(--oq-brand)!important;border-color:var(--oq-brand)!important;background:var(--oq-brand-soft)!important}

/* El dashboard y reportes no pueden recuperar el azul aunque una hoja previa lo declare. */
.oq-dashboard-v77 .oq-focus-card,
.oq-dashboard-v77 .oq-executive-hero,
.oq-reports-v77 .oq-report-hero{
  background:linear-gradient(135deg,var(--oq-brand-deep),var(--oq-brand-dark) 48%,var(--oq-brand))!important;
}

/* ========================================================================
   FASE 84 - visual hotfix: monthly close + accounting dashboard
   Keeps the ORQUIDEA purple hero identity while restoring contrast,
   spacing and responsive action buttons in these two modules only.
   ======================================================================== */
@media screen {
  /* Monthly financial close: the generic hero theme was coloring the row
     but the original module did not provide card spacing or subtitle contrast. */
  body.admin-body .admin-content .mc-hero {
    padding: 22px 26px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 18px !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    min-height: 108px;
  }

  body.admin-body .admin-content .mc-hero > div:first-child {
    min-width: 0;
  }

  body.admin-body .admin-content .mc-hero .mc-kicker {
    color: #eee8ff !important;
  }

  body.admin-body .admin-content .mc-hero h1 {
    color: #fff !important;
    margin: 5px 0 7px !important;
    line-height: 1.08;
  }

  body.admin-body .admin-content .mc-hero .muted {
    color: #eee9ff !important;
    opacity: .92;
  }

  body.admin-body .admin-content .mc-hero .mc-actions {
    align-items: center;
    justify-content: flex-end;
  }

  body.admin-body .admin-content .mc-hero .mc-btn {
    background: rgba(255,255,255,.97) !important;
    border-color: rgba(255,255,255,.95) !important;
    color: #342064 !important;
    box-shadow: 0 8px 20px rgba(31,19,65,.13) !important;
    min-height: 44px;
  }

  body.admin-body .admin-content .mc-hero .mc-btn:hover {
    background: #f0eaff !important;
    border-color: #fff !important;
    color: #2f1c70 !important;
  }

  /* Accounting dashboard: links inherited white text from the purple hero,
     producing blank white buttons. Use an explicit high-contrast palette and
     a stable grid so every action remains readable. */
  body.admin-body .admin-content .accounting-hero {
    display: grid !important;
    grid-template-columns: minmax(300px,.72fr) minmax(0,1.65fr) !important;
    align-items: center !important;
    gap: 26px !important;
    padding: 26px 28px !important;
  }

  body.admin-body .admin-content .accounting-hero > div:first-child {
    min-width: 0;
  }

  body.admin-body .admin-content .accounting-hero h1 {
    max-width: 520px;
    line-height: 1.05;
  }

  body.admin-body .admin-content .accounting-hero p {
    max-width: 560px !important;
    line-height: 1.48;
    color: #eee9ff !important;
  }

  body.admin-body .admin-content .accounting-actions {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px !important;
    width: 100%;
    align-self: stretch;
    align-content: center;
  }

  body.admin-body .admin-content .accounting-actions form {
    display: block !important;
    width: 100%;
    margin: 0 !important;
  }

  body.admin-body .admin-content .accounting-actions .accounting-btn,
  body.admin-body .admin-content .accounting-actions form .accounting-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 9px 12px;
    background: rgba(255,255,255,.97) !important;
    border-color: rgba(255,255,255,.95) !important;
    color: #342064 !important;
    box-shadow: 0 7px 18px rgba(31,19,65,.12) !important;
    text-align: center;
    white-space: normal;
    line-height: 1.18;
    font-size: .9rem;
  }

  body.admin-body .admin-content .accounting-actions .accounting-btn:hover,
  body.admin-body .admin-content .accounting-actions form .accounting-btn:hover {
    background: #f0eaff !important;
    border-color: #fff !important;
    color: #2f1c70 !important;
    transform: translateY(-1px);
  }

  body.admin-body .admin-content .accounting-actions .accounting-btn.primary,
  body.admin-body .admin-content .accounting-actions form .accounting-btn.primary {
    background: #2f1c70 !important;
    border-color: rgba(255,255,255,.52) !important;
    color: #fff !important;
  }

  body.admin-body .admin-content .accounting-actions .accounting-btn.primary:hover,
  body.admin-body .admin-content .accounting-actions form .accounting-btn.primary:hover {
    background: #3b238e !important;
    color: #fff !important;
  }

  body.admin-body .admin-content .accounting-actions .accounting-btn.blue {
    background: #5b39bd !important;
    border-color: #9a83e2 !important;
    color: #fff !important;
  }

  body.admin-body .admin-content .accounting-actions .accounting-btn.blue:hover {
    background: #6b49cf !important;
    color: #fff !important;
  }
}

@media screen and (max-width: 1450px) {
  body.admin-body .admin-content .accounting-actions {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
}

@media screen and (max-width: 1120px) {
  body.admin-body .admin-content .accounting-hero {
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }
  body.admin-body .admin-content .accounting-hero h1,
  body.admin-body .admin-content .accounting-hero p {
    max-width: 860px !important;
  }
  body.admin-body .admin-content .accounting-actions {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

@media screen and (max-width: 780px) {
  body.admin-body .admin-content .mc-hero {
    padding: 18px !important;
    align-items: flex-start !important;
  }
  body.admin-body .admin-content .mc-hero .mc-actions {
    width: 100%;
    justify-content: flex-start;
  }
  body.admin-body .admin-content .accounting-hero {
    padding: 20px !important;
  }
  body.admin-body .admin-content .accounting-actions {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media screen and (max-width: 520px) {
  body.admin-body .admin-content .mc-hero .mc-actions,
  body.admin-body .admin-content .mc-hero .mc-btn {
    width: 100%;
  }
  body.admin-body .admin-content .accounting-actions {
    grid-template-columns: 1fr;
  }
}
