/* ============================================================
   theme-dark.css — Tema oscuro (opt-in) de Multi App v2
   ------------------------------------------------------------
   Cómo funciona:
   - Se carga SIEMPRE, después de common.css (ui) y de
     front.css + cx.css (cx).
   - TODAS las reglas de color viven bajo [data-bs-theme="dark"],
     atributo que fija assets/js/theme.js (y el snippet anti-FOUC
     del <head>). Si el atributo NO está (modo claro, pantallas de
     login, superficies públicas como tienda/convenios/simulador),
     este archivo no altera absolutamente nada.
   - El modo claro sigue viviendo 100% en common.css/front.css/cx.css
     sin cambios.
   ============================================================ */

/* ---------- 1) Tokens (superficies claras del tema actual) ---------- */
[data-bs-theme="dark"] {
  color-scheme: dark;

  /* Bootstrap: paleta oscura con tinte corporativo azul */
  --bs-body-bg: #0e1621;
  --bs-body-color: #d7e1ec;
  --bs-secondary-bg: #16212e;
  --bs-tertiary-bg: #1b2735;
  --bs-secondary-color: rgba(215, 225, 236, .72);
  --bs-border-color: #26344a;
  --bs-border-color-translucent: rgba(255, 255, 255, .12);
  --bs-card-bg: #16212e;
  --bs-card-cap-bg: #1b2735;
  --bs-accordion-bg: #16212e;
  --bs-modal-bg: #16212e;
  --bs-offcanvas-bg: #16212e;
  --bs-dropdown-bg: #16212e;
  --bs-emphasis-color: #ffffff;

  /* Staff (common.css) */
  --brand-bg: #0e1621;

  /* Front compartido (front.css) — lo usa el portal cx.
     Página más oscura que las superficies para que las tarjetas y el
     sidebar se distingan con claridad. */
  --front-bg: #0a101a;
  --front-ink: #d7e1ec;
  --front-muted: #93a4b8;
  --front-line: #26344a;
  --front-card: #16212e;
  --front-fp: rgba(24, 130, 205, .16);
  --front-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  --front-shadow-lg: 0 10px 26px rgba(0, 0, 0, .55);

  /* Portal (cx.css) */
  --cx-bg-app: #0a101a;
  --cx-bg-surface: #16212e;
  --cx-sidebar-bg: #1b2735;   /* panel del sidebar, un paso más claro que la página */
  --cx-text-primary: #d7e1ec;
  --cx-text-secondary: #93a4b8;
  --cx-shadow-card: 0 2px 8px rgba(0, 0, 0, .5);
}

/* ---------- 2) Utilidades Bootstrap no adaptativas ---------- */
/* Bootstrap deja bg-light/bg-white/table-light/text-bg-light/text-dark
   con valores claros fijos; los reajustamos al tema oscuro. */
[data-bs-theme="dark"] .bg-light { background-color: #1b2735 !important; }
[data-bs-theme="dark"] .bg-white  { background-color: #16212e !important; }
/* .text-dark: sobre superficies oscuras pasa a texto claro, EXCEPTO en
   badges/fondos claros (bg-warning/bg-info/bg-light) donde el texto debe
   seguir siendo oscuro. */
[data-bs-theme="dark"] .text-dark:not(.badge):not(.bg-warning):not(.bg-info):not(.bg-light) { color: #d7e1ec !important; }
[data-bs-theme="dark"] .badge.text-dark,
[data-bs-theme="dark"] .bg-warning { color: #1a1a1a !important; }
[data-bs-theme="dark"] .bg-info    { color: #03212b !important; }

[data-bs-theme="dark"] .text-bg-light {
  color: #d7e1ec !important;
  background-color: #2b3a4d !important;
}

[data-bs-theme="dark"] .table-light {
  --bs-table-color: #d7e1ec;
  --bs-table-bg: #1b2735;
  --bs-table-border-color: #26344a;
  --bs-table-striped-bg: #1e2b3a;
  --bs-table-striped-color: #d7e1ec;
  --bs-table-hover-bg: #223246;
  --bs-table-hover-color: #ffffff;
  color: #d7e1ec;
}

/* ---------- 3) Marca legible sobre fondo oscuro ---------- */
[data-bs-theme="dark"] .text-brand      { color: #6fb3e8; }
[data-bs-theme="dark"] .text-brand-dark { color: #8fc5ee; }
[data-bs-theme="dark"] .text-brand-blue { color: #6fb3e8; }
[data-bs-theme="dark"] a.text-brand:hover { color: #a5d0f2; }

/* ---------- 4) Staff (common.css) ---------- */
[data-bs-theme="dark"] .card { box-shadow: 0 4px 20px rgba(0, 0, 0, .5); }

[data-bs-theme="dark"] .hist-item { border-bottom-color: #26344a; }
[data-bs-theme="dark"] .hist-item:hover { background: #1b2735; }
[data-bs-theme="dark"] .hist-header[aria-expanded="true"] { background: #16283c; }

[data-bs-theme="dark"] .res-item:hover { background: #16283c; }
[data-bs-theme="dark"] .sortable:hover { background: rgba(24, 130, 205, .18); }
[data-bs-theme="dark"] .sortable .sort-icon { color: #6b7c90; }

/* Transacciones · crear (wizard): colores claros fijos de la página. */
[data-bs-theme="dark"] .step-circle {
  background: #1b2735;
  color: #93a4b8;
  border-color: #26344a;
}
[data-bs-theme="dark"] .step-connector { background: #26344a; }
[data-bs-theme="dark"] .step-label { color: #93a4b8; }
[data-bs-theme="dark"] .step-item.active .step-label { color: #8fc5ee; }
[data-bs-theme="dark"] .step-item.done .step-label { color: #3ddc84; }
[data-bs-theme="dark"] .sel-row:hover,
[data-bs-theme="dark"] .pago-row:hover { background: #16283c !important; }
[data-bs-theme="dark"] .sel-row.selected,
[data-bs-theme="dark"] .pago-row.selected { background: #1d3b57 !important; }
[data-bs-theme="dark"] .metric-card { background: #16212e; border-color: #26344a; }
[data-bs-theme="dark"] .rubro-row { background: #16212e; }
[data-bs-theme="dark"] .locked-box { background: #1b2735; border-color: #26344a; }
[data-bs-theme="dark"] .form-section { border-top-color: #26344a; }
[data-bs-theme="dark"] .form-section-title { color: #93a4b8; }

/* Listas de autocompletado con style inline (background:#fff) */
[data-bs-theme="dark"] .list-group.position-absolute {
  background-color: var(--bs-body-bg) !important;
  border-color: var(--bs-border-color) !important;
}

/* Tom Select (selects con búsqueda del staff) */
[data-bs-theme="dark"] .ts-wrapper .ts-control {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .ts-control > input { color: var(--bs-body-color); }
[data-bs-theme="dark"] .ts-dropdown {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
}
[data-bs-theme="dark"] .ts-dropdown .option:hover,
[data-bs-theme="dark"] .ts-dropdown .option.active { background: var(--brand-blue); color: #fff; }
[data-bs-theme="dark"] .ts-dropdown .dropdown-input {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

/* ---------- 5) Front compartido (front.css) — portal cx ---------- */
[data-bs-theme="dark"] .front-body-falling::after {
  background-image: radial-gradient(circle at 50% 50%, transparent 0, transparent 2px, rgba(255, 255, 255, .08) 2px);
}
[data-bs-theme="dark"] .front-table thead th {
  background: #1b2735;
  color: var(--front-muted);
  border-bottom-color: #26344a;
}
[data-bs-theme="dark"] .front-table tbody td { border-bottom-color: #1e2b3a; }
[data-bs-theme="dark"] .front-table tbody tr:hover { background: #16212e; }
[data-bs-theme="dark"] .front-page { background: #16212e; color: var(--front-ink); border-color: var(--front-line); }
[data-bs-theme="dark"] .front-page.is-active { background: var(--brand-blue-dark); color: #fff; }
[data-bs-theme="dark"] .front-modal { background: #16212e; color: var(--front-ink); }
[data-bs-theme="dark"] .front-card { background: var(--front-card); }
[data-bs-theme="dark"] .front-page-title { color: #8fc5ee; }
[data-bs-theme="dark"] .front-btn-outline { background: #1b2735; color: #8fc5ee; border-color: var(--front-line); }
[data-bs-theme="dark"] .front-btn-outline:hover { color: #a5d0f2; border-color: var(--brand-blue); }

/* ---------- 6) Portal (cx.css) ---------- */

/* Login del portal (cx): el fondo y la tarjeta se definen en cx.css con
   colores fijos, así que en oscuro quedaban iguales. */
[data-bs-theme="dark"] .portal-auth-screen {
  background: radial-gradient(150% 180% at 20% 120%, #05080d 0%, #0b1520 35%, #12324f 60%, #0e1621 85%, #05080d 100%);
}
[data-bs-theme="dark"] .portal-auth-screen .portal-shape {
  background: rgba(24, 130, 205, .18);
}
[data-bs-theme="dark"] .portal-auth-screen .s2 {
  background: rgba(255, 255, 255, .06);
}
[data-bs-theme="dark"] .card-mobile {
  background: rgba(22, 33, 46, .84);
  border: 1px solid #26344a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
[data-bs-theme="dark"] .portal-auth-screen .card-header,
[data-bs-theme="dark"] .portal-auth-screen .card-header-brand {
  color: #d7e1ec;
}
[data-bs-theme="dark"] .portal-auth-screen .form-label {
  color: #d7e1ec;
}
[data-bs-theme="dark"] .portal-auth-screen .input-group {
  background: #0e1621;
  border: 1px solid #26344a;
}
[data-bs-theme="dark"] .portal-auth-screen .input-group input {
  background: transparent;
  color: #d7e1ec;
}
[data-bs-theme="dark"] .portal-auth-screen .input-group input::placeholder {
  color: #7d8ea3;
}
[data-bs-theme="dark"] .portal-auth-screen .input-group-text {
  background: #16212e;
  color: #8fc5ee;
  border: 0;
}
[data-bs-theme="dark"] .portal-auth-screen .auth-bottom-logo {
  background: #16212e;
}

/* Login interno (ui): el degradado de marca también se oscurece. */
[data-bs-theme="dark"] body.brand-gradient:not(.env-test):not(.env-local) {
  background: radial-gradient(150% 180% at 20% 120%, #05080d 0%, #0b1520 35%, #12324f 60%, #0e1621 85%, #05080d 100%);
}

/* Sidebar: panel propio, más claro que la página, con divisor y elevación
   para que no se confunda con el área de contenido. */
[data-bs-theme="dark"] .portal-sidebar {
  background: var(--cx-sidebar-bg);
  border-right-color: #2f4058;
  box-shadow: 6px 0 22px rgba(0, 0, 0, .35);
}

/* Los ítems del dock se pintan en cx.css con el selector
   `.portal-dock-nav a.portal-dock-item` (más específico); replicamos
   ese nivel para poder sobreescribirlos en oscuro. */
[data-bs-theme="dark"] .portal-dock-nav a.portal-dock-item {
  color: var(--cx-text-primary);
  background: linear-gradient(-75deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
}
[data-bs-theme="dark"] .portal-dock-nav a.portal-dock-item:hover {
  background: rgba(255, 255, 255, .14);
}
[data-bs-theme="dark"] .portal-dock-nav a.portal-dock-item .portal-dock-icon {
  background: rgba(255, 255, 255, .14);
  color: #cfe3f5;
}
[data-bs-theme="dark"] .portal-dock-group-label { color: #93a4b8; }
[data-bs-theme="dark"] .portal-dock-nav a.portal-dock-item.active,
[data-bs-theme="dark"] .portal-dock-nav a.portal-dock-item.active:hover {
  background: linear-gradient(135deg, #1f6fbf, #1882CD);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
[data-bs-theme="dark"] .portal-dock-nav a.portal-dock-item.active .portal-dock-icon {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

/* Encabezados de tarjeta: cx.css los fuerza a azul oscuro (--cx-dark),
   ilegible en fondos oscuros. */
[data-bs-theme="dark"] .card-header-brand { color: #cfe3f5; }
[data-bs-theme="dark"] .card-header-brand .crumb { color: var(--cx-text-secondary); }
/* Estilos inline "color:var(--cx-dark)" (íconos, montos aprobados, total). */
[data-bs-theme="dark"] [style*="color:var(--cx-dark)"] { color: #8fc5ee !important; }

[data-bs-theme="dark"] .portal-page-title {
  background: linear-gradient(90deg, #7fb8e6, #1882CD, #7fb8e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-bs-theme="dark"] .portal-area-title { color: #d7e1ec; }
[data-bs-theme="dark"] .portal-card-glowing-border {
  border-color: rgba(24, 130, 205, .55);
  box-shadow: 0 0 12px rgba(24, 130, 205, .22);
}

[data-bs-theme="dark"] .portal-table thead th { background: #1b2735; border-bottom-color: #26344a; }
[data-bs-theme="dark"] .portal-table tbody td { border-bottom-color: #1e2b3a; }
[data-bs-theme="dark"] .portal-table tbody tr:hover { background: #16212e; }
[data-bs-theme="dark"] .badge-mora { background: rgba(235, 48, 49, .18); color: #ff8a8b; }

[data-bs-theme="dark"] .portal-input,
[data-bs-theme="dark"] .portal-select {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .btn-eye { background: #1b2735; color: #cfe3f5; }
[data-bs-theme="dark"] .btn-eye:hover { color: #ffffff; }

/* Botón de contorno de marca: borde/texto azul oscuro → azul claro. */
[data-bs-theme="dark"] .btn-portal-outline { border-color: #8fc5ee; color: #8fc5ee; }
[data-bs-theme="dark"] .btn-portal-outline:hover { background: #8fc5ee; color: #0a101a; }

/* ---------- 6b) Chat del asistente (cx) ---------- */
[data-bs-theme="dark"] .chat-sesion.active { background: rgba(24, 130, 205, .18); }
[data-bs-theme="dark"] .chat-msg.error .chat-bubble { background: rgba(235, 48, 49, .16); border-color: rgba(235, 48, 49, .4); color: #ff8a8b; }
[data-bs-theme="dark"] .chat-chip { color: #cfe3f5; }
[data-bs-theme="dark"] .chat-fb-btn:hover { color: #cfe3f5; }
[data-bs-theme="dark"] .chat-bubble a { color: #6fb3e8; }


/* ============================================================
   7) Control del tema (visible en ambos temas)
   - ui:  .sidebar .theme-toggle / #sidebarOffcanvas .theme-toggle
   - cx:  .portal-theme-toggle (aspecto del dock del portal)
   ============================================================ */
.theme-toggle {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.sidebar .theme-toggle,
#sidebarOffcanvas .theme-toggle { color: rgba(255, 255, 255, .85); }
.sidebar .theme-toggle:hover,
#sidebarOffcanvas .theme-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.portal-theme-toggle,
.portal-tour-toggle {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  padding: .65rem .85rem;
  margin-bottom: .35rem;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-align: left;
  color: var(--cx-text-primary);
  background: linear-gradient(-75deg, rgba(255, 255, 255, .7), rgba(232, 236, 241, .7));
  transition: transform var(--cx-transition), background var(--cx-transition);
}
.portal-theme-toggle:hover,
.portal-tour-toggle:hover { transform: scale(1.02); }
.portal-theme-toggle .portal-dock-icon,
.portal-tour-toggle .portal-dock-icon {
  width: 28px; height: 28px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, .6);
  color: var(--cx-dark); font-size: .9rem;
}
[data-bs-theme="dark"] .portal-theme-toggle,
[data-bs-theme="dark"] .portal-tour-toggle {
  color: var(--cx-text-primary);
  background: linear-gradient(-75deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
}
[data-bs-theme="dark"] .portal-theme-toggle:hover,
[data-bs-theme="dark"] .portal-tour-toggle:hover {
  background: rgba(255, 255, 255, .14);
}
[data-bs-theme="dark"] .portal-theme-toggle .portal-dock-icon,
[data-bs-theme="dark"] .portal-tour-toggle .portal-dock-icon {
  background: rgba(255, 255, 255, .14);
  color: #cfe3f5;
}

/* ============================================================
   8) Superficies públicas — tienda (.td-*), convenios (.cv-*) y
      simulador (.sim-*).
      Sus CSS definen tokens como alias de --front-* (ya adaptados en
      la sección 1) y usan clases Bootstrap; aquí solo neutralizamos
      los colores claros hardcodeados.
   ============================================================ */

/* ----- 8.1 Textos en azul de marca → azul claro ----- */
[data-bs-theme="dark"] .td-price,
[data-bs-theme="dark"] .td-page-title,
[data-bs-theme="dark"] .td-qv-price,
[data-bs-theme="dark"] .td-det-coop-main,
[data-bs-theme="dark"] .td-sidebar h3,
[data-bs-theme="dark"] .td-modal h3,
[data-bs-theme="dark"] .td-drawer h3,
[data-bs-theme="dark"] .td-sort-opt.is-selected,
[data-bs-theme="dark"] .td-opt-list li button.is-selected,
[data-bs-theme="dark"] .td-chip,
[data-bs-theme="dark"] .td-chip button,
[data-bs-theme="dark"] .cv-price,
[data-bs-theme="dark"] .cv-page-title,
[data-bs-theme="dark"] .cv-qv-price,
[data-bs-theme="dark"] .cv-det-coop-main,
[data-bs-theme="dark"] .cv-hero-body h2,
[data-bs-theme="dark"] .cv-sidebar h3,
[data-bs-theme="dark"] .cv-modal h3,
[data-bs-theme="dark"] .cv-drawer h3,
[data-bs-theme="dark"] .cv-sort-opt.is-selected,
[data-bs-theme="dark"] .cv-opt-list li button.is-selected,
[data-bs-theme="dark"] .cv-chip,
[data-bs-theme="dark"] .cv-chip button {
  color: #8fc5ee;
}

/* ----- 8.2 Superficies blancas → oscuras (tienda) ----- */
[data-bs-theme="dark"] .td-filter-trigger,
[data-bs-theme="dark"] .td-sort-btn,
[data-bs-theme="dark"] .td-sort-menu,
[data-bs-theme="dark"] .td-opt-list li button,
[data-bs-theme="dark"] .td-modal,
[data-bs-theme="dark"] .td-drawer,
[data-bs-theme="dark"] .td-page,
[data-bs-theme="dark"] .td-qchip,
[data-bs-theme="dark"] .td-qv-img {
  background: #16212e;
  border-color: var(--front-line);
  color: var(--front-ink);
}
[data-bs-theme="dark"] .td-search input { background: #16212e; color: var(--front-ink); }
[data-bs-theme="dark"] .td-search input::placeholder { color: var(--front-muted); }
[data-bs-theme="dark"] .td-modal-close,
[data-bs-theme="dark"] .td-drawer-close { background: #1b2735; color: var(--front-ink); }
[data-bs-theme="dark"] .td-sort-opt:hover { background: #1b2735; }
[data-bs-theme="dark"] .td-sort-opt.is-selected,
[data-bs-theme="dark"] .td-opt-list li button.is-selected,
[data-bs-theme="dark"] .td-chip,
[data-bs-theme="dark"] .td-tag-multi { background: #2b3a4d; }
[data-bs-theme="dark"] .td-card-img { background: linear-gradient(135deg, #101a27, #16212e); }
[data-bs-theme="dark"] .td-card-img .td-noimg { color: #40536b; }
[data-bs-theme="dark"] .td-card-actions { border-top-color: var(--front-line); }
[data-bs-theme="dark"] .td-det-coop { color: var(--front-ink); }
[data-bs-theme="dark"] .td-qchip { box-shadow: none; }
/* Estados activos (mantener el azul de marca, que las reglas de arriba igualaban) */
[data-bs-theme="dark"] .td-page.is-active,
[data-bs-theme="dark"] .cv-page.is-active {
  background: var(--brand-blue-dark);
  color: #fff;
  border-color: var(--brand-blue-dark);
}
[data-bs-theme="dark"] .td-qchip.is-active,
[data-bs-theme="dark"] .cv-qchip.is-active {
  background: var(--brand-blue-dark);
  color: #fff;
  border-color: hsla(203, 100%, 80%, .2);
}

/* Botones de la tienda con estilo inline (fondo #fff / texto azul oscuro). */
[data-bs-theme="dark"] .td-btn-detail,
[data-bs-theme="dark"] .td-btn-ghost[style*="background:#fff"] {
  color: #8fc5ee !important;
  background: #16212e !important;
  border-color: var(--front-line) !important;
}

/* ----- 8.3 Superficies blancas → oscuras (convenios) ----- */
[data-bs-theme="dark"] .cv-filter-trigger,
[data-bs-theme="dark"] .cv-sort-btn,
[data-bs-theme="dark"] .cv-sort-menu,
[data-bs-theme="dark"] .cv-opt-list li button,
[data-bs-theme="dark"] .cv-modal,
[data-bs-theme="dark"] .cv-drawer,
[data-bs-theme="dark"] .cv-page,
[data-bs-theme="dark"] .cv-qchip,
[data-bs-theme="dark"] .cv-qv-img {
  background: #16212e;
  border-color: var(--front-line);
  color: var(--front-ink);
}
[data-bs-theme="dark"] .cv-search input { background: #16212e; color: var(--front-ink); }
[data-bs-theme="dark"] .cv-search input::placeholder { color: var(--front-muted); }
[data-bs-theme="dark"] .cv-modal-close,
[data-bs-theme="dark"] .cv-drawer-close { background: #1b2735; color: var(--front-ink); }
[data-bs-theme="dark"] .cv-sort-opt:hover { background: #1b2735; }
[data-bs-theme="dark"] .cv-sort-opt.is-selected,
[data-bs-theme="dark"] .cv-opt-list li button.is-selected,
[data-bs-theme="dark"] .cv-chip,
[data-bs-theme="dark"] .cv-tag-multi { background: #2b3a4d; }
[data-bs-theme="dark"] .cv-card-img { background: linear-gradient(135deg, #101a27, #16212e); }
[data-bs-theme="dark"] .cv-card-img .cv-noimg { color: #40536b; }
[data-bs-theme="dark"] .cv-card-actions { border-top-color: var(--front-line); }
[data-bs-theme="dark"] .cv-det-coop { color: var(--front-ink); }
[data-bs-theme="dark"] .cv-qchip { box-shadow: none; }
[data-bs-theme="dark"] .cv-chip-contact { background: #1b2735; color: #9fc2e0; }
[data-bs-theme="dark"] .cv-card-link .cv-card-actions { color: #6fb3e8; border-top-color: var(--front-line); }
[data-bs-theme="dark"] .cv-hero-img .cv-noimg { background: linear-gradient(135deg, #101a27, #16212e); color: #40536b; }

/* ----- 8.4 Puntos del fondo animado ----- */
[data-bs-theme="dark"] .td-falling-overlay,
[data-bs-theme="dark"] .cv-falling-overlay {
  background-image: radial-gradient(circle at 50% 50%, transparent 0, transparent 2px, rgba(255, 255, 255, .08) 2px);
}

/* ----- 8.5 Simulador ----- */
[data-bs-theme="dark"] .form-label { color: #a9b8c9; }
[data-bs-theme="dark"] .table-amort tr.row-last { background: #14351f; color: #d7f5e0; }
.sim-header .theme-toggle {
  margin-left: auto;
  width: 42px; height: 42px; flex: 0 0 auto;
  border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.sim-header .theme-toggle:hover { background: rgba(255, 255, 255, .26); }
