/*! Lynx UI 1.1.0 — the Lynxmind internal-apps design system.
 *  Source of truth: Lynxtime and Lynxbudget (palette from lynxmind.com and the 2026 decks).
 *  One file, no build step, no internet: fonts are self-hosted next to this file.
 *  Every class is prefixed `lx-` and every token `--lx-`, so it can sit next to an
 *  app's own CSS (Tailwind or not) without collisions.
 *  Light is the default; dark is `<html data-theme="dark">` (see lynx-theme.js). */

/* ================= Fonts (self-hosted, OFL) ================= */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/space-grotesk-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/space-grotesk-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

/* ================= Tokens ================= */
:root {
  /* Brand palette (lynxmind.com) — fixed in both themes */
  --lx-teal: #009999;
  --lx-teal-solid: #00807f;      /* teal behind white text (4.8:1) */
  --lx-skobeloff: #08706e;
  --lx-hunter: #3c5845;
  --lx-viridian: #5b866d;
  --lx-olive: #686847;
  --lx-reseda: #828259;
  --lx-sunburst: #a0885a;
  --lx-night: #111111;
  --lx-onyx: #444444;
  --lx-soft-gray: #9ca3af;
  --lx-danger: #b91c1c;
  --lx-attention: #854d0e;

  /* Semantic tokens — what components use; dark mode re-points these */
  --lx-bg: #f5f5f5;
  --lx-panel: #ffffff;
  --lx-panel-2: #f5f7f6;
  --lx-ink: #111111;
  --lx-text: #333333;
  --lx-muted: #5b6370;
  --lx-heading: #3c5845;
  --lx-border: #e5e7eb;
  --lx-border-soft: #eef0f2;
  --lx-border-strong: #d1d5db;
  --lx-accent: #009999;
  --lx-accent-solid: #00807f;
  --lx-accent-hover: #08706e;
  --lx-accent-text: #08706e;
  --lx-accent-soft: rgba(0, 153, 153, .10);
  --lx-on-accent: #ffffff;
  --lx-selected: #e6f4f3;
  --lx-row-hover: #f3f7f6;
  --lx-good-bg: #ccfbf1;   --lx-good-fg: #08706e;
  --lx-warn-bg: #fef3c7;   --lx-warn-fg: #854d0e;
  --lx-bad-bg: #fee2e2;    --lx-bad-fg: #b91c1c;
  --lx-info-bg: #e0f2fe;   --lx-info-fg: #075985;
  --lx-neutral-bg: #eeeeee; --lx-neutral-fg: #444444;

  /* Sidebar — dark in both themes */
  --lx-sidebar-bg: #111111;
  --lx-sidebar-text: #d1d5db;
  --lx-sidebar-muted: #9ca3af;
  --lx-sidebar-hover: rgba(255, 255, 255, .07);
  --lx-sidebar-line: rgba(255, 255, 255, .10);
  --lx-sidebar-active: #00807f;
  --lx-sidebar-w: 252px;

  /* Shape and depth */
  --lx-radius: 12px;
  --lx-radius-sm: 10px;
  --lx-radius-xs: 7px;
  --lx-radius-pill: 999px;
  --lx-shadow: 0 1px 2px rgba(17, 17, 17, .06);
  --lx-shadow-md: 0 8px 24px rgba(17, 17, 17, .12);
  --lx-shadow-lg: 0 20px 50px rgba(17, 17, 17, .18);
  --lx-focus-ring: 0 0 0 3px rgba(0, 153, 153, .22);

  /* Type */
  --lx-font-ui: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --lx-font-display: "Space Grotesk", "Geist", "Segoe UI", system-ui, sans-serif;
  --lx-font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --lx-text-size: 14px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --lx-bg: #121414;
  --lx-panel: #1b1f1f;
  --lx-panel-2: #222727;
  --lx-ink: #f3f4f6;
  --lx-text: #d6dada;
  --lx-muted: #9aa3a3;
  --lx-heading: #a7c5b4;
  --lx-border: #2d3333;
  --lx-border-soft: #252b2b;
  --lx-border-strong: #3b4343;
  --lx-accent: #2ec4c4;
  --lx-accent-solid: #1aa5a5;
  --lx-accent-hover: #2ec4c4;
  --lx-accent-text: #5fd3d3;
  --lx-accent-soft: rgba(46, 196, 196, .14);
  --lx-on-accent: #062424;
  --lx-selected: #1d3333;
  --lx-row-hover: #1f2626;
  --lx-good-bg: #0f3d39;   --lx-good-fg: #7fe0d6;
  --lx-warn-bg: #3d2f0f;   --lx-warn-fg: #f4d07a;
  --lx-bad-bg: #4a1414;    --lx-bad-fg: #f8a3a3;
  --lx-info-bg: #0f2e3d;   --lx-info-fg: #9bd5f0;
  --lx-neutral-bg: #2b3030; --lx-neutral-fg: #d6dada;
  --lx-sidebar-bg: #0b0d0d;
  --lx-sidebar-active: #1aa5a5;
  --lx-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --lx-shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
  --lx-shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
  --lx-focus-ring: 0 0 0 3px rgba(46, 196, 196, .28);
  color-scheme: dark;
}

/* ================= Base (opt-in: put .lx-app on <body>) ================= */
.lx-app {
  margin: 0;
  font-family: var(--lx-font-ui);
  font-size: var(--lx-text-size);
  line-height: 1.45;
  color: var(--lx-text);
  background: var(--lx-bg);
  -webkit-font-smoothing: antialiased;
}
.lx-app *, .lx-app *::before, .lx-app *::after { box-sizing: border-box; }
.lx-app h1, .lx-app h2, .lx-app h3, .lx-app h4, .lx-h {
  font-family: var(--lx-font-display); color: var(--lx-heading); margin: 0; font-weight: 600; letter-spacing: -.01em;
}
.lx-app h1 { font-size: 24px; }
.lx-app h2 { font-size: 17px; }
.lx-app h3 { font-size: 14px; }
.lx-app p { margin: 0; }
.lx-app a { color: var(--lx-accent-text); text-decoration: none; }
.lx-app a:hover { text-decoration: underline; }
.lx-app :focus-visible { outline: 2px solid var(--lx-accent); outline-offset: 2px; }
.lx-app [hidden] { display: none !important; }

.lx-muted { color: var(--lx-muted); }
.lx-small { font-size: 12.5px; }
.lx-strong { font-weight: 600; color: var(--lx-ink); }
.lx-num { font-variant-numeric: tabular-nums; }
.lx-mono { font-family: var(--lx-font-mono); font-variant-numeric: tabular-nums; }
.lx-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lx-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lx-stack { display: flex; flex-direction: column; gap: 16px; }
.lx-grow { flex: 1; }
.lx-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= Brand ================= */
.lx-brand { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.lx-brand:hover { text-decoration: none; }
.lx-wordmark { font-family: var(--lx-font-display); font-weight: 700; font-size: 23px; letter-spacing: -.02em; color: #fff; }
.lx-brand-sub { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--lx-soft-gray); margin-top: 3px; }
.lx-brand-light .lx-wordmark { color: var(--lx-ink); }
.lx-brand-light .lx-brand-sub { color: var(--lx-accent); }
.lx-brand-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px;
  background: var(--lx-teal-solid); color: #fff; font: 700 13px var(--lx-font-display); letter-spacing: -.02em;
}

/* ================= Login ================= */
.lx-login {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background:
    radial-gradient(800px 480px at 50% 45%, rgba(17, 17, 17, .25), rgba(17, 17, 17, .65)),
    linear-gradient(rgba(8, 112, 110, .18), rgba(17, 17, 17, .35)),
    var(--lx-login-photo, url("login-bg.webp")) right center / cover no-repeat,
    var(--lx-night);
  font-family: var(--lx-font-ui);
}
.lx-login-card {
  width: 100%; max-width: 400px; border-radius: 18px; padding: 40px 32px 32px;
  background: var(--lx-panel); background: color-mix(in srgb, var(--lx-panel) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid color-mix(in srgb, var(--lx-border) 70%, transparent); border-top: 3px solid var(--lx-accent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; color: var(--lx-text);
}
.lx-login-card .lx-wordmark { font-size: 28px; }
.lx-login-card form, .lx-login-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lx-login-card .lx-btn-primary { padding-top: 11px; padding-bottom: 11px; justify-content: center; }
.lx-login-tagline { font-size: 15px; color: var(--lx-text); }
.lx-login-hint { font-size: 12.5px; color: var(--lx-muted); }
.lx-login-error { color: var(--lx-bad-fg); font-size: 13px; }
.lx-login-foot { font-size: 12px; color: var(--lx-muted); }
/* Under the sign-in: the same PT | EN and light | dark switches as the sidebar, on the card
   (as Lynxtime and Lynxbudget). Use .lx-switch .lx-switch-light inside. */
.lx-login-switches { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.lx-divider { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 12px; color: var(--lx-muted); }
.lx-divider::before, .lx-divider::after { content: ""; flex: 1; height: 1px; background: var(--lx-border); }
@media (max-width: 480px) { .lx-login-card { padding: 32px 20px 24px; } }

/* ================= Shell: sidebar + content ================= */
.lx-shell { display: flex; min-height: 100vh; }
.lx-sidebar {
  width: var(--lx-sidebar-w); background: var(--lx-sidebar-bg); color: #fff;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 30;
  display: flex; flex-direction: column; padding: 22px 16px 16px;
}
.lx-sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 18px; }
.lx-sidebar-top .lx-brand { margin-right: auto; }
.lx-hamburger {
  display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: #fff; cursor: pointer; font-size: 18px;
}
.lx-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.lx-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--lx-radius-sm);
  color: var(--lx-sidebar-text); font-weight: 500; font-size: 14px; text-decoration: none;
  transition: background .12s, color .12s;
}
.lx-nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.lx-nav-item:hover { background: var(--lx-sidebar-hover); color: #fff; text-decoration: none; }
.lx-nav-item.is-active, .lx-nav-item[aria-current="page"] { background: var(--lx-sidebar-active); color: #fff; }
.lx-nav-item.is-active svg, .lx-nav-item[aria-current="page"] svg { opacity: 1; }
.lx-nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--lx-sidebar-muted); padding: 16px 12px 6px; }
.lx-nav-section:first-child { padding-top: 2px; }
.lx-nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--lx-radius-pill);
  background: var(--lx-sunburst); color: #111; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.lx-nav-badge.is-bad { background: #ef4444; color: #fff; }
.lx-nav-item.is-active .lx-nav-badge, .lx-nav-item[aria-current="page"] .lx-nav-badge { background: #fff; color: var(--lx-teal-solid); }

.lx-sidebar-user { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--lx-sidebar-line); display: flex; flex-direction: column; gap: 10px; }
.lx-sidebar-user-info { display: flex; flex-direction: column; padding: 0 8px; min-width: 0; }
.lx-sidebar-user-name { font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-sidebar-user-email { font-size: 12px; color: var(--lx-sidebar-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-sidebar-switches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 8px; }
.lx-logout {
  background: transparent; border: 1px solid transparent; color: #fff; width: 100%; padding: 8px 14px; min-height: 38px;
  border-radius: var(--lx-radius-sm); font: 500 14px/1.2 var(--lx-font-ui); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.lx-logout:hover { background: rgba(255, 255, 255, .08); }

/* Pill switch (language, theme) — made for the dark sidebar */
.lx-switch { display: inline-flex; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--lx-radius-pill); overflow: hidden; }
.lx-switch button {
  border: 0; background: transparent; color: #cbd5d1; font: 600 11px/1.25 var(--lx-font-ui); letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; cursor: pointer;
}
.lx-switch button:hover { color: #fff; }
.lx-switch button.is-on, .lx-switch button[aria-pressed="true"] { background: var(--lx-skobeloff); color: #fff; }
.lx-switch.lx-switch-icons button { font-size: 14px; letter-spacing: 0; text-transform: none; padding: 3px 9px; }
/* the same switch on a light surface */
.lx-switch.lx-switch-light { border-color: var(--lx-border-strong); }
.lx-switch.lx-switch-light button { color: var(--lx-muted); }
.lx-switch.lx-switch-light button:hover { color: var(--lx-ink); }
.lx-switch.lx-switch-light button.is-on, .lx-switch.lx-switch-light button[aria-pressed="true"] { background: var(--lx-accent-solid); color: var(--lx-on-accent); }

.lx-content { margin-left: var(--lx-sidebar-w); flex: 1; min-width: 0; padding: 26px 28px 60px; }
.lx-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lx-page-title { font-family: var(--lx-font-display); font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--lx-heading); margin: 0; }
.lx-page-sub { color: var(--lx-muted); margin-top: 3px; font-size: 13px; }
.lx-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ================= Buttons ================= */
.lx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; min-height: 36px; border-radius: var(--lx-radius-xs); border: 1px solid var(--lx-border-strong);
  background: var(--lx-panel); color: var(--lx-ink); font: 500 13.5px/1.2 var(--lx-font-ui); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.lx-btn:hover { background: var(--lx-panel-2); text-decoration: none; }
.lx-btn:disabled, .lx-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.lx-btn-primary { background: var(--lx-accent-solid); border-color: var(--lx-accent-solid); color: var(--lx-on-accent); }
.lx-btn-primary:hover { background: var(--lx-skobeloff); border-color: var(--lx-skobeloff); color: #fff; }
.lx-btn-ghost { background: transparent; border-color: transparent; color: var(--lx-accent-text); }
.lx-btn-ghost:hover { background: var(--lx-accent-soft); }
.lx-btn-danger { color: var(--lx-bad-fg); }
.lx-btn-danger:hover { background: var(--lx-bad-bg); border-color: var(--lx-bad-fg); }
.lx-btn-danger-solid { background: var(--lx-danger); border-color: var(--lx-danger); color: #fff; }
.lx-btn-danger-solid:hover { background: #991b1b; }
.lx-btn-sm { padding: 4px 9px; min-height: 30px; font-size: 12.5px; }
.lx-btn-lg { padding: 11px 18px; min-height: 44px; font-size: 15px; border-radius: var(--lx-radius-sm); }
.lx-btn-block { width: 100%; }
.lx-btn-icon { padding: 4px 7px; min-width: 32px; line-height: 1; }
.lx-link-btn { background: none; border: 0; padding: 0; color: var(--lx-accent-text); cursor: pointer; font: inherit; }
.lx-link-btn:hover { text-decoration: underline; }

/* ================= Forms ================= */
.lx-input, .lx-select, .lx-textarea {
  font: inherit; color: var(--lx-ink); background: var(--lx-panel);
  border: 1px solid var(--lx-border-strong); border-radius: var(--lx-radius-xs);
  padding: 7px 10px; width: 100%; min-height: 36px; transition: border-color .12s, box-shadow .12s;
}
.lx-textarea { min-height: 70px; resize: vertical; }
.lx-input::placeholder, .lx-textarea::placeholder { color: var(--lx-soft-gray); }
.lx-input:focus, .lx-select:focus, .lx-textarea:focus { outline: none; border-color: var(--lx-accent); box-shadow: var(--lx-focus-ring); }
.lx-input:disabled, .lx-select:disabled, .lx-textarea:disabled { background: var(--lx-panel-2); color: var(--lx-muted); cursor: not-allowed; }
.lx-input[aria-invalid="true"] { border-color: var(--lx-bad-fg); }
.lx-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lx-label { font-size: 12.5px; color: var(--lx-muted); font-weight: 500; }
.lx-hint { font-size: 11.5px; color: var(--lx-muted); }
.lx-field-error { color: var(--lx-bad-fg); font-size: 12px; font-weight: 500; }
.lx-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.lx-form-grid .lx-span-all { grid-column: 1 / -1; }
.lx-form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.lx-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; color: var(--lx-text); }
.lx-check input, .lx-app input[type="checkbox"], .lx-app input[type="radio"] { accent-color: var(--lx-accent-solid); width: 16px; height: 16px; margin: 0; }

/* ================= Cards and KPIs ================= */
.lx-card { background: var(--lx-panel); border: 1px solid var(--lx-border); border-radius: var(--lx-radius); box-shadow: var(--lx-shadow); padding: 16px 18px; }
.lx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.lx-card-title { font: 600 12px var(--lx-font-ui); text-transform: uppercase; letter-spacing: .09em; color: var(--lx-muted); margin: 0; }
.lx-section-title { font-family: var(--lx-font-display); font-size: 17px; font-weight: 600; color: var(--lx-heading); margin: 26px 0 12px; }
.lx-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; }
.lx-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.lx-kpi { background: var(--lx-panel); border: 1px solid var(--lx-border); border-radius: var(--lx-radius); padding: 14px 16px; box-shadow: var(--lx-shadow); min-width: 0; }
.lx-kpi-label { font-size: 12px; color: var(--lx-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.lx-kpi-value { font-size: 22px; font-weight: 500; color: var(--lx-ink); margin-top: 6px; font-variant-numeric: tabular-nums; }
.lx-kpi-sub { font-size: 12px; color: var(--lx-muted); margin-top: 4px; }
.lx-kpi-hero { background: linear-gradient(135deg, var(--lx-accent-soft), transparent 70%), var(--lx-panel); border-color: var(--lx-accent); }
.lx-kpi-hero .lx-kpi-value { font-size: 30px; }
.lx-progress { height: 6px; background: var(--lx-border); border-radius: var(--lx-radius-pill); overflow: hidden; }
.lx-progress > span { display: block; height: 100%; background: var(--lx-accent); border-radius: var(--lx-radius-pill); transition: width .3s; }

/* ================= Tables ================= */
.lx-table-wrap { overflow: auto; background: var(--lx-panel); border: 1px solid var(--lx-border); border-radius: var(--lx-radius); box-shadow: var(--lx-shadow); }
.lx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lx-table th, .lx-table td { padding: 9px 12px; border-bottom: 1px solid var(--lx-border); text-align: left; vertical-align: middle; }
.lx-table thead th {
  font-size: 12px; color: var(--lx-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  background: var(--lx-panel-2); position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.lx-table tbody tr:last-child td { border-bottom: 0; }
.lx-table tbody tr:hover { background: var(--lx-row-hover); }
.lx-table tfoot td { font-weight: 600; color: var(--lx-ink); background: var(--lx-panel-2); border-top: 2px solid var(--lx-border-strong); }
.lx-table .lx-num, .lx-table td.num, .lx-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lx-table .lx-actions { text-align: right; white-space: nowrap; }
.lx-table-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ================= Badges and chips ================= */
.lx-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--lx-radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--lx-neutral-bg); color: var(--lx-neutral-fg);
}
.lx-badge-good { background: var(--lx-good-bg); color: var(--lx-good-fg); }
.lx-badge-warn { background: var(--lx-warn-bg); color: var(--lx-warn-fg); }
.lx-badge-bad { background: var(--lx-bad-bg); color: var(--lx-bad-fg); }
.lx-badge-info { background: var(--lx-info-bg); color: var(--lx-info-fg); }
.lx-badge-count { background: var(--lx-accent-solid); color: var(--lx-on-accent); min-width: 22px; justify-content: center; }
.lx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lx-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--lx-radius-pill);
  border: 1px solid var(--lx-border-strong); background: var(--lx-panel); font-size: 12.5px; cursor: pointer; color: var(--lx-text);
}
.lx-chip:hover { border-color: var(--lx-accent); }
.lx-chip.is-on, .lx-chip[aria-pressed="true"] { background: var(--lx-accent-solid); border-color: var(--lx-accent-solid); color: var(--lx-on-accent); }

/* ================= Tabs ================= */
/* Pill tabs: a page's sections (Settings tabs are these) */
.lx-subnav {
  display: inline-flex; gap: 2px; background: var(--lx-panel-2); border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-pill); padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.lx-subnav::-webkit-scrollbar { display: none; }
.lx-subnav a, .lx-subnav button {
  padding: 4px 12px; border-radius: var(--lx-radius-pill); font: 500 13px var(--lx-font-ui); color: var(--lx-text);
  white-space: nowrap; border: 0; background: transparent; cursor: pointer; text-decoration: none;
}
.lx-subnav a:hover, .lx-subnav button:hover { color: var(--lx-accent-text); text-decoration: none; }
.lx-subnav .is-active, .lx-subnav [aria-current="page"], .lx-subnav [aria-selected="true"] { background: var(--lx-panel); color: var(--lx-ink); box-shadow: var(--lx-shadow); }
.lx-subnav.lx-settings-tabs { flex-wrap: wrap; border-radius: 14px; }
@media (max-width: 720px) { .lx-subnav.lx-settings-tabs { flex-wrap: nowrap; } }
/* Underline tabs: switching between kinds of the same thing */
.lx-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--lx-border); overflow-x: auto; scrollbar-width: none; }
.lx-tabs a, .lx-tabs button {
  padding: 6px 2px 8px; font: 600 14px var(--lx-font-ui); color: var(--lx-muted); border: 0; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none;
}
.lx-tabs a:hover, .lx-tabs button:hover { color: var(--lx-ink); text-decoration: none; }
.lx-tabs .is-active, .lx-tabs [aria-current="page"], .lx-tabs [aria-selected="true"] { color: var(--lx-ink); border-bottom-color: var(--lx-accent); }

/* ================= Settings layout ================= */
.lx-settings { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.lx-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--lx-border); flex-wrap: wrap; }
.lx-setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.lx-setting-row:first-child { padding-top: 0; }
.lx-setting-text { display: flex; flex-direction: column; gap: 2px; min-width: 220px; flex: 1; }
.lx-setting-name { font-weight: 600; color: var(--lx-ink); }
.lx-setting-desc { font-size: 12.5px; color: var(--lx-muted); }

/* ================= Notices and states ================= */
.lx-notice { background: var(--lx-panel-2); border: 1px solid var(--lx-border); color: var(--lx-text); border-radius: var(--lx-radius-sm); padding: 10px 14px; font-size: 13px; }
.lx-notice-info { background: var(--lx-accent-soft); border-color: color-mix(in srgb, var(--lx-accent) 35%, transparent); color: var(--lx-accent-text); }
.lx-notice-warn { background: var(--lx-warn-bg); border-color: color-mix(in srgb, var(--lx-warn-fg) 25%, transparent); color: var(--lx-warn-fg); }
.lx-notice-bad { background: var(--lx-bad-bg); border-color: color-mix(in srgb, var(--lx-bad-fg) 25%, transparent); color: var(--lx-bad-fg); }
.lx-notice-good { background: var(--lx-good-bg); border-color: color-mix(in srgb, var(--lx-good-fg) 25%, transparent); color: var(--lx-good-fg); }
.lx-empty { background: var(--lx-panel); border: 1px dashed var(--lx-border-strong); border-radius: var(--lx-radius); padding: 28px 20px; text-align: center; color: var(--lx-muted); }
.lx-loading { color: var(--lx-muted); padding: 28px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lx-loading::before, .lx-spinner {
  content: ""; display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--lx-border-strong); border-top-color: var(--lx-accent); animation: lx-spin .8s linear infinite;
}
@keyframes lx-spin { to { transform: rotate(360deg); } }
.lx-kbd { font-family: var(--lx-font-mono); font-size: 11px; background: var(--lx-panel-2); border: 1px solid var(--lx-border-strong); border-radius: 4px; padding: 0 4px; color: var(--lx-muted); }

/* ================= Menus (dropdowns, popovers) ================= */
.lx-menu { background: var(--lx-panel); border: 1px solid var(--lx-border); border-radius: var(--lx-radius-sm); box-shadow: var(--lx-shadow-md); padding: 6px; min-width: 200px; }
.lx-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: var(--lx-radius-xs); border: 0; background: none; font: inherit; color: var(--lx-ink); text-align: left; cursor: pointer; text-decoration: none; }
.lx-menu-item:hover { background: var(--lx-row-hover); text-decoration: none; }
.lx-menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--lx-muted); padding: 6px 10px 4px; }
.lx-menu hr { border: 0; border-top: 1px solid var(--lx-border); margin: 6px 0; }

/* ================= Modal ================= */
.lx-modal-backdrop { position: fixed; inset: 0; background: rgba(17, 17, 17, .45); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 16px; animation: lx-fade .15s ease-out; }
:root[data-theme="dark"] .lx-modal-backdrop { background: rgba(0, 0, 0, .6); }
@keyframes lx-fade { from { opacity: 0; } }
.lx-modal { background: var(--lx-panel); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--lx-shadow-lg); border: 1px solid var(--lx-border); display: flex; flex-direction: column; }
.lx-modal-lg { max-width: 720px; }
.lx-modal-sm { max-width: 420px; }
.lx-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.lx-modal-head h2, .lx-modal-title { font-family: var(--lx-font-display); font-size: 18px; font-weight: 600; color: var(--lx-heading); margin: 0; }
.lx-modal-body { padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.lx-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--lx-border); flex-wrap: wrap; }

/* ================= Toasts ================= */
.lx-toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(380px, calc(100vw - 32px)); }
.lx-toast { display: flex; align-items: center; gap: 12px; background: var(--lx-night); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--lx-shadow-lg); }
.lx-toast-ok { background: var(--lx-skobeloff); }
.lx-toast-error { background: var(--lx-danger); }

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .lx-sidebar { transform: translateX(-100%); transition: transform .18s; box-shadow: var(--lx-shadow-lg); }
  .lx-sidebar.is-open { transform: none; }
  .lx-hamburger { display: inline-flex; }
  .lx-content { margin-left: 0; padding: 64px 16px 60px; }
  .lx-kpi-hero { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lx-sidebar, .lx-btn, .lx-nav-item, .lx-progress > span { transition: none; }
  .lx-loading::before, .lx-spinner { animation-duration: 2s; }
}
@media print {
  .lx-sidebar, .lx-page-actions, .lx-toasts { display: none !important; }
  .lx-content { margin: 0; padding: 0; }
}
