/* Tecno Market: índigo (--accent) con fondos neutros de tinte índigo; ámbar (--sec) para la
   segunda línea de las gráficas (subida). Antes fue verde (neón y luego esmeralda): no combinaba
   con el logo. Reemplaza a core/marca/tema.css en esta instancia; Netfit no lo usa. */
:root {
  --bg: #f4f4fb;
  --card: #ffffff;
  --text: #1b1d38;
  --muted: #5d6080;
  --line: #e2e2f0;
  --accent: #4f46e5;
  --on-accent: #ffffff;
  --accent-soft: #ebeaff;
  --sec: #d97706;
  /* En modo claro el menú también es claro (en Netfit es oscuro siempre). */
  --side: #ffffff;
  --side-text: #3d4063;
  --side-resalte: #4f46e5;
  --side-activo: #ebeaff;
}
/* Modo oscuro (09/11): antes fondo #0b0b16 y tarjetas #13132a, casi negros y sin separación; el
   usuario lo veía muy oscuro. Se aclararon fondo, tarjetas, bordes y textos secundarios. */
:root[data-theme="dark"] {
  --bg: #171832;
  --card: #222449;
  --text: #eef0fb;
  --muted: #b4b6d9;
  --line: #393b72;
  --accent: #8b95fa;
  --on-accent: #0b0b1f;
  --accent-soft: #2a2766;
  --sec: #fbbf24;
  --side: #10111f;
  --side-text: #c3c5e0;
  --side-resalte: #818cf8;
  --side-activo: rgba(129, 140, 248, .16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171832;
    --card: #222449;
    --text: #eef0fb;
    --muted: #b4b6d9;
    --line: #393b72;
    --accent: #8b95fa;
    --on-accent: #0b0b1f;
    --accent-soft: #2a2766;
    --sec: #fbbf24;
    --side: #10111f;
    --side-text: #c3c5e0;
    --side-resalte: #818cf8;
    --side-activo: rgba(129, 140, 248, .16);
  }
}

/* Menú claro (modo claro): panel.css lo pinta para fondo oscuro con blancos fijos. */
.side { border-right: 1px solid var(--line); }
.side nav a.activo, .side details.grupo[open] summary { color: #3730a3; }
.side nav a:hover, .side details.grupo summary:hover { background: rgba(27, 29, 56, .05); }
.side .pie { border-top-color: var(--line); }
.side .tema { background: var(--bg); border: 1px solid var(--line); }
.side .tema button.activo { background: var(--accent-soft); color: #3730a3; }
.topbar, .topbar button { color: var(--text); }
.topbar { border-bottom: 1px solid var(--line); }
.side .marca img.logo-menu-oscuro, .topbar img.logo-menu-oscuro { display: none !important; }
.side .marca img.logo-menu-claro, .topbar img.logo-menu-claro { display: block !important; }

/* Modo oscuro: el menú vuelve a como lo dibuja panel.css (blancos sobre fondo oscuro). */
:root[data-theme="dark"] .side { border-right: 0; }
:root[data-theme="dark"] .side nav a.activo, :root[data-theme="dark"] .side details.grupo[open] summary { color: #fff; }
:root[data-theme="dark"] .side nav a:hover, :root[data-theme="dark"] .side details.grupo summary:hover { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .side .pie { border-top-color: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .side .tema { background: rgba(255, 255, 255, .06); border: 0; }
:root[data-theme="dark"] .side .tema button.activo { background: rgba(129, 140, 248, .22); color: #fff; }
:root[data-theme="dark"] .topbar, :root[data-theme="dark"] .topbar button { color: #fff; }
:root[data-theme="dark"] .topbar { border-bottom: 0; }
:root[data-theme="dark"] .side .marca img.logo-menu-oscuro, :root[data-theme="dark"] .topbar img.logo-menu-oscuro { display: block !important; }
:root[data-theme="dark"] .side .marca img.logo-menu-claro, :root[data-theme="dark"] .topbar img.logo-menu-claro { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .side { border-right: 0; }
  :root:not([data-theme="light"]) .side nav a.activo, :root:not([data-theme="light"]) .side details.grupo[open] summary { color: #fff; }
  :root:not([data-theme="light"]) .side nav a:hover, :root:not([data-theme="light"]) .side details.grupo summary:hover { background: rgba(255, 255, 255, .06); }
  :root:not([data-theme="light"]) .side .pie { border-top-color: rgba(255, 255, 255, .08); }
  :root:not([data-theme="light"]) .side .tema { background: rgba(255, 255, 255, .06); border: 0; }
  :root:not([data-theme="light"]) .side .tema button.activo { background: rgba(129, 140, 248, .22); color: #fff; }
  :root:not([data-theme="light"]) .topbar, :root:not([data-theme="light"]) .topbar button { color: #fff; }
  :root:not([data-theme="light"]) .topbar { border-bottom: 0; }
  :root:not([data-theme="light"]) .side .marca img.logo-menu-oscuro, :root:not([data-theme="light"]) .topbar img.logo-menu-oscuro { display: block !important; }
  :root:not([data-theme="light"]) .side .marca img.logo-menu-claro, :root:not([data-theme="light"]) .topbar img.logo-menu-claro { display: none !important; }
}
a.card-link:hover { box-shadow: 0 6px 20px rgba(79, 70, 229, .16); }

/* Modo oscuro: los enlaces de texto en índigo #818cf8 sobre fondo oscuro se leían apagados; van en
   un índigo casi blanco. Botones, chips y tarjetas-enlace conservan sus colores. */
:root[data-theme="dark"] a:not(.btn):not(.card-link):not(.chip), :root[data-theme="dark"] .ir { color: #c7d2fe; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a:not(.btn):not(.card-link):not(.chip), :root:not([data-theme="light"]) .ir { color: #c7d2fe; }
}
/* El logo es ancho (cubo + texto): un poco más grande en el menú para que el texto se lea. */
.side .marca img { max-width: 210px; }

/* Administración técnica (variables del admin de Django). */
html[data-theme="light"], :root {
  --primary: #13132a;
  --secondary: #4f46e5;
  --primary-fg: #ffffff;
  --header-color: #b0b2cc;
  --header-bg: #13132a;
  --breadcrumbs-bg: #1e1e3f;
  --breadcrumbs-fg: #b0b2cc;
  --link-fg: #4f46e5;
  --link-hover-color: #3730a3;
  --link-selected-fg: #3730a3;
  --button-bg: #4f46e5;
  --button-hover-bg: #4338ca;
  --default-button-bg: #13132a;
  --default-button-hover-bg: #25254a;
  --selected-row: #ebeaff;
  --object-tools-hover-bg: #13132a;
}
html[data-theme="dark"] {
  --primary: #08080f;
  --secondary: #818cf8;
  --link-fg: #818cf8;
  --link-hover-color: #a5b4fc;
  --link-selected-fg: #a5b4fc;
  --button-bg: #4f46e5;
  --button-hover-bg: #6366f1;
  --header-bg: #08080f;
  --breadcrumbs-bg: #13132a;
  --selected-row: #2a2766;
  --body-bg: #171832;
  --darkened-bg: #222449;
  --border-color: #393b72;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --primary: #08080f; --secondary: #818cf8; --link-fg: #818cf8; --link-hover-color: #a5b4fc;
    --header-bg: #08080f; --breadcrumbs-bg: #13132a; --selected-row: #2a2766;
    --body-bg: #171832; --darkened-bg: #222449; --border-color: #393b72;
  }
}
.volver-panel { background: rgba(129, 140, 248, .18); }
.volver-panel:hover { background: rgba(129, 140, 248, .32); }
.module h2, .module caption, .inline-group h2 { background: #1e1e3f; }
