/* Self-hosted variable Manrope; license and source hashes in ../fonts/manrope/. */
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/manrope/manrope-v20-cyrillic-ext-de37de877dc1.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/manrope/manrope-v20-cyrillic-c268b459a932.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/manrope/manrope-v20-greek-2fb2e8cbfd52.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/manrope/manrope-v20-vietnamese-6bbb044ab420.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/manrope/manrope-v20-latin-ext-3911b66d9f2e.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;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/manrope/manrope-v20-latin-a30ddcd34970.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;
}

:root {
  --font-ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-field-size: 16px;
  --font-field-weight: 400;
  --font-action-size: 16px;
  --font-action-weight: 850;
  --font-control-line-height: 1.4;
  --font-field: var(--font-field-weight) var(--font-field-size)/var(--font-control-line-height) var(--font-ui);
  --font-action: var(--font-action-weight) var(--font-action-size)/var(--font-control-line-height) var(--font-ui);
  --font-code: var(--font-ui);
  color-scheme: light;
  --bg: #f2f2f7;
  --page-bg: #f2f2f7;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --panel-2: #f2f2f7;
  --surface-2: #f2f2f7;
  --surface-3: #e5e5ea;
  --field: #e5e5ea;
  --button-bg: #e5e5ea;
  --button-hover: #d1d1d6;
  --border: rgba(60, 60, 67, 0.18);
  --focus-bg: #e5e5ea;
  --focus-border: rgba(0, 122, 255, 0.58);
  --selected-bg: rgba(0, 122, 255, 0.12);
  --selected-border: rgba(0, 122, 255, 0.34);
  --sidebar-control-bg: #f2f2f7;
  --sidebar-control-hover: #e5e5ea;
  --sidebar-field-bg: #f2f2f7;
  --sidebar-field-focus: #e5e5ea;
  --sidebar-group-bg: #f2f2f7;
  --sidebar-selected-bg: rgba(0, 122, 255, 0.12);
  --sidebar-selected-hover: rgba(0, 122, 255, 0.18);
  --sidebar-pinned-bg: rgba(0, 122, 255, 0.08);
  --sidebar-drag-bg: rgba(0, 122, 255, 0.16);
  --sidebar-focus-bg: rgba(0, 122, 255, 0.12);
  --text: #000000;
  --muted: rgba(60, 60, 67, 0.72);
  --subtle: rgba(60, 60, 67, 0.42);
  --danger: #ff3b30;
  --favorite-active: #d08a00;
  --task-open-bg: #f7edc9;
  --task-open-ink: #80620c;
  --success: #34c759;
  --warn: #ff9500;
  --accent: #007aff;
  --accent-2: #5ac8fa;
  /* Device type families (inventory icons): five calm tones, never status red/green. */
  --device-compute: #2f6fe4;
  --device-network: #0f9fb5;
  --device-service: #7d5ad6;
  --device-workplace: #5b7398;
  --device-hardware: #7c7c84;
  --accent-strong: #0066d6;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --accent-contrast: #ffffff;
  --link: #007aff;
  --link-hover: #0066d6;
  --link-underline: rgba(0, 122, 255, 0.35);
  --shadow: 0 22px 70px rgba(60, 60, 67, 0.12);
  --shadow-soft: 0 12px 34px rgba(60, 60, 67, 0.1);
  --shadow-strong: 0 28px 90px rgba(60, 60, 67, 0.22);
  --code-bg: #f2f2f7;
  --code-syntax-keyword: #cf222e;
  --code-syntax-title: #8250df;
  --code-syntax-constant: #0550ae;
  --code-syntax-string: #0a3069;
  --code-syntax-builtin: #953800;
  --code-syntax-comment: #57606a;
  --code-syntax-tag: #116329;
  --code-syntax-section: #0550ae;
  --code-syntax-addition: #116329;
  --code-syntax-addition-bg: #dafbe1;
  --code-syntax-deletion: #82071e;
  --code-syntax-deletion-bg: #ffebe9;
  --overlay-bg: rgba(242, 242, 247, 0.76);

  /* Legacy aliases while old templates are migrated to shared primitives. */
  --line: var(--border);
  --panel2: var(--panel-2);
  --ok: var(--success);
  --bad: var(--danger);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --page-bg: #000000;
  --panel: rgba(28, 28, 30, 0.96);
  --panel-solid: #1c1c1e;
  --panel-2: #2c2c2e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --field: #2c2c2e;
  --button-bg: #3a3a3c;
  --button-hover: #48484a;
  --border: rgba(84, 84, 88, 0.62);
  --focus-bg: #3a3a3c;
  --focus-border: rgba(10, 132, 255, 0.72);
  --selected-bg: rgba(10, 132, 255, 0.18);
  --selected-border: rgba(10, 132, 255, 0.44);
  --sidebar-control-bg: #2c2c2e;
  --sidebar-control-hover: #3a3a3c;
  --sidebar-field-bg: #2c2c2e;
  --sidebar-field-focus: #3a3a3c;
  --sidebar-group-bg: #2c2c2e;
  --sidebar-selected-bg: rgba(10, 132, 255, 0.22);
  --sidebar-selected-hover: rgba(10, 132, 255, 0.28);
  --sidebar-pinned-bg: rgba(10, 132, 255, 0.14);
  --sidebar-drag-bg: rgba(10, 132, 255, 0.24);
  --sidebar-focus-bg: rgba(10, 132, 255, 0.18);
  --text: #ffffff;
  --muted: rgba(235, 235, 245, 0.66);
  --subtle: rgba(235, 235, 245, 0.42);
  --danger: #ff453a;
  --favorite-active: #f2b84b;
  --task-open-bg: #403921;
  --task-open-ink: #dfc36e;
  --success: #30d158;
  --warn: #ff9f0a;
  --accent: #0a84ff;
  --accent-2: #64d2ff;
  --device-compute: #5b9bff;
  --device-network: #40c8d8;
  --device-service: #a88bff;
  --device-workplace: #8fa3c4;
  --device-hardware: #a1a1aa;
  --accent-strong: #409cff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --accent-contrast: #ffffff;
  --link: #64d2ff;
  --link-hover: #9cddff;
  --link-underline: rgba(100, 210, 255, 0.42);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.25);
  --shadow-strong: 0 30px 100px rgba(0, 0, 0, 0.46);
  --code-bg: #1c1c1e;
  --code-syntax-keyword: #ff7b72;
  --code-syntax-title: #d2a8ff;
  --code-syntax-constant: #79c0ff;
  --code-syntax-string: #a5d6ff;
  --code-syntax-builtin: #ffa657;
  --code-syntax-comment: #8b949e;
  --code-syntax-tag: #7ee787;
  --code-syntax-section: #58a6ff;
  --code-syntax-addition: #aff5b4;
  --code-syntax-addition-bg: #033a16;
  --code-syntax-deletion: #ffdcd7;
  --code-syntax-deletion-bg: #67060c;
  --overlay-bg: rgba(0, 0, 0, 0.72);
}

/* Settings theme overrides. Page layout dimensions belong to settings_layout.css. */
body.settings-page {
  --settings-page-surface: #f2f2f7;
  --settings-chrome: rgba(249, 249, 249, .94);
  --settings-card: #ffffff;
  --settings-item: #f2f2f7;
  --settings-control: #e5e5ea;
  --settings-control-hover: #d1d1d6;
  --settings-divider: rgba(60, 60, 67, .18);
  --bg: #f2f2f7;
  --page-bg: #f2f2f7;
  --panel: rgba(255, 255, 255, .94);
  --panel-solid: #ffffff;
  --panel-2: #f2f2f7;
  --panel2: var(--panel-2);
  --surface-2: #f2f2f7;
  --surface-3: #e5e5ea;
  --field: #f2f2f7;
  --button-bg: #f2f2f7;
  --button-hover: #e5e5ea;
  --border: rgba(60, 60, 67, .18);
  --line: var(--border);
  --focus-border: rgba(0, 122, 255, .58);
  --sidebar-control-bg: #f2f2f7;
  --sidebar-control-hover: #e5e5ea;
  --sidebar-field-bg: #f2f2f7;
  --sidebar-field-focus: #e5e5ea;
  --sidebar-group-bg: #f2f2f7;
  --sidebar-selected-bg: rgba(0, 122, 255, .12);
  --sidebar-selected-hover: rgba(0, 122, 255, .17);
  --sidebar-pinned-bg: #e5e5ea;
  --text: #000000;
  --muted: rgba(60, 60, 67, .72);
  --subtle: rgba(60, 60, 67, .48);
  --accent: #007aff;
  --accent-2: #5ac8fa;
  --accent-strong: #0066d6;
  --accent-soft: rgba(0, 122, 255, .12);
  --favorite-active: #d08a00;
  --task-open-bg: #f7edc9;
  --task-open-ink: #80620c;
  --success: #34c759;
  --ok: var(--success);
  --danger: #ff3b30;
  --bad: var(--danger);
  --warn: #ff9500;
  --overlay-bg: rgba(0, 0, 0, .28);
  --shadow: 0 18px 54px rgba(60, 60, 67, .12);
  --shadow-soft: 0 10px 32px rgba(60, 60, 67, .08);
}

:root[data-theme="dark"] body.settings-page {
  --settings-page-surface: #000000;
  --settings-chrome: rgba(28, 28, 30, .94);
  --settings-card: #1c1c1e;
  --settings-item: #2c2c2e;
  --settings-control: #3a3a3c;
  --settings-control-hover: #48484a;
  --settings-divider: rgba(84, 84, 88, .62);
  --bg: #000000;
  --page-bg: #000000;
  --panel: rgba(28, 28, 30, .96);
  --panel-solid: #1c1c1e;
  --panel-2: #2c2c2e;
  --panel2: var(--panel-2);
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --field: #2c2c2e;
  --button-bg: #2c2c2e;
  --button-hover: #3a3a3c;
  --border: rgba(84, 84, 88, .62);
  --line: var(--border);
  --focus-border: rgba(10, 132, 255, .72);
  --sidebar-control-bg: #2c2c2e;
  --sidebar-control-hover: #3a3a3c;
  --sidebar-field-bg: #2c2c2e;
  --sidebar-field-focus: #3a3a3c;
  --sidebar-group-bg: #2c2c2e;
  --sidebar-selected-bg: rgba(10, 132, 255, .18);
  --sidebar-selected-hover: rgba(10, 132, 255, .25);
  --sidebar-pinned-bg: #3a3a3c;
  --text: #ffffff;
  --muted: rgba(235, 235, 245, .66);
  --subtle: rgba(235, 235, 245, .38);
  --accent: #0a84ff;
  --accent-2: #64d2ff;
  --accent-strong: #409cff;
  --accent-soft: rgba(10, 132, 255, .18);
  --favorite-active: #f2b84b;
  --task-open-bg: #403921;
  --task-open-ink: #dfc36e;
  --success: #30d158;
  --ok: var(--success);
  --danger: #ff453a;
  --bad: var(--danger);
  --warn: #ff9f0a;
  --overlay-bg: rgba(0, 0, 0, .62);
  --shadow: 0 24px 80px rgba(0, 0, 0, .36);
  --shadow-soft: 0 14px 42px rgba(0, 0, 0, .26);
}

html { background: var(--bg); }

@media (pointer: fine) {
  * {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--muted) 46%, transparent) var(--surface-2);
  }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: var(--surface-2); }
  *::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--muted) 42%, transparent);
    border: 2px solid var(--surface-2);
    border-radius: 999px;
  }
  *::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
}
