/* Themes of Esitel Inventario (2026-10-10, approved mockup «Temas de Esitel Inventario»): «esitel» (default), «a» Órbita,
   «b» Cristal, «c» Consola (as in the Portal WGAccess); each light and dark (D Grafito, F Marino removed 2026-10-11). The server decides
   which one (Esitel's people: always «esitel»; a client's accounts: their company's) and theme.js puts it on <html
   data-estilo>; the mode stays each person's (data-theme). These rules only set the variables styles.css paints with,
   plus the bar's and the compact layout's. Generated from the mockup's tokens: keep both in step. */

@font-face { font-family: 'Sora'; src: url('/static/fuentes/sora.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

@font-face { font-family: 'Manrope'; src: url('/static/fuentes/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

@font-face { font-family: 'IBM Plex Sans'; src: url('/static/fuentes/ibm-plex-sans.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }

@font-face { font-family: 'IBM Plex Mono'; src: url('/static/fuentes/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

@font-face { font-family: 'Chakra Petch'; src: url('/static/fuentes/chakra-petch-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

@font-face { font-family: 'Montserrat'; src: url('/static/fuentes/montserrat.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

@font-face { font-family: 'Source Sans 3'; src: url('/static/fuentes/source-sans-3.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }

html[data-estilo="esitel"] {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-soft: #f6f6f7;
  --text: #18181b;
  --muted: #6b6b74;
  --border: #e3e3e6;
  --header: #ffffff;
  --header-text: #18181b;
  --accent: #d5121c;
  --accent-soft: #fdebec;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --bar-muted: #55555e;
  --bar-line: 2px solid #d5121c;
  --bar-sep: #e3e3e6;
  --nav-on: transparent;
  --nav-mark: inset 0 -2px 0 #d5121c;
  --ib: #ffffff;
  --ib-line: #e3e3e6;
  --radius: 7px;
  --radius-lg: 10px;
  --font: "Source Sans 3",system-ui,"Segoe UI",sans-serif;
  --display: "Montserrat",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: none;
  --track: 0;
  --blur: none;
}

html[data-estilo="esitel"][data-theme="dark"] {
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-soft: #1d1d21;
  --text: #ececef;
  --muted: #9b9ba4;
  --border: #29292e;
  --header: #0a0a0b;
  --header-text: #f3f3f5;
  --accent: #ff3d45;
  --accent-soft: rgba(255,61,69,.14);
  --accent-text: #ffffff;
  --shadow: none;
  --bar-muted: #a7a7b0;
  --bar-line: 2px solid #ff3d45;
  --bar-sep: #2c2c31;
  --nav-on: transparent;
  --nav-mark: inset 0 -2px 0 #ff3d45;
  --ib: #17171a;
  --ib-line: #2c2c31;
  --radius: 7px;
  --radius-lg: 10px;
  --font: "Source Sans 3",system-ui,"Segoe UI",sans-serif;
  --display: "Montserrat",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: none;
  --track: 0;
  --blur: none;
}

html[data-estilo="a"] {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --text: #121a24;
  --muted: #647184;
  --border: #d9e1ea;
  --header: #0d141c;
  --header-text: #dbe6f1;
  --accent: #0a8fb3;
  --accent-soft: #dff3f8;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --bar-muted: #8ea0b5;
  --bar-line: 1px solid #1c2a38;
  --bar-sep: #22313f;
  --nav-on: rgba(63,208,240,.12);
  --nav-mark: inset 0 -2px 0 #3fd0f0;
  --ib: transparent;
  --ib-line: #22313f;
  --radius: 8px;
  --radius-lg: 10px;
  --font: "Sora",system-ui,"Segoe UI",sans-serif;
  --display: "Sora",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: none;
  --track: 0;
  --blur: none;
}

html[data-estilo="a"][data-theme="dark"] {
  --bg: #070b10;
  --surface: #0d141c;
  --surface-soft: #111b25;
  --text: #dbe6f1;
  --muted: #7d8ea3;
  --border: #1c2a38;
  --header: #070b10;
  --header-text: #dbe6f1;
  --accent: #3fd0f0;
  --accent-soft: #0d2a35;
  --accent-text: #04121a;
  --shadow: none;
  --bar-muted: #8ea0b5;
  --bar-line: 1px solid #1c2a38;
  --bar-sep: #22313f;
  --nav-on: rgba(63,208,240,.12);
  --nav-mark: inset 0 -2px 0 #3fd0f0;
  --ib: transparent;
  --ib-line: #22313f;
  --radius: 8px;
  --radius-lg: 10px;
  --font: "Sora",system-ui,"Segoe UI",sans-serif;
  --display: "Sora",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: none;
  --track: 0;
  --blur: none;
}

html[data-estilo="b"] {
  --bg: #f1f2fa;
  --surface: rgba(255,255,255,.86);
  --surface-soft: rgba(255,255,255,.6);
  --text: #1b1d33;
  --muted: #5f6585;
  --border: rgba(70,80,140,.16);
  --header: rgba(255,255,255,.75);
  --header-text: #1b1d33;
  --accent: #5146e5;
  --accent-soft: rgba(81,70,229,.10);
  --accent-text: #ffffff;
  --shadow: 0 8px 30px rgba(40,40,90,.08);
  --bar-muted: #5f6585;
  --bar-line: 1px solid rgba(70,80,140,.14);
  --bar-sep: rgba(70,80,140,.2);
  --nav-on: rgba(81,70,229,.10);
  --nav-mark: none;
  --ib: rgba(255,255,255,.7);
  --ib-line: rgba(70,80,140,.16);
  --radius: 12px;
  --radius-lg: 16px;
  --font: "Manrope",system-ui,"Segoe UI",sans-serif;
  --display: "Manrope",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: none;
  --track: 0;
  --blur: blur(14px);
}

html[data-estilo="b"][data-theme="dark"] {
  --bg: #0d0e1c;
  --surface: rgba(28,30,52,.86);
  --surface-soft: rgba(38,40,68,.62);
  --text: #e7e8f8;
  --muted: #9a9ec2;
  --border: rgba(160,170,255,.14);
  --header: rgba(20,21,40,.85);
  --header-text: #e7e8f8;
  --accent: #9a92ff;
  --accent-soft: rgba(154,146,255,.16);
  --accent-text: #12122a;
  --shadow: none;
  --bar-muted: #9a9ec2;
  --bar-line: 1px solid rgba(160,170,255,.14);
  --bar-sep: rgba(160,170,255,.2);
  --nav-on: rgba(81,70,229,.10);
  --nav-mark: none;
  --ib: rgba(38,40,68,.6);
  --ib-line: rgba(160,170,255,.16);
  --radius: 12px;
  --radius-lg: 16px;
  --font: "Manrope",system-ui,"Segoe UI",sans-serif;
  --display: "Manrope",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: none;
  --track: 0;
  --blur: blur(14px);
}

html[data-estilo="c"] {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-soft: #f8f8f5;
  --text: #16191c;
  --muted: #62676d;
  --border: #d7d9d2;
  --header: #16191c;
  --header-text: #e3e6e9;
  --accent: #1f5eff;
  --accent-soft: #e6edff;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --bar-muted: #8a9198;
  --bar-line: 1px solid #262b31;
  --bar-sep: #2c3238;
  --nav-on: transparent;
  --nav-mark: inset 0 -2px 0 #5b8cff;
  --ib: transparent;
  --ib-line: #2c3238;
  --radius: 3px;
  --radius-lg: 4px;
  --font: "IBM Plex Sans",system-ui,"Segoe UI",sans-serif;
  --display: "Chakra Petch","IBM Plex Sans",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: uppercase;
  --track: .06em;
  --blur: none;
}

html[data-estilo="c"][data-theme="dark"] {
  --bg: #0d0f11;
  --surface: #14171a;
  --surface-soft: #191d21;
  --text: #e3e6e9;
  --muted: #8a9198;
  --border: #262b31;
  --header: #0a0c0e;
  --header-text: #e3e6e9;
  --accent: #5b8cff;
  --accent-soft: #16213a;
  --accent-text: #0a1020;
  --shadow: none;
  --bar-muted: #8a9198;
  --bar-line: 1px solid #262b31;
  --bar-sep: #2c3238;
  --nav-on: transparent;
  --nav-mark: inset 0 -2px 0 #5b8cff;
  --ib: transparent;
  --ib-line: #2c3238;
  --radius: 3px;
  --radius-lg: 4px;
  --font: "IBM Plex Sans",system-ui,"Segoe UI",sans-serif;
  --display: "Chakra Petch","IBM Plex Sans",system-ui,"Segoe UI",sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
  --case: uppercase;
  --track: .06em;
  --blur: none;
}

/* ---------- painted with the theme (every theme, both modes) ---------- */
html[data-estilo] { --surface-hover: color-mix(in srgb, var(--accent) 8%, var(--surface)); --row: 32px; --ctl: 32px; }
html[data-estilo] body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }
html[data-estilo] :is(h1, h2, h3, .code-big) { font-family: var(--display); text-transform: var(--case); letter-spacing: var(--track); }
html[data-estilo] .mono, html[data-estilo] code { font-family: var(--mono); }
html[data-estilo] :is(.panel, .card, .modal, .menu, .suggest) { border-radius: var(--radius-lg); border-color: var(--border); }
html[data-estilo] :is(.panel, .card) { backdrop-filter: var(--blur); }
html[data-estilo] :is(table, td, th, .card, .panel, .modal, .meta, dd, dt, li, p, span, label) { color: inherit; }
html[data-estilo] :is(.note, .hint, .empty, th, .meta span, .menu-caption) { color: var(--muted); }

/* The bar: its own colours (light in «esitel» and «b» light, dark in the rest) */
html[data-estilo] .topbar { background: var(--header); color: var(--header-text); border-bottom: var(--bar-line); backdrop-filter: var(--blur);
  min-height: 52px; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; gap: 12px; }
html[data-estilo] .nav { gap: 2px; }
html[data-estilo] .nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--bar-muted); padding: 6px 10px; border-radius: var(--radius);
  font-family: var(--display); font-size: .86rem; text-transform: var(--case); letter-spacing: var(--track); }
html[data-estilo] .nav a svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-estilo] .nav a:hover { color: var(--header-text); background: var(--nav-on); }
html[data-estilo] .nav a[aria-current="page"] { color: var(--header-text); background: var(--nav-on); box-shadow: var(--nav-mark); border-radius: var(--radius) var(--radius) 0 0; }
html[data-estilo] :is(.topbar .icon-btn, .bell summary, .account summary, .support-btn, .company-select) {
  background: var(--ib); border: 1px solid var(--ib-line); color: var(--header-text); border-radius: var(--radius); }
html[data-estilo] :is(.topbar .icon-btn, .bell summary) { width: var(--ctl); height: var(--ctl); }
html[data-estilo] :is(.account summary, .support-btn) { height: var(--ctl); padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; }
html[data-estilo] .company-select { height: var(--ctl); padding: 0 8px; }
html[data-estilo] :is(.icon-btn, .bell summary, .account summary, .support-btn) svg { width: 17px; height: 17px; }

/* Brand: «Inventario» large with the company below (client accounts) | logo. Esitel's people: Inventario | Esitel. */
html[data-estilo] .brand { gap: 10px; min-width: 0; }
.brand .brand-name { display: grid; line-height: 1.05; }
.brand .brand-name b { font: 700 1.12rem var(--display); text-transform: var(--case); letter-spacing: var(--track); white-space: nowrap; }
.brand .brand-name small { font: 700 .64rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--bar-muted); white-space: nowrap; }
.brand .brand-sep { width: 1px; height: 26px; background: var(--bar-sep); flex: none; }
.brand .brand-img { height: 30px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.brand .brand-img.esitel { height: 30px; }
html[data-bar="dark"] .brand .logo-pos, html:not([data-bar="dark"]) .brand .logo-neg { display: none; }

/* Compact: controls and rows of ~32px */
html[data-estilo] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select) { min-height: var(--ctl); padding: 5px 10px; border-radius: var(--radius); }
html[data-estilo] textarea { border-radius: var(--radius); padding: 7px 10px; }
html[data-estilo] .btn { min-height: var(--ctl); padding: 0 12px; border-radius: var(--radius); color: var(--accent-text); font-size: .88rem; font-family: var(--font); font-weight: 700; justify-content: center; }
html[data-estilo] .btn.sm { min-height: 28px; padding: 0 9px; font-size: .82rem; }
html[data-estilo] .btn.secondary { color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); }
html[data-estilo] .btn:is(.danger, .ok, .warn, .repair) { color: #fff; }
html[data-estilo] .btn.icon-only { width: var(--ctl); padding: 0; }
html[data-estilo] .btn.sm.icon-only { width: 28px; }
html[data-estilo] .btn.icon-only svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html[data-estilo] :is(th, td) { padding: 6px 10px; }
html[data-estilo] td { height: var(--row); vertical-align: middle; }
html[data-estilo] th { font-size: .7rem; letter-spacing: .08em; font-weight: 700; background: var(--surface-soft); }
html[data-estilo] tbody tr:hover { background: var(--surface-hover); }
html[data-estilo] .panel { padding: 14px 16px; }
html[data-estilo] .card { padding: 12px 14px; }
html[data-estilo] .tabs button { padding: 6px 11px; font-size: .86rem; border-radius: var(--radius) var(--radius) 0 0; background: transparent; }
html[data-estilo] .tabs button[aria-selected="true"] { background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); border-color: transparent; }
html[data-estilo] :is(.brand-mark, .cam-controls .on, .segmented a[aria-selected="true"]) { color: var(--accent-text); }
html[data-estilo][data-theme] .tab-select { background-color: var(--accent); color: var(--accent-text); }
html[data-estilo] .badge { font-size: .74rem; padding: 1px 8px; }
html[data-estilo] h1 { font-size: 1.25rem; }
html[data-estilo] main { margin-top: 14px; }

@media (max-width: 1100px) { html[data-estilo] .nav a span { display: none; } html[data-estilo] .nav a { padding: 6px 8px; } }
@media (max-width: 720px) {
  .brand .brand-name small { display: none; }
  .brand .brand-img { height: 24px; max-width: 110px; }
  html[data-estilo] .topbar { gap: 8px; }
}

/* The login screen's Esitel logo: the version for the page's background (light or dark mode) */
.login-logo img { display: block; max-width: 260px; height: auto; margin: 0 auto; }
html[data-theme="dark"] .page-logo-light, html:not([data-theme="dark"]) .page-logo-dark { display: none; }

html[data-estilo] .login-logo { background: var(--surface); }
/* Administración › Temas */
.theme-logos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 10px; }
.theme-logo { border: 1px solid var(--border); border-radius: var(--radius-lg, 10px); padding: 12px; display: grid; gap: 8px; }
.logo-samples { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.logo-samples .sample { display: grid; gap: 6px; justify-items: center; padding: 10px; border-radius: var(--radius, 8px); }
.logo-samples .sample span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; justify-self: start; }
.logo-samples .sample.light { background: #ffffff; color: #55555e; border: 1px solid #e3e3e6; }
.logo-samples .sample.dark { background: #0d141c; color: #a7a7b0; }
.logo-samples img { height: 34px; width: auto; max-width: 100%; }
.theme-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 10px; }
.theme-card { display: flex; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-lg, 10px); padding: 10px 12px; }
.theme-card .sw { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 4px; }
.theme-card p { margin: 4px 0 0; }
/* Lists: the full code under the short one, small; mono text at the body's size */
html[data-estilo] td .note { font-size: .74rem; line-height: 1.25; }
html[data-estilo] .mono { font-size: .92em; }
html[data-estilo] td b { font-weight: 650; }
html[data-estilo] .topbar.tight .nav a span { display: none; }
html[data-estilo] .topbar.tight .nav a { padding: 6px 8px; }
/* Nothing animates while the page loads (the theme is final from the first paint; theme.js removes no-anim after it) */
html.no-anim *, html.no-anim *::before, html.no-anim *::after { transition: none !important; animation-duration: 0s !important; }
/* The logo's room is kept before it loads: the server writes width/height on the image (the browser keeps its ratio) */

/* ---------- counters and urgency (user rule 2026-10-10): WHITE text in every theme and mode ----------
   Backgrounds chosen for white to read (WCAG AA, ≥ 4.5:1): red 5.74, orange 5.18, amber 4.92 (darkened instead of
   black text), green 5.02, and each theme's accent darkened where needed (--badge-accent ≥ 4.6). */
html[data-estilo] { --badge-red: #c81e1e; --badge-orange: #c2410c; --badge-amber: #a16207; --badge-green: #15803d; }
html[data-estilo="esitel"] { --badge-accent: #d5121c; }
html[data-estilo="a"] { --badge-accent: #097f9f; }
html[data-estilo="b"] { --badge-accent: #5146e5; }
html[data-estilo="c"] { --badge-accent: #1f5eff; }
html[data-estilo] :is(.bell-count, .support-count, .seg-count) { background: var(--badge-red); color: #fff; }
html[data-estilo] .bell-count.soon { background: var(--badge-amber); }
html[data-estilo] .support-count.progress { background: var(--badge-accent); }
html[data-estilo] .topbar .mail-warn { background: var(--badge-amber); border-color: var(--badge-amber); color: #fff; }
html[data-estilo] .urg { color: #fff; }
html[data-estilo] :is(.urg, .req-urg-bar).urg-CRITICA { background: var(--badge-red); }
html[data-estilo] :is(.urg, .req-urg-bar).urg-ALTA { background: var(--badge-orange); }
html[data-estilo] :is(.urg, .req-urg-bar).urg-MEDIA { background: var(--badge-amber); }
html[data-estilo] :is(.urg, .req-urg-bar).urg-BAJA { background: var(--badge-green); }

/* Desktop: the first section starts on the content's left edge (main: centred, max-width 1200 px, 16 px padding), a clean
   line from the menu down to the page. The bar is as wide as the page and has 18 px side padding and a 12 px gap, so
   the brand box (content + padding) is sized to end 12 px before that edge: 50% − 584 px − room + (room − 12 px). When «Inventario | logo» is wider than that (below
   ~1660 px), it keeps the room the user asked for: 64 px (--brand-room) after the logo. Tablets and phones: compact. */
@media (min-width: 1101px) {
  html[data-estilo] .topbar { --brand-room: 64px; padding-left: 18px; padding-right: 18px; }
  html[data-estilo] .topbar .brand { box-sizing: content-box; flex: none; min-width: max-content;
    padding-right: calc(var(--brand-room) - 12px); width: calc(50% - 584px - var(--brand-room)); }
}

/* ---------- state colours (user 2026-10-10: less pastel, one step more intense) ----------
   Tint of the state colour over the surface: 20 % in light (was ~8–10 %), 26 % in dark (was ~15–18 %); the text a step
   darker in light / lighter in dark. Minimum contrast 5.0:1 in the four themes, both modes (WCAG AA ≥ 4.5). */
html[data-estilo] { --st-tint: 20%; --st-ink: #000; --st-ink-mix: 72%; --st-purple: #7e22ce; }
html[data-estilo][data-theme="dark"] { --st-tint: 26%; --st-ink: #fff; --st-ink-mix: 70%; --st-purple: #d8b4fe; }
html[data-estilo] .badge:is(.ACTIVO, .DISPONIBLE) { background: color-mix(in srgb, var(--ok) var(--st-tint), var(--surface)); color: color-mix(in srgb, var(--ok) var(--st-ink-mix), var(--st-ink)); }
html[data-estilo] .badge:is(.REPARACION, .sens) { background: color-mix(in srgb, var(--warn) var(--st-tint), var(--surface)); color: color-mix(in srgb, var(--warn) var(--st-ink-mix), var(--st-ink)); }
html[data-estilo] .badge:is(.BAJA, .VENCIDO) { background: color-mix(in srgb, var(--danger) var(--st-tint), var(--surface)); color: color-mix(in srgb, var(--danger) var(--st-ink-mix), var(--st-ink)); }
html[data-estilo] .badge.PRESTADO { background: color-mix(in srgb, var(--accent) var(--st-tint), var(--surface)); color: color-mix(in srgb, var(--accent) var(--st-ink-mix), var(--st-ink)); }
html[data-estilo] .badge.EN_REPARACION { background: color-mix(in srgb, var(--st-purple) var(--st-tint), var(--surface)); color: color-mix(in srgb, var(--st-purple) var(--st-ink-mix), var(--st-ink)); }

/* Pickers: the current choice is marked when the list opens (it always opens with every option) */
html[data-estilo] .combo-list .sel { font-weight: 650; background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
html[data-estilo] .combo-list .sel.on, html[data-estilo] .combo-list .sel:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }

/* A second action next to the main one, told apart by tone (Soporte › Crear tarea de IT): the accent, tinted */
html[data-estilo] .btn.tint { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: color-mix(in srgb, var(--accent) var(--st-ink-mix), var(--st-ink));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
html[data-estilo] .btn.tint:hover { background: color-mix(in srgb, var(--accent) 26%, var(--surface)); }
@media (max-width: 720px) { .req-actions { margin-left: 0; width: 100%; } .req-actions .btn { flex: 1 1 auto; } }
