/* The Telekom look of the satiot pages, shared by all of them.

   The colours are the design tokens of Telekom's Scale (@telekom/scale-components 3.0.0-beta.161), light and dark, under their official names (--telekom-color-*). The pages use the short names
   (--bg, --card, ...) that are defined from them below. Dark is the default; light is chosen with data-theme="light" on <html> (see telekom.js). The look follows the dashboard of
   q-stars-fpga-main: a sticky top bar with a magenta square for the logo, cards with a 1 px border and 10 px corners, 14 px text.

   The font (TeleNeoWeb) and the logo belong to Deutsche Telekom AG and are not part of this repository: they are read from the brand folder (see satiot_common/telekom.py,
   demo/static/brand/README.md) if it has them, else the page falls back to a system font. */

@font-face { font-family: "TeleNeoWeb"; font-weight: 400; font-style: normal; font-display: swap; src: url("/brand/fonts/TeleNeoWeb-Regular.woff2") format("woff2"); }
@font-face { font-family: "TeleNeoWeb"; font-weight: 500; font-style: normal; font-display: swap; src: url("/brand/fonts/TeleNeoWeb-Medium.woff2") format("woff2"); }
@font-face { font-family: "TeleNeoWeb"; font-weight: 700; font-style: normal; font-display: swap; src: url("/brand/fonts/TeleNeoWeb-Bold.woff2") format("woff2"); }
@font-face { font-family: "TeleNeoWeb"; font-weight: 800; font-style: normal; font-display: swap; src: url("/brand/fonts/TeleNeoWeb-ExtraBold.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  /* Scale tokens, dark */
  --telekom-color-primary-standard: #f61488;
  --telekom-color-background-canvas-subtle: #0e0e0f;
  --telekom-color-background-surface: #151517;
  --telekom-color-background-surface-subtle: #242426;
  --telekom-color-ui-faint: #39393c;
  --telekom-color-ui-subtle: #1c1c1e;
  --telekom-color-text-and-icon-standard: #ffffff;
  --telekom-color-text-and-icon-additional: hsla(0, 0%, 100%, 0.65);
  --telekom-color-text-and-icon-functional-success: #00b367;
  --telekom-color-text-and-icon-functional-warning: #f97012;
  --telekom-color-text-and-icon-functional-danger: #f84934;
  --telekom-color-text-and-icon-link-standard: #7d94f9;
  /* the short names of the pages */
  --accent-hover: #ec59a5; --accent-text: #ffffff; --line-strong: hsla(0, 0%, 100%, 0.4); --input: #0e0e0f;
  --ok-bg: rgba(0, 179, 103, 0.18); --bad-bg: rgba(248, 73, 52, 0.18); --warn-bg: rgba(253, 144, 56, 0.16); --grid: #2a2a2d;
  --ltem: #f61488; --nbiot: #7d94f9; --ntn: #fd9038; --shadow: 0 2px 10px rgb(0 0 0 / 0.25);
}
:root[data-theme="light"], :root[data-theme="telekom"] {
  color-scheme: light;
  --telekom-color-primary-standard: #e20074;
  --telekom-color-background-canvas-subtle: #fbfbfb;
  --telekom-color-background-surface: #ffffff;
  --telekom-color-background-surface-subtle: #efeff0;
  --telekom-color-ui-faint: #dfdfe1;
  --telekom-color-ui-subtle: #efeff0;
  --telekom-color-text-and-icon-standard: #000000;
  --telekom-color-text-and-icon-additional: hsla(0, 0%, 0%, 0.65);
  --telekom-color-text-and-icon-functional-success: #008653;
  --telekom-color-text-and-icon-functional-warning: #b63d00;
  --telekom-color-text-and-icon-functional-danger: #d91308;
  --telekom-color-text-and-icon-link-standard: #2238df;
  --accent-hover: #c00063; --accent-text: #ffffff; --line-strong: hsla(0, 0%, 0%, 0.44); --input: #ffffff;
  --ok-bg: rgba(0, 179, 103, 0.12); --bad-bg: rgba(232, 32, 16, 0.10); --warn-bg: rgba(249, 112, 18, 0.14); --grid: #e6e6e8;
  --ltem: #e20074; --nbiot: #2238df; --ntn: #f97012; --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
:root {
  --bg: var(--telekom-color-background-canvas-subtle);
  --card: var(--telekom-color-background-surface);
  --card2: var(--telekom-color-background-surface-subtle);
  --line: var(--telekom-color-ui-faint);
  --text: var(--telekom-color-text-and-icon-standard);
  --muted: var(--telekom-color-text-and-icon-additional);
  --accent: var(--telekom-color-primary-standard);
  --link: var(--telekom-color-text-and-icon-link-standard);
  --good: var(--telekom-color-text-and-icon-functional-success);
  --warn: var(--telekom-color-text-and-icon-functional-warning);
  --bad: var(--telekom-color-text-and-icon-functional-danger);
  --chip-bg: var(--card2);
  --font: TeleNeoWeb, "TeleNeo", "TeleGrotesk Next", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --radius: 10px; --radius-s: 8px;
  --gutter: clamp(12px, 2.5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0 var(--gutter) 48px; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--link); }

/* the top bar: a magenta square with the logo, the title, then what the page puts into .tk-actions */
.tk-topbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; min-height: 64px; margin: 0 calc(-1 * var(--gutter)) 16px;
             padding: 0 var(--gutter) 0 0; background: var(--card); border-bottom: 1px solid var(--line); }
.tk-logo { flex: none; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: var(--accent); }
.tk-logo img { width: 34px; height: auto; } .tk-logo img[hidden] { display: none; }
.tk-heading { min-width: 0; padding: 6px 0; }
.tk-heading h1 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.25; }
.tk-heading .sub { margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 400; letter-spacing: 0; }
.tk-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tk-topbar button { font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 5px 14px; cursor: pointer; }
.tk-topbar button:hover { border-color: var(--accent); }

/* where the data comes from when it is not a real modem: next to the title (see Telekom.setKind in telekom.js) */
.tk-badge { display: inline-block; margin-left: 10px; padding: 1px 9px; vertical-align: middle; border: 1px solid var(--warn); border-radius: 999px; background: var(--warn-bg); color: var(--warn);
            font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.tk-footer { margin-top: 24px; padding: 14px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
