/*
 * Cabinet design system: tokens, reset and base typography.
 * Plain CSS (custom properties, nesting, cascade layers) served by AssetMapper, no build step.
 */
@layer reset, tokens, base, layout, components, pages, utilities;

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-ext-wght-normal-7c5a0cc471644217266f8b0fce64794e.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-wght-normal-90a020d6ded201feff55e678cde71aea.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal-d41afbece57a3d66b2ee22fd630ad4ce.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal-1b3ec095194194abe1625b02c945e2f1.woff2") format("woff2-variations");
  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;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  img, svg, video { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  [hidden] { display: none !important; }
  table { border-collapse: collapse; }
}

@layer tokens {
  :root {
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-w: 260px;
    --topbar-h: 72px;
    --tabbar-h: 64px;
    --gap: 20px;
    --page-pad: 32px;
    --focus: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent);
  }

  /* Dark is the default theme */
  :root, [data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c1416;
    --surface: #131f23;
    --surface-2: #1a2a2f;
    --border: #22343a;
    --border-strong: #33494f;
    --text: #e8f0f2;
    --muted: #a3b5ba;
    --subtle: #83989d;
    --primary: #45c4d8;
    --primary-soft: #123a42;
    --btn-bg: #45c4d8;
    --btn-fg: #04272e;
    --success: #4cc99d;
    --success-soft: #123a2e;
    --warn: #e9b155;
    --warn-soft: #3a2e14;
    --danger: #f2789a;
    --danger-soft: #3d1a25;
    --shadow: 0 10px 40px rgb(0 0 0 / .45);
  }

  [data-theme="light"] {
    color-scheme: light;
    --bg: #f1f5f6;
    --surface: #ffffff;
    --surface-2: #f4f8f9;
    --border: #dde7ea;
    --border-strong: #c4d3d7;
    --text: #13262b;
    --muted: #4c6166;
    --subtle: #5f7479;
    --primary: #0c7a8f;
    --primary-soft: #e3f4f7;
    --btn-bg: #0c7a8f;
    --btn-fg: #ffffff;
    --success: #167a55;
    --success-soft: #e3f5ec;
    --warn: #94600c;
    --warn-soft: #fbf0dc;
    --danger: #b0234c;
    --danger-soft: #fbe6ec;
    --shadow: 0 10px 40px rgb(19 38 43 / .14);
  }

  @media (max-width: 991.98px) {
    :root { --page-pad: 16px; --gap: 12px; --topbar-h: 56px; }
  }
}

@layer base {
  body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--primary); text-decoration: none; }
  a:hover { text-decoration: underline; }
  :focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
  h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
  h2 { font-size: 15px; font-weight: 600; }
  h3 { font-size: 14px; font-weight: 600; }
  ::selection { background: var(--primary-soft); }
}

@layer utilities {
  .num, .tnum { font-variant-numeric: tabular-nums; }
  .void { text-decoration: line-through; opacity: .6; }
  .muted { color: var(--muted); }
  .subtle { color: var(--subtle); }
  .pos { color: var(--success); }
  .neg { color: var(--danger); }
  .warn { color: var(--warn); }
  .lbl { font-size: 12px; color: var(--muted); }
  .strong { font-weight: 600; }
  .nowrap { white-space: nowrap; }
  .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .ta-r { text-align: right; }
  .mt-auto { margin-top: auto; }
  .stack { display: flex; flex-direction: column; gap: var(--stack-gap, 12px); }
  .cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, 8px); }
  .desktop-only { @media (max-width: 991.98px) { display: none !important; } }
  .mobile-only { @media (min-width: 992px) { display: none !important; } }
}
