:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #657085;
  --line: #dce3ef;
  --primary: #2457d6;
  --primary-dark: #183f9c;
  --danger: #c73535;
  --success: #0a7b45;
  --warn: #9a6500;
  --shadow: 0 12px 30px rgba(20, 33, 61, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--text);
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
}
.nav a:hover { background: #edf2ff; text-decoration: none; }

.container {
  width: min(1500px, calc(100% - 28px));
  margin: 24px auto 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.narrow { max-width: 520px; margin: 48px auto; }
.hero h1, .page-head h1, .card h1, .card h2 { margin-top: 0; }
.muted { color: var(--muted); }
code {
  background: #eef2f8;
  padding: 2px 6px;
  border-radius: 6px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 18px;
}
.page-head h1 { margin-bottom: 6px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}
.stat { color: var(--text); display: block; }
.stat:hover { text-decoration: none; transform: translateY(-1px); }
.stat strong { display: block; font-size: 2.1rem; line-height: 1; margin-bottom: 8px; }
.stat span { color: var(--muted); }

.form-grid, .provider-form {
  display: grid;
  gap: 14px;
}
.provider-form {
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 2fr) auto;
  align-items: end;
}
.form-grid .span-full { grid-column: 1 / -1; margin: 0; }
label { font-weight: 650; color: var(--text); }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 108px; resize: vertical; }
input:focus, textarea:focus, select:focus, [contenteditable="true"]:focus {
  outline: 2px solid rgba(36, 87, 214, .18);
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: .93rem;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; background: #f1f5fb; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 31px; padding: 5px 9px; font-size: .84rem; }
.inline { display: inline; }
.actions-cell { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 14px 0;
  font-weight: 650;
}
.alert.error { color: #8b1e1e; background: #fff0f0; border: 1px solid #f1c0c0; }
.alert.success { color: var(--success); background: #eefaF5; border: 1px solid #b9e4cf; }

.responsive-table { overflow-x: auto; }
.plain-table {
  width: 100%;
  border-collapse: collapse;
}
.plain-table th, .plain-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.plain-table th { color: var(--muted); font-size: .88rem; }

.spreadsheet-card { padding: 0; overflow: hidden; }
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.toolbar.inside { padding: 0 0 14px; background: transparent; border-bottom: 0; }
.toolbar.inside h2 { margin: 0; }
.search {
  max-width: 280px;
  margin-top: 0;
  margin-left: auto;
}
.status { font-weight: 700; color: var(--muted); }
.status.ok { color: var(--success); }
.status.error { color: var(--danger); }
.status.warn { color: var(--warn); }
.hint {
  padding: 10px 16px;
  color: var(--muted);
  font-size: .92rem;
  border-bottom: 1px solid var(--line);
}
.grid-wrap {
  max-height: calc(100vh - 250px);
  min-height: 420px;
  overflow: auto;
  background: #fff;
}
.data-grid {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  width: 100%;
  font-size: .88rem;
  table-layout: fixed;
}
.data-grid th, .data-grid td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 6px;
  min-width: 150px;
  width: 190px;
  max-width: none;
  height: 48px;
  max-height: 48px;
  vertical-align: middle;
  background: #fff;
  overflow: hidden;
}
.data-grid tbody tr:nth-child(even) td { background: #fbfcff; }
.data-grid .grid-heading-row th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 38px;
  background: #e9eff9;
  color: #40506a;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.data-grid .grid-filter-row th {
  position: sticky;
  top: 38px;
  z-index: 4;
  height: 42px;
  padding: 5px;
  background: #f7f9fd;
}
.grid-sort-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 3px 1px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}
.grid-sort-button:hover, .grid-sort-button.active { color: var(--primary); }
.sort-indicator { flex: 0 0 auto; font-size: .68rem; opacity: .72; }
.column-filter {
  min-width: 0;
  width: 100%;
  height: 30px;
  margin: 0;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 500;
  text-transform: none;
}
.data-grid td .cell-editor,
.data-grid td .cell-static {
  display: block;
  width: 100%;
  height: 38px;
  max-height: 38px;
  line-height: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  cursor: text;
}
.data-grid td .cell-static { cursor: default; text-align: center; }
.data-grid td .cell-editor:focus {
  outline: 2px solid rgba(36, 87, 214, .25);
  outline-offset: -2px;
  background: #fff;
}
.data-grid tr.dirty td { background: #fffbe9 !important; }
.data-grid tr.to-delete td {
  background: #fff0f0 !important;
  color: #8b1e1e;
  text-decoration: line-through;
}
.data-grid .select-col {
  min-width: 58px;
  width: 58px;
  max-width: 58px;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 2;
}
.data-grid .id-col {
  min-width: 70px;
  width: 72px;
  max-width: none;
  text-align: center;
  position: sticky;
  left: 58px;
  z-index: 2;
  background: #fafcff;
}
.data-grid .grid-heading-row .select-col,
.data-grid .grid-heading-row .id-col { z-index: 6; background: #dfe8f5; }
.data-grid .grid-filter-row .select-col,
.data-grid .grid-filter-row .id-col { z-index: 6; background: #edf2f9; }
.data-grid .actions-col { min-width: 82px; width: 82px; max-width: 82px; text-align: center; position: static; }
.data-grid select { margin: 0; min-width: 0; width: 100%; height: 30px; padding: 4px 6px; border-radius: 7px; font-size: .82rem; }
.data-grid tr[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .55);
  z-index: 100;
}
.modal.open { display: flex; }
.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0,0,0,.25);
  padding: 24px;
}
.modal-panel.wide { width: min(980px, 100%); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: #eef2f8;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}
.record-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.record-form label:has(textarea), .record-form .modal-actions { grid-column: 1 / -1; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .page-head { flex-direction: column; }
  .provider-form, .stats-grid, .record-form { grid-template-columns: 1fr; }
  .search { max-width: none; margin-left: 0; }
  .grid-wrap { max-height: calc(100vh - 310px); min-height: 360px; }
  .toolbar { align-items: stretch; }
  .toolbar .btn, .toolbar .search { width: 100%; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 16px, 1500px); margin-top: 12px; }
  .card { padding: 16px; border-radius: 14px; }
  .spreadsheet-card { padding: 0; }
  .nav { width: 100%; }
  .nav a { flex: 1 1 auto; text-align: center; background: #f6f8fc; }
  .modal { padding: 8px; }
  .modal-panel { padding: 18px; border-radius: 16px; }
}


.import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}
.import-card h2 { margin-bottom: 8px; }
.import-card .btn { margin-top: 12px; }
.template-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.import-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.result-pill {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfcff;
}
.result-pill strong { display: block; font-size: 1.4rem; }
.preview-table { max-height: 360px; overflow: auto; margin-top: 12px; }
.checkline { display: flex; gap: 9px; align-items: center; font-weight: 650; }
.checkline input { width: auto; margin: 0; }
@media (max-width: 1000px) { .import-grid, .import-result { grid-template-columns: 1fr; } }


/* Menú desplegable de herramientas */
.nav { align-items: center; }
.nav-dropdown { position: relative; }
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}
.nav-trigger:hover, .nav-dropdown.open .nav-trigger, .nav-dropdown:focus-within .nav-trigger { background: #edf2ff; }
.nav-submenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: none;
  min-width: 245px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
}
.nav-dropdown.open .nav-submenu,
.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu { display: grid; }
.nav-submenu a { padding: 10px 11px; }

/* Popup de descargas */
.download-list { display: grid; gap: 12px; margin-top: 18px; }
.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}
.download-info { display: grid; gap: 5px; min-width: 0; flex: 1; }
.download-info strong { font-size: 1rem; }
.download-info span { color: var(--muted); font-size: .88rem; }
.download-url { margin: 3px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; }
.download-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-feedback { margin-bottom: 0; }
.copy-feedback[hidden] { display: none; }

/* Herramientas integradas */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 18px; }
.tool-card { display: flex; align-items: flex-start; gap: 16px; color: var(--text); margin: 0; transition: transform .15s ease, box-shadow .15s ease; }
.tool-card:hover { text-decoration: none; transform: translateY(-2px); }
.tool-card h2 { margin-bottom: 7px; }
.tool-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.tool-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #edf2ff;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 800;
}
.tool-page-head { align-items: center; }

@media (max-width: 900px) {
  .download-row { align-items: stretch; flex-direction: column; }
  .download-actions .btn { flex: 1; }
  .tools-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-dropdown { flex: 1 1 auto; }
  .nav-trigger { width: 100%; justify-content: center; background: #f6f8fc; }
  .nav-submenu { position: absolute; top: calc(100% + 6px); right: 0; left: auto; width: min(300px, calc(100vw - 16px)); min-width: 0; }
}


/* Proveedores ampliados */
.provider-edit-form label { grid-column: auto; }
.provider-edit-form .modal-actions { grid-column: 1 / -1; }
.native-tool { margin-bottom: 32px; }

/* Alta y edición de proveedores en modal */
.provider-edit-form small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}
.provider-edit-form.is-loading {
  opacity: .55;
  pointer-events: none;
}
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}


/* Estado de caducidad del token del proveedor */
.provider-name-with-token {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.token-expiry-clock {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #64748b;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1;
  cursor: help;
  outline: none;
}
.token-expiry-clock.token-valid { color: #15803d; background: #f0fdf4; }
.token-expiry-clock.token-warning { color: #b45309; background: #fffbeb; }
.token-expiry-clock.token-expired { color: #b91c1c; background: #fef2f2; }
.token-expiry-clock.token-invalid { color: #64748b; background: #f8fafc; }
.token-expiry-clock:focus-visible {
  box-shadow: 0 0 0 3px rgba(36, 87, 214, .18);
}
.token-expiry-tooltip {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(360px, calc(100vw - 20px));
  padding: 8px 10px;
  border-radius: 9px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .24);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}
.token-expiry-tooltip[hidden] { display: none; }


/* Login discreto sin cabecera pública */
.login-body { min-height: 100vh; display: grid; place-items: center; background: #f4f7fb; }
.login-container { width: min(100%, 480px); margin: 0; padding: 18px; }
.login-card { margin: 0 auto; }

/* Mantiene abierto el submenú al mover el puntero desde Herramientas */
.nav-dropdown::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
.nav-submenu { top: calc(100% + 4px); }
.nav-trigger { text-decoration: none; }

/* Gestión de usuarios */
.user-action-menu { position: relative; display: inline-block; }
.user-action-menu summary { list-style: none; }
.user-action-menu summary::-webkit-details-marker { display: none; }
.user-action-box { position: absolute; z-index: 30; right: 0; top: calc(100% + 7px); width: 280px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); display: grid; gap: 10px; }



/* Redimensionado de columnas tipo hoja de cálculo. */
.data-grid .grid-heading-row th { position: sticky; }
.data-grid .grid-heading-row th.resizable-col { padding-right: 10px; }
.column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  z-index: 12;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}
.column-resizer::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}
.column-resizer:hover::after, .column-resizer.active::after { background: var(--primary); }
body.column-resizing, body.column-resizing * { cursor: col-resize !important; user-select: none !important; }
.provider-name-link { color: inherit; text-decoration: none; }
.provider-name-link:hover, .provider-name-link:focus-visible { color: var(--primary); text-decoration: underline; }

/* En el visor de streams se fija Nombre en lugar de ID. */
.data-grid.streams-grid tbody .id-col {
  position: static;
  left: auto;
  z-index: auto;
}
.data-grid.streams-grid thead .id-col {
  left: auto;
}
.data-grid.streams-grid .name-col {
  position: sticky;
  left: 58px;
  z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}
.data-grid.streams-grid tbody tr:nth-child(even) .name-col { background: #fbfcff; }
.data-grid.streams-grid tr.dirty .name-col { background: #fffbe9 !important; }
.data-grid.streams-grid tr.to-delete .name-col { background: #fff0f0 !important; }
.data-grid.streams-grid .grid-heading-row .name-col {
  z-index: 6;
  background: #dfe8f5;
}
.data-grid.streams-grid .grid-filter-row .name-col {
  z-index: 6;
  background: #edf2f9;
}

/* Paginación ligera para tablas grandes. */
.grid-pagination,
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.grid-pagination label,
.table-pagination label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}
.grid-pagination select,
.table-pagination select {
  width: auto;
  min-width: 82px;
  margin: 0;
  padding: 6px 28px 6px 9px;
}
.pagination-buttons {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pagination-buttons [data-page-info],
.pagination-summary {
  min-width: 185px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  text-align: center;
}
.pagination-buttons .btn:disabled { opacity: .42; }
.provider-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.provider-list-toolbar form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.provider-list-toolbar form > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.provider-list-toolbar form > label select {
  width: auto;
  min-width: 94px;
  margin-top: 0;
}
.provider-list-toolbar .search { margin-left: 0; }
.sortable-table-link { color: inherit; text-decoration: none; }
.sortable-table-link:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 620px) {
  .grid-pagination, .table-pagination { align-items: stretch; flex-direction: column; }
  .pagination-buttons { justify-content: space-between; }
  .pagination-buttons [data-page-info], .pagination-summary { min-width: 0; }
}
.table-pagination .btn.disabled {
  pointer-events: none;
  opacity: .42;
}

/* Asistente de vinculación para importaciones CSV */
.mapper-heading,
.mapping-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mapper-heading h2 { margin-bottom: 6px; }
.mapper-heading p { margin: 0; }
.mapper-info { color: var(--text); background: #f4f7ff; border: 1px solid #cfdaf5; }
.mapping-table-wrap { max-height: 70vh; border: 1px solid var(--line); border-radius: 14px; }
.mapping-table { min-width: 1050px; }
.mapping-table thead th { position: sticky; top: 0; z-index: 3; background: #f8faff; }
.mapping-table select,
.mapping-table input,
.mapping-table textarea { margin-top: 0; }
.mapping-table textarea { min-height: 48px; }
.mapping-table td:nth-child(1) { width: 260px; }
.mapping-table td:nth-child(2) { min-width: 330px; }
.mapping-table td:nth-child(3) { min-width: 280px; }
.mapping-table td:nth-child(4) { min-width: 220px; }
.mapping-group th {
  position: sticky;
  top: 45px;
  z-index: 2;
  background: #eaf0ff;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
}
.mapping-target strong,
.mapping-target span { display: block; }
.mapping-target code { display: inline-block; margin: 5px 0; font-size: .8rem; }
.mapping-target span { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.mapping-table [data-manual-value] { opacity: .48; }
.mapping-table [data-manual-value].is-active,
.mapping-table tr.uses-manual-value [data-manual-value] { opacity: 1; border-color: var(--primary); background: #fbfcff; }
.mapping-sample { color: var(--muted); font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.mapping-actions { align-items: center; margin-top: 16px; }
.mapping-actions p { margin: 0; }
.csv-preview { margin-top: 20px; }
.csv-preview summary { cursor: pointer; font-weight: 750; color: var(--primary-dark); }

@media (max-width: 760px) {
  .mapper-heading form,
  .mapper-heading .btn,
  .mapping-actions .btn { width: 100%; }
  .mapping-table-wrap { max-height: 62vh; }
}
.data-grid td .cell-editor.read-only { cursor: default; color: var(--text); background: transparent; }
.data-grid select:disabled { opacity: 1; color: var(--text); background: #f8fafc; }

/* Proveedores: permisos por rol y enlaces personalizados */
.modal-panel.extra-wide { width: min(1180px, 100%); }
.visibility-permissions,
.download-format-grid {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fbff;
}
.visibility-permissions legend,
.download-format-grid legend { padding: 0 7px; font-weight: 800; }
.visibility-permissions .muted { margin: 0 0 10px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin: 8px 0;
  font-weight: 700;
}
.check-row input { width: auto; margin: 0; }
.check-row small { color: var(--muted); font-weight: 500; }
.download-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.download-modal-head h2 { margin-bottom: 6px; }
.custom-download-builder,
.custom-download-results,
.custom-download-existing {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.custom-download-builder h3,
.custom-download-results h3,
.custom-download-existing h3 { margin: 0 0 12px; }
.download-format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 16px;
}
.format-choice { width: 100%; align-items: flex-start; }
.format-choice span { display: grid; gap: 3px; }
.format-choice small { display: block; }
.custom-download-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.download-row .status-badge { align-self: flex-start; }
.download-row.has-access-log { flex-wrap: wrap; }
.download-note { white-space: pre-wrap; color: var(--text) !important; line-height: 1.45; }
.compact-textarea { min-height: 82px; }
.download-access-log {
  flex: 1 0 100%;
  width: 100%;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #f6f8fc;
  border-radius: 10px;
}
.download-access-log[hidden] { display: none; }
.download-access-log > strong { display: block; margin-bottom: 8px; }
.access-log-list { display: grid; gap: 6px; }
.access-log-list > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: .82rem;
}
.access-log-list code { white-space: nowrap; }
.compact-alert { display: block; margin: 0; padding: 9px 10px; }

/* Streams: conmutador Normal / Editable y tabla moderna */
.stream-page-head { align-items: center; }
.stream-head-actions { align-items: center; }
.view-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(20, 33, 61, .05);
}
.view-mode-switch > span { color: var(--muted); font-size: .86rem; font-weight: 800; }
.view-mode-switch > span.active { color: var(--primary); }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { width: 0; height: 0; opacity: 0; margin: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e5;
  cursor: pointer;
  transition: .2s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(20, 33, 61, .25);
  transition: .2s ease;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 3px solid rgba(36, 87, 214, .2); }
.normal-streams-card { padding: 0; overflow: hidden; }
.normal-stream-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.normal-stream-toolbar form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.normal-stream-toolbar .search { margin: 0; }
.normal-stream-toolbar label { display: flex; align-items: center; gap: 7px; }
.normal-stream-toolbar select { width: auto; min-width: 80px; margin: 0; }
.modern-stream-table th { background: #f6f8fc; white-space: nowrap; }
.modern-stream-table tbody tr { transition: background .15s ease; }
.modern-stream-table tbody tr:hover td { background: #f8faff; }
.modern-stream-table td { vertical-align: middle; }
.modern-stream-table .actions-cell { display: table-cell; white-space: nowrap; }
.stream-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.stream-row-id { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; }
.stream-type-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  background: #edf2fb;
  color: #40506a;
}
.status-badge.active { background: #e7f7ef; color: #087245; }
.status-badge.inactive { background: #f4f5f8; color: #747d8d; }
.stream-url-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 390px;
}
.stream-url-preview {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
}
.stream-url-copy {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fd;
  color: var(--primary);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.stream-url-copy:hover { background: #edf2ff; border-color: #b8c7eb; }
.stream-url-copy.copied { background: #e7f7ef; border-color: #9ed7bb; color: var(--success); }
.stream-logo-cell { min-width: 68px; }
.stream-logo-preview {
  display: block;
  width: 46px;
  height: 34px;
  padding: 5px;
  object-fit: contain;
  border: 1px solid #233147;
  border-radius: 8px;
  background: #334155;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.empty-cell { padding: 38px !important; text-align: center !important; color: var(--muted); }
.stream-normal-form .span-full { grid-column: 1 / -1; }
.stream-normal-form.is-loading { opacity: .55; pointer-events: none; }

@media (max-width: 820px) {
  .download-modal-head,
  .normal-stream-toolbar,
  .stream-page-head { align-items: stretch; flex-direction: column; }
  .download-format-grid,
  .custom-download-options { grid-template-columns: 1fr; }
  .view-mode-switch { justify-content: center; }
  .normal-stream-toolbar form { align-items: stretch; }
  .normal-stream-toolbar .search { max-width: none; }
}

/* Filtros de vacíos y vistas normales de PSSH/Logos */
.download-modal-head { padding-right: 48px; }
.column-filter-wrap { display: flex; align-items: center; gap: 5px; width: 100%; }
.column-filter-wrap .column-filter { min-width: 0; flex: 1 1 auto; }
.empty-filter-toggle { flex: 0 0 auto; display: inline-flex; margin: 0; cursor: pointer; }
.empty-filter-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.empty-filter-toggle span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--muted); font-size: .9rem; font-weight: 900;
}
.empty-filter-toggle input:checked + span { background: #e9efff; border-color: #9db2ed; color: var(--primary); }
.empty-filter-toggle input:focus-visible + span { outline: 3px solid rgba(36,87,214,.18); }
.column-filter:disabled { background: #f1f4f9; opacity: .65; }
.normal-data-table td { max-width: 460px; }
.normal-data-table code { white-space: normal; overflow-wrap: anywhere; }
.normal-copy-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 230px;
  max-width: 460px;
}
.normal-copy-cell code {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.normal-copy-cell .stream-url-copy { flex: 0 0 30px; }
.normal-cell-subtext { display: block; max-width: 320px; margin-top: 6px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-large-preview { width: 74px; height: 46px; }
.record-form .span-full { grid-column: 1 / -1; }
@media (max-width: 820px) { .download-modal-head { padding-right: 0; padding-top: 38px; } }


/* Versión visible de la aplicación */
.app-version-footer {
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 20;
  padding: 5px 9px;
  border: 1px solid rgba(101, 112, 133, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(20, 33, 61, .08);
  backdrop-filter: blur(8px);
  font-size: .74rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
@media (max-width: 640px) {
  .app-version-footer { right: 8px; bottom: 7px; }
}

/* Botón de reproducción mediante extensión Chrome (v1.15) */
.provider-play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 32px;
  padding: 0;
  color: #fff;
  background: #f97316;
  border-color: #ea580c;
  box-shadow: 0 3px 9px rgba(234, 88, 12, .22);
}
.provider-play-button:hover,
.provider-play-button:focus-visible {
  color: #fff;
  background: #ea580c;
  border-color: #c2410c;
}
.provider-play-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}



/* Streaminator 1.15.13 · interfaz móvil y acciones compactas */
.mobile-nav-toggle,
.mobile-nav-backdrop { display: none; }
.provider-filter-form { width: 100%; }
.provider-search-controls,
.provider-display-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.provider-display-controls { margin-left: auto; }
.provider-action-icon { display: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  body.mobile-nav-open { overflow: hidden; }
  .topbar {
    z-index: 100;
    min-height: 64px;
    padding: 10px 14px;
    align-items: center;
    flex-direction: row;
  }
  .brand { min-width: 0; }
  .brand span { max-width: calc(100vw - 120px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav-toggle {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
  }
  .mobile-nav-toggle span { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s ease, opacity .2s ease; }
  .mobile-nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
  .mobile-nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    display: flex;
    width: min(86vw, 360px);
    height: 100dvh;
    padding: 82px 18px 24px;
    border-left: 1px solid var(--line);
    background: #fff;
    box-shadow: -24px 0 70px rgba(15,23,42,.18);
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform .24s ease;
  }
  .nav.mobile-open { transform: translateX(0); }
  .nav > a,
  .nav .nav-trigger { width: 100%; justify-content: flex-start; padding: 12px 14px; border-radius: 12px; background: #f7f9fd; text-align: left; }
  .nav-dropdown { width: 100%; flex: 0 0 auto; }
  .nav-dropdown::after { display: none; }
  .nav-submenu {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    border: 0;
    border-left: 3px solid #d7e1fb;
    border-radius: 0 10px 10px 0;
    box-shadow: none;
    background: #f8faff;
  }
  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu { display: none; }
  .nav-dropdown.open .nav-submenu { display: grid; }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(15,23,42,.46);
  }
  .mobile-nav-backdrop[hidden] { display: none; }
  .page-head { align-items: stretch; }
  .head-actions { width: 100%; }
  .head-actions > .btn { flex: 1 1 180px; }
}

@media (max-width: 700px) {
  body { background: #eef2f7; }
  .container { width: 100%; margin: 0 auto 66px; padding: 12px; }
  .card { margin-bottom: 12px; border-radius: 16px; box-shadow: 0 7px 24px rgba(20,33,61,.07); }
  .page-head { margin-top: 2px; gap: 12px; }
  .page-head h1 { font-size: 1.55rem; }
  .head-actions > .btn { width: 100%; flex-basis: 100%; }

  /* Proveedores: solo nombre y acciones, como lista de app. */
  .provider-list-toolbar { display: block; }
  .provider-filter-form { display: grid; gap: 12px; }
  .provider-search-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .provider-search-controls .search { grid-column: 1 / -1; width: 100%; max-width: none; }
  .provider-search-controls .btn { min-width: 82px; }
  .provider-display-controls { width: 100%; margin: 0; justify-content: space-between; }
  .provider-display-controls label { display: inline-flex; align-items: center; gap: 8px; }
  .provider-display-controls select { width: 92px; margin: 0; }
  .provider-display-controls .pagination-summary { text-align: right; min-width: 0; }
  .providers-table th:nth-child(2), .providers-table th:nth-child(3), .providers-table th:nth-child(4),
  .providers-table td:nth-child(2), .providers-table td:nth-child(3), .providers-table td:nth-child(4) { display: none; }
  .providers-table th, .providers-table td { padding: 12px 6px; vertical-align: middle; }
  .providers-table th:first-child, .providers-table td:first-child { padding-left: 2px; }
  .providers-table th:last-child, .providers-table td:last-child { text-align: right; }
  .providers-table .provider-actions { display: table-cell; width: 1%; white-space: nowrap; }
  .providers-table .provider-actions > * { vertical-align: middle; }
  .providers-table .provider-actions { gap: 5px; }
  .providers-table .inline { display: inline-flex; }
  .provider-action-label { display: none; }
  .provider-action-icon { display: block; }
  .provider-action-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    margin: 2px;
    border-radius: 11px;
  }
  .provider-play-button { display: none !important; }
  .token-expiry-clock { width: 23px; height: 23px; }

  /* Controles Normal / Editable */
  .stream-page-head .stream-head-actions { display: grid; grid-template-columns: 1fr; }
  .view-mode-switch { width: 100%; justify-content: space-between; padding: 8px 12px; }
  .normal-streams-card { border-radius: 16px; }
  .normal-stream-toolbar { padding: 14px; }
  .normal-stream-toolbar form { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 9px; }
  .normal-stream-toolbar .search { grid-column: 1 / -1; width: 100%; }
  .normal-stream-toolbar label { display: grid; gap: 4px; align-items: stretch; font-size: .82rem; }
  .normal-stream-toolbar label select { width: 100%; min-width: 0; }
  .normal-stream-toolbar form > .btn { width: 100%; }
  .normal-stream-toolbar > .pagination-summary { width: 100%; text-align: left; }

  /* Las tablas normales se convierten en fichas verticales. */
  .mobile-card-table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; width: 100%; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody { padding: 12px; }
  .mobile-card-table tbody tr { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(20,33,61,.05); }
  .mobile-card-table tbody tr:last-child { margin-bottom: 0; }
  .mobile-card-table tbody tr:hover td { background: transparent; }
  .mobile-card-table td {
    position: relative;
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f5;
    text-align: left;
  }
  .mobile-card-table td:last-child { border-bottom: 0; }
  .mobile-card-table td::before { content: attr(data-label); color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .025em; }
  .mobile-card-table .empty-cell { display: block; padding: 26px 14px !important; }
  .mobile-card-table .empty-cell::before { display: none; }
  .mobile-card-table .stream-url-cell,
  .mobile-card-table .normal-copy-cell { width: 100%; min-width: 0; max-width: none; }
  .mobile-card-table .stream-logo-cell { min-width: 0; }
  .mobile-card-table .stream-row-actions { justify-content: flex-end; }
  .mobile-card-table .actions-cell { display: grid; white-space: normal; }
  .mobile-card-table .actions-cell .btn { width: 100%; }
  .normal-cell-subtext { max-width: 100%; }

  /* Hoja editable: desplazamiento táctil, botones compactos y más espacio útil. */
  .spreadsheet-card { margin-left: -4px; margin-right: -4px; border-radius: 14px; }
  .spreadsheet-card .toolbar { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; gap: 8px; }
  .spreadsheet-card .toolbar .btn { width: 100%; min-width: 0; white-space: normal; line-height: 1.15; }
  .spreadsheet-card .toolbar .search,
  .spreadsheet-card .toolbar .status { grid-column: 1 / -1; width: 100%; }
  .spreadsheet-card .hint { padding: 10px 12px; font-size: .8rem; }
  .grid-pagination { padding: 10px 12px; }
  .grid-wrap { min-height: 58vh; max-height: calc(100dvh - 260px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .data-grid { font-size: .8rem; }
  .data-grid th, .data-grid td { min-width: 132px; width: 160px; height: 44px; }
  .data-grid .select-col { min-width: 48px; width: 48px; }
  .data-grid .name-col { left: 48px; }
  .data-grid .id-col { min-width: 60px; width: 60px; left: 48px; }
  .grid-pagination .pagination-buttons { width: 100%; }
  .grid-pagination .pagination-buttons .btn { min-width: 38px; }

  .table-pagination { padding: 12px; }
  .table-pagination .pagination-buttons { width: 100%; }
  .table-pagination .pagination-buttons > span { flex: 1; text-align: center; }
  .modal-panel { max-height: calc(100dvh - 16px); }
}


/* Streaminator 1.15.13 · fichas de consulta para el rol Visor */
.readonly-record-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.readonly-record-row {
  display: grid;
  grid-template-columns: minmax(150px, 24%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.readonly-record-row:last-child { border-bottom: 0; }
.readonly-record-label {
  padding-top: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.readonly-record-value-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.readonly-record-value {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 220px;
  margin: 0;
  padding: 7px 0;
  overflow: auto;
  color: var(--text);
  background: transparent;
  border: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 500 .88rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.readonly-record-copy { margin-top: 2px; }
.readonly-record-empty { margin: 0; padding: 22px; text-align: center; }
.readonly-record-actions { margin-top: 14px; }

@media (max-width: 700px) {
  .readonly-record-row { grid-template-columns: 1fr; gap: 5px; padding: 12px; }
  .readonly-record-label { padding-top: 0; }
  .readonly-record-value-wrap { align-items: flex-start; }
  .readonly-record-value { max-height: 180px; padding-top: 3px; font-size: .8rem; }
}


/* Streaminator 1.15.13 · drawer móvil compacto */
.mobile-nav-header { display: none; }

@media (max-width: 900px) {
  .mobile-nav-toggle {
    position: fixed;
    top: 11px;
    right: 14px;
    z-index: 140;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .12);
  }
  body.mobile-nav-open .mobile-nav-toggle {
    background: #eef2f8;
    border-color: #cfd8e8;
  }
  .nav {
    z-index: 130;
    width: min(86vw, 340px);
    padding: 12px 12px 16px;
    gap: 4px;
    align-items: stretch;
    align-content: flex-start;
    overscroll-behavior: contain;
  }
  .mobile-nav-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    margin: 0 0 7px;
    padding: 2px 50px 12px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-nav-brand {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--text);
    font-size: .98rem;
    font-weight: 850;
    text-align: center;
  }
  .mobile-nav-brand:hover { text-decoration: none; }
  .mobile-nav-brand img {
    display: block;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
  }
  .mobile-nav-brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav > a,
  .nav .nav-trigger {
    flex: 0 0 auto !important;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    justify-content: flex-start;
    text-align: left;
  }
  .nav > a:hover,
  .nav > a:focus-visible,
  .nav .nav-trigger:hover,
  .nav .nav-trigger:focus-visible,
  .nav-dropdown.open .nav-trigger {
    border-color: #e2e8f2;
    background: #f4f7fb;
    text-decoration: none;
  }
  .nav-dropdown {
    flex: 0 0 auto !important;
    width: 100%;
  }
  .nav .nav-trigger {
    justify-content: space-between !important;
  }
  .nav-submenu {
    width: auto;
    margin: 3px 0 5px 12px;
    padding: 3px 0 3px 9px;
    border: 0;
    border-left: 2px solid #d7e1f2;
    border-radius: 0;
    background: transparent;
  }
  .nav-submenu a {
    flex: 0 0 auto !important;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 9px;
    background: transparent;
    text-align: left;
  }
  .nav-submenu a:hover,
  .nav-submenu a:focus-visible {
    background: #f4f7fb;
    text-decoration: none;
  }
  .nav > .nav-logout {
    margin-top: auto;
    color: var(--danger);
    background: #fff7f7;
  }
  .mobile-nav-backdrop { z-index: 120; }
}

@media (max-width: 420px) {
  .nav { width: min(88vw, 326px); }
  .mobile-nav-header { padding-right: 48px; padding-left: 48px; }
}

/* Streaminator 1.15.13 · fichas y modales de entidades */
.modal.open {
  animation: entityBackdropIn .18s ease-out both;
  backdrop-filter: blur(5px);
}
.entity-modal-panel {
  --entity-accent: var(--primary);
  --entity-soft: #edf3ff;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .32);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--entity-soft) 82%, transparent) 0, transparent 280px),
    #fff;
  box-shadow: 0 34px 100px rgba(15, 23, 42, .28), 0 8px 26px rgba(15, 23, 42, .12);
  animation: entityPanelIn .22s cubic-bezier(.2,.8,.2,1) both;
}
.provider-entity-modal { --entity-accent: #2457d6; --entity-soft: #e9f0ff; }
.stream-entity-modal { --entity-accent: #ea7b16; --entity-soft: #fff2e2; }
.pssh-entity-modal { --entity-accent: #7c3aed; --entity-soft: #f1eaff; }
.logo-entity-modal { --entity-accent: #0f9f78; --entity-soft: #e5f8f2; }

.entity-modal-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 22px 74px 20px 26px;
  border-bottom: 1px solid rgba(148, 163, 184, .24);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
}
.entity-modal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--entity-accent) 20%, transparent);
  border-radius: 16px;
  color: var(--entity-accent);
  background: var(--entity-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px color-mix(in srgb, var(--entity-accent) 12%, transparent);
}
.entity-modal-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.entity-modal-heading { min-width: 0; }
.entity-modal-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--entity-accent);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.entity-modal-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
}
.entity-modal-heading p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}
.entity-modal-panel > .alert { margin: 18px 24px 0; }
.entity-modal-panel > .entity-form,
.entity-modal-panel > .readonly-record-list {
  margin: 0;
}
.entity-form {
  padding: 24px 26px 4px;
  gap: 13px;
}
.entity-form > label {
  position: relative;
  min-width: 0;
  padding: 13px 14px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(248, 250, 252, .84);
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .015em;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
.entity-form > label:focus-within {
  border-color: color-mix(in srgb, var(--entity-accent) 55%, #dbe4f0);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--entity-accent) 10%, transparent), 0 10px 22px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
.entity-form > label input,
.entity-form > label textarea,
.entity-form > label select {
  margin-top: 8px;
  border-color: #cfd8e6;
  background: #fff;
  color: #172033;
  font-weight: 500;
  letter-spacing: 0;
}
.entity-form > label textarea {
  min-height: 94px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .84rem;
  line-height: 1.48;
}
.entity-form > label small {
  margin-top: 8px;
  color: #718096;
  font-size: .75rem;
  line-height: 1.4;
}
.entity-form fieldset {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0 0;
  padding: 17px;
  border: 1px solid #dbe4ef;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(248,250,252,.96), rgba(241,245,249,.72));
}
.entity-form fieldset legend {
  padding: 0 8px;
  color: #334155;
  font-size: .82rem;
  font-weight: 850;
}
.entity-form fieldset .muted { margin: 0 0 12px; font-size: .82rem; }
.entity-form fieldset .check-row {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
}
.entity-modal-panel .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  grid-column: 1 / -1;
  margin: 12px -26px 0;
  padding: 15px 26px 18px;
  border-top: 1px solid rgba(148, 163, 184, .25);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.entity-modal-panel .modal-actions .btn {
  min-height: 42px;
  padding-inline: 18px;
  border-radius: 11px;
}
.entity-modal-head .modal-close {
  position: absolute;
  top: 50%;
  right: 20px;
  z-index: 8;
  margin: 0;
  transform: translateY(-50%);
  border: 1px solid #dbe3ef;
  color: #475569;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 20px rgba(15,23,42,.12);
  transition: transform .16s ease, color .16s ease, background .16s ease;
}
.entity-modal-head .modal-close:hover {
  color: #0f172a;
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.entity-preview-card {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 16px;
  align-items: center;
  margin: 20px 26px 0;
  padding: 14px 16px;
  border: 1px solid #dbe8e3;
  border-radius: 15px;
  background: linear-gradient(135deg, #f6fbf9, #edf8f4);
}
.entity-preview-card > span {
  color: #42675c;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.entity-preview-stage {
  display: grid;
  place-items: center;
  min-height: 90px;
  padding: 12px;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #253247 25%, transparent 25%),
    linear-gradient(-45deg, #253247 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #253247 75%),
    linear-gradient(-45deg, transparent 75%, #253247 75%), #1c2739;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.entity-preview-stage img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 105px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,.32));
}
.entity-modal-panel > .readonly-record-list {
  margin: 22px 26px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 10px;
  overflow: visible;
}
.entity-modal-panel .readonly-record-row {
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
  box-shadow: 0 5px 14px rgba(15,23,42,.035);
}
.entity-modal-panel .readonly-record-row:last-child { border-bottom: 1px solid #e2e8f0; }
.entity-modal-panel > .readonly-record-actions {
  margin: 18px 0 0;
  padding-inline: 26px;
}

.record-name-button {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: -4px -6px 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  color: #1d4ed8;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.record-name-button:hover { color: #153da8; background: #edf3ff; text-decoration: underline; }
.record-name-button:focus-visible { outline: 3px solid rgba(36,87,214,.2); outline-offset: 1px; }
.record-name-button strong { overflow-wrap: anywhere; }

@keyframes entityBackdropIn { from { background-color: rgba(15,23,42,0); } to { background-color: rgba(15,23,42,.55); } }
@keyframes entityPanelIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .modal.open, .entity-modal-panel { animation: none; }
  .entity-form > label, .entity-modal-panel .modal-close { transition: none; }
}

.entity-form-section {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin: 7px 0 -1px;
  padding: 4px 2px;
}
.entity-form-section > span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--entity-accent);
  background: var(--entity-soft);
  font-size: .7rem;
  font-weight: 900;
}
.entity-form-section > div { min-width: 0; }
.entity-form-section strong { display: block; color: #263247; font-size: .87rem; }
.entity-form-section small { display: block; margin-top: 2px; color: var(--muted); font-size: .74rem; font-weight: 500; }


/* Streaminator 1.15.13 · modales compactos, visor de logos y reproducción individual */
.entity-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.entity-form > label:has(textarea) { grid-column: auto; }
.entity-form > label.span-full,
.entity-form > .span-full { grid-column: 1 / -1; }
.entity-form > .entity-span-2 { grid-column: span 2; }
.entity-form > label {
  padding: 10px 11px 11px;
  border-radius: 12px;
}
.entity-form > label input,
.entity-form > label textarea,
.entity-form > label select { margin-top: 6px; }
.entity-form > label textarea {
  min-height: 58px;
  max-height: 150px;
  line-height: 1.38;
}
.entity-form-section { padding-block: 8px; }
.provider-edit-form .visibility-permissions { grid-column: span 2; }
.stream-name-with-play { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stream-inline-play {
  display: inline-grid;
  place-items: center;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border: 1px solid #f5b66f;
  border-radius: 9px;
  color: #d86508;
  background: #fff3e4;
  box-shadow: 0 4px 11px rgba(234,123,22,.13);
}
.stream-inline-play:hover { color: #fff; background: #e97813; text-decoration: none; }
.stream-inline-play svg { width: 15px; height: 15px; fill: currentColor; }
.logo-preview-trigger {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: zoom-in;
}
.logo-preview-trigger:focus-visible { outline: 3px solid rgba(36,87,214,.25); outline-offset: 3px; }
.logo-image-panel {
  width: min(470px, 100%);
  max-height: min(620px, 92dvh);
  padding: 0;
  overflow: hidden;
}
.logo-image-head {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 16px 64px 16px 20px;
  border-bottom: 1px solid var(--line);
}
.logo-image-head h2 { margin: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-image-head .modal-close { top: 14px; right: 14px; }
.logo-image-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  background:
    linear-gradient(45deg, #263247 25%, transparent 25%),
    linear-gradient(-45deg, #263247 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #263247 75%),
    linear-gradient(-45deg, transparent 75%, #263247 75%), #172033;
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.logo-image-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(400px, 100%);
  max-height: min(460px, 65dvh);
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.4));
}

/* Personalización por usuario */
.personalization-form { grid-template-columns: minmax(0, 1fr); }
.personalization-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.personalization-theme-row strong { display: block; margin-bottom: 4px; }
.personalization-theme-row small { display: block; color: var(--muted); font-weight: 500; }
.theme-toggle-control { display: flex; align-items: center; gap: 11px; white-space: nowrap; }

/* Tema oscuro por usuario */
body.theme-dark {
  --bg: #09111f;
  --card: #111b2b;
  --text: #e7eef9;
  --muted: #9cacbf;
  --line: #2a3a50;
  --primary: #75a7ff;
  --primary-dark: #4d85e8;
  --danger: #e25c62;
  --success: #3cc98a;
  --warn: #f2b84b;
  --shadow: 0 16px 36px rgba(0,0,0,.3);
  color-scheme: dark;
}
body.theme-dark .topbar { background: rgba(11,20,34,.94); }
body.theme-dark .nav a:hover,
body.theme-dark .nav-trigger:hover,
body.theme-dark .nav-dropdown.open .nav-trigger,
body.theme-dark .nav-dropdown:focus-within .nav-trigger { background: #1b2b43; }
body.theme-dark .card,
body.theme-dark .modal-panel,
body.theme-dark .nav-submenu { background-color: var(--card); }
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark .btn { background: #0d1727; color: var(--text); border-color: var(--line); }
body.theme-dark .btn:hover { background: #19283d; }
body.theme-dark .btn.primary { background: #376ed0; border-color: #376ed0; color: #fff; }
body.theme-dark .btn.danger { background: #b8424a; border-color: #b8424a; color: #fff; }
body.theme-dark code { background: #18263a; color: #d8e7fb; }
body.theme-dark .toolbar,
body.theme-dark .hint,
body.theme-dark .result-pill,
body.theme-dark .download-row,
body.theme-dark .readonly-record-row,
body.theme-dark .personalization-theme-row { background: #0e1929; }
body.theme-dark .grid-wrap,
body.theme-dark .data-grid td { background: #0d1727; }
body.theme-dark .data-grid tbody tr:nth-child(even) td { background: #101c2e; }
body.theme-dark .data-grid .grid-heading-row th { background: #1a2a40; color: #bfd0e5; }
body.theme-dark .data-grid .grid-filter-row th { background: #142238; }
body.theme-dark .entity-modal-panel {
  background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--entity-accent) 12%, transparent) 0, transparent 290px), #101a2a;
}
body.theme-dark .entity-modal-head,
body.theme-dark .entity-modal-panel .modal-actions { background: rgba(16,26,42,.95); }
body.theme-dark .entity-modal-heading h2 { color: #f3f7fd; }
body.theme-dark .entity-form > label { background: rgba(13,23,39,.9); border-color: #2b3b51; color: #c9d7e8; }
body.theme-dark .entity-form > label:focus-within { background: #111e31; }
body.theme-dark .entity-form > label input,
body.theme-dark .entity-form > label textarea,
body.theme-dark .entity-form > label select { background: #091321; color: #edf4fd; border-color: #34465e; }
body.theme-dark .entity-form fieldset { background: linear-gradient(135deg,#101c2d,#0d1727); border-color: #2b3c53; }
body.theme-dark .entity-form fieldset .check-row { background: #0b1625; border-color: #2b3b51; }
body.theme-dark .entity-modal-head .modal-close { background: #17253a; color: #d9e5f5; border-color: #35465d; }
body.theme-dark .entity-preview-card { background: linear-gradient(135deg,#10231f,#0e1c25); border-color: #28483f; }
body.theme-dark .entity-modal-panel .readonly-record-row { background: #0d1828; border-color: #2c3c52; }
body.theme-dark .plain-table th,
body.theme-dark .plain-table td { border-color: var(--line); }
body.theme-dark .stream-inline-play { background: #3b2814; border-color: #80501f; color: #ffad55; }
body.theme-dark .alert.error { background: #31191d; border-color: #653038; color: #ffb8bd; }
body.theme-dark .alert.success { background: #10291f; border-color: #245d46; color: #8ce0b8; }
body.theme-dark .options-sidebar a:hover { background: #19283d; }
body.theme-dark .options-sidebar a.active { background: #233b62; color: #dce9ff; }
body.theme-dark .mobile-nav-backdrop { background: rgba(0,0,0,.62); }
body.theme-dark .nav[data-mobile-nav] { background: #0e1929; }


/* Streaminator 1.15.13 · conmutador de tema flotante */
.floating-theme-control {
  position: fixed;
  left: 14px;
  bottom: 10px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
}
.floating-theme-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid rgba(101,112,133,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 5px 18px rgba(20,33,61,.12);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.floating-theme-switch { width: 44px; height: 24px; }
.floating-theme-switch .toggle-slider::before { width: 18px; height: 18px; }
.floating-theme-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.floating-theme-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #7a879a;
}
.floating-theme-icon.sun { color: #e6a212; }
.floating-theme-icon.moon { color: #50627e; }
.floating-theme-status {
  max-width: 90px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
}
@media (max-width: 640px) {
  .floating-theme-control { left: 8px; bottom: 7px; }
  .floating-theme-label { min-height: 34px; padding: 4px 7px; }
  .floating-theme-status { display: none; }
}


/* Streaminator 1.15.13 · controles de cabecera y tema móvil */
.header-brand-group {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-header-version,
.mobile-header-theme-control { display: none; }

@media (max-width: 900px) {
  .topbar { gap: 8px; }
  .header-brand-group {
    flex: 1 1 auto;
    min-width: 0;
  }
  .header-brand-group .brand { min-width: 0; }
  .header-brand-group .brand span {
    max-width: min(42vw, 190px);
  }
  .mobile-header-version {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 24px;
    padding: 4px 7px;
    border: 1px solid rgba(101,112,133,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: var(--muted);
    font-size: .67rem;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
  }
  .mobile-header-actions {
    position: relative;
    z-index: 145;
    flex: 0 0 auto;
    margin-left: auto;
  }
  .mobile-header-theme-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 42px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15,23,42,.1);
    cursor: pointer;
  }
  .mobile-header-theme-switch { width: 36px; height: 21px; }
  .mobile-header-theme-switch .toggle-slider::before { width: 15px; height: 15px; }
  .mobile-header-theme-switch input:checked + .toggle-slider::before { transform: translateX(15px); }
  .mobile-header-theme-icon {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-header-theme-icon.sun { color: #e6a212; }
  .mobile-header-theme-icon.moon { color: #50627e; }
  .mobile-nav-toggle {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-left: 0 !important;
  }
  .floating-theme-control,
  .app-version-footer { display: none !important; }
}

@media (max-width: 390px) {
  .header-brand-group { gap: 6px; }
  .brand-logo { width: 31px; height: 31px; }
  .header-brand-group .brand { gap: 7px; font-size: .93rem; }
  .header-brand-group .brand span { max-width: 31vw; }
  .mobile-header-version { padding-inline: 6px; font-size: .62rem; }
  .mobile-header-theme-control { width: 40px; padding: 5px 4px; justify-content: center; }
  .mobile-header-theme-icon { display: none; }
}

@media (max-width: 900px) {
  body.theme-dark .mobile-header-version,
  body.theme-dark .mobile-header-theme-control {
    background: #142237;
    color: #dbe7f7;
    border-color: #33465e;
    box-shadow: 0 5px 18px rgba(0,0,0,.28);
  }
  body.theme-dark .mobile-header-theme-icon.moon { color: #d5e1f5; }
  body.theme-dark .mobile-nav-toggle,
  body.theme-dark.mobile-nav-open .mobile-nav-toggle {
    background: #142237;
    border-color: #33465e;
  }
  body.theme-dark .mobile-nav-toggle span { background: #f0f5fc; }
  body.theme-dark .mobile-nav-brand {
    background-color: #0e1929 !important;
    color: #f3f7fd !important;
  }
  body.theme-dark .mobile-nav-brand span { color: #f3f7fd !important; }
  body.theme-dark .mobile-nav-brand img {
    background: transparent !important;
    filter: invert(1) !important;
  }
  body.theme-dark .nav > a,
  body.theme-dark .nav .nav-trigger,
  body.theme-dark .nav-submenu a { color: #e7eef9; }
  body.theme-dark .nav > a:hover,
  body.theme-dark .nav > a:focus-visible,
  body.theme-dark .nav .nav-trigger:hover,
  body.theme-dark .nav .nav-trigger:focus-visible,
  body.theme-dark .nav-dropdown.open .nav-trigger,
  body.theme-dark .nav-submenu a:hover,
  body.theme-dark .nav-submenu a:focus-visible {
    border-color: #34465e;
    background: #18283e;
  }
  body.theme-dark .nav-submenu { border-left-color: #3a5271; }
  body.theme-dark .nav > .nav-logout {
    color: #ff9fa6;
    background: #29171d;
    border-color: #58303a;
  }
}


/* Streaminator 1.15.13 · corrección del logo en modo oscuro */
body.theme-dark .brand-logo {
  background: transparent !important;
  filter: invert(1) !important;
}
body.theme-dark .mobile-nav-brand {
  background-color: #0e1929 !important;
}
body.theme-dark .mobile-nav-brand .brand-logo,
body.theme-dark .mobile-nav-brand img {
  background: transparent !important;
  filter: invert(1) !important;
}
