@charset "UTF-8";

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/montserrat-latin.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: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/montserrat-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -- themes ---------------------------------------------------------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08080a;
  --bg-glow: radial-gradient(1100px 520px at 78% -12%, #16161b 0%, transparent 62%);
  --sidebar: #0b0b0d;
  --surface: #101013;
  --surface2: #16161a;
  --surface3: #1d1d22;
  --border: #232329;
  --border-soft: #1b1b20;
  --border-strong: #33333c;
  --text: #f4f4f6;
  --text-strong: #ffffff;
  --muted: #9a9aa4;
  --dim: #6b6b76;
  --accent: #e8e8ec;
  --accent-hover: #ffffff;
  --accent-contrast: #0a0a0c;
  --accent-soft: #1f1f25;
  --green: #6ee7a8;
  --amber: #f2c14e;
  --red: #f2777a;
  --overlay: #000000b8;
  --shadow: 0 18px 44px -22px #000000cc;
  --font: "Montserrat", Inter, "Segoe UI", Arial, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f6;
  --bg-glow: radial-gradient(1100px 520px at 78% -12%, #ffffff 0%, transparent 62%);
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface2: #f7f7f9;
  --surface3: #eeeef2;
  --border: #e0e0e6;
  --border-soft: #e8e8ee;
  --border-strong: #c9c9d3;
  --text: #17171c;
  --text-strong: #000000;
  --muted: #5d5d68;
  --dim: #83838f;
  --accent: #17171c;
  --accent-hover: #2c2c36;
  --accent-contrast: #ffffff;
  --accent-soft: #ececf1;
  --green: #128a4d;
  --amber: #a86a00;
  --red: #c02b2f;
  --overlay: #10101866;
  --shadow: 0 18px 40px -26px #10101840;
}

:root[data-theme="dark-purple"] {
  color-scheme: dark;
  --bg: #0a0713;
  --bg-glow: radial-gradient(1100px 520px at 78% -12%, #2a1350 0%, transparent 62%);
  --sidebar: #0d0918;
  --surface: #130d22;
  --surface2: #1a1130;
  --surface3: #22163d;
  --border: #2e1f4d;
  --border-soft: #241838;
  --border-strong: #4a2f7a;
  --text: #f3eefe;
  --text-strong: #ffffff;
  --muted: #a99cc4;
  --dim: #7b6d99;
  --accent: #a97bff;
  --accent-hover: #bd97ff;
  --accent-contrast: #12071f;
  --accent-soft: #241740;
  --green: #6ee7a8;
  --amber: #f2c14e;
  --red: #f2777a;
  --overlay: #05030ab8;
  --shadow: 0 18px 44px -22px #05030acc;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-glow);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { overflow: visible; }
.icon {
  width: 18px; height: 18px; flex: 0 0 18px;
  fill: none; stroke: currentColor; stroke-width: 1.65;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* -- sidebar --------------------------------------------------------- */
.app-shell { min-height: 100vh; }
.sidebar {
  width: 236px; position: fixed; inset: 0 auto 0 0; z-index: 20;
  background: var(--sidebar); border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; padding: 30px 18px 0;
  overflow-y: auto;
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.brand { display: block; }
.brand-name { display: block; font-size: 23px; font-weight: 900; letter-spacing: -1.1px; color: var(--text-strong); }
.brand small { display: block; font-size: 8px; letter-spacing: 2px; font-weight: 700; color: var(--dim); margin-top: 5px; }
.sidebar-close {
  display: none; background: var(--surface2); border: 1px solid var(--border-strong);
  border-radius: 9px; width: 34px; height: 34px; align-items: center; justify-content: center;
}
.workspace {
  display: flex; align-items: center; gap: 10px; margin-top: 30px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 11px 10px;
}
.workspace-avatar {
  display: flex; align-items: center; justify-content: center; width: 31px; height: 32px;
  background: var(--surface3); border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted);
}
.workspace-avatar .icon { width: 15px; height: 15px; flex-basis: 15px; }
.workspace div { min-width: 0; }
.workspace strong { display: block; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace small { display: block; color: var(--dim); font-size: 10px; margin-top: 4px; }
.workspace-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-left: auto; flex: 0 0 5px; }
.nav-heading { font-size: 9px; letter-spacing: 1.7px; color: var(--dim); font-weight: 700; margin: 28px 12px 11px; }
#nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; min-height: 42px;
  color: var(--muted); font-size: 12px; font-weight: 600;
  border: 1px solid transparent; border-radius: 7px;
}
.nav-item .icon { width: 16px; height: 16px; flex-basis: 16px; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); border-color: var(--border-strong); color: var(--text-strong); }
.nav-count { margin-left: auto; font-size: 10px; border-radius: 4px; background: var(--surface3); padding: 2px 6px; color: var(--muted); }
.nav-item.active .nav-count { background: var(--border-strong); color: var(--text-strong); }
.sidebar-bottom { margin-top: auto; padding-top: 26px; }
.agent-foot { border-top: 1px solid var(--border); padding: 18px 2px 20px; display: flex; align-items: center; gap: 9px; }
.agent-foot strong { font-weight: 600; font-size: 10px; }
.agent-foot small { display: block; color: var(--dim); font-size: 9px; margin-top: 4px; }
.agent-foot > .icon { margin-left: auto; width: 14px; height: 14px; flex-basis: 14px; color: var(--dim); }
.connection-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--dim); display: inline-block; }
.connection-dot.online { background: var(--green); }
.connection-dot.offline { background: var(--red); }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 15; background: var(--overlay); border: 0; backdrop-filter: blur(2px); }

/* -- topbar ---------------------------------------------------------- */
.main-shell { margin-left: 236px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 68px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; background: var(--sidebar); border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 12;
}
.topbar-leading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-menu-toggle {
  display: none; background: var(--surface2); border: 1px solid var(--border-strong);
  border-radius: 8px; width: 34px; height: 34px; align-items: center; justify-content: center;
}
.mobile-brand { display: none; font-weight: 900; letter-spacing: -.6px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--dim); }
.breadcrumb span { color: var(--border-strong); }
.breadcrumb strong { color: var(--muted); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.local-tag { font-size: 9px; letter-spacing: 1.2px; color: var(--dim); font-weight: 700; }
.connection-status { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); }
.admin-avatar {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--surface3); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 11px; font-weight: 800; text-transform: uppercase;
}
.icon-button {
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.icon-button:hover { background: var(--surface2); color: var(--text); border-color: var(--border-strong); }

/* -- theme switcher -------------------------------------------------- */
.theme-switch {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px;
}
.theme-option {
  width: 26px; height: 24px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--dim);
}
.theme-option .icon { width: 13px; height: 13px; flex-basis: 13px; }
.theme-option:hover { color: var(--text); background: var(--surface3); }
.theme-option[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-contrast);
}

/* -- page ------------------------------------------------------------ */
main { padding: 32px 34px 20px; max-width: 1680px; width: 100%; margin: 0 auto; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: 1.7px; font-weight: 700; color: var(--dim); margin-bottom: 11px; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
h1 { font-size: clamp(26px, 2.3vw, 32px); font-weight: 800; letter-spacing: -1.1px; line-height: 1.2; color: var(--text-strong); }
.heading-dot { color: var(--accent); }
.page-heading p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 9px; }
.button-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-foot { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--dim); padding: 26px 2px 8px; }
.page-foot span:last-child { margin-left: auto; }
.small-dot { width: 4px; height: 4px; flex: 0 0 4px; border-radius: 50%; background: var(--dim); display: inline-block; }
.small-dot.green { background: var(--green); }

/* -- buttons --------------------------------------------------------- */
.button {
  height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; font-size: 11px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent; border-radius: 6px;
}
.button .icon { width: 14px; height: 14px; flex-basis: 14px; }
.button-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-outline { background: var(--surface2); color: var(--text); border-color: var(--border-strong); }
.button-outline:hover:not(:disabled) { background: var(--surface3); border-color: var(--accent); }
.button-subtle { background: transparent; color: var(--muted); }
.button-subtle:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.button-danger { background: var(--red); color: #fff; border-color: var(--red); }
.button-danger:hover:not(:disabled) { filter: brightness(1.1); }
.btn {
  height: 30px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; background: var(--surface2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 6px;
}
.btn:hover:not(:disabled) { background: var(--surface3); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.btn.small { height: 27px; padding: 0 9px; font-size: 10px; }

/* -- surfaces -------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card h3 { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); font-weight: 800; margin-bottom: 14px; }
.card > p { font-size: 12px; line-height: 1.6; margin-bottom: 14px; }
.card > p + .button, .card > p + .btn { margin-top: 2px; }
.grid { display: grid; gap: 14px; }
.grid.k4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid.k2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stat-card {
  position: relative; overflow: hidden; padding: 18px 20px 17px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.stat-icon {
  width: 27px; height: 27px; display: flex; align-items: center; justify-content: center;
  background: var(--surface3); border: 1px solid var(--border); border-radius: 6px; color: var(--muted);
}
.stat-icon .icon { width: 14px; height: 14px; flex-basis: 14px; }
.stat-number {
  display: flex; align-items: baseline; gap: 8px; font-size: 32px; font-weight: 800;
  letter-spacing: -1px; line-height: 1; margin: 15px 0 16px; font-variant-numeric: tabular-nums;
  color: var(--text-strong);
}
.stat-denominator { font-size: 15px; color: var(--dim); font-weight: 500; letter-spacing: 0; }
.stat-unit { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stat-footer { font-size: 9px; color: var(--dim); display: flex; align-items: center; gap: 5px; line-height: 1.4; }
.stat-highlight { background: linear-gradient(140deg, var(--accent-soft), var(--surface) 78%); border-color: var(--border-strong); }
.stat-highlight .stat-number { color: var(--accent); }
.stat-highlight .stat-icon { background: var(--accent-soft); color: var(--accent); }

/* -- tables ---------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
th { font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--dim); font-weight: 800; white-space: nowrap; }
tbody tr:hover { background: var(--surface2); }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }
td strong { font-weight: 700; }

/* -- badges ---------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface2);
  font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.online, .pill.running, .pill.active, .pill.ok, .pill.conforme { color: var(--green); border-color: var(--green); background: transparent; }
.pill.offline, .pill.stopped, .pill.unknown, .pill.indisponível { color: var(--dim); }
.pill.error, .pill.expired, .pill.missing, .pill.captcha_failed { color: var(--red); border-style: dashed; }
.pill.expiring, .pill.starting, .pill.divergente { color: var(--amber); border-color: var(--amber); background: transparent; }
.pill.done { color: var(--green); border-color: var(--green); background: transparent; }
.pill.reserved, .pill.requesting, .pill.offering, .pill.confirming { color: var(--amber); border-color: var(--amber); background: transparent; }
.pill.failed, .pill.cancelled { color: var(--red); border-style: dashed; }
.pill.delivered { color: var(--green); border-color: var(--green); background: transparent; }
.pill.queued, .pill.checking, .pill.ready { color: var(--amber); border-color: var(--amber); background: transparent; }
.pill.needs_review { color: var(--text-strong); border-color: var(--accent); background: var(--accent-soft); }
.pill.critical { color: var(--red); border-color: var(--red); background: transparent; font-weight: 800; }
.pill.warning { color: var(--amber); border-color: var(--amber); background: transparent; }
.pill.info { color: var(--muted); }
.notice {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-left: 3px solid var(--amber); border-radius: 8px;
  background: var(--surface2); font-size: 12px; color: var(--text); margin-bottom: 16px;
}
.notice a { color: var(--accent); text-decoration: underline; }

/* -- forms ----------------------------------------------------------- */
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], select {
  background: var(--surface2); border: 1px solid var(--border-strong); border-radius: 7px;
  padding: 8px 11px; width: 100%; font-size: 12px; color: var(--text);
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
input::placeholder { color: var(--dim); }
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); font-weight: 800; margin-bottom: 6px; }
.row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row > input, .row > select { width: auto; flex: 1 1 150px; min-width: 0; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 10px; align-items: end; }
.field-grid > .btn { margin-bottom: 12px; justify-self: start; grid-column: 1 / -1; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spread > h3 { margin-bottom: 0; }
.spread > select { width: auto; flex: 1 1 200px; max-width: 340px; min-width: 0; }
.spread > .dim { white-space: nowrap; }
.spread > .row { flex: 0 0 auto; flex-wrap: nowrap; }
.spread + .chips { margin-top: 12px; }
.chart-window { width: auto; flex: 0 0 auto; padding: 6px 9px; font-size: 12px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.empty { padding: 34px; text-align: center; color: var(--dim); font-size: 12px; }
code {
  font-family: ui-monospace, Consolas, monospace; font-size: 11px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; display: inline-block; word-break: break-all;
}

/* -- filters --------------------------------------------------------- */
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface2); color: var(--muted);
  padding: 6px 10px; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
}
.chip:hover { background: var(--surface3); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

/* -- inventory ------------------------------------------------------- */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.item .art { position: relative; aspect-ratio: 1; background: var(--surface2); display: grid; place-items: center; }
.item .art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.item .art.missing {
  background: repeating-linear-gradient(45deg, var(--surface2), var(--surface2) 8px, var(--surface3) 8px, var(--surface3) 16px);
  color: var(--dim); font-size: 30px; font-weight: 900; text-transform: uppercase;
}
.item .meta { padding: 8px 10px; }
.item .name { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .rar { font-size: 9px; letter-spacing: .8px; text-transform: uppercase; color: var(--dim); margin-top: 3px; }

/* -- charts ---------------------------------------------------------- */
.chart { width: 100%; height: 170px; display: block; }
.chart polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; }

/* -- toast ----------------------------------------------------------- */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: min(360px, calc(100vw - 40px));
  background: var(--surface3); border: 1px solid var(--border-strong); color: var(--text);
  padding: 11px 15px; border-radius: 8px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow);
}
.toast.bad { border-color: var(--red); }

/* -- login ----------------------------------------------------------- */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); background-image: var(--bg-glow); }
.login-card {
  width: min(100%, 430px); padding: 36px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow);
}
.login-brand { font-size: 27px; font-weight: 900; letter-spacing: -1.3px; margin-bottom: 26px; color: var(--text-strong); }
.login-card .eyebrow { color: var(--muted); }
.login-card h1 { font-size: 27px; font-weight: 800; }
.login-card > p { color: var(--muted); font-size: 12px; margin: 9px 0 22px; line-height: 1.6; }
.login-card > label { display: block; font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text); font-weight: 800; margin-bottom: 6px; }
.login-card > input { margin-bottom: 14px; }
.login-card > small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; margin-top: 16px; }
.login-card > small .icon { width: 12px; height: 12px; flex-basis: 12px; }
.login-card .button { width: 100%; margin-top: 6px; }
.form-error { color: var(--red); font-size: 11px; border: 1px dashed var(--red); border-radius: 7px; padding: 8px 11px; margin-bottom: 12px; }

/* -- responsive ------------------------------------------------------ */
@media (max-width: 1100px) {
  .local-tag { display: none; }
  main { padding: 26px 22px 16px; }
  .topbar { padding: 0 22px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; width: min(84vw, 280px); }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .sidebar-close { display: flex; }
  .main-shell { margin-left: 0; }
  .mobile-menu-toggle { display: flex; }
  .mobile-brand { display: block; }
  .breadcrumb { display: none; }
  .page-heading { flex-direction: column; align-items: flex-start; }
  .page-heading .button-row { width: 100%; }
  .topbar { height: 60px; }
}
@media (max-width: 680px) {
  .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.k4 > .stat-highlight { grid-column: 1 / -1; }
  .grid.k2 { grid-template-columns: minmax(0, 1fr); }
  .items { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
  .card { padding: 15px; border-radius: 10px; }
  .stat-card { padding: 14px 15px; }
  .stat-number { font-size: 26px; margin: 12px 0 12px; }
  .connection-status { display: none; }
  .topbar-right { gap: 9px; }
  .spread { align-items: flex-start; }
  .spread > .row { width: 100%; }
  .chart-window { flex: 1 1 auto; }
  table { font-size: 11px; min-width: 520px; }
  th, td { padding: 9px 8px; }
  .empty { padding: 26px 12px; }
  .page-foot { flex-wrap: wrap; }
  .page-foot span:last-child { margin-left: 0; }
  .card > .button { width: 100%; justify-content: center; }
  .card > .btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  main { padding: 18px 12px 12px; }
  .topbar { padding: 0 12px; }
  .theme-switch { gap: 0; padding: 2px; }
  .theme-option { width: 24px; height: 22px; }
  .admin-avatar { display: none; }
  .stat-number { font-size: 23px; }
  .login-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
