:root {
  --bg: #ffffff;
  --bg-accent: #f5f5f5;
  --card: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f8f8f8;
  --surface-3: #f3f3f3;
  --surface-4: #eeeeee;
  --surface: var(--surface-1);
  --surface-accent: #f4f4f4;
  --surface-accent-2: #eaeaea;
  --surface-success: #f4f4f4;
  --line: #d8d8d8;
  --line-strong: #b8b8b8;
  --line-muted: #e8e8e8;
  --line-info: #9a9a9a;
  --line-success: #8f8f8f;
  --text: #111111;
  --text-soft: #464646;
  --text-muted: #7a7a7a;
  --brand: #111111;
  --brand-strong: #000000;
  --brand-subtle: #f2f2f2;
  --brand-contrast: #ffffff;
  --focus-ring: rgba(0, 0, 0, 0.22);
  --bg-grad-start: #ffffff;
  --bg-grad-mid: #f7f7f7;
  --bg-grad-end: #efefef;
  --panel-grad-start: #ffffff;
  --panel-grad-end: #f4f4f4;
  --danger: #b72222;
  --ok: #186c46;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --theme-card-border-width: 1px;
  --theme-card-border-style: solid;
  --theme-control-radius: 10px;
  --theme-detail-radius: 8px;
  --theme-standard-font: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --theme-body-font: var(--theme-standard-font);
  --theme-heading-font: var(--theme-standard-font);
  --theme-control-font: inherit;
  --theme-ui-transform: none;
  --theme-ui-letter-spacing: 0;
  --theme-body-overlay: linear-gradient(transparent, transparent);
  --theme-card-background: var(--card);
  --theme-card-shadow: var(--shadow);
  --theme-panel-background: linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end));
  --theme-control-background: var(--surface-1);
  --theme-menu-background: var(--surface-1);
  --theme-input-background: var(--surface-1);
  --theme-nav-background: var(--surface-1);
  --theme-nav-radius: 999px;
  --theme-nav-item-radius: 999px;
  --theme-primary-button-background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  --theme-button-shadow: none;
  --skeleton-base: #e1e1e1;
  --skeleton-sheen: #f7f7f7;
  --loader-backdrop: rgba(255, 255, 255, 0.86);
  --scrollbar-track: color-mix(in srgb, var(--surface-2) 84%, transparent);
  --scrollbar-thumb: color-mix(in srgb, var(--brand-strong) 58%, var(--line-strong));
  --scrollbar-thumb-hover: color-mix(in srgb, var(--brand) 72%, var(--text-soft));
  --theme-preview-ratio: 0;
  --theme-preview-percent: 0%;
  --theme-preview-inverse-percent: 100%;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-accent: #050505;
  --card: #080808;
  --surface-1: #0b0b0b;
  --surface-2: #111111;
  --surface-3: #161616;
  --surface-4: #1a1a1a;
  --surface-accent: #151515;
  --surface-accent-2: #202020;
  --surface-success: #0f2419;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --line-muted: #202020;
  --line-info: #4b5563;
  --line-success: #4a8f69;
  --text: #f4f4f5;
  --text-soft: #c4c4c8;
  --text-muted: #8a8a90;
  --brand: #3a3a3a;
  --brand-strong: #4a4a4a;
  --brand-subtle: #151515;
  --brand-contrast: #ffffff;
  --focus-ring: rgba(255, 255, 255, 0.24);
  --bg-grad-start: #000000;
  --bg-grad-mid: #030303;
  --bg-grad-end: #070707;
  --panel-grad-start: #101010;
  --panel-grad-end: #0a0a0a;
  --danger: #ff8f8f;
  --ok: #6bdba4;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.56);
  --skeleton-base: #1f1f1f;
  --skeleton-sheen: #3a3a3a;
  --loader-backdrop: rgba(0, 0, 0, 0.86);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:root[data-theme-palette="steel"] {
  --bg: #edf1f5;
  --bg-accent: #e3e9ef;
  --card: #f8fafc;
  --surface-1: #f8fafc;
  --surface-2: #f0f4f8;
  --surface-3: #e8eef4;
  --surface-4: #dfe7ee;
  --surface-accent: #e6edf3;
  --surface-accent-2: #d6e0e9;
  --surface-success: #e8f3ed;
  --line: #c6d1dc;
  --line-strong: #9fafbd;
  --line-muted: #d6e0e9;
  --line-info: #8298aa;
  --text: #1f2a36;
  --text-soft: #526475;
  --text-muted: #8796a6;
  --brand: #485766;
  --brand-strong: #2e3a46;
  --brand-subtle: #e5ebf1;
  --focus-ring: rgba(72, 87, 102, 0.24);
  --bg-grad-start: #f8fafc;
  --bg-grad-mid: #eef3f7;
  --bg-grad-end: #e1e8ef;
  --panel-grad-start: #f7f9fb;
  --panel-grad-end: #e7edf3;
  --shadow: 0 14px 34px rgba(38, 52, 69, 0.12);
  --skeleton-base: #ccd8e4;
  --skeleton-sheen: #eef4fa;
  --loader-backdrop: rgba(237, 241, 245, 0.88);
}

:root[data-theme="dark"][data-theme-palette="steel"] {
  --bg: #000000;
  --bg-accent: #050607;
  --card: #08090a;
  --surface-1: #0b0d0f;
  --surface-2: #111417;
  --surface-3: #171b1f;
  --surface-4: #1d2227;
  --surface-accent: #13171b;
  --surface-accent-2: #1d242a;
  --line-info: #5f7488;
  --brand: #8c99a6;
  --brand-strong: #a9b4bf;
  --brand-subtle: #12161a;
  --focus-ring: rgba(169, 180, 191, 0.28);
  --bg-grad-start: #000000;
  --bg-grad-mid: #020303;
  --bg-grad-end: #050607;
}

:root[data-theme-palette="ocean"] {
  --bg: #eaf5fb;
  --bg-accent: #d9ecf7;
  --card: #f7fcff;
  --surface-1: #f7fcff;
  --surface-2: #edf8fd;
  --surface-3: #e1f1f9;
  --surface-4: #d3e8f4;
  --surface-accent: #dff0f9;
  --surface-accent-2: #cce5f3;
  --surface-success: #e6f6f2;
  --line: #bfd7e6;
  --line-strong: #91b8ce;
  --line-muted: #d0e5f0;
  --line-info: #6da6c9;
  --text: #153044;
  --text-soft: #46667a;
  --text-muted: #7fa0b2;
  --brand: #1f6f9d;
  --brand-strong: #10547b;
  --brand-subtle: #dceff8;
  --focus-ring: rgba(31, 111, 157, 0.24);
  --bg-grad-start: #f9fdff;
  --bg-grad-mid: #eaf6fb;
  --bg-grad-end: #d9ecf7;
  --panel-grad-start: #f7fcff;
  --panel-grad-end: #def0f8;
  --shadow: 0 14px 34px rgba(20, 79, 114, 0.12);
  --skeleton-base: #c5dfed;
  --skeleton-sheen: #eef9fe;
  --loader-backdrop: rgba(234, 245, 251, 0.88);
}

:root[data-theme="dark"][data-theme-palette="ocean"] {
  --bg: #000000;
  --bg-accent: #020608;
  --card: #070a0c;
  --surface-1: #090d10;
  --surface-2: #0f1519;
  --surface-3: #151d22;
  --surface-4: #1a252c;
  --surface-accent: #0d1820;
  --surface-accent-2: #102432;
  --line-info: #2e739d;
  --brand: #56a6d4;
  --brand-strong: #8bc8e6;
  --brand-subtle: #0d1820;
  --focus-ring: rgba(139, 200, 230, 0.3);
  --bg-grad-start: #000000;
  --bg-grad-mid: #010304;
  --bg-grad-end: #020608;
}

:root[data-theme-palette="spruce"] {
  --bg: #edf6f1;
  --bg-accent: #deede5;
  --card: #f8fcfa;
  --surface-1: #f8fcfa;
  --surface-2: #eff8f3;
  --surface-3: #e4f1e9;
  --surface-4: #d8e8df;
  --surface-accent: #e1f0e7;
  --surface-accent-2: #cee4d7;
  --surface-success: #dff2e7;
  --line: #bdd5c8;
  --line-strong: #8db29d;
  --line-muted: #d0e3d8;
  --line-info: #72a889;
  --line-success: #5eaa7c;
  --text: #193528;
  --text-soft: #496b58;
  --text-muted: #7fa08c;
  --brand: #26724f;
  --brand-strong: #16583a;
  --brand-subtle: #dceee4;
  --focus-ring: rgba(38, 114, 79, 0.24);
  --bg-grad-start: #f9fdfa;
  --bg-grad-mid: #eef7f2;
  --bg-grad-end: #dcece4;
  --panel-grad-start: #f8fcfa;
  --panel-grad-end: #e2f0e8;
  --shadow: 0 14px 34px rgba(25, 82, 55, 0.12);
  --skeleton-base: #c2dccd;
  --skeleton-sheen: #eff9f3;
  --loader-backdrop: rgba(237, 246, 241, 0.88);
}

:root[data-theme="dark"][data-theme-palette="spruce"] {
  --bg: #000000;
  --bg-accent: #020704;
  --card: #070a08;
  --surface-1: #090e0b;
  --surface-2: #0f1712;
  --surface-3: #142017;
  --surface-4: #19281d;
  --surface-accent: #0f1a13;
  --surface-accent-2: #14281d;
  --line-info: #3f8d62;
  --line-success: #58b178;
  --brand: #66c28a;
  --brand-strong: #9addb4;
  --brand-subtle: #0f1a13;
  --focus-ring: rgba(154, 221, 180, 0.28);
  --bg-grad-start: #000000;
  --bg-grad-mid: #010302;
  --bg-grad-end: #020704;
}

:root[data-theme-palette="ember"] {
  --bg: #f6efec;
  --bg-accent: #eee2dd;
  --card: #fffaf8;
  --surface-1: #fffaf8;
  --surface-2: #f8f0ec;
  --surface-3: #f1e4de;
  --surface-4: #e8d8d1;
  --surface-accent: #fae5dc;
  --surface-accent-2: #f1cfc5;
  --surface-success: #edf5e9;
  --line: #dbc3ba;
  --line-strong: #b99285;
  --line-muted: #e8d4cd;
  --line-info: #b88574;
  --text: #40261e;
  --text-soft: #76584f;
  --text-muted: #a5867d;
  --danger: #a62c23;
  --brand: #9b3d2b;
  --brand-strong: #73281d;
  --brand-subtle: #f7e2db;
  --focus-ring: rgba(155, 61, 43, 0.24);
  --bg-grad-start: #fffaf8;
  --bg-grad-mid: #f7efec;
  --bg-grad-end: #ecdeda;
  --panel-grad-start: #fff9f7;
  --panel-grad-end: #f3e3de;
  --shadow: 0 14px 34px rgba(91, 43, 30, 0.13);
  --skeleton-base: #dfc4ba;
  --skeleton-sheen: #fff3ef;
  --loader-backdrop: rgba(246, 239, 236, 0.88);
}

:root[data-theme="dark"][data-theme-palette="ember"] {
  --bg: #000000;
  --bg-accent: #080403;
  --card: #0a0807;
  --surface-1: #0f0b09;
  --surface-2: #18110e;
  --surface-3: #211712;
  --surface-4: #281c16;
  --surface-accent: #1d100d;
  --surface-accent-2: #2b1711;
  --line-info: #9b5e4f;
  --danger: #ff9a8c;
  --brand: #e5866f;
  --brand-strong: #ffc0b2;
  --brand-subtle: #1d100d;
  --focus-ring: rgba(255, 192, 178, 0.28);
  --bg-grad-start: #000000;
  --bg-grad-mid: #030101;
  --bg-grad-end: #080403;
}

:root[data-theme-palette="orange"] {
  --bg: #f7f2eb;
  --bg-accent: #eee4d8;
  --card: #fffaf5;
  --surface-1: #fffaf5;
  --surface-2: #f9f2ea;
  --surface-3: #f1e6d9;
  --surface-4: #e9dac8;
  --surface-accent: #f8e7d1;
  --surface-accent-2: #f1d5b3;
  --surface-success: #edf5e9;
  --line: #dec9ae;
  --line-strong: #b99a72;
  --line-muted: #ead8c1;
  --line-info: #c38338;
  --text: #392616;
  --text-soft: #715a42;
  --text-muted: #9d8468;
  --brand: #c76f16;
  --brand-strong: #96500b;
  --brand-subtle: #f6e2c9;
  --brand-contrast: #1d1208;
  --focus-ring: rgba(199, 111, 22, 0.24);
  --bg-grad-start: #fffaf5;
  --bg-grad-mid: #f8f1e8;
  --bg-grad-end: #eee1d1;
  --panel-grad-start: #fff9f3;
  --panel-grad-end: #f4e4d0;
  --shadow: 0 14px 34px rgba(91, 55, 18, 0.13);
  --skeleton-base: #dfc8a9;
  --skeleton-sheen: #fff3e4;
  --loader-backdrop: rgba(247, 242, 235, 0.88);
}

:root[data-theme-palette="custom"] {
  --bg: var(--theme-custom-bg, #ffffff);
  --bg-accent: var(--theme-custom-bg-accent, #f5f5f5);
  --card: var(--theme-custom-surface, #ffffff);
  --surface-1: var(--theme-custom-surface, #ffffff);
  --surface-2: var(--theme-custom-surface-2, #f8f8f8);
  --surface-3: var(--theme-custom-surface-3, #f3f3f3);
  --surface-4: var(--theme-custom-surface-3, #eeeeee);
  --surface-accent: var(--theme-custom-accent-subtle, #f8ddbf);
  --surface-accent-2: color-mix(in srgb, var(--theme-custom-accent-subtle, #f8ddbf) 76%, var(--theme-custom-surface, #ffffff));
  --surface-success: color-mix(in srgb, #edf9f2 68%, var(--theme-custom-surface, #ffffff));
  --line: var(--theme-custom-border, #d8d8d8);
  --line-strong: var(--theme-custom-border-strong, #b8b8b8);
  --line-muted: color-mix(in srgb, var(--theme-custom-border, #d8d8d8) 58%, var(--theme-custom-surface, #ffffff));
  --line-info: color-mix(in srgb, var(--theme-custom-accent, #f28c28) 68%, var(--theme-custom-border, #d8d8d8));
  --text: var(--theme-custom-text, #1d2735);
  --text-soft: var(--theme-custom-muted, #5b6d84);
  --text-muted: var(--theme-custom-text-muted, #a4b0c2);
  --brand: var(--theme-custom-accent, #f28c28);
  --brand-strong: var(--theme-custom-accent-strong, #ae641d);
  --brand-subtle: var(--theme-custom-accent-subtle, #f8ddbf);
  --brand-contrast: var(--theme-custom-accent-contrast, #ffffff);
  --focus-ring: color-mix(in srgb, var(--theme-custom-accent, #f28c28) 28%, transparent);
  --bg-grad-start: var(--theme-custom-bg, #ffffff);
  --bg-grad-mid: var(--theme-custom-bg-accent, #f5f5f5);
  --bg-grad-end: color-mix(in srgb, var(--theme-custom-bg, #ffffff) 78%, var(--theme-custom-surface, #ffffff));
  --panel-grad-start: var(--theme-custom-surface, #ffffff);
  --panel-grad-end: var(--theme-custom-surface-2, #f8f8f8);
  --skeleton-base: color-mix(in srgb, var(--theme-custom-border, #d8d8d8) 74%, var(--theme-custom-surface, #ffffff));
  --skeleton-sheen: color-mix(in srgb, var(--theme-custom-surface, #ffffff) 82%, #ffffff);
  --loader-backdrop: color-mix(in srgb, var(--theme-custom-bg, #ffffff) 86%, transparent);
}

:root[data-theme-palette="contrast"] {
  --bg: #ffffff;
  --bg-accent: #f2f2f2;
  --card: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f8f8f8;
  --surface-3: #f0f0f0;
  --surface-4: #e8e8e8;
  --surface-accent: #fff5c2;
  --surface-accent-2: #ffe680;
  --line: #8a8a8a;
  --line-strong: #404040;
  --line-muted: #b8b8b8;
  --line-info: #111111;
  --text: #050505;
  --text-soft: #202020;
  --text-muted: #555555;
  --brand: #000000;
  --brand-strong: #000000;
  --brand-subtle: #fff5c2;
  --brand-contrast: #ffffff;
  --focus-ring: rgba(0, 0, 0, 0.32);
  --bg-grad-start: #ffffff;
  --bg-grad-mid: #ffffff;
  --bg-grad-end: #f2f2f2;
  --panel-grad-start: #ffffff;
  --panel-grad-end: #f7f7f7;
}

:root[data-theme="dark"][data-theme-palette="contrast"] {
  --bg: #000000;
  --bg-accent: #000000;
  --card: #050505;
  --surface-1: #050505;
  --surface-2: #0d0d0d;
  --surface-3: #151515;
  --surface-4: #1d1d1d;
  --surface-accent: #1f1a00;
  --surface-accent-2: #3d3200;
  --line: #8f8f8f;
  --line-strong: #d0d0d0;
  --line-muted: #555555;
  --line-info: #f6c744;
  --text: #ffffff;
  --text-soft: #f0f0f0;
  --text-muted: #c8c8c8;
  --brand: #f6c744;
  --brand-strong: #ffe582;
  --brand-subtle: #1f1a00;
  --brand-contrast: #111111;
  --focus-ring: rgba(246, 199, 68, 0.38);
  --bg-grad-start: #000000;
  --bg-grad-mid: #000000;
  --bg-grad-end: #050505;
}

:root[data-theme="dark"][data-theme-palette] {
  --bg: #000000;
  --bg-accent: #050505;
  --card: #080808;
  --surface-1: #0b0b0b;
  --surface-2: #111111;
  --surface-3: #161616;
  --surface-4: #1a1a1a;
  --surface-accent: #151515;
  --surface-accent-2: #202020;
  --surface-success: #0f2419;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;
  --line-muted: #202020;
  --line-info: color-mix(in srgb, var(--brand) 64%, #8a8a90);
  --brand-subtle: color-mix(in srgb, var(--brand) 16%, #101010);
  --focus-ring: color-mix(in srgb, var(--brand) 30%, transparent);
  --bg-grad-start: #000000;
  --bg-grad-mid: #030303;
  --bg-grad-end: #070707;
  --panel-grad-start: #101010;
  --panel-grad-end: #0a0a0a;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.56);
  --skeleton-base: #1f1f1f;
  --skeleton-sheen: #3a3a3a;
  --loader-backdrop: rgba(0, 0, 0, 0.86);
}

:root[data-theme="dark"][data-theme-palette="default"] {
  --brand: #d6d6d6;
  --brand-strong: #ffffff;
  --brand-contrast: #111111;
}

:root[data-theme="dark"][data-theme-palette="steel"] {
  --brand: #9ca7b3;
  --brand-strong: #c6d0da;
  --brand-contrast: #111111;
}

:root[data-theme="dark"][data-theme-palette="ocean"] {
  --brand: #4fb3e8;
  --brand-strong: #98d7f4;
  --brand-contrast: #071017;
}

:root[data-theme="dark"][data-theme-palette="spruce"] {
  --brand: #62c98f;
  --brand-strong: #a1e4bc;
  --brand-contrast: #07120b;
}

:root[data-theme="dark"][data-theme-palette="orange"] {
  --brand: #f28c28;
  --brand-strong: #ffbd72;
  --brand-contrast: #170d04;
}

:root[data-theme="dark"][data-theme-palette="ember"] {
  --brand: #ee846c;
  --brand-strong: #ffc2b5;
  --brand-contrast: #190906;
}

:root[data-theme="dark"][data-theme-palette="contrast"] {
  --brand: #f6c744;
  --brand-strong: #ffe582;
  --brand-contrast: #111111;
  --line: #8f8f8f;
  --line-strong: #d0d0d0;
  --line-muted: #555555;
  --text: #ffffff;
  --text-soft: #f0f0f0;
  --text-muted: #c8c8c8;
}

:root[data-theme="dark"][data-theme-palette="custom"] {
  --bg: var(--theme-custom-bg, #ffffff);
  --bg-accent: var(--theme-custom-bg-accent, #f5f5f5);
  --card: var(--theme-custom-surface, #ffffff);
  --surface-1: var(--theme-custom-surface, #ffffff);
  --surface-2: var(--theme-custom-surface-2, #f8f8f8);
  --surface-3: var(--theme-custom-surface-3, #f3f3f3);
  --surface-4: var(--theme-custom-surface-3, #eeeeee);
  --surface-accent: var(--theme-custom-accent-subtle, #f8ddbf);
  --surface-accent-2: color-mix(in srgb, var(--theme-custom-accent-subtle, #f8ddbf) 76%, var(--theme-custom-surface, #ffffff));
  --surface-success: color-mix(in srgb, #0f2419 48%, var(--theme-custom-surface, #ffffff));
  --line: var(--theme-custom-border, #d8d8d8);
  --line-strong: var(--theme-custom-border-strong, #b8b8b8);
  --line-muted: color-mix(in srgb, var(--theme-custom-border, #d8d8d8) 58%, var(--theme-custom-surface, #ffffff));
  --line-info: color-mix(in srgb, var(--theme-custom-accent, #f28c28) 68%, var(--theme-custom-border, #d8d8d8));
  --text: var(--theme-custom-text, #1d2735);
  --text-soft: var(--theme-custom-muted, #5b6d84);
  --text-muted: var(--theme-custom-text-muted, #a4b0c2);
  --brand: var(--theme-custom-accent, #f28c28);
  --brand-strong: var(--theme-custom-accent-strong, #ae641d);
  --brand-subtle: var(--theme-custom-accent-subtle, #f8ddbf);
  --brand-contrast: var(--theme-custom-accent-contrast, #ffffff);
  --focus-ring: color-mix(in srgb, var(--theme-custom-accent, #f28c28) 30%, transparent);
  --bg-grad-start: var(--theme-custom-bg, #ffffff);
  --bg-grad-mid: var(--theme-custom-bg-accent, #f5f5f5);
  --bg-grad-end: color-mix(in srgb, var(--theme-custom-bg, #ffffff) 78%, var(--theme-custom-surface, #ffffff));
  --panel-grad-start: var(--theme-custom-surface, #ffffff);
  --panel-grad-end: var(--theme-custom-surface-2, #f8f8f8);
  --skeleton-base: color-mix(in srgb, var(--theme-custom-border, #d8d8d8) 74%, var(--theme-custom-surface, #ffffff));
  --skeleton-sheen: color-mix(in srgb, var(--theme-custom-surface, #ffffff) 82%, #ffffff);
  --loader-backdrop: color-mix(in srgb, var(--theme-custom-bg, #ffffff) 86%, transparent);
}

:root[data-theme-preset="monochrome"] {
  --radius: 2px;
  --shadow: none;
  --theme-body-overlay: repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--line) 42%, transparent) 27px 28px);
  --theme-card-background: var(--surface-1);
  --theme-card-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-nav-background: transparent;
  --theme-nav-radius: 2px;
  --theme-nav-item-radius: 2px;
  --theme-primary-button-background: var(--text);
  --theme-card-border-width: 1px;
  --theme-control-radius: 2px;
  --theme-detail-radius: 2px;
  --theme-body-font: Arial, Helvetica, sans-serif;
  --theme-heading-font: Arial, Helvetica, sans-serif;
}

:root[data-theme-preset="bauhaus"] {
  --radius: 2px;
  --theme-bauhaus-card-radius: 2px;
  --shadow: 4px 4px 0 color-mix(in srgb, var(--text) 18%, transparent);
  --theme-body-overlay: linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, transparent) 0 18%, transparent 18% 100%);
  --theme-card-background: linear-gradient(135deg, var(--surface-1) 0 72%, color-mix(in srgb, var(--brand-subtle) 64%, var(--surface-1)) 72% 100%);
  --theme-control-background: color-mix(in srgb, var(--surface-1) 86%, var(--brand-subtle));
  --theme-nav-background: var(--surface-2);
  --theme-nav-radius: 2px;
  --theme-nav-item-radius: 2px;
  --theme-primary-button-background: linear-gradient(90deg, var(--brand-strong), var(--brand));
  --theme-card-border-width: 2px;
  --theme-control-radius: 2px;
  --theme-detail-radius: 2px;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.06em;
}

:root[data-theme-preset="bauhaus"] :is(
  [class~="card"],
  [class~="brand-history"],
  [class~="brand-teams"],
  [class~="theme-preconfigured-card"],
  [class~="theme-custom-picker"],
  [class~="theme-palette-menu"],
  [class~="nan-modal-dialog"],
  [class~="nan-visual-detail-cards"] > *,
  article[class*="-card"],
  section[class*="-card"],
  div[class*="-card"],
  button[class*="-card"],
  article[class*="-panel"],
  section[class*="-panel"],
  div[class*="-panel"],
  article[class*="-tile"],
  section[class*="-tile"],
  div[class*="-tile"],
  article[class*="-block"],
  section[class*="-block"],
  div[class*="-block"],
  article[class*="-summary"],
  section[class*="-summary"],
  div[class*="-summary"],
  article[class*="-detail"],
  section[class*="-detail"],
  div[class*="-detail"],
  article[class*="-frame"],
  section[class*="-frame"],
  div[class*="-frame"],
  [class*="-dialog"],
  [class*="-modal"],
  [class*="-popover"],
  [class*="-dropdown"],
  [class*="-menu"]
) {
  border-radius: var(--theme-bauhaus-card-radius) !important;
  background-clip: padding-box;
}

:root[data-theme-preset="bauhaus"] :is(
  article,
  section,
  div,
  aside,
  main,
  header,
  nav,
  button,
  a
):has(:is(
  [class~="card"],
  [class~="brand-history"],
  [class~="brand-teams"],
  article[class*="-card"],
  section[class*="-card"],
  div[class*="-card"],
  button[class*="-card"],
  article[class*="-panel"],
  section[class*="-panel"],
  div[class*="-panel"],
  article[class*="-tile"],
  section[class*="-tile"],
  div[class*="-tile"],
  article[class*="-block"],
  section[class*="-block"],
  div[class*="-block"],
  article[class*="-summary"],
  section[class*="-summary"],
  div[class*="-summary"],
  [class*="-detail"],
  [class*="-frame"],
  [class*="-dialog"],
  [class*="-modal"],
  [class*="-popover"],
  [class*="-dropdown"],
  [class*="-menu"]
)) {
  border-radius: 0 !important;
  background-clip: padding-box;
}

:root[data-theme-preset="bauhaus"] :is(
  [class~="card"],
  [class~="brand-history"],
  article[class*="-card"],
  section[class*="-card"],
  div[class*="-card"],
  button[class*="-card"],
  article[class*="-panel"],
  section[class*="-panel"],
  div[class*="-panel"],
  article[class*="-tile"],
  section[class*="-tile"],
  div[class*="-tile"],
  article[class*="-block"],
  section[class*="-block"],
  div[class*="-block"],
  article[class*="-summary"],
  section[class*="-summary"],
  div[class*="-summary"],
  article[class*="-detail"],
  section[class*="-detail"],
  div[class*="-detail"],
  article[class*="-frame"],
  section[class*="-frame"],
  div[class*="-frame"],
  [class*="-dialog"],
  [class*="-modal"],
  [class*="-popover"],
  [class*="-dropdown"],
  [class*="-menu"]
):has(:is(
  [class~="card"],
  article[class*="-card"],
  section[class*="-card"],
  div[class*="-card"],
  button[class*="-card"],
  article[class*="-panel"],
  section[class*="-panel"],
  div[class*="-panel"],
  article[class*="-tile"],
  section[class*="-tile"],
  div[class*="-tile"],
  article[class*="-block"],
  section[class*="-block"],
  div[class*="-block"],
  article[class*="-summary"],
  section[class*="-summary"],
  div[class*="-summary"],
  article[class*="-detail"],
  section[class*="-detail"],
  div[class*="-detail"],
  article[class*="-frame"],
  section[class*="-frame"],
  div[class*="-frame"],
  [class*="-dialog"],
  [class*="-modal"],
  [class*="-popover"],
  [class*="-dropdown"],
  [class*="-menu"],
  [class~="brand-teams"],
  [class~="nan-visual-detail-cards"] > *
)) {
  border-radius: 0 !important;
}

:root[data-theme-preset="modern-dark"] {
  --radius: 15px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent), 0 20px 48px color-mix(in srgb, var(--brand) 18%, transparent);
  --theme-body-overlay: radial-gradient(900px 420px at 100% -20%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 62%);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 92%, var(--brand-subtle)), var(--card));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 90%, var(--brand-subtle));
  --theme-menu-background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  --theme-nav-background: color-mix(in srgb, var(--surface-1) 78%, transparent);
  --theme-primary-button-background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand-strong) 72%, var(--text)));
  --theme-control-radius: 12px;
  --theme-detail-radius: 10px;
}

:root[data-theme-preset="newsprint"] {
  --radius: 0px;
  --shadow: none;
  --theme-body-overlay: repeating-linear-gradient(0deg, transparent 0 32px, color-mix(in srgb, var(--line) 46%, transparent) 32px 33px);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 94%, var(--bg)), var(--surface-1));
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-nav-background: transparent;
  --theme-nav-radius: 0px;
  --theme-nav-item-radius: 0px;
  --theme-primary-button-background: var(--text);
  --theme-card-border-width: 2px;
  --theme-control-radius: 0px;
  --theme-detail-radius: 0px;
  --theme-body-font: Georgia, 'Times New Roman', serif;
  --theme-heading-font: Georgia, 'Times New Roman', serif;
}

:root[data-theme-preset="saas"] {
  --radius: 14px;
  --shadow: 0 14px 36px color-mix(in srgb, var(--brand) 12%, transparent);
  --theme-body-overlay: linear-gradient(120deg, color-mix(in srgb, var(--brand-subtle) 34%, transparent), transparent 46%);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 68%, var(--surface-1)));
  --theme-control-background: var(--surface-1);
  --theme-menu-background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  --theme-button-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 14%, transparent);
  --theme-control-radius: 10px;
  --theme-detail-radius: 8px;
}

:root[data-theme-preset="luxury"] {
  --radius: 10px;
  --shadow: 0 16px 34px color-mix(in srgb, #000000 16%, transparent);
  --theme-body-overlay: linear-gradient(90deg, transparent 0 49.6%, color-mix(in srgb, var(--brand) 18%, transparent) 49.6% 50.4%, transparent 50.4% 100%);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 72%, var(--brand-subtle)));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 84%, var(--brand-subtle));
  --theme-menu-background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  --theme-primary-button-background: linear-gradient(145deg, var(--brand-strong), var(--brand));
  --theme-card-border-width: 1px;
  --theme-card-border-style: double;
  --theme-control-radius: 3px;
  --theme-detail-radius: 3px;
  --theme-body-font: Georgia, 'Times New Roman', serif;
  --theme-heading-font: Georgia, 'Times New Roman', serif;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.08em;
}

:root[data-theme-preset="terminal"] {
  --radius: 0px;
  --shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent);
  --theme-body-overlay: repeating-linear-gradient(0deg, color-mix(in srgb, var(--brand) 4%, transparent) 0 1px, transparent 1px 24px);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 86%, var(--brand-subtle)), var(--surface-1));
  --theme-control-background: color-mix(in srgb, var(--surface-2) 78%, var(--brand-subtle));
  --theme-menu-background: var(--surface-1);
  --theme-nav-background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  --theme-nav-radius: 0px;
  --theme-nav-item-radius: 0px;
  --theme-primary-button-background: var(--brand-strong);
  --theme-card-border-width: 1px;
  --theme-card-border-style: dashed;
  --theme-control-radius: 0px;
  --theme-detail-radius: 0px;
  --theme-body-font: Consolas, 'Courier New', monospace;
  --theme-heading-font: Consolas, 'Courier New', monospace;
}

:root[data-theme-preset="swiss-minimalist"] {
  --radius: 0px;
  --shadow: none;
  --theme-body-overlay: linear-gradient(90deg, color-mix(in srgb, var(--line) 32%, transparent) 1px, transparent 1px), linear-gradient(0deg, color-mix(in srgb, var(--line) 22%, transparent) 1px, transparent 1px);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-nav-background: transparent;
  --theme-nav-radius: 0px;
  --theme-nav-item-radius: 0px;
  --theme-primary-button-background: var(--brand);
  --theme-button-shadow: none;
  --theme-card-border-width: 2px;
  --theme-control-radius: 0px;
  --theme-detail-radius: 0px;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.04em;
}

:root[data-theme-preset="kinetic"] {
  --radius: 7px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 26%, transparent), 0 12px 26px color-mix(in srgb, var(--text) 12%, transparent);
  --theme-body-overlay: linear-gradient(120deg, transparent 0 64%, color-mix(in srgb, var(--brand) 8%, transparent) 64% 100%);
  --theme-card-background: linear-gradient(135deg, var(--surface-1) 0 78%, color-mix(in srgb, var(--brand-subtle) 72%, var(--surface-1)) 78% 100%);
  --theme-control-background: var(--surface-2);
  --theme-nav-background: var(--surface-1);
  --theme-nav-radius: 6px;
  --theme-nav-item-radius: 4px;
  --theme-card-border-width: 2px;
  --theme-control-radius: 5px;
  --theme-detail-radius: 4px;
  --theme-heading-font: "Arial Narrow", "Aptos Display", "Segoe UI", sans-serif;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.06em;
}

:root[data-theme-preset="flat-design"] {
  --radius: 4px;
  --shadow: none;
  --theme-body-overlay: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 80%, transparent), transparent 42%);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-nav-background: var(--surface-2);
  --theme-nav-radius: 4px;
  --theme-nav-item-radius: 2px;
  --theme-primary-button-background: var(--brand);
  --theme-control-radius: 4px;
  --theme-detail-radius: 4px;
}

:root[data-theme-preset="art-deco"] {
  --radius: 4px;
  --shadow: 0 14px 30px color-mix(in srgb, #000000 15%, transparent);
  --theme-body-overlay: linear-gradient(90deg, transparent 0 48%, color-mix(in srgb, var(--brand) 10%, transparent) 48% 52%, transparent 52% 100%);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--brand-subtle) 34%, var(--surface-2)));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 82%, var(--brand-subtle));
  --theme-nav-radius: 2px;
  --theme-nav-item-radius: 1px;
  --theme-primary-button-background: linear-gradient(145deg, var(--brand-strong), var(--brand));
  --theme-card-border-width: 2px;
  --theme-card-border-style: double;
  --theme-control-radius: 2px;
  --theme-detail-radius: 2px;
  --theme-body-font: Georgia, 'Times New Roman', serif;
  --theme-heading-font: Georgia, 'Times New Roman', serif;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.08em;
}

:root[data-theme-preset="material-design"] {
  --radius: 24px;
  --shadow: 0 16px 34px color-mix(in srgb, var(--brand) 14%, transparent);
  --theme-card-background: color-mix(in srgb, var(--surface-1) 86%, var(--brand-subtle));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 88%, var(--brand-subtle));
  --theme-menu-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 82%, var(--brand-subtle)));
  --theme-nav-background: color-mix(in srgb, var(--surface-2) 84%, var(--brand-subtle));
  --theme-button-shadow: 0 3px 8px color-mix(in srgb, var(--brand) 18%, transparent);
  --theme-control-radius: 18px;
  --theme-detail-radius: 16px;
}

:root[data-theme-preset="neo-brutalism"] {
  --radius: 4px;
  --shadow: 4px 4px 0 color-mix(in srgb, var(--text) 20%, transparent);
  --theme-body-overlay: linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, transparent) 0 24%, transparent 24% 100%);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-1);
  --theme-nav-background: var(--surface-2);
  --theme-nav-radius: 4px;
  --theme-nav-item-radius: 2px;
  --theme-button-shadow: 2px 2px 0 color-mix(in srgb, var(--text) 18%, transparent);
  --theme-card-border-width: 3px;
  --theme-control-radius: 3px;
  --theme-detail-radius: 2px;
}

:root[data-theme-preset="bold-typography"] {
  --radius: 6px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--text) 22%, transparent), 0 12px 26px color-mix(in srgb, var(--text) 10%, transparent);
  --theme-body-overlay: linear-gradient(180deg, transparent 0 62%, color-mix(in srgb, var(--brand) 7%, transparent) 62% 100%);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 76%, var(--brand-subtle)));
  --theme-nav-background: transparent;
  --theme-nav-radius: 5px;
  --theme-nav-item-radius: 3px;
  --theme-card-border-width: 2px;
  --theme-control-radius: 5px;
  --theme-detail-radius: 5px;
  --theme-heading-font: "Arial Narrow", "Aptos Display", "Segoe UI", sans-serif;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.04em;
}

:root[data-theme-preset="academia"] {
  --radius: 8px;
  --shadow: 0 10px 24px color-mix(in srgb, #3b2a1d 18%, transparent);
  --theme-body-overlay: repeating-linear-gradient(0deg, transparent 0 29px, color-mix(in srgb, var(--line) 26%, transparent) 29px 30px);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 82%, var(--bg)));
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-nav-radius: 8px;
  --theme-nav-item-radius: 5px;
  --theme-card-border-width: 1px;
  --theme-control-radius: 5px;
  --theme-detail-radius: 5px;
  --theme-body-font: Georgia, 'Times New Roman', serif;
  --theme-heading-font: Georgia, 'Times New Roman', serif;
}

:root[data-theme-preset="cyberpunk"] {
  --radius: 6px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 26%, transparent), 0 12px 30px color-mix(in srgb, var(--brand) 14%, transparent);
  --theme-body-overlay: linear-gradient(90deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 44%);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 90%, var(--brand-subtle)), var(--surface-1));
  --theme-control-background: color-mix(in srgb, var(--surface-2) 78%, var(--brand-subtle));
  --theme-nav-background: color-mix(in srgb, var(--surface-1) 76%, transparent);
  --theme-nav-radius: 6px;
  --theme-nav-item-radius: 4px;
  --theme-card-border-width: 2px;
  --theme-control-radius: 4px;
  --theme-detail-radius: 4px;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.05em;
}

:root[data-theme-preset="web3"] {
  --radius: 22px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent), 0 16px 34px color-mix(in srgb, var(--brand) 12%, transparent);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 90%, var(--brand-subtle)), var(--surface-1));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 82%, var(--brand-subtle));
  --theme-nav-background: color-mix(in srgb, var(--surface-2) 76%, var(--brand-subtle));
  --theme-button-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent);
  --theme-control-radius: 999px;
  --theme-detail-radius: 18px;
}

:root[data-theme-preset="playful-geometric"] {
  --radius: 18px;
  --shadow: 0 12px 28px color-mix(in srgb, var(--brand) 12%, transparent);
  --theme-body-overlay: linear-gradient(135deg, transparent 0 58%, color-mix(in srgb, var(--brand) 7%, transparent) 58% 100%);
  --theme-card-background: linear-gradient(135deg, var(--surface-1), color-mix(in srgb, var(--brand-subtle) 38%, var(--surface-1)));
  --theme-control-background: var(--surface-2);
  --theme-nav-background: color-mix(in srgb, var(--surface-2) 82%, var(--brand-subtle));
  --theme-card-border-width: 2px;
  --theme-control-radius: 16px;
  --theme-detail-radius: 14px;
}

:root[data-theme-preset="minimal-dark"] {
  --radius: 8px;
  --shadow: 0 8px 20px color-mix(in srgb, #000000 18%, transparent);
  --theme-body-overlay: linear-gradient(180deg, transparent 0 78%, color-mix(in srgb, var(--brand) 6%, transparent) 78% 100%);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-nav-background: transparent;
  --theme-nav-radius: 6px;
  --theme-nav-item-radius: 4px;
  --theme-control-radius: 6px;
  --theme-detail-radius: 6px;
}

:root[data-theme-preset="claymorphism"] {
  --radius: 26px;
  --shadow: 0 12px 0 color-mix(in srgb, var(--brand) 7%, transparent), 0 20px 38px color-mix(in srgb, var(--text) 8%, transparent);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 74%, var(--brand-subtle)));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 84%, var(--brand-subtle));
  --theme-menu-background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  --theme-nav-background: color-mix(in srgb, var(--surface-1) 88%, var(--brand-subtle));
  --theme-card-border-width: 0px;
  --theme-control-radius: 20px;
  --theme-detail-radius: 18px;
}

:root[data-theme-preset="professional"] {
  --radius: 8px;
  --shadow: 0 10px 24px color-mix(in srgb, var(--text) 10%, transparent);
  --theme-body-overlay: linear-gradient(180deg, color-mix(in srgb, var(--brand-subtle) 24%, transparent), transparent 38%);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 70%, var(--surface-1)));
  --theme-control-background: var(--surface-1);
  --theme-menu-background: var(--surface-1);
  --theme-nav-background: var(--surface-2);
  --theme-nav-radius: 8px;
  --theme-nav-item-radius: 5px;
  --theme-control-radius: 6px;
  --theme-detail-radius: 6px;
}

:root[data-theme-preset="botanical"] {
  --radius: 18px;
  --shadow: 0 14px 32px color-mix(in srgb, var(--brand) 14%, transparent);
  --theme-body-overlay: linear-gradient(140deg, color-mix(in srgb, var(--brand-subtle) 42%, transparent), transparent 52%);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 90%, var(--brand-subtle)), var(--surface-1));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 88%, var(--brand-subtle));
  --theme-nav-background: color-mix(in srgb, var(--surface-2) 82%, var(--brand-subtle));
  --theme-control-radius: 14px;
  --theme-detail-radius: 12px;
  --theme-heading-font: Georgia, 'Times New Roman', serif;
}

:root[data-theme-preset="vaporwave"] {
  --radius: 16px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent), 0 14px 30px color-mix(in srgb, var(--brand) 12%, transparent);
  --theme-body-overlay: linear-gradient(135deg, color-mix(in srgb, var(--brand-subtle) 36%, transparent), transparent 54%);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 88%, var(--brand-subtle)), var(--surface-1));
  --theme-control-background: color-mix(in srgb, var(--surface-2) 78%, var(--brand-subtle));
  --theme-menu-background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  --theme-card-border-width: 2px;
  --theme-control-radius: 12px;
  --theme-detail-radius: 10px;
}

:root[data-theme-preset="enterprise"] {
  --radius: 4px;
  --shadow: none;
  --theme-body-overlay: repeating-linear-gradient(0deg, transparent 0 35px, color-mix(in srgb, var(--line) 30%, transparent) 35px 36px);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-input-background: var(--surface-2);
  --theme-nav-background: transparent;
  --theme-nav-radius: 4px;
  --theme-nav-item-radius: 2px;
  --theme-button-shadow: none;
  --theme-card-border-width: 1px;
  --theme-control-radius: 3px;
  --theme-detail-radius: 3px;
}

:root[data-theme-preset="sketch"] {
  --radius: 10px;
  --shadow: 2px 3px 0 color-mix(in srgb, var(--text) 12%, transparent);
  --theme-body-overlay: repeating-linear-gradient(0deg, transparent 0 26px, color-mix(in srgb, var(--line) 32%, transparent) 26px 27px);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-nav-background: var(--surface-1);
  --theme-nav-radius: 10px;
  --theme-nav-item-radius: 7px;
  --theme-card-border-width: 2px;
  --theme-card-border-style: dashed;
  --theme-control-radius: 11px;
  --theme-detail-radius: 10px;
  --theme-body-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --theme-heading-font: "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif;
}

:root[data-theme-preset="industrial"] {
  --radius: 8px;
  --shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 34%, transparent), 0 10px 20px color-mix(in srgb, var(--text) 18%, transparent);
  --theme-body-overlay: repeating-linear-gradient(90deg, color-mix(in srgb, var(--line) 18%, transparent) 0 1px, transparent 1px 34px);
  --theme-card-background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 88%, #ffffff), var(--surface-1));
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-nav-background: var(--surface-2);
  --theme-nav-radius: 6px;
  --theme-nav-item-radius: 4px;
  --theme-control-radius: 6px;
  --theme-detail-radius: 6px;
}

:root[data-theme-preset="neumorphism"] {
  --radius: 22px;
  --shadow: 7px 7px 16px color-mix(in srgb, var(--text) 11%, transparent), -5px -5px 14px color-mix(in srgb, #ffffff 34%, transparent);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-button-shadow: inset 1px 1px 2px color-mix(in srgb, #ffffff 28%, transparent), inset -1px -1px 2px color-mix(in srgb, var(--text) 8%, transparent);
  --theme-card-border-width: 0px;
  --theme-control-radius: 18px;
  --theme-detail-radius: 16px;
}

:root[data-theme-preset="organic"] {
  --radius: 22px;
  --shadow: 0 16px 30px color-mix(in srgb, var(--text) 12%, transparent);
  --theme-body-overlay: linear-gradient(145deg, color-mix(in srgb, var(--brand-subtle) 42%, transparent), transparent 48%);
  --theme-card-background: linear-gradient(180deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 82%, var(--brand-subtle)));
  --theme-control-background: color-mix(in srgb, var(--surface-1) 86%, var(--brand-subtle));
  --theme-nav-background: color-mix(in srgb, var(--surface-2) 78%, var(--brand-subtle));
  --theme-control-radius: 18px;
  --theme-detail-radius: 16px;
  --theme-heading-font: Georgia, 'Times New Roman', serif;
}

:root[data-theme-preset="maximalism"] {
  --radius: 14px;
  --shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent), 0 14px 30px color-mix(in srgb, var(--brand) 14%, transparent);
  --theme-body-overlay: linear-gradient(90deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 42%), linear-gradient(180deg, transparent 0 72%, color-mix(in srgb, var(--line-info) 12%, transparent) 72% 100%);
  --theme-card-background: linear-gradient(135deg, var(--surface-1), color-mix(in srgb, var(--brand-subtle) 40%, var(--surface-1)));
  --theme-control-background: var(--surface-2);
  --theme-nav-background: var(--surface-1);
  --theme-nav-radius: 12px;
  --theme-nav-item-radius: 8px;
  --theme-card-border-width: 2px;
  --theme-control-radius: 12px;
  --theme-detail-radius: 10px;
  --theme-ui-transform: uppercase;
  --theme-ui-letter-spacing: 0.06em;
}

:root[data-theme-preset="retro"] {
  --radius: 0px;
  --shadow: 3px 3px 0 color-mix(in srgb, var(--text) 24%, transparent);
  --theme-body-overlay: repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--line) 30%, transparent) 31px 32px);
  --theme-card-background: var(--surface-1);
  --theme-control-background: var(--surface-2);
  --theme-nav-background: transparent;
  --theme-nav-radius: 0px;
  --theme-nav-item-radius: 0px;
  --theme-card-border-width: 2px;
  --theme-control-radius: 0px;
  --theme-detail-radius: 0px;
  --theme-body-font: Tahoma, Verdana, sans-serif;
  --theme-heading-font: Tahoma, Verdana, sans-serif;
}

:root[data-theme-preview="drag"] {
  --bg: color-mix(in srgb, var(--theme-preview-light-bg, #ffffff) var(--theme-preview-inverse-percent), var(--theme-preview-dark-bg, #000000) var(--theme-preview-percent));
  --bg-accent: color-mix(in srgb, var(--theme-preview-light-bg-accent, #f5f5f5) var(--theme-preview-inverse-percent), var(--theme-preview-dark-bg-accent, #050505) var(--theme-preview-percent));
  --card: color-mix(in srgb, var(--theme-preview-light-card, #ffffff) var(--theme-preview-inverse-percent), var(--theme-preview-dark-card, #080808) var(--theme-preview-percent));
  --surface-1: color-mix(in srgb, var(--theme-preview-light-surface-1, #ffffff) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-1, #0b0b0b) var(--theme-preview-percent));
  --surface-2: color-mix(in srgb, var(--theme-preview-light-surface-2, #f8f8f8) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-2, #111111) var(--theme-preview-percent));
  --surface-3: color-mix(in srgb, var(--theme-preview-light-surface-3, #f3f3f3) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-3, #161616) var(--theme-preview-percent));
  --surface-4: color-mix(in srgb, var(--theme-preview-light-surface-4, #eeeeee) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-4, #1a1a1a) var(--theme-preview-percent));
  --surface-accent: color-mix(in srgb, var(--theme-preview-light-surface-accent, #f4f4f4) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-accent, #151515) var(--theme-preview-percent));
  --surface-accent-2: color-mix(in srgb, var(--theme-preview-light-surface-accent-2, #eaeaea) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-accent-2, #202020) var(--theme-preview-percent));
  --surface-success: color-mix(in srgb, var(--theme-preview-light-surface-success, #f4f4f4) var(--theme-preview-inverse-percent), var(--theme-preview-dark-surface-success, #0f2419) var(--theme-preview-percent));
  --line: color-mix(in srgb, var(--theme-preview-light-line, #d8d8d8) var(--theme-preview-inverse-percent), var(--theme-preview-dark-line, #2a2a2a) var(--theme-preview-percent));
  --line-strong: color-mix(in srgb, var(--theme-preview-light-line-strong, #b8b8b8) var(--theme-preview-inverse-percent), var(--theme-preview-dark-line-strong, #3a3a3a) var(--theme-preview-percent));
  --line-muted: color-mix(in srgb, var(--theme-preview-light-line-muted, #e8e8e8) var(--theme-preview-inverse-percent), var(--theme-preview-dark-line-muted, #202020) var(--theme-preview-percent));
  --line-info: color-mix(in srgb, var(--theme-preview-light-line-info, #9a9a9a) var(--theme-preview-inverse-percent), var(--theme-preview-dark-line-info, #4b5563) var(--theme-preview-percent));
  --line-success: color-mix(in srgb, var(--theme-preview-light-line-success, #8f8f8f) var(--theme-preview-inverse-percent), var(--theme-preview-dark-line-success, #4a8f69) var(--theme-preview-percent));
  --text: color-mix(in srgb, var(--theme-preview-light-text, #111111) var(--theme-preview-inverse-percent), var(--theme-preview-dark-text, #f4f4f5) var(--theme-preview-percent));
  --text-soft: color-mix(in srgb, var(--theme-preview-light-text-soft, #464646) var(--theme-preview-inverse-percent), var(--theme-preview-dark-text-soft, #c4c4c8) var(--theme-preview-percent));
  --text-muted: color-mix(in srgb, var(--theme-preview-light-text-muted, #7a7a7a) var(--theme-preview-inverse-percent), var(--theme-preview-dark-text-muted, #8a8a90) var(--theme-preview-percent));
  --brand: color-mix(in srgb, var(--theme-preview-light-brand, #111111) var(--theme-preview-inverse-percent), var(--theme-preview-dark-brand, #3a3a3a) var(--theme-preview-percent));
  --brand-strong: color-mix(in srgb, var(--theme-preview-light-brand-strong, #000000) var(--theme-preview-inverse-percent), var(--theme-preview-dark-brand-strong, #4a4a4a) var(--theme-preview-percent));
  --brand-subtle: color-mix(in srgb, var(--theme-preview-light-brand-subtle, #f2f2f2) var(--theme-preview-inverse-percent), var(--theme-preview-dark-brand-subtle, #151515) var(--theme-preview-percent));
  --brand-contrast: color-mix(in srgb, var(--theme-preview-light-brand-contrast, #ffffff) var(--theme-preview-inverse-percent), var(--theme-preview-dark-brand-contrast, #ffffff) var(--theme-preview-percent));
  --focus-ring: color-mix(in srgb, var(--theme-preview-light-focus-ring, rgba(0, 0, 0, 0.22)) var(--theme-preview-inverse-percent), var(--theme-preview-dark-focus-ring, rgba(255, 255, 255, 0.24)) var(--theme-preview-percent));
  --bg-grad-start: color-mix(in srgb, var(--theme-preview-light-bg-grad-start, #ffffff) var(--theme-preview-inverse-percent), var(--theme-preview-dark-bg-grad-start, #000000) var(--theme-preview-percent));
  --bg-grad-mid: color-mix(in srgb, var(--theme-preview-light-bg-grad-mid, #f7f7f7) var(--theme-preview-inverse-percent), var(--theme-preview-dark-bg-grad-mid, #030303) var(--theme-preview-percent));
  --bg-grad-end: color-mix(in srgb, var(--theme-preview-light-bg-grad-end, #efefef) var(--theme-preview-inverse-percent), var(--theme-preview-dark-bg-grad-end, #070707) var(--theme-preview-percent));
  --panel-grad-start: color-mix(in srgb, var(--theme-preview-light-panel-grad-start, #ffffff) var(--theme-preview-inverse-percent), var(--theme-preview-dark-panel-grad-start, #101010) var(--theme-preview-percent));
  --panel-grad-end: color-mix(in srgb, var(--theme-preview-light-panel-grad-end, #f4f4f4) var(--theme-preview-inverse-percent), var(--theme-preview-dark-panel-grad-end, #0a0a0a) var(--theme-preview-percent));
  --danger: color-mix(in srgb, var(--theme-preview-light-danger, #b72222) var(--theme-preview-inverse-percent), var(--theme-preview-dark-danger, #ff8f8f) var(--theme-preview-percent));
  --ok: color-mix(in srgb, var(--theme-preview-light-ok, #186c46) var(--theme-preview-inverse-percent), var(--theme-preview-dark-ok, #6bdba4) var(--theme-preview-percent));
  --shadow: 0 13px 34px color-mix(in srgb, rgba(0, 0, 0, 0.08) var(--theme-preview-inverse-percent), rgba(0, 0, 0, 0.56) var(--theme-preview-percent));
  --skeleton-base: color-mix(in srgb, var(--theme-preview-light-skeleton-base, #e1e1e1) var(--theme-preview-inverse-percent), var(--theme-preview-dark-skeleton-base, #1f1f1f) var(--theme-preview-percent));
  --skeleton-sheen: color-mix(in srgb, var(--theme-preview-light-skeleton-sheen, #f7f7f7) var(--theme-preview-inverse-percent), var(--theme-preview-dark-skeleton-sheen, #3a3a3a) var(--theme-preview-percent));
  --loader-backdrop: color-mix(in srgb, var(--theme-preview-light-loader-backdrop, rgba(255, 255, 255, 0.86)) var(--theme-preview-inverse-percent), var(--theme-preview-dark-loader-backdrop, rgba(0, 0, 0, 0.86)) var(--theme-preview-percent));
}

:root[data-theme-preset] {
  --theme-body-overlay: linear-gradient(transparent, transparent);
  --theme-body-font: var(--theme-standard-font);
  --theme-heading-font: var(--theme-standard-font);
}

:root[data-theme="dark"],
:root[data-theme="dark"][data-theme-palette],
:root[data-theme="dark"][data-theme-preset] {
  --bg: #0c1118;
  --bg-accent: #101722;
  --card: #121a25;
  --surface-1: #121a25;
  --surface-2: #172130;
  --surface-3: #1e2a3a;
  --surface-4: #263345;
  --surface-accent: #172842;
  --surface-accent-2: #1f3452;
  --surface-success: #12251c;
  --line: #2d3a4d;
  --line-strong: #43536a;
  --line-muted: #243145;
  --line-info: #55769f;
  --line-success: #4e9a75;
  --text: #f3f7fb;
  --text-soft: #bfccdc;
  --text-muted: #8797aa;
  --brand: #6ea8e6;
  --brand-strong: #9dc6f3;
  --brand-subtle: #15263e;
  --brand-contrast: #08111e;
  --focus-ring: rgba(110, 168, 230, 0.32);
  --bg-grad-start: #0c1118;
  --bg-grad-mid: #0f1722;
  --bg-grad-end: #111a27;
  --panel-grad-start: #151d2a;
  --panel-grad-end: #111923;
  --danger: #ff9b9b;
  --ok: #79d6a2;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  --theme-body-overlay: linear-gradient(transparent, transparent);
  --theme-card-background: var(--surface-1);
  --theme-panel-background: linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end));
  --theme-control-background: var(--surface-2);
  --theme-menu-background: var(--surface-1);
  --theme-input-background: var(--surface-2);
  --theme-primary-button-background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  --skeleton-base: #223148;
  --skeleton-sheen: #31435d;
  --loader-backdrop: rgba(12, 17, 24, 0.88);
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  min-width: 40px;
  min-height: 40px;
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--scrollbar-thumb) 92%, var(--surface-1)),
      var(--scrollbar-thumb)
    );
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--theme-standard-font);
  color: var(--text);
  background:
    var(--theme-body-overlay, linear-gradient(transparent, transparent)),
    linear-gradient(180deg, var(--bg-grad-start) 0%, var(--bg-grad-mid) 48%, var(--bg-grad-end) 100%),
    var(--bg);
  background-size: auto, auto, auto;
}

body,
body * {
  font-family: var(--theme-standard-font) !important;
}

body[data-page="auth"] {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 20px 0;
}

.area-loader {
  width: 100%;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.area-loader.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 18px;
  background: color-mix(in srgb, var(--bg) 68%, #000 32%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease;
}

.confirm-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(460px, 94vw);
  border: var(--theme-card-border-width, 1px) solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--theme-panel-background, linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end)));
  box-shadow: var(--theme-card-shadow, var(--shadow));
  padding: 18px;
  display: grid;
  gap: 12px;
}

.confirm-dialog h3 {
  margin: 0;
  font-size: 1.05rem;
}

.confirm-dialog-message {
  margin: 0;
  color: var(--text-muted);
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-dialog-actions [data-confirm-accept] {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line-strong));
  background: color-mix(in srgb, var(--brand-subtle) 76%, var(--surface-1));
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface-1) 76%, transparent);
}

.confirm-dialog-actions [data-confirm-accept]:hover,
.confirm-dialog-actions [data-confirm-accept]:focus-visible {
  border-color: color-mix(in srgb, var(--brand) 54%, var(--line-strong));
  background: color-mix(in srgb, var(--brand-subtle) 88%, var(--surface-1));
  color: var(--text);
}

.area-loader-card {
  border: var(--theme-card-border-width, 1px) solid var(--line);
  border-radius: var(--radius);
  background: var(--theme-panel-background, linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end)));
  box-shadow: var(--theme-card-shadow, var(--shadow));
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(150px, 220px) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
}

.area-loader-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 30%, var(--line));
  display: grid;
  place-items: center;
  position: relative;
}

.area-loader-spinner span {
  position: absolute;
  left: calc(50% - 2.5px);
  top: calc(50% - 2.5px);
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--brand-strong);
  animation: area-loader-dot 900ms ease-in-out infinite;
}

.area-loader-spinner span:nth-child(1) {
  margin-left: -8px;
}

.area-loader-spinner span:nth-child(2) {
  animation-delay: 120ms;
}

.area-loader-spinner span:nth-child(3) {
  animation-delay: 240ms;
  margin-left: 8px;
}

.area-loader-label {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.area-loader-lines {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.runtime-area-loader {
  margin: 0 0 14px;
}

.skeleton-block {
  height: 16px;
  border-radius: 10px;
  background: var(--skeleton-base);
  overflow: hidden;
  position: relative;
}

.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-sheen), transparent);
  animation: skeleton-shimmer 1300ms ease-in-out infinite;
}

.skeleton-lg {
  height: 28px;
  border-radius: 12px;
  width: min(460px, 94%);
}

.skeleton-md {
  width: min(320px, 72%);
}

.skeleton-sm {
  width: min(220px, 52%);
}

.skeleton-xs {
  width: min(180px, 44%);
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes area-loader-dot {
  0%,
  100% {
    opacity: 0.38;
    transform: translateY(5px) scale(0.78);
  }

  50% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, 94vw);
  margin: 0 auto;
}

body[data-module-page="putaway-audit"] .shell {
  width: min(1900px, 99vw);
}

body[data-module-page="vis-dry-store-set"] .shell,
body[data-module-page="vis-dry"] .shell,
body[data-module-page="vis-cooler"] .shell,
body[data-module-page="vis-freezer"] .shell,
body[data-module-page="variable-item-parser"] .shell,
body[data-module-page="vpc-monthly-report"] .shell,
body[data-module-page="file-hosting"] .shell,
body[data-module-page="monthly-item-launch"] .shell,
body[data-module-page="variable-item-sap-variable"] .shell,
body[data-module-page="variable-item-store-sets"] .shell,
body[data-module-page="variable-item-due-date"] .shell,
body[data-module-page="variable-item-temp-translation"] .shell {
  width: min(1700px, 98vw);
}

.topbar {
  padding: 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas:
    "brand actions"
    "nav nav";
  align-items: start;
  column-gap: 12px;
  row-gap: 10px;
}

.topbar > .brand {
  grid-area: brand;
  justify-self: start;
  align-self: start;
}

.topbar > .topnav {
  grid-area: nav;
  justify-self: start;
  max-width: 100%;
}

.topbar > .topbar-actions {
  grid-area: actions;
}

.brand {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: max-content;
  max-width: min(60ch, 56vw);
}

.brand-copy,
.brand-home-copy {
  display: inline-grid;
  gap: 2px;
  align-items: start;
  min-width: 0;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  min-height: 45px;
  text-decoration: none;
  transform-origin: left center;
  transition: filter 160ms ease;
}

.brand-home:hover {
  filter: contrast(1.03);
}

.brand-home:active {
  filter: contrast(1.08);
}

.vellwick-logo-mark {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 44px;
  height: 37px;
  overflow: visible;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateZ(0);
  transform-origin: center;
  transition:
    filter 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vellwick-logo-mark::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 40%, color-mix(in srgb, #ffffff 36%, transparent) 49%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-120%) skewX(-10deg);
  mix-blend-mode: screen;
}

.vellwick-logo-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1.02);
  transform-origin: center;
  filter: drop-shadow(0 4px 7px color-mix(in srgb, #000000 13%, transparent));
  transition:
    clip-path 420ms cubic-bezier(0.2, 0.9, 0.22, 1),
    filter 220ms ease,
    opacity 360ms ease,
    transform 260ms ease;
}

.vellwick-logo-image.is-light {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.vellwick-logo-image.is-dark {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

:root[data-theme="dark"] .vellwick-logo-image.is-light {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

:root[data-theme="dark"] .vellwick-logo-image.is-dark {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.brand-home:hover .vellwick-logo-mark,
.brand-home:focus-visible .vellwick-logo-mark {
  filter: contrast(1.06);
  transform: translateY(-0.5px) scale(1.018);
}

.brand-home:hover .vellwick-logo-mark::before,
.brand-home:focus-visible .vellwick-logo-mark::before {
  animation: vellwickLogoSweepHover 780ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

.brand-home:hover .vellwick-logo-image,
.brand-home:focus-visible .vellwick-logo-image {
  filter: contrast(1.12) drop-shadow(0 6px 10px color-mix(in srgb, #000000 16%, transparent));
  transform: translate(-50%, -50%) scale(1.06);
}

:root:not([data-theme="dark"]) .brand-home:hover .vellwick-logo-image.is-light,
:root:not([data-theme="dark"]) .brand-home:focus-visible .vellwick-logo-image.is-light {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

:root:not([data-theme="dark"]) .brand-home:hover .vellwick-logo-image.is-dark,
:root:not([data-theme="dark"]) .brand-home:focus-visible .vellwick-logo-image.is-dark {
  opacity: 0.07;
  clip-path: inset(0 0 0 0);
}

:root[data-theme="dark"] .brand-home:hover .vellwick-logo-image.is-light,
:root[data-theme="dark"] .brand-home:focus-visible .vellwick-logo-image.is-light {
  opacity: 0.07;
  clip-path: inset(0 0 0 0);
}

:root[data-theme="dark"] .brand-home:hover .vellwick-logo-image.is-dark,
:root[data-theme="dark"] .brand-home:focus-visible .vellwick-logo-image.is-dark {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

@keyframes vellwickLogoIdle {
  0%,
  68%,
  100% {
    transform: translateZ(0) rotate(0deg) scale(1);
  }
  73% {
    transform: translateY(-1px) rotate(-2.5deg) scale(1.045);
  }
  79% {
    transform: translateY(0) rotate(2deg) scale(1.02);
  }
  84% {
    transform: translateZ(0) rotate(0deg) scale(1);
  }
}

@keyframes vellwickLogoHover {
  0% {
    transform: translateZ(0) scale(1);
  }
  48% {
    transform: translateY(-0.5px) scale(1.014);
  }
  100% {
    transform: translateY(-0.5px) scale(1.012);
  }
}

@keyframes vellwickLogoSweep {
  0%,
  70%,
  100% {
    opacity: 0;
    transform: translateX(-82%) rotate(8deg);
  }
  78% {
    opacity: 0.55;
  }
  86% {
    opacity: 0;
    transform: translateX(82%) rotate(8deg);
  }
}

@keyframes vellwickLogoSweepHover {
  0% {
    opacity: 0;
    transform: translateX(-120%) skewX(-10deg);
  }
  48% {
    opacity: 0.32;
  }
  100% {
    opacity: 0;
    transform: translateX(120%) skewX(-10deg);
  }
}

@keyframes vellwickLogoLightCycle {
  0%,
  70%,
  100% {
    opacity: 1;
  }
  77%,
  84% {
    opacity: 0;
  }
}

@keyframes vellwickLogoDarkCycle {
  0%,
  70%,
  100% {
    opacity: 0;
  }
  77%,
  84% {
    opacity: 1;
  }
}

.brand-home:hover .brand-text {
  color: var(--brand-strong);
  transform: translateX(1px);
}

.brand-text {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  transition: color 160ms ease, transform 160ms cubic-bezier(0.2, 0.9, 0.22, 1);
}

@media (prefers-reduced-motion: reduce) {
  .vellwick-logo-mark,
  .vellwick-logo-mark::before,
  .vellwick-logo-image {
    animation: none;
  }

  .brand-home:hover .vellwick-logo-mark,
  .brand-home:focus-visible .vellwick-logo-mark {
    transform: none;
  }
}

.brand-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  max-width: 100%;
}

.brand-history {
  display: grid;
  gap: 4px;
  flex: 0 1 clamp(224px, 28vw, 316px);
  width: clamp(224px, 28vw, 316px);
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  box-shadow: 0 8px 18px rgba(10, 26, 54, 0.05);
  text-decoration: none;
  transition: transform 140ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.brand-history:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-accent);
  box-shadow: 0 12px 24px rgba(10, 26, 54, 0.08);
}

.brand-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-history-label {
  color: var(--text-soft);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-version {
  display: block;
  color: var(--brand-strong);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-changes {
  display: grid;
  gap: 2px;
}

.brand-change-item {
  display: block;
  color: var(--text-muted);
  font-size: 0.44rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: none;
  opacity: 0.9;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-home:focus-visible,
.brand-history:focus-visible,
.brand-visualizing:focus-visible,
.brand-teams:focus-visible,
.brand-logic:focus-visible,
.brand-reports:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.brand-teams {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--brand-subtle) 72%, var(--surface-1)),
    color-mix(in srgb, var(--brand-subtle) 42%, var(--surface-2))
  );
  box-shadow: 0 8px 18px rgba(10, 26, 54, 0.05);
  color: var(--brand-strong);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: transform 140ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.brand-teams:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--brand-subtle) 88%, var(--surface-1));
  box-shadow: 0 12px 24px rgba(10, 26, 54, 0.08);
}

.brand-refresh {
  cursor: default;
}

.brand-refresh:hover {
  transform: none;
}

.brand-teams-value {
  color: var(--brand-strong);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: pre-line;
}

:root[data-theme-palette="custom"] .brand-teams {
  border-color: var(--line);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  color: var(--text);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--line) 28%, transparent);
}

:root[data-theme-palette="custom"] .brand-teams:hover {
  border-color: var(--line-strong);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-1) 86%, var(--surface-2)),
    color-mix(in srgb, var(--surface-2) 78%, var(--surface-3))
  );
  box-shadow: 0 12px 24px color-mix(in srgb, var(--line-strong) 24%, transparent);
}

:root[data-theme-palette="custom"] .brand-teams-value {
  color: var(--text);
}

.brand-visualizing {
  min-width: 142px;
}

.brand-logic {
  min-width: 142px;
}

.brand-refresh {
  min-width: 304px;
  justify-content: flex-start;
  position: relative;
}

.brand-refresh .brand-teams-value {
  padding-right: 30px;
  text-align: left;
  white-space: pre;
}

.brand-refresh.is-loading .brand-teams-value {
  display: grid;
  min-width: min(232px, 100%);
  gap: 4px;
  white-space: normal;
}

.brand-refresh-label {
  font-weight: 900;
}

.brand-refresh-skeleton-row {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr);
  align-items: center;
  gap: 6px;
}

.brand-refresh-skeleton {
  position: relative;
  display: block;
  width: 112px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--skeleton-base);
}

.brand-refresh-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-sheen), transparent);
  animation: skeleton-shimmer 1300ms ease-in-out infinite;
}

.brand-refresh-skeleton.is-short {
  width: 82px;
}

.brand-refresh-skeleton.is-medium {
  width: 118px;
}

.brand-refresh-skeleton.is-long {
  width: min(142px, 100%);
}

body[data-page="nan"] .brand-refresh.is-loading .brand-teams-value {
  width: max-content;
  min-width: 0;
}

body[data-page="nan"] .brand-refresh {
  flex: 0 0 auto;
  width: max-content;
  min-width: min(31ch, 100%);
  max-width: min(35ch, 32vw);
  min-height: 66px;
}

body[data-page="nan"] .brand-refresh .brand-teams-value {
  display: grid;
  width: max-content;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  align-content: center;
  gap: 4px;
  white-space: pre-line;
}

body[data-page="nan"] .brand-refresh.is-loading {
  min-width: min(31ch, 100%);
}

body[data-page="nan"] .brand-refresh.is-loading .brand-refresh-skeleton-row > span:first-child {
  white-space: nowrap;
}

body[data-page="nan"] .brand-refresh-skeleton {
  width: 86px;
}

body[data-page="nan"] .brand-refresh-skeleton.is-short {
  width: 62px;
}

body[data-page="nan"] .brand-refresh-skeleton.is-medium {
  width: 96px;
}

body[data-page="nan"] .brand-refresh-skeleton.is-long {
  width: min(104px, 100%);
}

.brand-refresh-timezone {
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--text-muted);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 0.86;
  pointer-events: none;
}

.brand-reports {
  min-width: 112px;
}

.nan-reports-dialog {
  width: min(860px, 100%);
}

.nan-reports-body {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.nan-reports-toolbar {
  display: grid;
  gap: 8px;
}

.nan-reports-search {
  display: grid;
  gap: 7px;
}

.nan-reports-search span {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.nan-reports-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 720;
  outline: none;
  padding: 10px 12px;
}

.nan-reports-search input::placeholder {
  color: var(--text-muted);
  opacity: 0.82;
}

.nan-reports-search input:focus {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.nan-reports-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  background:
    linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: clamp(14px, 2vw, 20px);
}

.nan-reports-summary span,
.nan-report-card span {
  color: var(--brand-strong);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

.nan-reports-summary strong {
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 900;
  line-height: 1.1;
}

.nan-reports-summary p,
.nan-report-card p {
  max-width: 56ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.5;
}

.nan-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nan-report-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 206px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  padding: 14px;
  box-shadow: 0 10px 22px rgba(10, 26, 54, 0.06);
}

.nan-report-card[hidden] {
  display: none;
}

.nan-report-card div {
  display: grid;
  gap: 7px;
}

.nan-report-card strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.14;
}

.nan-report-card p {
  font-size: 0.84rem;
}

.nan-report-card small {
  min-height: 1.2em;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.25;
}

.nan-report-card small.ok {
  color: var(--success);
}

.nan-report-card small.error {
  color: var(--danger);
}

.nan-report-card .btn {
  width: 100%;
}

.nan-reports-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 760;
}

@media (max-width: 720px) {
  .nan-reports-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

body[data-page="nan"] .brand {
  width: 100%;
  max-width: 100%;
}

body[data-page="nan"] .topbar > a.brand {
  width: fit-content;
  max-width: 100%;
}

body[data-page="nan"] .brand-tools {
  flex-wrap: nowrap;
}

body[data-page="nan"] .brand-history {
  flex: 1 1 clamp(264px, 32vw, 384px);
  width: clamp(264px, 32vw, 384px);
  max-width: clamp(264px, 32vw, 384px);
}

body[data-page="nan"] .brand-teams {
  min-width: 132px;
}

body[data-page="sosa"] .brand {
  width: 100%;
  max-width: 100%;
}

body[data-page="sosa"] .topbar > a.brand {
  width: fit-content;
  max-width: 100%;
}

body[data-page="sosa"] .brand-tools {
  flex-wrap: nowrap;
}

body[data-page="sosa"] .brand-history {
  flex-basis: clamp(218px, 26vw, 292px);
  width: clamp(218px, 26vw, 292px);
}

body[data-page="sosa"] .brand-teams {
  min-width: 132px;
}

.topbar-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.topnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--theme-nav-background, var(--surface-1));
  border-radius: var(--theme-nav-radius, 999px);
  padding: 4px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.89rem;
  padding: 8px 12px;
  border-radius: var(--theme-nav-item-radius, 999px);
  font-weight: 700;
}

.topnav a[data-nav-icon="true"]::before {
  display: none;
}

.topnav-icon {
  flex: 0 0 auto;
  width: 1.1em;
  display: inline-grid;
  place-items: center;
  font-size: 0.95em;
  line-height: 1;
}

.topnav-label {
  min-width: 0;
}

.topnav a.is-current,
.topnav a:hover {
  color: var(--brand-strong);
  background: var(--brand-subtle);
}

.topnav-compact {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 6px;
  max-width: min(100%, 470px);
}

.topnav-compact a {
  font-size: 0.83rem;
  padding: 7px 10px;
}

.topbar-actions {
  position: relative;
  display: grid;
  grid-template-columns: max-content max-content max-content max-content max-content;
  grid-template-areas: "theme notifications company warehouse session";
  align-items: center;
  justify-content: end;
  justify-items: end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.notification-inbox {
  grid-area: notifications;
  position: relative;
  justify-self: end;
  z-index: 2;
  pointer-events: auto;
}

.notification-inbox-button {
  position: relative;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--theme-control-radius, 999px);
  background: var(--theme-control-background, var(--surface-1));
  color: var(--text-soft);
  box-shadow: var(--theme-button-shadow, 0 2px 6px color-mix(in srgb, var(--text) 8%, transparent));
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 140ms ease;
}

.notification-inbox-button:hover,
.notification-inbox-button:focus-visible,
.notification-inbox[data-open="true"] .notification-inbox-button {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line-strong));
  color: var(--text);
  background: color-mix(in srgb, var(--brand-subtle) 54%, var(--surface-1));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 12%, transparent);
}

.notification-inbox-button:hover {
  transform: translateY(-1px);
}

.notification-inbox[data-open="true"] .notification-inbox-button {
  transform: translateY(-1px);
}

.notification-inbox-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.notification-inbox-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  color: currentColor;
}

.notification-inbox-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-inbox-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #dc2626;
  opacity: 0;
  transform: scale(0.7);
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.notification-inbox[data-has-unread="true"] .notification-inbox-dot {
  opacity: 1;
  transform: scale(1);
  box-shadow:
    0 0 0 3px rgba(220, 38, 38, 0.14),
    0 0 12px rgba(220, 38, 38, 0.58);
  animation: notificationDotGlow 1.8s ease-in-out infinite;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9400;
  width: min(360px, calc(100vw - 28px));
  border: var(--theme-card-border-width, 1px) solid var(--line);
  border-radius: var(--theme-card-radius, 12px);
  background: var(--theme-menu-background, var(--surface-1));
  color: var(--text);
  box-shadow: var(--theme-card-shadow, 0 18px 42px color-mix(in srgb, #000000 18%, transparent));
  overflow: hidden;
}

.notification-panel[hidden] {
  display: none;
}

.notification-inbox[data-open="true"] .notification-inbox-icon {
  animation: notificationInboxIconOpen 220ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

.notification-inbox[data-open="true"] .notification-panel {
  animation: notificationPanelOpen 180ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
  transform-origin: top right;
}

@keyframes notificationPanelOpen {
  from {
    filter: blur(1px);
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notificationInboxIconOpen {
  from {
    transform: translateY(-1px) rotate(-8deg) scale(0.96);
  }
  to {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.notification-panel:focus {
  outline: none;
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-head h2 {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.2;
}

.notification-panel-close {
  border: 1px solid var(--line);
  border-radius: var(--theme-control-radius, 8px);
  background: var(--theme-control-background, var(--surface-2));
  color: var(--text-soft);
  padding: 5px 8px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.notification-panel-close:hover,
.notification-panel-close:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
}

.notification-list {
  max-height: min(320px, calc(100vh - 210px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-item {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.notification-item:first-child {
  border-top: 0;
}

.notification-item[data-unread="true"] {
  background: color-mix(in srgb, var(--brand-subtle) 52%, transparent);
}

.notification-item-title {
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--text);
}

.notification-item-message {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.notification-item-time {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 800;
}

.notification-empty {
  margin: 0;
  padding: 14px 12px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

@keyframes notificationDotGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(220, 38, 38, 0.12),
      0 0 10px rgba(220, 38, 38, 0.44);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(220, 38, 38, 0.18),
      0 0 16px rgba(220, 38, 38, 0.68);
  }
}

.theme-toggle {
  grid-area: theme;
  --theme-switch-width: 58px;
  --theme-switch-height: 30px;
  --theme-knob-size: 22px;
  --theme-knob-offset: 4px;
  --theme-knob-travel: calc(var(--theme-switch-width) - var(--theme-knob-size) - (var(--theme-knob-offset) * 2));
  border: 0;
  background: transparent;
  color: var(--text-soft);
  border-radius: var(--theme-control-radius, 999px);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition: color 180ms ease;
}

.theme-toggle:active,
.theme-toggle.is-dragging {
  cursor: grabbing;
}

.theme-toggle-switch {
  width: var(--theme-switch-width);
  height: var(--theme-switch-height);
  box-sizing: border-box;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 76% 78%, #ffffff 0 8px, transparent 8.5px),
    radial-gradient(circle at 92% 72%, #ffffff 0 11px, transparent 11.5px),
    radial-gradient(circle at 58% 88%, #ffffff 0 10px, transparent 10.5px),
    linear-gradient(180deg, #117af5 0%, #2aa1ea 58%, #8edbff 100%);
  box-shadow:
    0 0 0 1px rgba(37, 45, 55, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.82),
    inset 0 -10px 18px rgba(255, 255, 255, 0.18),
    0 2px 5px rgba(10, 26, 54, 0.18);
  overflow: hidden;
  position: relative;
  transition: background 260ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 140ms ease;
}

.theme-toggle-switch:hover {
  transform: translateY(-1px);
}

.theme-toggle-switch::before,
.theme-toggle-switch::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: opacity 220ms ease, transform 260ms ease;
}

.theme-toggle-switch::before {
  inset: 0;
  background:
    radial-gradient(circle at 83% 67%, rgba(255, 255, 255, 0.88) 0 4px, transparent 4.5px),
    radial-gradient(circle at 67% 78%, rgba(255, 255, 255, 0.92) 0 6px, transparent 6.5px),
    radial-gradient(circle at 94% 82%, rgba(255, 255, 255, 0.95) 0 8px, transparent 8.5px);
  opacity: 1;
}

.theme-toggle-switch::after {
  inset: 0;
  background:
    radial-gradient(circle at 17% 35%, #ffffff 0 1px, transparent 1.5px),
    radial-gradient(circle at 28% 66%, #ffffff 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 42% 28%, #ffffff 0 0.9px, transparent 1.4px),
    radial-gradient(circle at 50% 60%, #ffffff 0 1px, transparent 1.5px),
    radial-gradient(circle at 64% 36%, #ffffff 0 0.9px, transparent 1.4px),
    radial-gradient(circle at 73% 72%, #ffffff 0 1.1px, transparent 1.6px),
    linear-gradient(180deg, var(--bg) 0%, var(--surface-1) 100%);
  opacity: 0;
  transform: translateX(7px);
}

.theme-toggle-knob {
  width: var(--theme-knob-size);
  height: var(--theme-knob-size);
  border-radius: 50%;
  position: absolute;
  top: calc((var(--theme-switch-height) - var(--theme-knob-size)) / 2 - 1px);
  left: var(--theme-knob-offset);
  z-index: 1;
  transform: translateX(0) rotate(0deg);
  transform-origin: 50% 50%;
  background:
    radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.92) 0 3px, transparent 3.5px),
    linear-gradient(145deg, #ffe45c 0%, #eccd2d 72%);
  box-shadow:
    0 2px 5px rgba(10, 26, 54, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.72);
  transition: transform 360ms cubic-bezier(0.28, 0.86, 0.24, 1), background 220ms ease, box-shadow 220ms ease;
}

.theme-toggle-knob::before,
.theme-toggle-knob::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 180ms ease;
}

.theme-toggle-knob::before {
  width: 7px;
  height: 7px;
  right: 4px;
  top: 4px;
  background: #889399;
}

.theme-toggle-knob::after {
  width: 4px;
  height: 4px;
  left: 5px;
  bottom: 5px;
  background: #889399;
}

.theme-toggle[aria-checked="true"] .theme-toggle-switch {
  border-color: rgba(255, 255, 255, 0.48);
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface-1) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 2px rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18),
    0 2px 5px rgba(0, 0, 0, 0.28);
}

.theme-toggle.is-dragging .theme-toggle-switch,
.theme-toggle.is-dragging[aria-checked="true"] .theme-toggle-switch {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 76% 78%, #ffffff 0 8px, transparent 8.5px),
    radial-gradient(circle at 92% 72%, #ffffff 0 11px, transparent 11.5px),
    radial-gradient(circle at 58% 88%, #ffffff 0 10px, transparent 10.5px),
    linear-gradient(180deg, #117af5 0%, #2aa1ea 58%, #8edbff 100%);
  transform: none;
}

.theme-toggle[aria-checked="true"] .theme-toggle-switch::before {
  opacity: 0;
  transform: translateX(-6px);
}

.theme-toggle[aria-checked="true"] .theme-toggle-switch::after {
  opacity: 1;
  transform: translateX(0);
}

.theme-toggle.is-dragging .theme-toggle-switch::before,
.theme-toggle.is-dragging[aria-checked="true"] .theme-toggle-switch::before {
  opacity: calc(1 - var(--theme-drag-ratio, 0));
  transform: translateX(0);
  transition: none;
}

.theme-toggle.is-dragging .theme-toggle-switch::after,
.theme-toggle.is-dragging[aria-checked="true"] .theme-toggle-switch::after {
  opacity: var(--theme-drag-ratio, 0);
  transform: translateX(0);
  transition: none;
}

.theme-toggle[aria-checked="true"] .theme-toggle-knob {
  transform: translateX(var(--theme-knob-travel)) rotate(360deg);
  background:
    radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.7) 0 3px, transparent 3.5px),
    linear-gradient(145deg, #d7d7d7 0%, #c9c9c9 72%);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.64);
}

.theme-toggle.is-dragging .theme-toggle-knob,
.theme-toggle.is-dragging[aria-checked="true"] .theme-toggle-knob {
  transform: translateX(calc(var(--theme-knob-travel) * var(--theme-drag-ratio, 0))) rotate(var(--theme-drag-roll, 0deg));
  background:
    radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.82) 0 3px, transparent 3.5px),
    linear-gradient(
      145deg,
      color-mix(in srgb, #ffe45c var(--theme-drag-inverse-percent, 100%), #d7d7d7 var(--theme-drag-percent, 0%)) 0%,
      color-mix(in srgb, #eccd2d var(--theme-drag-inverse-percent, 100%), #c9c9c9 var(--theme-drag-percent, 0%)) 72%
    );
  transition: none;
}

.theme-toggle[aria-checked="true"] .theme-toggle-knob::before,
.theme-toggle[aria-checked="true"] .theme-toggle-knob::after {
  opacity: 1;
}

.theme-toggle.is-dragging .theme-toggle-knob::before,
.theme-toggle.is-dragging .theme-toggle-knob::after,
.theme-toggle.is-dragging[aria-checked="true"] .theme-toggle-knob::before,
.theme-toggle.is-dragging[aria-checked="true"] .theme-toggle-knob::after {
  opacity: var(--theme-drag-ratio, 0);
  transition: none;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-toggle-label {
  display: none !important;
}

.theme-toggle-label:hover {
  background: var(--surface-accent);
  color: var(--brand-strong);
}

.theme-toggle-label::after {
  content: "";
  display: none;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.72;
  transform: translateY(1px);
  transition: transform 160ms ease, opacity 160ms ease;
}

.theme-toggle[data-theme-menu-open] .theme-toggle-label::after {
  opacity: 1;
  transform: translateY(0) rotate(180deg);
}

.theme-palette-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9300;
  display: grid;
  gap: 8px;
  width: min(520px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 96px));
  overflow: auto;
  padding: 10px;
  border: var(--theme-card-border-width, 1px) solid var(--line);
  border-radius: var(--radius);
  background: var(--theme-menu-background, var(--surface-1));
  box-shadow: 0 18px 48px rgba(5, 13, 28, 0.2);
}

.theme-palette-menu[hidden] {
  display: none;
}

.theme-palette-option {
  border: 1px solid transparent;
  border-radius: var(--theme-detail-radius, 8px);
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 7px 8px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 140ms ease;
}

.theme-palette-option:hover,
.theme-palette-option:focus-visible,
.theme-palette-option.is-selected {
  background: var(--surface-accent);
  border-color: var(--line);
}

.theme-palette-option:hover {
  transform: translateY(-1px);
}

.theme-palette-option:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-palette-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.theme-palette-copy strong {
  font-size: 0.82rem;
  line-height: 1.08;
}

.theme-palette-copy small {
  color: var(--text-soft);
  font-size: 0.68rem;
  line-height: 1.15;
}

.theme-palette-swatch {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0 48%, #111111 48% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.32);
}

.theme-palette-swatch.is-steel {
  background: linear-gradient(135deg, #f4f6f8 0 48%, #485766 48% 100%);
}

.theme-palette-swatch.is-ocean {
  background: linear-gradient(135deg, #f2f7fb 0 48%, #1f6f9d 48% 100%);
}

.theme-palette-swatch.is-spruce {
  background: linear-gradient(135deg, #f3f8f5 0 48%, #26724f 48% 100%);
}

.theme-palette-swatch.is-ember {
  background: linear-gradient(135deg, #f7f5f4 0 48%, #9b3d2b 48% 100%);
}

.theme-palette-swatch.is-orange {
  background: linear-gradient(135deg, #fff8ef 0 48%, #f28c28 48% 100%);
}

.theme-palette-swatch.is-contrast {
  background: linear-gradient(135deg, #ffffff 0 35%, #f6c744 35% 58%, #000000 58% 100%);
}

.theme-palette-swatch.is-custom {
  background: linear-gradient(135deg, var(--surface-1) 0 48%, var(--theme-custom-accent, #f28c28) 48% 100%);
}

.theme-custom-picker {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: var(--theme-card-border-width, 1px) solid var(--line);
  border-radius: var(--radius);
  background: var(--theme-panel-background, linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 92%, transparent), var(--surface-1)));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 32%, transparent);
}

.theme-custom-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-custom-reset {
  border: 1px solid var(--line-strong);
  border-radius: var(--theme-control-radius, 8px);
  background: var(--theme-control-background, var(--surface-2));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 7px 9px;
  transition: background 150ms ease, border-color 150ms ease, transform 140ms ease;
}

.theme-custom-reset:hover,
.theme-custom-reset:focus-visible {
  border-color: var(--brand);
  background: var(--surface-accent);
  transform: translateY(-1px);
}

.theme-custom-reset:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-custom-picker-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.theme-custom-picker-head span,
.theme-custom-picker-copy strong {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
}

.theme-custom-picker-head small,
.theme-custom-picker-copy small {
  color: var(--text-soft);
  font-size: 0.66rem;
  line-height: 1.18;
}

.theme-custom-picker-head strong {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.theme-custom-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.theme-custom-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: var(--theme-card-border-width, 1px) solid var(--line);
  border-radius: var(--theme-detail-radius, 9px);
  background: var(--theme-card-background, var(--surface-1));
  padding: 9px;
}

.theme-custom-field-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.theme-custom-field-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-custom-field-copy small {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-custom-field-control {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--theme-detail-radius, 8px);
  background: var(--theme-control-background, var(--surface-2));
  padding: 4px 7px 4px 4px;
  cursor: pointer;
}

.theme-custom-field-control:hover,
.theme-custom-field-control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.theme-custom-field-preview {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: var(--theme-detail-radius, 7px);
  background:
    radial-gradient(circle at 32% 28%, color-mix(in srgb, #ffffff 42%, transparent) 0 3px, transparent 3.5px),
    var(--preset-color, var(--theme-custom-accent, #f28c28));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #ffffff 32%, transparent);
}

.theme-custom-field-control strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-custom-picker input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-custom-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.theme-custom-picker input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.theme-preconfigured {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.theme-preconfigured-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.theme-preconfigured-head strong {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
}

.theme-preconfigured-head small {
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.18;
  text-align: right;
}

.theme-preconfigured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-preconfigured-card {
  --theme-preconfigured-card-bg: var(--surface-1);
  --theme-preconfigured-card-active-bg: color-mix(in srgb, var(--brand) 18%, var(--surface-1));
  --theme-preconfigured-card-border-width: 1px;
  --theme-preconfigured-card-radius: 9px;
  --theme-preconfigured-card-shadow: 0 0 0 0 transparent;
  min-width: 0;
  min-height: 104px;
  border: var(--theme-preconfigured-card-border-width) solid var(--line);
  border-radius: var(--theme-preconfigured-card-radius);
  background: var(--theme-preconfigured-card-bg);
  box-shadow: var(--theme-preconfigured-card-shadow);
  color: var(--text);
  cursor: pointer;
  display: grid;
  align-content: space-between;
  gap: 7px;
  padding: 9px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.theme-preconfigured-card:hover,
.theme-preconfigured-card:focus-visible,
.theme-preconfigured-card.is-selected {
  border-color: color-mix(in srgb, var(--brand) 62%, var(--line-strong));
  background: var(--theme-preconfigured-card-active-bg);
}

.theme-preconfigured-card:hover {
  transform: translateY(-1px);
}

.theme-preconfigured-card:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-preconfigured-card.is-selected {
  box-shadow: var(--theme-preconfigured-card-shadow), inset 0 0 0 2px var(--focus-ring);
}


.theme-preconfigured-card[data-theme-preconfigured-option="monochrome"] {
  --theme-preconfigured-card-radius: 2px;
}

.theme-preconfigured-card[data-theme-preconfigured-option="bauhaus"],
.theme-preconfigured-card[data-theme-preconfigured-option="neo-brutalism"] {
  --theme-preconfigured-card-border-width: 3px;
  --theme-preconfigured-card-radius: 4px;
  --theme-preconfigured-card-shadow: 5px 5px 0 color-mix(in srgb, var(--text) 24%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="modern-dark"],
.theme-preconfigured-card[data-theme-preconfigured-option="cyberpunk"],
.theme-preconfigured-card[data-theme-preconfigured-option="vaporwave"] {
  --theme-preconfigured-card-border-width: 2px;
  --theme-preconfigured-card-radius: 12px;
  --theme-preconfigured-card-shadow: 0 0 18px color-mix(in srgb, var(--brand) 22%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="newsprint"],
.theme-preconfigured-card[data-theme-preconfigured-option="swiss-minimalist"],
.theme-preconfigured-card[data-theme-preconfigured-option="retro"] {
  --theme-preconfigured-card-border-width: 2px;
  --theme-preconfigured-card-radius: 0px;
  --theme-preconfigured-card-shadow: 4px 4px 0 color-mix(in srgb, var(--text) 28%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="saas"],
.theme-preconfigured-card[data-theme-preconfigured-option="professional"] {
  --theme-preconfigured-card-radius: 10px;
  --theme-preconfigured-card-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 14%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="luxury"],
.theme-preconfigured-card[data-theme-preconfigured-option="art-deco"] {
  --theme-preconfigured-card-border-width: 2px;
  --theme-preconfigured-card-radius: 5px;
  --theme-preconfigured-card-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 34%, transparent), 0 10px 24px color-mix(in srgb, #000000 16%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="terminal"],
.theme-preconfigured-card[data-theme-preconfigured-option="enterprise"] {
  --theme-preconfigured-card-radius: 0px;
  --theme-preconfigured-card-shadow: inset 0 0 16px color-mix(in srgb, var(--brand) 10%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="kinetic"],
.theme-preconfigured-card[data-theme-preconfigured-option="bold-typography"],
.theme-preconfigured-card[data-theme-preconfigured-option="maximalism"] {
  --theme-preconfigured-card-border-width: 2px;
  --theme-preconfigured-card-radius: 6px;
  --theme-preconfigured-card-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="flat-design"] {
  --theme-preconfigured-card-radius: 4px;
}

.theme-preconfigured-card[data-theme-preconfigured-option="material-design"],
.theme-preconfigured-card[data-theme-preconfigured-option="playful-geometric"],
.theme-preconfigured-card[data-theme-preconfigured-option="claymorphism"],
.theme-preconfigured-card[data-theme-preconfigured-option="web3"],
.theme-preconfigured-card[data-theme-preconfigured-option="neumorphism"] {
  --theme-preconfigured-card-radius: 18px;
  --theme-preconfigured-card-shadow: 0 12px 22px color-mix(in srgb, var(--brand) 14%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="academia"],
.theme-preconfigured-card[data-theme-preconfigured-option="botanical"],
.theme-preconfigured-card[data-theme-preconfigured-option="organic"] {
  --theme-preconfigured-card-radius: 12px;
  --theme-preconfigured-card-shadow: 0 10px 24px color-mix(in srgb, var(--text) 12%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="minimal-dark"] {
  --theme-preconfigured-card-radius: 7px;
  --theme-preconfigured-card-shadow: 0 6px 14px color-mix(in srgb, var(--text) 8%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="sketch"] {
  --theme-preconfigured-card-border-width: 2px;
  --theme-preconfigured-card-radius: 13px;
  --theme-preconfigured-card-shadow: 3px 4px 0 color-mix(in srgb, var(--text) 18%, transparent);
}

.theme-preconfigured-card[data-theme-preconfigured-option="industrial"] {
  --theme-preconfigured-card-radius: 7px;
  --theme-preconfigured-card-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 38%, transparent), 0 8px 18px color-mix(in srgb, var(--text) 12%, transparent);
}

.theme-preconfigured-card.is-disabled,

.theme-preconfigured-card.is-disabled,
.theme-preconfigured-card:disabled {
  cursor: default;
  opacity: 0.62;
  transform: none;
}

.theme-preconfigured-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-preconfigured-index {
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.theme-preconfigured-swatches {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.theme-preconfigured-swatch {
  width: 15px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--preset-color, var(--brand));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 34%, transparent);
}

.theme-preconfigured-swatch + .theme-preconfigured-swatch {
  margin-left: -4px;
}

.theme-preconfigured-card strong {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.08;
}

.theme-preconfigured-card small {
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.14;
}

@media (max-width: 520px) {
  .theme-custom-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .theme-preconfigured-head {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .theme-preconfigured-head small {
    text-align: left;
  }

  .theme-preconfigured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nan-tutorial-running .theme-palette-menu:not([hidden]) {
  z-index: 9420;
}

.company-chip,
.warehouse-chip {
  grid-area: warehouse;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1);
  padding: 4px 10px;
  font-size: 0.79rem;
  color: var(--text-soft);
  font-weight: 700;
}

.company-chip {
  grid-area: company;
}

.company-chip-label,
.warehouse-chip-label {
  color: var(--text-soft);
  white-space: nowrap;
}

.company-select,
.warehouse-select {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
  min-width: 118px;
  max-width: 100%;
}

.warehouse-readonly {
  color: var(--text);
  font-weight: 800;
  min-width: 0;
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-chip:has(.warehouse-readonly:not(.hidden)) {
  flex: 0 0 auto;
  gap: 6px;
  padding-right: 8px;
}

.card {
  border: var(--theme-card-border-width, 1px) var(--theme-card-border-style, solid) var(--line);
  background: var(--theme-card-background, var(--card));
  border-radius: var(--radius);
  box-shadow: var(--theme-card-shadow, var(--shadow));
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--theme-control-radius, 10px);
  font-family: var(--theme-control-font, inherit);
  font-size: inherit;
  font-weight: 700;
  letter-spacing: var(--theme-ui-letter-spacing, 0);
  text-transform: var(--theme-ui-transform, none);
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--theme-button-shadow, none);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--theme-primary-button-background, linear-gradient(145deg, var(--brand), var(--brand-strong)));
  color: var(--brand-contrast);
}

.btn-outline {
  border-color: var(--line-strong);
  background: var(--theme-control-background, var(--surface-1));
  color: var(--text);
}

.btn-ghost {
  border-color: var(--line);
  background: var(--theme-control-background, var(--surface-1));
  color: var(--brand-strong);
}

.btn-sm {
  padding: 7px 10px;
  font-size: 0.82rem;
}

.btn.is-disabled,
.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.is-loading {
  position: relative;
  gap: 8px;
  cursor: wait;
}

.btn.is-loading::before {
  content: "";
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: btn-spin 0.75s linear infinite;
  display: inline-block;
}

.btn.is-loading:disabled {
  opacity: 0.92;
}

.emulation-chip-label {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.emulation-exit-btn {
  border-color: color-mix(in srgb, var(--brand-strong) 46%, var(--line-strong));
  color: var(--brand-strong);
  min-width: 48px;
  padding-inline: 9px;
  white-space: nowrap;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  letter-spacing: var(--theme-ui-letter-spacing, 0.08em);
  text-transform: var(--theme-ui-transform, uppercase);
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--theme-heading-font, "Plus Jakarta Sans", sans-serif);
}
.auth-layout {
  margin-top: 10px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

.auth-only {
  width: min(560px, 94vw);
  margin: 0 auto;
}

.auth-hero {
  padding: clamp(20px, 3.1vw, 34px);
  background:
    radial-gradient(740px 380px at 100% -20%, rgba(56, 113, 201, 0.11) 0%, transparent 65%),
    var(--card);
}

.auth-hero h1 {
  margin-top: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.9rem);
  line-height: 1.05;
}

.auth-hero p {
  margin-top: 10px;
  color: var(--text-soft);
  max-width: 60ch;
}

.bullet-list {
  margin: 14px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.auth-panel {
  padding: clamp(18px, 2.6vw, 28px);
}

.auth-switch {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--theme-control-background, var(--surface-2));
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
}

.tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-weight: 800;
  border-radius: 9px;
  padding: 10px;
  cursor: pointer;
}

.tab.is-active {
  background: var(--theme-card-background, var(--surface-1));
  border-color: var(--line);
  color: var(--brand-strong);
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid h2 {
  font-size: 1.16rem;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-soft);
  font-weight: 700;
}

.field-hint {
  margin-top: -2px;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 700;
}

.field-hint:empty {
  display: none;
}

.form-grid input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.form-grid input:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  padding-right: 44px;
}

.password-input-wrap input[type="password"]::-ms-clear,
.password-input-wrap input[type="password"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.password-toggle-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.password-toggle-icon:hover {
  color: var(--brand-strong);
  background: var(--surface-3);
}

.password-toggle-icon:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.password-toggle-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle-icon.is-visible {
  color: var(--brand-strong);
}

.password-toggle-icon.is-visible::after {
  content: "";
  position: absolute;
  width: 14px;
  border-top: 2px solid currentColor;
  transform: rotate(-35deg);
}

.password-toggle-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-msg {
  min-height: 20px;
  font-size: 0.84rem;
  font-weight: 700;
}

.form-msg.error {
  color: var(--danger);
}

.form-msg.ok {
  color: var(--ok);
}

.form-msg.warning {
  color: #a56a06;
}

[data-theme="dark"] .form-msg.warning {
  color: #ffd17a;
}

.password-hint {
  margin: -2px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.mfa-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--theme-control-background, var(--surface-2));
  padding: 12px;
  display: grid;
  gap: 10px;
}

.mfa-panel h3 {
  margin: 0;
  font-size: 1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.mfa-qr-wrap {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  background: var(--theme-card-background, var(--surface-1));
  display: grid;
  gap: 8px;
}

.mfa-qr {
  min-height: 92px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.mfa-qr-media,
.mfa-qr img,
.mfa-qr svg {
  background: #ffffff;
  border: 1px solid #d6dce8;
  border-radius: 10px;
  padding: 10px;
}

.mfa-qr img,
.mfa-qr svg {
  max-width: 240px;
  height: auto;
  width: 240px;
  display: block;
}

.mfa-qr-fallback-msg {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.mfa-secret {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.mfa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mfa-method-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mfa-method-switch .tab {
  width: 100%;
  justify-content: center;
  padding-inline: 8px;
}

.hidden {
  display: none !important;
}

.auth-honeypot,
.auth-autofill-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-autofill-trap {
  top: auto;
  overflow: hidden;
}

.auth-autofill-trap input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
}

.page-main {
  margin-bottom: 24px;
}

body[data-page="sosa"] {
  min-height: 100vh;
  overflow-x: hidden;
}

.sosa-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 28px;
}

body[data-page="sosa"] .topbar,
body[data-page="sosa"] .shell {
  width: min(1600px, 94vw);
  max-width: 1740px;
}

.sosa-filter-panel,
.sosa-overview-grid,
.sosa-analytics-grid,
.sosa-date-range {
  display: grid;
  gap: 12px;
}

.sosa-filter-panel,
.sosa-upload-panel,
.sosa-status-panel,
.sosa-metric-card,
.sosa-chart-card,
.sosa-table-card,
.sosa-title-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--theme-card-background);
  box-shadow: 0 10px 24px rgba(28, 50, 87, 0.06);
}

.sosa-panel-label,
.sosa-panel-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 800;
}

.sosa-clear-button:hover {
  border-color: var(--line-info);
  background: var(--surface-accent);
}

.sosa-clear-button,
.sosa-secondary-button,
.sosa-upload-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--theme-control-background);
  color: var(--brand-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.sosa-secondary-button:hover,
.sosa-row-action:hover,
.sosa-employee-link:hover {
  border-color: var(--line-info);
  background: var(--surface-accent);
}

.sosa-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.sosa-title-row > div {
  min-width: 0;
}

.sosa-title-row h1 {
  margin: 4px 0 4px;
  font-family: var(--theme-heading-font);
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.sosa-title-row p {
  margin: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.sosa-title-row > div > p:not(.eyebrow) {
  max-width: 64ch;
}

.sosa-shift-start-note {
  margin: -4px 2px 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.45;
}

.sosa-title-status {
  min-width: min(310px, 100%);
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.sosa-title-status p {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.sosa-filter-panel {
  position: relative;
  grid-template-columns: minmax(170px, 0.9fr) minmax(320px, 1.35fr) minmax(120px, 0.65fr) minmax(180px, 0.9fr) auto auto;
  align-items: end;
  padding: 14px;
}

.sosa-filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.sosa-filter-panel select,
.sosa-filter-panel input,
.sosa-date-input {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--theme-input-background);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 11px;
}

.sosa-employee-search-label {
  position: relative;
}

.sosa-employee-search {
  position: relative;
}

.sosa-employee-search input {
  padding-right: 34px;
}

.sosa-employee-search::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.sosa-employee-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  overflow: auto;
  max-height: 252px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--theme-card-background);
  box-shadow: 0 18px 42px rgba(10, 26, 54, 0.18);
  padding: 6px;
}

.sosa-employee-suggestions[hidden] {
  display: none;
}

.sosa-employee-suggestion,
.sosa-employee-suggestion-empty {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
}

.sosa-employee-suggestion {
  cursor: pointer;
}

.sosa-employee-suggestion:hover,
.sosa-employee-suggestion.is-active {
  background: var(--theme-control-background);
}

.sosa-employee-suggestion strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.sosa-employee-suggestion span,
.sosa-employee-suggestion-empty {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.sosa-date-range {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sosa-date-input {
  cursor: pointer;
  text-align: left;
}

.sosa-date-input::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  transform: rotate(45deg) translateY(-2px);
}

.sosa-calendar-popover {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 14px;
  width: min(380px, calc(100% - 28px));
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--theme-card-background);
  box-shadow: 0 18px 42px rgba(10, 26, 54, 0.18);
  padding: 14px;
}

.sosa-calendar-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sosa-calendar-head strong {
  color: var(--text);
  font-size: 0.95rem;
  text-align: center;
}

.sosa-calendar-head button,
.sosa-calendar-grid button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--theme-control-background);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.sosa-calendar-head button {
  min-height: 34px;
}

.sosa-calendar-weekdays,
.sosa-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.sosa-calendar-weekdays {
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.sosa-calendar-grid button,
.sosa-calendar-empty {
  min-height: 34px;
}

.sosa-calendar-grid button.is-selected {
  border-color: var(--brand-strong);
  background: var(--theme-primary-button-background);
  color: var(--brand-contrast);
}

.sosa-calendar-grid button.is-full-shifts {
  border-color: color-mix(in srgb, var(--ok) 62%, var(--line));
  background: color-mix(in srgb, var(--ok) 22%, var(--theme-control-background));
  color: color-mix(in srgb, var(--ok) 62%, var(--text));
}

.sosa-calendar-grid button.is-partial-shifts {
  border-color: color-mix(in srgb, #d89a00 68%, var(--line));
  background: color-mix(in srgb, #ffd966 36%, var(--theme-control-background));
  color: #6f4600;
}

.sosa-calendar-grid button.is-no-shifts {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
  background: color-mix(in srgb, var(--danger) 14%, var(--theme-control-background));
  color: color-mix(in srgb, var(--danger) 72%, var(--text));
}

.sosa-calendar-grid button.is-selected {
  box-shadow: 0 0 0 2px var(--focus-ring);
  outline: 2px solid color-mix(in srgb, var(--brand-strong) 42%, transparent);
  outline-offset: 1px;
}

:root[data-theme="dark"] .sosa-calendar-grid button.is-full-shifts {
  background: rgba(110, 231, 168, 0.18);
  color: #b8f7d3;
}

:root[data-theme="dark"] .sosa-calendar-grid button.is-partial-shifts {
  background: rgba(255, 209, 102, 0.2);
  color: #ffe39a;
}

:root[data-theme="dark"] .sosa-calendar-grid button.is-no-shifts {
  background: rgba(255, 180, 171, 0.16);
  color: #ffd2cc;
}

.sosa-filter-panel .btn,
.sosa-secondary-button,
.sosa-clear-button {
  min-height: 38px;
  white-space: nowrap;
}

.sosa-clear-button,
.sosa-secondary-button {
  padding: 0 16px;
}

.sosa-overview-grid {
  grid-template-columns: minmax(320px, 1.6fr) minmax(220px, 1fr) repeat(4, minmax(130px, 0.75fr));
}

.sosa-upload-panel,
.sosa-status-panel,
.sosa-metric-card,
.sosa-chart-card,
.sosa-table-card {
  padding: 14px;
}

.sosa-upload-panel {
  display: grid;
  gap: 10px;
}

.sosa-panel-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sosa-panel-headline .sosa-row-action {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.sosa-drop-zone {
  min-height: 108px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 16px;
  text-align: left;
}

.sosa-drop-zone.is-dragging {
  border-color: var(--brand-strong);
  background: var(--surface-accent);
}

.sosa-drop-zone .btn {
  min-width: 112px;
  white-space: nowrap;
}

.sosa-drop-zone p,
.sosa-drop-zone small {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.sosa-upload-mark {
  width: 34px;
  height: 30px;
  border: 2px solid var(--brand-strong);
  border-radius: 9px;
  position: relative;
}

.sosa-upload-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 12px;
  height: 12px;
  border-left: 2px solid var(--brand-strong);
  border-top: 2px solid var(--brand-strong);
  transform: translateX(-50%) rotate(45deg);
}

.sosa-upload-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  height: 16px;
  border-left: 2px solid var(--brand-strong);
  transform: translateX(-50%);
}

.sosa-upload-button {
  width: 100%;
  min-height: 96px;
  align-self: end;
}

.sosa-inline-status,
.sosa-action-status {
  margin: 0;
  min-height: 1.2rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.sosa-action-status {
  padding: 0 4px;
}

.sosa-exemption-note {
  margin-top: -2px;
}

.sosa-status-panel dl {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.sosa-status-panel dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sosa-status-panel dt,
.sosa-status-panel dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.sosa-status-panel dt {
  color: var(--text-soft);
}

.sosa-status-panel dd {
  color: var(--text);
}

.sosa-metric-card {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: space-between;
}

.sosa-metric-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 900;
}

.sosa-metric-card strong {
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 900;
}

.sosa-metric-card span {
  font-size: 0.74rem;
  font-weight: 800;
}

.sosa-good {
  color: var(--ok);
}

.sosa-watch,
.sosa-watch-text {
  color: #b26a00;
}

.sosa-risk {
  color: var(--danger);
  font-weight: 900;
}

.sosa-analytics-grid {
  grid-template-columns: minmax(420px, 1.35fr) minmax(260px, 0.7fr) minmax(300px, 0.9fr);
}

.sosa-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sosa-card-head h2 {
  margin: 0;
  font-family: var(--theme-heading-font);
  font-size: 0.95rem;
}

.sosa-card-head span {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.sosa-segments {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.sosa-segments button {
  min-width: 72px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 9px;
}

.sosa-segments button:last-child {
  border-right: 0;
}

.sosa-segments .is-active {
  background: var(--theme-primary-button-background);
  color: var(--brand-contrast);
}

.sosa-trend-bars {
  min-height: 270px;
  display: grid;
  align-items: center;
  padding: 12px 0 0;
  border-top: 1px solid var(--line-muted);
}

.sosa-trend-svg {
  width: 100%;
  min-height: 252px;
  display: block;
  overflow: visible;
}

.sosa-trend-grid {
  stroke: var(--line-muted);
  stroke-width: 1;
}

.sosa-trend-zero {
  stroke: color-mix(in srgb, var(--brand-strong) 44%, var(--line-strong));
  stroke-width: 1.25;
  stroke-dasharray: 5 6;
}

.sosa-trend-area {
  fill: color-mix(in srgb, var(--brand) 18%, transparent);
}

.sosa-trend-line {
  fill: none;
  stroke: #4f86df;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sosa-trend-point {
  fill: var(--surface-1);
  stroke: #4f86df;
  stroke-width: 3;
}

.sosa-trend-point.is-good {
  stroke: #69be7b;
}

.sosa-trend-point.is-watch {
  stroke: #f1b944;
}

.sosa-trend-point.is-risk {
  stroke: #e45e54;
}

.sosa-trend-callout-line {
  stroke: color-mix(in srgb, var(--text-soft) 44%, transparent);
  stroke-width: 1;
}

.sosa-trend-callout-rect {
  fill: var(--surface-1);
  stroke: var(--line-strong);
  stroke-width: 1;
  filter: drop-shadow(0 8px 12px rgba(20, 31, 45, 0.12));
}

.sosa-trend-callout-text,
.sosa-trend-day,
.sosa-trend-y-label {
  font-family: Manrope, sans-serif;
  font-weight: 900;
  text-anchor: middle;
}

.sosa-trend-callout-text {
  fill: var(--text);
  font-size: 12px;
}

.sosa-trend-day {
  fill: var(--text-soft);
  font-size: 11px;
}

.sosa-trend-y-label {
  fill: var(--text-soft);
  font-size: 10.5px;
  text-anchor: end;
}

.sosa-empty-state,
.sosa-empty-cell {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.sosa-empty-state {
  grid-column: 1 / -1;
  align-self: center;
  padding: 22px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.sosa-skeleton-line {
  display: block;
  width: min(100%, 140px);
  height: 13px;
  border-radius: 999px;
  background: var(--skeleton-base);
  overflow: hidden;
  position: relative;
}

.sosa-skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-sheen), transparent);
  animation: skeleton-shimmer 1300ms ease-in-out infinite;
}

.sosa-skeleton-line.is-xs {
  width: 54px;
}

.sosa-skeleton-line.is-short {
  width: 118px;
}

.sosa-skeleton-line.is-wide {
  width: min(100%, 190px);
}

.sosa-skeleton-line.is-value {
  width: 86px;
  height: 30px;
  border-radius: 12px;
}

.sosa-skeleton-line.is-note {
  width: min(100%, 132px);
  height: 10px;
}

.sosa-skeleton-line.is-centered {
  width: min(170px, 80%);
  margin: 0 auto;
}

.sosa-skeleton-line.is-gap-value {
  width: 64px;
}

.sosa-skeleton-row td {
  height: 39px;
}

.sosa-trend-bars.is-loading {
  align-items: end;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  padding-inline: 4px;
}

.sosa-trend-skeleton-bar {
  width: 100%;
  max-width: 46px;
  height: var(--h);
  min-height: 34px;
  justify-self: center;
  border-radius: 9px 9px 4px 4px;
  background: var(--skeleton-base);
  overflow: hidden;
  position: relative;
}

.sosa-trend-skeleton-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-sheen), transparent);
  animation: skeleton-shimmer 1300ms ease-in-out infinite;
}

.sosa-shift-bars.is-loading .sosa-skeleton-line {
  width: min(100%, 210px);
  height: 30px;
  border-radius: 8px;
}

.sosa-employee-gap-row.is-loading {
  cursor: wait;
  pointer-events: none;
}

.sosa-upload-panel.is-loading .sosa-drop-zone {
  border-color: var(--line-info);
  background: var(--surface-accent);
}

.sosa-exemption-form.is-loading {
  cursor: wait;
}

.sosa-shift-bars {
  display: grid;
  gap: 13px;
}

.sosa-shift-bars > div:not(.sosa-empty-state) {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.sosa-shift-bars .sosa-empty-state {
  display: block;
  width: 100%;
}

.sosa-shift-bars b {
  width: var(--w);
  min-width: 72px;
  padding: 7px 9px;
  border-radius: 8px;
  background: linear-gradient(90deg, #69be7b, #ffd966);
  color: #1d2735;
  text-align: right;
}

.sosa-chart-note {
  margin: 16px 0 0;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.sosa-average-gap-card {
  min-height: 282px;
}

.sosa-employee-gap-list {
  display: grid;
  gap: 9px;
}

.sosa-employee-gap-list.is-expanded {
  max-height: min(560px, 58vh);
  overflow-y: auto;
  padding-right: 4px;
}

.sosa-employee-gap-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
}

.sosa-employee-gap-row:hover {
  border-color: var(--line-info);
  background: var(--surface-accent);
}

.sosa-employee-gap-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sosa-employee-gap-row b,
.sosa-employee-gap-row strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.sosa-employee-gap-row em {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.sosa-employee-gap-row strong {
  color: var(--danger);
  white-space: nowrap;
}

.sosa-see-more-button {
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--theme-control-radius, 10px);
  background: var(--theme-control-background);
  color: var(--brand-strong);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  transition: background 150ms ease, border-color 150ms ease, transform 140ms ease;
}

.sosa-see-more-button:hover,
.sosa-see-more-button:focus-visible {
  border-color: var(--line-info);
  background: var(--surface-accent);
  transform: translateY(-1px);
}

.sosa-see-more-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sosa-see-more-button[hidden] {
  display: none;
}

.sosa-table-card {
  overflow: hidden;
}

.sosa-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}

.sosa-table-card table,
.sosa-detail-card table {
  width: 100%;
  min-width: 1400px;
  border-collapse: collapse;
}

.sosa-table-card th,
.sosa-table-card td,
.sosa-detail-card th,
.sosa-detail-card td {
  padding: 9px 10px;
  border-top: 1px solid var(--line-muted);
  color: var(--text);
  font-size: 0.78rem;
  text-align: left;
  white-space: nowrap;
}

.sosa-table-card th {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.sosa-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.sosa-badge-risk {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.sosa-badge-watch {
  background: rgba(255, 217, 102, 0.34);
  color: #8a5200;
}

.sosa-badge-good {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
}

:root[data-theme="dark"] .sosa-watch,
:root[data-theme="dark"] .sosa-watch-text {
  color: #ffd166;
}

:root[data-theme="dark"] .sosa-risk {
  color: #ffb4ab;
}

:root[data-theme="dark"] .sosa-badge-risk {
  background: rgba(255, 180, 171, 0.18);
  color: #ffd2cc;
}

:root[data-theme="dark"] .sosa-badge-watch {
  background: rgba(255, 209, 102, 0.2);
  color: #ffe39a;
}

:root[data-theme="dark"] .sosa-badge-good {
  background: rgba(110, 231, 168, 0.16);
  color: #9ff0c6;
}

:root[data-theme="dark"] .sosa-table-card th {
  color: #cbd5e1;
}

.sosa-row-action,
.sosa-employee-link {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--theme-control-background);
  color: var(--brand-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.sosa-employee-link {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.sosa-employee-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  background: rgba(0, 0, 0, 0.56);
  padding: clamp(14px, 2.4vw, 22px);
  max-width: 100vw;
}

.sosa-employee-screen[hidden] {
  display: none;
}

.sosa-employee-dialog {
  width: min(1120px, 100%);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--theme-card-background);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  padding: 18px;
}

.sosa-employee-head,
.sosa-employee-summary,
.sosa-employee-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sosa-employee-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.sosa-employee-head h2 {
  margin: 2px 0 4px;
  font-family: var(--theme-heading-font);
  overflow-wrap: anywhere;
}

.sosa-employee-head p {
  margin: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.sosa-employee-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sosa-employee-summary article,
.sosa-detail-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line-muted);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
}

.sosa-employee-summary span,
.sosa-detail-card dt {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.sosa-employee-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.sosa-employee-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
}

.sosa-detail-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.sosa-detail-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.sosa-detail-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.sosa-detail-card dl div {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
  min-width: 0;
}

.sosa-detail-card dd {
  margin: 0;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.sosa-exemption-dialog {
  width: min(920px, 100%);
}

.sosa-exemption-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line-muted);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
}

.sosa-exemption-form label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.sosa-exemption-form input,
.sosa-exemption-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--theme-input-background);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 10px;
}

.sosa-exemption-form textarea {
  min-height: 38px;
  resize: vertical;
}

.sosa-exemption-form .btn {
  min-height: 38px;
  white-space: nowrap;
}

.sosa-card-head h3 {
  margin: 0;
}

.sosa-detail-card table.sosa-exemption-table {
  min-width: 720px;
}

body.sosa-detail-open {
  overflow: hidden;
}

@media (max-width: 1220px) {
  .sosa-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sosa-filter-panel .btn,
  .sosa-secondary-button,
  .sosa-clear-button {
    width: 100%;
  }

  .sosa-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sosa-upload-panel,
  .sosa-status-panel {
    grid-column: 1 / -1;
  }

  .sosa-analytics-grid {
    grid-template-columns: 1fr;
  }

  .sosa-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .sosa-title-row > div {
    width: 100%;
  }

  .sosa-title-status {
    width: 100%;
  }

  .sosa-title-row > div > p:not(.eyebrow) {
    max-width: 34ch;
  }
}

@media (max-width: 720px) {
  body[data-page="sosa"] .topbar,
  body[data-page="sosa"] .shell {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .sosa-filter-panel,
  .sosa-overview-grid {
    grid-template-columns: 1fr;
  }

  .sosa-title-row,
  .sosa-filter-panel,
  .sosa-upload-panel,
  .sosa-status-panel,
  .sosa-metric-card,
  .sosa-chart-card,
  .sosa-table-card {
    min-width: 0;
    max-width: 100%;
  }

  .sosa-filter-panel select,
  .sosa-filter-panel input,
  .sosa-date-input {
    min-width: 0;
  }

  .sosa-date-range,
  .sosa-employee-summary,
  .sosa-employee-grid,
  .sosa-employee-head,
  .sosa-exemption-form {
    grid-template-columns: 1fr;
  }

  .sosa-employee-screen {
    padding: 14px;
  }

  .sosa-employee-dialog {
    width: 100%;
    max-width: calc(100vw - 28px);
    padding: 14px;
  }

  .sosa-detail-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .sosa-detail-card dd {
    text-align: left;
  }

  .sosa-upload-panel,
  .sosa-status-panel {
    grid-column: auto;
  }

  .sosa-drop-zone {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .sosa-panel-headline {
    align-items: flex-start;
    flex-direction: column;
  }

  .sosa-panel-headline .sosa-row-action {
    width: 100%;
  }

  .sosa-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sosa-segments {
    width: 100%;
    grid-auto-flow: row;
  }

  .sosa-segments button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sosa-segments button:last-child {
    border-bottom: 0;
  }

  .sosa-trend-bars {
    min-height: 250px;
    padding-top: 10px;
  }

  .sosa-trend-svg {
    min-height: 232px;
  }

  .sosa-trend-callout-text {
    font-size: 10.5px;
  }

  .sosa-trend-day,
  .sosa-trend-y-label {
    font-size: 9.5px;
  }

  .sosa-calendar-popover {
    left: 12px;
    width: calc(100% - 24px);
  }
}

.page-back-row {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--theme-control-background, linear-gradient(145deg, var(--surface-1), var(--surface-2)));
  color: #111827;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(10, 26, 54, 0.08);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.page-back-link::before {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

.page-back-link:hover {
  background: var(--surface-accent);
  border-color: var(--line-strong);
  color: #111827;
  transform: translateY(-1px);
}

html[data-theme="dark"] .page-back-link,
html[data-theme="dark"] .page-back-link:hover {
  color: var(--text);
}

.page-back-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.page-back-link-icon-only {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  justify-content: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

.page-back-link-icon-only::before {
  width: 10px;
  height: 10px;
}

.module-jump {
  position: relative;
  flex: 1 1 min(420px, calc(100% - 48px));
  max-width: 620px;
  min-width: min(280px, 100%);
  z-index: 40;
}

.module-jump-input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  box-shadow: 0 2px 8px rgba(10, 26, 54, 0.06);
}

.module-jump-input::placeholder {
  color: var(--text-soft);
}

.module-jump-input:focus {
  outline: 3px solid var(--focus-ring);
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line-strong));
}

.module-jump-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(720px, 92vw);
  max-height: min(560px, 72vh);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--theme-panel-background, linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end)));
  box-shadow: var(--theme-card-shadow, 0 18px 42px rgba(10, 26, 54, 0.18));
  padding: 10px;
  z-index: 120;
}

.module-jump-results {
  display: grid;
  gap: 10px;
}

.module-jump-group {
  display: grid;
  gap: 6px;
}

.module-jump-group-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-jump-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.module-jump-option {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  text-decoration: none;
  padding: 9px 10px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.module-jump-option:hover,
.module-jump-option.is-active {
  border-color: var(--line-strong);
  background: var(--surface-accent);
  transform: translateY(-1px);
}

.module-jump-option.is-current {
  border-color: color-mix(in srgb, var(--brand) 56%, var(--line-strong));
}

.module-jump-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 850;
}

.module-jump-option-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
}

.module-jump-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface-1);
  padding: 12px;
  font-size: 0.84rem;
  font-weight: 750;
}

body[data-workspace-frame="true"] {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  padding: 0 !important;
  background: var(--surface-0);
}

body[data-workspace-frame="true"] .topbar,
body[data-workspace-frame="true"] .page-back-row {
  display: none !important;
}

body[data-workspace-frame="true"] .shell:not(.topbar) {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow-x: hidden;
}

body[data-workspace-frame="true"] .page-main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden;
  padding: 10px !important;
}

body[data-workspace-frame="true"] .protected-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body[data-workspace-frame="true"] .page-head,
body[data-workspace-frame="true"] .card,
body[data-workspace-frame="true"] .module-grid,
body[data-workspace-frame="true"] .module-category,
body[data-workspace-frame="true"] .operations-module-shell,
body[data-workspace-frame="true"] .operations-module-main,
body[data-workspace-frame="true"] .operations-module-toolbar,
body[data-workspace-frame="true"] .operations-module-toolbar-actions {
  max-width: 100%;
  min-width: 0;
}

body[data-workspace-frame="true"] .operations-module-main {
  grid-template-columns: minmax(0, 1fr);
}

body[data-workspace-frame="true"] .operations-module-shell {
  grid-template-columns: minmax(188px, 0.3fr) minmax(0, 1.7fr);
  align-items: stretch;
  gap: 8px;
  height: calc(100vh - 18px);
  min-height: 0;
}

body[data-workspace-frame="true"] .operations-module-side,
body[data-workspace-frame="true"] .operations-module-table-card {
  min-height: 0;
  padding: 7px;
}

body[data-workspace-frame="true"] .operations-module-side {
  overflow: auto;
}

body[data-workspace-frame="true"] .operations-module-form,
body[data-workspace-frame="true"] .operations-module-fields,
body[data-workspace-frame="true"] .operations-module-main {
  min-height: 0;
  gap: 5px;
}

body[data-workspace-frame="true"] .operations-module-toolbar {
  margin-bottom: 4px;
}

body[data-workspace-frame="true"] .operations-module-form input,
body[data-workspace-frame="true"] .operations-module-form select,
body[data-workspace-frame="true"] .operations-module-record-picker select,
body[data-workspace-frame="true"] .operations-module-toolbar input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.72rem;
}

body[data-workspace-frame="true"] .operations-module-table th,
body[data-workspace-frame="true"] .operations-module-table td {
  padding: 1px 5px;
  font-size: 0.66rem;
  line-height: 1;
  vertical-align: middle;
}

body[data-workspace-frame="true"] .operations-module-table tr {
  height: 20px;
}

body[data-workspace-frame="true"] .operations-module-table .btn,
body[data-workspace-frame="true"] .operations-module-row-actions .btn {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 0.68rem;
  line-height: 1.1;
}

body[data-workspace-frame="true"] .operations-module-table-wrap {
  flex: 1 1 auto;
  margin-top: 4px;
  max-height: none;
  min-height: 0;
}

body[data-workspace-frame="true"] .operations-module-table-card {
  display: flex;
  flex-direction: column;
}

body[data-workspace-frame="true"] .operations-module-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

body[data-workspace-frame="true"] .operations-module-table-wrap,
body[data-workspace-frame="true"] .role-table-wrap,
body[data-workspace-frame="true"] .sql-results-shell {
  overflow-x: auto;
}

body[data-module-page="workspace"] {
  overflow: hidden;
  min-height: 100vh;
}

body[data-module-page="workspace"] .page-main {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding: 0;
}

.workspace-page {
  width: 100vw;
  max-width: none;
  background: var(--surface-0);
}

.workspace-home-logo {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 360;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 38%, var(--line-strong));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 96%, var(--brand-subtle));
  box-shadow:
    0 14px 32px rgba(10, 26, 54, 0.18),
    inset 0 0 0 1px color-mix(in srgb, #ffffff 42%, transparent);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.workspace-home-logo:hover,
.workspace-home-logo:focus-visible {
  border-color: var(--text);
  background: var(--surface-1);
  outline: none;
  transform: translateY(-1px);
}

.workspace-home-logo .vellwick-logo-mark {
  width: 30px;
  height: 30px;
  min-width: 30px;
}

.workspace-home-logo .vellwick-logo-image {
  object-fit: contain;
  filter: drop-shadow(0 3px 8px color-mix(in srgb, var(--text) 18%, transparent));
}

.workspace-toolbar {
  position: fixed;
  top: 8px;
  left: 54px;
  right: 8px;
  z-index: 340;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) max-content;
  align-items: center;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.workspace-title-stack {
  min-width: 0;
}

.workspace-title-stack .eyebrow {
  margin: 0 0 1px;
  font-size: 0.62rem;
}

.workspace-title-stack h1 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.workspace-search {
  position: relative;
  min-width: 0;
  z-index: 80;
  pointer-events: auto;
}

.workspace-search-input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-input-background, var(--surface-1)) 92%, transparent);
  color: var(--text);
  padding: 0 11px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  box-shadow: 0 14px 34px rgba(10, 26, 54, 0.14);
  backdrop-filter: blur(10px);
}

.workspace-search-input:focus {
  outline: 3px solid var(--focus-ring);
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line-strong));
}

.workspace-search-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  width: min(880px, calc(100vw - 68px));
  max-height: min(520px, 70vh);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--theme-panel-background, linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end)));
  box-shadow: var(--theme-card-shadow, 0 18px 42px rgba(10, 26, 54, 0.18));
  padding: 8px;
  z-index: 220;
  overscroll-behavior: contain;
}

.workspace-search-results {
  display: grid;
  gap: 8px;
}

.workspace-search-group {
  display: grid;
  gap: 6px;
}

.workspace-search-group-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-search-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.workspace-search-option {
  display: grid;
  align-items: center;
  gap: 0;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  text-align: left;
  padding: 7px 9px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.workspace-search-option:hover,
.workspace-search-option.is-active {
  border-color: var(--line-strong);
  background: var(--surface-accent);
  transform: translateY(-1px);
}

.workspace-search-option-label,
.workspace-search-option-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-search-option-label {
  font-size: 0.8rem;
  font-weight: 850;
}

.workspace-search-option-path {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
}

.workspace-search-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface-1);
  padding: 12px;
  font-size: 0.84rem;
  font-weight: 750;
}

.workspace-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.workspace-actions .btn {
  min-height: 32px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface-1) 92%, transparent);
  box-shadow: 0 12px 28px rgba(10, 26, 54, 0.12);
  backdrop-filter: blur(10px);
}

.workspace-canvas {
  position: absolute;
  inset: 0;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 38%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--line) 38%, transparent) 1px, transparent 1px),
    var(--surface-0);
  background-size: 28px 28px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface-1) 55%, transparent);
}

.workspace-brand-watermark {
  position: absolute;
  left: 50%;
  top: 53%;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 34px);
  max-width: min(980px, 86vw);
  color: var(--text);
  pointer-events: none;
  transform: translate(-50%, -50%);
  user-select: none;
  opacity: 0.13;
}

:root[data-theme="dark"] .workspace-brand-watermark {
  opacity: 0.18;
}

.workspace-brand-watermark-mark {
  position: relative;
  flex: 0 0 auto;
  width: clamp(84px, 10vw, 156px);
  height: clamp(84px, 10vw, 156px);
}

.workspace-brand-watermark-mark .vellwick-logo-image {
  filter: drop-shadow(0 18px 30px color-mix(in srgb, #000000 16%, transparent));
}

.workspace-brand-watermark-text {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(4.4rem, 11vw, 11.5rem);
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

.workspace-snap-preview {
  position: absolute;
  z-index: 310;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 64%, var(--line-strong));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-subtle) 74%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--surface-1) 72%, transparent),
    0 18px 42px rgba(10, 26, 54, 0.14);
  opacity: 0.88;
  transition:
    left 120ms ease,
    top 120ms ease,
    width 120ms ease,
    height 120ms ease,
    opacity 120ms ease;
}

.workspace-snap-preview[hidden] {
  display: none;
}

.workspace-resize-preview {
  position: absolute;
  z-index: 320;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 70%, var(--line-strong));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 42%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--surface-1) 82%, transparent),
    0 18px 42px rgba(10, 26, 54, 0.16);
  outline: 1px solid color-mix(in srgb, var(--brand-subtle) 84%, transparent);
}

.workspace-resize-preview[hidden] {
  display: none;
}

.workspace-minimized-toggle.has-minimized {
  border-color: color-mix(in srgb, var(--brand) 44%, var(--line-strong));
  background: var(--brand-subtle);
}

.workspace-minimized-toggle span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.7rem;
}

.workspace-minimized-panel {
  position: absolute;
  top: 58px;
  right: 10px;
  width: min(300px, calc(100% - 20px));
  max-height: min(360px, calc(100% - 20px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: 0 18px 42px rgba(10, 26, 54, 0.18);
  padding: 8px;
  z-index: 260;
}

.workspace-minimized-list {
  display: grid;
  gap: 6px;
}

.workspace-minimized-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 9px;
  text-align: left;
}

.workspace-minimized-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-accent);
}

.workspace-minimized-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 6px;
}

.workspace-desktop {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.workspace-desktop:empty {
  display: none;
}

.workspace-desktop-icon {
  --workspace-desktop-accent: var(--text-soft);
  --workspace-desktop-accent-bg: var(--surface-2);
  position: absolute;
  width: 74px;
  height: 72px;
  min-width: 0;
  min-height: 0;
  display: inline-grid;
  grid-template-rows: 38px minmax(0, 1fr);
  place-items: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--workspace-desktop-accent) 38%, var(--line-strong));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  color: var(--text);
  cursor: grab;
  font: inherit;
  padding: 6px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--surface-0) 64%, transparent),
    0 7px 18px rgba(10, 26, 54, 0.08);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.workspace-desktop-icon[data-workspace-desktop-size="compact"] {
  width: 66px;
  height: 64px;
  grid-template-rows: 32px minmax(0, 1fr);
  padding: 5px;
}

.workspace-desktop-icon[data-workspace-desktop-size="wide"] {
  width: 94px;
  height: 72px;
}

.workspace-desktop-icon[data-workspace-desktop-accent="blue"] {
  --workspace-desktop-accent: #2563eb;
  --workspace-desktop-accent-bg: color-mix(in srgb, #2563eb 14%, var(--surface-2));
}

.workspace-desktop-icon[data-workspace-desktop-accent="green"] {
  --workspace-desktop-accent: #059669;
  --workspace-desktop-accent-bg: color-mix(in srgb, #059669 14%, var(--surface-2));
}

.workspace-desktop-icon[data-workspace-desktop-accent="amber"] {
  --workspace-desktop-accent: #b45309;
  --workspace-desktop-accent-bg: color-mix(in srgb, #b45309 16%, var(--surface-2));
}

.workspace-desktop-icon[data-workspace-desktop-accent="red"] {
  --workspace-desktop-accent: #dc2626;
  --workspace-desktop-accent-bg: color-mix(in srgb, #dc2626 14%, var(--surface-2));
}

.workspace-desktop-icon[data-workspace-desktop-accent="violet"] {
  --workspace-desktop-accent: #7c3aed;
  --workspace-desktop-accent-bg: color-mix(in srgb, #7c3aed 14%, var(--surface-2));
}

.workspace-desktop-icon:hover,
.workspace-desktop-icon.is-saved {
  border-color: color-mix(in srgb, var(--workspace-desktop-accent) 62%, var(--line-strong));
  background: var(--surface-1);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--surface-0) 72%, transparent),
    0 10px 24px rgba(10, 26, 54, 0.12);
}

.workspace-desktop-icon.is-dragging {
  cursor: grabbing;
  border-color: color-mix(in srgb, var(--workspace-desktop-accent) 68%, var(--line-strong));
  background: color-mix(in srgb, var(--surface-1) 92%, transparent);
  box-shadow: 0 14px 30px rgba(10, 26, 54, 0.16);
  transition: none;
  will-change: left, top;
}

.workspace-desktop-icon-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--workspace-desktop-accent) 46%, var(--line-strong));
  border-radius: 11px;
  background: linear-gradient(180deg, var(--workspace-desktop-accent-bg), var(--surface-2));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface-1) 68%, transparent);
}

.workspace-desktop-icon[data-workspace-desktop-size="compact"] .workspace-desktop-icon-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.workspace-desktop-icon-mark::before {
  content: attr(data-workspace-desktop-symbol);
  color: var(--workspace-desktop-accent);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.workspace-desktop-icon-label {
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  color: var(--text);
  font-size: 0.61rem;
  font-weight: 780;
  line-height: 1.08;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  clip: auto;
  clip-path: none;
}

.workspace-desktop-menu {
  position: absolute;
  z-index: 380;
  display: grid;
  width: 196px;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: 0 18px 42px rgba(10, 26, 54, 0.2);
  padding: 5px;
  pointer-events: auto;
}

.workspace-desktop-menu[hidden] {
  display: none !important;
}

.workspace-desktop-menu[data-workspace-menu-mode="workspace"] [data-workspace-menu-tile-action="true"] {
  display: none;
}

.workspace-desktop-menu-separator {
  height: 1px;
  margin: 2px 3px;
  background: var(--line);
}

.workspace-desktop-menu button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 820;
  padding: 8px 9px;
  text-align: left;
}

.workspace-desktop-menu button:disabled,
.workspace-desktop-menu button[aria-disabled="true"] {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.72;
}

.workspace-desktop-menu button:hover,
.workspace-desktop-menu button:focus-visible {
  border-color: var(--line);
  background: var(--surface-accent);
  outline: none;
}

.workspace-desktop-menu button:disabled:hover,
.workspace-desktop-menu button[aria-disabled="true"]:hover,
.workspace-desktop-menu button:disabled:focus-visible,
.workspace-desktop-menu button[aria-disabled="true"]:focus-visible {
  border-color: transparent;
  background: transparent;
}

.workspace-desktop-menu .workspace-menu-theme-toggle {
  --theme-switch-width: 54px;
  --theme-switch-height: 28px;
  --theme-knob-size: 20px;
  width: max-content;
  justify-self: start;
  margin: 2px 5px 1px;
  padding: 2px;
  border: 0;
  text-align: left;
}

.workspace-desktop-menu .workspace-menu-theme-toggle:hover,
.workspace-desktop-menu .workspace-menu-theme-toggle:focus-visible {
  border-color: transparent;
  background: transparent;
}

.workspace-desktop-customize {
  position: absolute;
  z-index: 370;
  display: grid;
  width: min(372px, calc(100% - 20px));
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: 0 22px 52px rgba(10, 26, 54, 0.22);
  padding: 10px;
  pointer-events: auto;
}

.workspace-desktop-customize header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace-desktop-customize h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 880;
}

.workspace-desktop-customize-close {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
}

.workspace-desktop-customize form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 8px;
}

.workspace-desktop-customize label {
  color: var(--text-soft);
  font-size: 0.69rem;
  font-weight: 850;
}

.workspace-desktop-customize form > label,
.workspace-desktop-customize-options,
.workspace-desktop-customize-actions {
  grid-column: 1 / -1;
}

.workspace-desktop-customize form > label:nth-of-type(1),
.workspace-desktop-customize form > label:nth-of-type(2),
.workspace-desktop-customize form > input:nth-of-type(1),
.workspace-desktop-customize form > input:nth-of-type(2) {
  grid-column: auto;
}

.workspace-desktop-customize input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--theme-input-background, var(--surface-2));
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 0 9px;
}

.workspace-desktop-customize-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.workspace-desktop-customize-options-size {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-desktop-choice {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  padding: 7px 8px;
}

.workspace-desktop-choice input {
  width: 13px;
  height: 13px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.workspace-desktop-choice span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-desktop-choice-swatch {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--text-soft);
}

.workspace-desktop-choice-swatch[data-workspace-desktop-accent="blue"] {
  background: #2563eb;
}

.workspace-desktop-choice-swatch[data-workspace-desktop-accent="green"] {
  background: #059669;
}

.workspace-desktop-choice-swatch[data-workspace-desktop-accent="amber"] {
  background: #b45309;
}

.workspace-desktop-choice-swatch[data-workspace-desktop-accent="red"] {
  background: #dc2626;
}

.workspace-desktop-choice-swatch[data-workspace-desktop-accent="violet"] {
  background: #7c3aed;
}

.workspace-desktop-customize input:focus {
  border-color: var(--line-strong);
  outline: 3px solid var(--focus-ring);
}

.workspace-desktop-choice:has(input:checked) {
  border-color: var(--line-strong);
  background: var(--surface-accent);
}

.workspace-desktop-customize-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 4px;
}

.workspace-desktop-customize-actions button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  padding: 7px 9px;
}

.workspace-desktop-customize-actions button[type="submit"] {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line-strong));
  background: color-mix(in srgb, var(--brand-subtle) 78%, var(--surface-1));
  color: var(--text);
}

.workspace-empty-state {
  position: absolute;
  inset: 66px 18px 18px;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 6px;
  min-height: 220px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 78%, transparent);
  text-align: center;
  color: var(--text-soft);
}

.workspace-empty-state[hidden] {
  display: none;
}

.workspace-empty-state h2,
.workspace-empty-state p {
  margin: 0;
}

.workspace-empty-state h2 {
  color: var(--text);
  font-size: 1rem;
}

.workspace-empty-state p {
  font-size: 0.9rem;
  font-weight: 650;
}

.workspace-window {
  position: absolute;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  min-width: 280px;
  min-height: 220px;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: 0 18px 44px rgba(10, 26, 54, 0.18);
  contain: layout paint style;
  isolation: isolate;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 120ms ease;
}

.workspace-window[hidden] {
  display: none !important;
}

.workspace-window[data-workspace-maximized="true"] {
  border-radius: 0;
}

.workspace-window.is-active {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line-strong));
  box-shadow: 0 22px 52px rgba(10, 26, 54, 0.24);
}

.workspace-window.is-dragging,
.workspace-window.is-resizing {
  user-select: none;
  transition: none !important;
  will-change: transform;
}

.workspace-window.is-dragging {
  cursor: grabbing;
}

.workspace-window.is-resizing {
  opacity: 0.96;
}

.workspace-window.is-dragging .workspace-window-frame,
.workspace-window.is-resizing .workspace-window-frame,
.workspace-canvas.is-window-interacting .workspace-window-frame {
  pointer-events: none;
}

.workspace-window.is-resizing .workspace-window-frame {
  opacity: 0.72;
}

.workspace-window-chrome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface-1));
  padding: 5px 7px 5px 9px;
  cursor: grab;
}

.workspace-window-title-stack {
  min-width: 0;
}

.workspace-window-title-stack h2,
.workspace-window-title-stack p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-window-title-stack h2 {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 850;
}

.workspace-window-title-stack p {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.workspace-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.workspace-window-button {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-1);
  color: var(--text);
  padding: 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.workspace-window-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-accent);
}

.workspace-window-icon-button svg {
  width: 16px;
  height: 16px;
  display: block;
  margin: auto;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.05;
}

.workspace-window-button[data-window-command="refresh"].workspace-window-icon-button svg {
  width: 16.5px;
  height: 16.5px;
  stroke-width: 2.2;
}

.workspace-window-icon-button::before,
.workspace-window-icon-button::after {
  content: none !important;
}

.workspace-window-button[data-window-command="pin"]::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 8px;
  width: 8px;
  height: 9px;
  border-radius: 2px 2px 4px 4px;
  background: currentColor;
  clip-path: polygon(14% 0, 86% 0, 86% 52%, 62% 52%, 50% 100%, 38% 52%, 14% 52%);
}

.workspace-window-button[data-window-command="pin"]::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 13px;
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.workspace-window-button[data-window-command="home"]::before {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 5px;
  width: 11px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 1px 1px 2px 2px;
}

.workspace-window-button[data-window-command="home"]::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.workspace-window-button[data-window-command="minimize"]::before {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.workspace-window-button[data-window-command="maximize"]::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.workspace-window[data-workspace-maximized="true"] .workspace-window-button[data-window-command="maximize"]::before {
  inset: 8px 5px 5px 8px;
}

.workspace-window[data-workspace-maximized="true"] .workspace-window-button[data-window-command="maximize"]::after {
  content: "";
  position: absolute;
  inset: 5px 8px 8px 5px;
  border: 2px solid currentColor;
  border-radius: 2px;
  background: var(--surface-1);
}

.workspace-window-button[data-window-command="refresh"]::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 999px;
  transform: rotate(28deg);
}

.workspace-window-button[data-window-command="refresh"]::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 4px;
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transform: rotate(44deg);
}

.workspace-window-button.workspace-window-icon-button::before,
.workspace-window-button.workspace-window-icon-button::after {
  content: none !important;
}

.workspace-window-button[data-window-command="close"]::before,
.workspace-window-button[data-window-command="close"]::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.workspace-window-button[data-window-command="close"]::before {
  transform: rotate(45deg);
}

.workspace-window-button[data-window-command="close"]::after {
  transform: rotate(-45deg);
}

.workspace-window-button.workspace-window-icon-button::before,
.workspace-window-button.workspace-window-icon-button::after {
  content: none !important;
  display: none !important;
}

.workspace-window-frame {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: var(--surface-0);
}

.workspace-window-loader {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  bottom: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: 9px;
  background: color-mix(in srgb, var(--surface-1) 90%, transparent);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 820;
  pointer-events: none;
}

.workspace-window-loader[hidden],
.workspace-window[data-workspace-loading="false"] .workspace-window-loader {
  display: none !important;
}

.workspace-window[data-workspace-frame-error="true"] .workspace-window-loader {
  background: color-mix(in srgb, var(--surface-1) 94%, rgba(217, 45, 32, 0.12));
  color: #b42318;
}

.workspace-window-loader-bar {
  position: relative;
  display: block;
  width: min(190px, 42vw);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.workspace-window-loader-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: var(--brand-strong);
  animation: workspaceWindowLoad 900ms ease-in-out infinite;
}

.workspace-window[data-workspace-frame-error="true"] .workspace-window-loader-bar::before {
  width: 100%;
  background: #d92d20;
  animation: none;
}

@keyframes workspaceWindowLoad {
  0% {
    transform: translateX(-110%);
  }
  50% {
    transform: translateX(85%);
  }
  100% {
    transform: translateX(250%);
  }
}

.workspace-window-resize-handle {
  position: absolute;
  z-index: 8;
  background: transparent;
  touch-action: none;
}

.workspace-window-resize-handle[data-resize-edge="n"],
.workspace-window-resize-handle[data-resize-edge="s"] {
  left: 8px;
  right: 8px;
  height: 14px;
  cursor: ns-resize;
}

.workspace-window-resize-handle[data-resize-edge="n"] {
  top: -7px;
}

.workspace-window-resize-handle[data-resize-edge="s"] {
  bottom: -7px;
}

.workspace-window-resize-handle[data-resize-edge="e"],
.workspace-window-resize-handle[data-resize-edge="w"] {
  top: 8px;
  bottom: 8px;
  width: 14px;
  cursor: ew-resize;
}

.workspace-window-resize-handle[data-resize-edge="e"] {
  right: -7px;
}

.workspace-window-resize-handle[data-resize-edge="w"] {
  left: -7px;
}

.workspace-window-resize-handle[data-resize-edge="ne"],
.workspace-window-resize-handle[data-resize-edge="nw"],
.workspace-window-resize-handle[data-resize-edge="se"],
.workspace-window-resize-handle[data-resize-edge="sw"] {
  width: 22px;
  height: 22px;
}

.workspace-window-resize-handle[data-resize-edge="ne"] {
  top: -8px;
  right: -8px;
  cursor: nesw-resize;
}

.workspace-window-resize-handle[data-resize-edge="nw"] {
  top: -8px;
  left: -8px;
  cursor: nwse-resize;
}

.workspace-window-resize-handle[data-resize-edge="se"] {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}

.workspace-window-resize-handle[data-resize-edge="sw"] {
  left: -8px;
  bottom: -8px;
  cursor: nesw-resize;
}

@media (max-width: 720px) {
  .module-back-row {
    align-items: flex-start;
  }

  .module-jump {
    flex-basis: calc(100% - 46px);
    min-width: 0;
  }

  .module-jump-panel {
    width: calc(100vw - 24px);
    max-height: 68vh;
  }

  .module-jump-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-toolbar {
    left: 52px;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .workspace-search-panel {
    width: calc(100vw - 62px);
    max-height: 68vh;
  }

  .workspace-search-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .workspace-window {
    min-width: min(320px, calc(100% - 18px));
  }
}

.page-head {
  padding: clamp(18px, 2.9vw, 28px);
  margin-bottom: 14px;
}

.page-head h1 {
  margin-top: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.55rem, 2.9vw, 2.2rem);
}

.page-head p {
  margin-top: 10px;
  color: var(--text-soft);
}

.page-head-split {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
}

.page-head-main {
  flex: 1;
  min-width: 0;
}

.active-warehouse-panel {
  width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, var(--panel-grad-start), var(--panel-grad-end));
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.active-warehouse-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.active-warehouse-code {
  margin: 0;
  color: var(--brand-strong);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.1rem, 1.9vw, 1.55rem);
  font-weight: 800;
  line-height: 1.05;
}

.active-warehouse-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.79rem;
  font-weight: 700;
}

.module-search-panel {
  margin-bottom: 14px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.module-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.module-search-label {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 3px;
}

.module-view-btn {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  padding: 6px 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.module-view-btn:hover,
.module-view-btn.is-active {
  border-color: var(--line);
  background: var(--surface-1);
  color: var(--brand-strong);
}

.module-search-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.module-search-results {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.module-categories {
  display: grid;
  gap: 16px;
}

.module-category {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-1) 92%, var(--surface-2));
  padding: 12px;
}

.module-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-muted);
  padding: 0 2px 10px;
}

.module-category-head h2 {
  font-size: 1rem;
  letter-spacing: 0;
}

.module-category-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.module-category-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transform: rotate(0deg);
  transition: transform 140ms ease;
}

.module-category-toggle:hover {
  border-color: var(--line-strong);
  color: var(--brand-strong);
}

.module-category.is-collapsed .module-category-toggle::before {
  transform: rotate(-90deg);
}

.module-category.is-collapsed .module-grid {
  display: none;
}

.module-category.is-collapsed .module-category-head {
  border-bottom-color: transparent;
  padding-bottom: 0;
}

.module-category-head p,
.module-category-empty {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.module-category-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  padding: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.module-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.module-card h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.module-card-title-row h2 {
  min-width: 0;
}

.module-title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-star-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: color-mix(in srgb, var(--text-muted) 82%, var(--line-strong));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.86;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.module-star-btn:hover {
  border-color: color-mix(in srgb, var(--text-soft) 32%, var(--line));
  background: var(--surface-1);
  color: var(--text-soft);
  opacity: 1;
  transform: translateY(-1px);
}

.module-star-glyph::before {
  content: "\2606";
}

.module-star-btn.is-starred {
  border-color: color-mix(in srgb, #c27a14 46%, var(--line));
  background: color-mix(in srgb, #f7d46a 18%, var(--surface-1));
  color: #92520a;
  opacity: 1;
  transform: translateY(-1px);
}

.module-star-btn.is-starred .module-star-glyph::before {
  content: "\2605";
}

.module-card p {
  color: var(--text-soft);
}
.vis-dry-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 12px;
}

.vis-dry-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.vis-dry-card h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.12rem;
}

.vis-dry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variable-item-layout {
  display: grid;
  gap: 12px;
}

.sap-variable-head {
  padding: 18px;
}

.sap-variable-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 14px;
  align-items: stretch;
}

.sap-variable-lede {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.sap-variable-badges {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sap-variable-guide {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.sap-variable-guide h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.98rem;
}

.sap-variable-guide-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--text-soft);
  font-size: 0.86rem;
  display: grid;
  gap: 6px;
}

.sap-variable-layout {
  gap: 14px;
}

.variable-item-actions-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.variable-item-actions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.variable-item-actions-head h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.12rem;
}

.variable-item-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.variable-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.variable-item-actions-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  width: 100%;
  margin-left: 0;
}

.variable-item-upload-panel {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-muted);
  border-bottom: 1px solid var(--line-muted);
}

.variable-item-upload-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
  align-items: end;
}

.variable-item-upload-source {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.variable-item-file-field {
  min-width: min(100%, 280px);
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.variable-item-file-field input[type="file"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
  font-size: 0.9rem;
}

.variable-item-file-field input[type="file"]:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.variable-item-file-field input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--brand-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.variable-item-actions-left,
.variable-item-actions-right {
  padding: 8px;
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  background: var(--surface-1);
}

.variable-item-actions-left {
  justify-content: flex-start;
  align-content: flex-start;
  min-width: 0;
}

.variable-item-actions-right {
  justify-content: flex-end;
  align-content: flex-start;
  min-width: max-content;
}

@media (max-width: 1200px) {
  .variable-item-actions-groups {
    width: 100%;
    margin-left: 0;
    grid-template-columns: 1fr;
  }

  .variable-item-upload-main {
    grid-template-columns: 1fr;
  }
}

.sap-variable-command-card {
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}

.sap-variable-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: flex-start;
}

.sap-variable-search-bar {
  margin-top: 10px;
  grid-template-columns: 1fr;
}

.sap-variable-actions {
  justify-content: flex-end;
}

.sap-variable-status {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line-muted);
}

.variable-item-status {
  margin: 0;
  min-height: 20px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.variable-item-sheets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.variable-item-sheet-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.variable-item-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.variable-item-sheet-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.variable-item-sheet-head h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.02rem;
}

.variable-item-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--brand-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.variable-item-sheet-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  min-height: 520px;
  max-height: 72vh;
}

.sap-variable-sheet-card {
  padding: 0;
  overflow: hidden;
}

.sap-variable-sheet-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.sap-variable-sheet-note {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.sap-variable-sheet-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sap-variable-table-shell {
  padding: 12px;
}

.sap-variable-sheet-wrap {
  min-height: 560px;
  max-height: 76vh;
  border-radius: 12px;
}

body[data-module-page="variable-item-sap-variable"] .vis-assignment-table th {
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

body[data-module-page="variable-item-sap-variable"] .vis-assignment-table td {
  font-size: 0.84rem;
}

body[data-module-page="variable-item-sap-variable"] .vis-assignment-table tbody tr:nth-child(even) td {
  background: var(--surface-2);
}

body[data-module-page="variable-item-sap-variable"]
  .vis-assignment-table
  tbody
  tr:nth-child(even)
  th.row-head {
  background: var(--surface-3);
}

body[data-module-page="variable-item-sap-variable"] .vis-assignment-table td[contenteditable="true"]:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.vis-search-bar {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.vis-search-bar input[type="text"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.vis-search-actions {
  display: flex;
  gap: 8px;
}

.vis-upload-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.upload-status {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.upload-status.is-idle {
  color: var(--text-soft);
  border-color: var(--line);
}

.upload-status.is-loading {
  color: var(--brand-strong);
  border-color: var(--line-info);
  background: var(--surface-accent);
}

.upload-status.is-ready {
  color: var(--ok);
  border-color: var(--line-success);
  background: var(--surface-success);
}

.upload-status.is-error {
  color: var(--danger);
  border-color: rgba(183, 34, 34, 0.28);
  background: rgba(183, 34, 34, 0.08);
}

.vis-paste-status {
  margin-top: 8px;
}

.vis-progress {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
}

.vis-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 7px;
}

.vis-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  overflow: hidden;
}

.vis-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transition: width 180ms ease;
}

.vis-export-config {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  display: grid;
  gap: 10px;
}

.vis-export-mode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.vis-export-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.vis-export-radio input[type="radio"] {
  accent-color: var(--brand);
}

.vis-export-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.vis-division-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-2);
}

.vis-division-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 700;
}

.vis-division-item input[type="checkbox"] {
  accent-color: var(--brand);
}

.vis-assignment-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.vis-assignment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.vis-assignment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vis-assignment-sheet-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  min-height: 700px;
  max-height: 78vh;
}

.vis-assignment-sheet-wrap.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.vis-assignment-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.vis-assignment-table th,
.vis-assignment-table td {
  border: 1px solid var(--line-muted);
  min-width: 170px;
  padding: 8px 10px;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.vis-assignment-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-3);
  color: var(--text-soft);
  z-index: 3;
  text-align: left;
}

.vis-assignment-table thead th.row-head {
  left: 0;
  z-index: 4;
}

.vis-assignment-table .row-head {
  width: 52px;
  min-width: 52px;
  text-align: center;
}

.vis-assignment-table tbody th.row-head {
  position: sticky;
  left: 0;
  top: auto;
  z-index: 2;
  background: var(--surface-3);
  color: var(--text-soft);
}

.vis-assignment-table tbody tr.is-locked-row > td,
.vis-assignment-table tbody tr.is-locked-row > th.row-head,
.vis-assignment-table tbody tr.is-frozen-row > td,
.vis-assignment-table tbody tr.is-frozen-row > th.row-head {
  position: sticky;
  top: var(--sticky-frozen-row-top, var(--sticky-locked-row-top, 40px));
}

.vis-assignment-table tbody tr.is-locked-row > td,
.vis-assignment-table tbody tr.is-frozen-row > td {
  z-index: 2;
}

.vis-assignment-table tbody tr.is-locked-row > th.row-head,
.vis-assignment-table tbody tr.is-frozen-row > th.row-head {
  left: 0;
  z-index: 4;
}

.vis-assignment-table td {
  background: var(--surface-1);
}

.vis-assignment-table td[contenteditable="true"] {
  outline: none;
  cursor: text;
}

.vis-assignment-table td[contenteditable="true"]:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.vis-assignment-table td.is-locked {
  background: var(--surface-3);
  color: var(--text-soft);
  font-weight: 700;
  cursor: default;
}

.vis-assignment-table td .readonly-cell {
  display: inline-block;
  width: 100%;
  padding: 6px 4px;
  color: var(--text);
  font-weight: 700;
}

.vis-assignment-table tbody tr.is-row-match td,
.vis-assignment-table tbody tr.is-row-match th.row-head {
  background: var(--surface-accent-2);
}

.inline-note {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  min-height: 20px;
  overflow-wrap: anywhere;
}

.putaway-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.putaway-card {
  padding: 16px;
}

.putaway-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.putaway-card-head h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#calendar-month-label {
  font-size: 0.96rem;
  color: var(--brand-strong);
  min-width: 130px;
  text-align: center;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-soft);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-cell {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.cal-cell.is-available {
  border-color: var(--line-strong);
  background: var(--surface-3);
  cursor: pointer;
}

.cal-cell.is-available:hover {
  border-color: var(--brand);
}

.cal-cell.is-selected {
  border-color: var(--brand);
  background: var(--brand-subtle);
  color: var(--brand-strong);
}

.cal-cell.is-unavailable {
  border-color: var(--line-muted);
  background: var(--surface-4);
  color: var(--text-muted);
}

.cal-cell.is-empty {
  border: 0;
  background: transparent;
}

.availability-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.availability-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.availability-chip:hover {
  border-color: var(--line-strong);
}

.availability-chip.is-selected {
  border-color: var(--brand);
  background: var(--brand-subtle);
  color: var(--brand-strong);
}

.putaway-workspace {
  margin-top: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.putaway-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-pick {
  position: relative;
  overflow: hidden;
}

.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sheet-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  max-height: 78vh;
  min-height: 900px;
}

.sheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.sheet-table th,
.sheet-table td {
  border: 1px solid var(--line-muted);
  min-width: 170px;
  padding: 7px 8px;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.sheet-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-3);
  color: var(--text-soft);
  z-index: 3;
}

.sheet-table thead th.row-head {
  left: 0;
  z-index: 4;
  width: 52px;
  min-width: 52px;
  text-align: center;
}

.sheet-table tbody th.row-head {
  position: sticky;
  left: 0;
  top: auto;
  z-index: 2;
  background: var(--surface-3);
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}

.sheet-table tbody tr.is-frozen-row > td,
.sheet-table tbody tr.is-frozen-row > th.row-head {
  position: sticky;
  top: var(--sticky-frozen-row-top, 40px);
}

.sheet-table tbody tr.is-frozen-row > td {
  z-index: 2;
}

.sheet-table tbody tr.is-frozen-row > th.row-head {
  left: 0;
  z-index: 4;
}

.sheet-table tbody tr.is-row-selected th.row-head,
.sheet-table tbody tr.is-row-selected td {
  background: var(--surface-accent-2);
}

.sheet-table td {
  background: var(--surface-1);
}

.sheet-table td:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.file-queue {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.file-queue li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  padding: 8px 10px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.vpc-monthly-layout,
.vpc-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vpc-monthly-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.vpc-monthly-output-card {
  margin-top: 12px;
}

.vpc-monthly-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vpc-monthly-card-head h2,
.vpc-summary-panel-head h3 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.12rem;
}

.vpc-monthly-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

body[data-module-page="vpc-monthly-report"] .inline-note:empty {
  display: none;
}

.vpc-monthly-action-select {
  min-height: 42px;
  min-width: 180px;
  max-width: 260px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.vpc-monthly-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.vpc-monthly-config-grid,
.vpc-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.vpc-monthly-field {
  display: grid;
  gap: 8px;
}

.vpc-monthly-field span {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.vpc-monthly-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.vpc-monthly-text-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.vpc-monthly-field select:focus,
.vpc-monthly-action-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.vpc-monthly-text-input:focus,
.vpc-monthly-sql-editor:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.vpc-monthly-sql-editor {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  color: var(--text);
  padding: 14px 16px;
  font: 600 0.92rem/1.6 "Cascadia Code", "Consolas", "Courier New", monospace;
  white-space: pre;
  overflow: auto;
}

.vpc-metric-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 14px 16px;
}

.vpc-metric-card span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vpc-metric-card strong {
  color: var(--brand-strong);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  letter-spacing: -0.03em;
}

.vpc-preview-wrap,
.vpc-summary-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-1);
}

.vpc-preview-wrap {
  max-height: 540px;
}

.vpc-summary-table-wrap {
  max-height: 620px;
}

.vpc-preview-table,
.vpc-summary-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.vpc-preview-table th,
.vpc-preview-table td,
.vpc-summary-table th,
.vpc-summary-table td {
  border: 1px solid var(--line-muted);
  min-width: 140px;
  padding: 8px 10px;
  font-size: 0.85rem;
  text-align: left;
  vertical-align: top;
}

.vpc-preview-table thead th,
.vpc-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-3);
  color: var(--text-soft);
}

.vpc-preview-table .vpc-preview-index,
.vpc-summary-table th:first-child {
  min-width: 56px;
  width: 56px;
}

.vpc-matrix-table {
  table-layout: fixed;
}

.vpc-matrix-table col.vpc-matrix-col-type {
  width: 110px;
}

.vpc-matrix-table col.vpc-matrix-col-description {
  width: 320px;
}

.file-hosting-layout {
  display: grid;
  gap: 12px;
}

.file-hosting-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 24px);
}

.file-hosting-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.file-hosting-card-head h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.12rem;
}

.file-hosting-card-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.file-hosting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.file-hosting-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-hosting-dropzone {
  width: 100%;
  border: 1.5px dashed var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-accent) 52%, transparent), transparent),
    var(--surface-2);
  padding: 30px 18px;
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.file-hosting-dropzone:hover,
.file-hosting-dropzone.is-dragover {
  border-color: var(--brand);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-subtle) 72%, transparent), transparent),
    var(--surface-1);
  transform: translateY(-1px);
}

.file-hosting-dropzone.is-disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.file-hosting-dropzone-title {
  font-weight: 800;
  font-size: 1rem;
}

.file-hosting-dropzone-note,
.file-hosting-note-list,
.file-hosting-entry-meta,
.file-hosting-empty span {
  color: var(--text-soft);
}

.file-hosting-controls,
.file-hosting-field {
  display: grid;
  gap: 8px;
}

.file-hosting-field span {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.file-hosting-field select {
  width: 100%;
  max-width: 220px;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.file-hosting-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.file-hosting-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.file-hosting-metric-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 14px 16px;
}

.file-hosting-metric-card span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.file-hosting-metric-card strong {
  color: var(--brand-strong);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  letter-spacing: -0.03em;
}

.file-hosting-note-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.file-hosting-list {
  display: grid;
  gap: 12px;
}

.file-hosting-empty,
.file-hosting-entry {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  padding: 16px;
}

.file-hosting-empty {
  display: grid;
  gap: 6px;
}

.file-hosting-entry {
  display: grid;
  gap: 12px;
}

.file-hosting-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.file-hosting-entry-name {
  margin: 0;
  font-size: 1.02rem;
}

.file-hosting-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.file-hosting-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-hosting-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--brand-subtle) 64%, transparent);
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.file-hosting-badge.is-alert {
  background: rgba(198, 83, 63, 0.16);
  color: #c6533f;
}

.file-hosting-badge.is-muted {
  background: var(--surface-3);
  color: var(--text-soft);
}

.file-hosting-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.88rem;
}

.knowledge-hub-layout {
  display: grid;
  gap: 12px;
}

.knowledge-hub-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 24px);
}

.knowledge-hub-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-hub-card-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.knowledge-hub-card-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.knowledge-hub-actions,
.knowledge-hub-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.knowledge-hub-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.knowledge-hub-dropzone {
  width: 100%;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-accent) 52%, transparent), transparent), var(--surface-2);
  padding: 30px 18px;
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.knowledge-hub-dropzone:hover,
.knowledge-hub-dropzone.is-dragover {
  border-color: var(--brand);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-subtle) 72%, transparent), transparent), var(--surface-1);
  transform: translateY(-1px);
}

.knowledge-hub-dropzone.is-disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.knowledge-hub-dropzone-title {
  font-weight: 800;
  font-size: 1rem;
}

.knowledge-hub-dropzone-note,
.knowledge-hub-note-list,
.knowledge-hub-entry-meta,
.knowledge-hub-entry-path,
.knowledge-hub-empty span,
.knowledge-hub-feedback-line {
  color: var(--text-soft);
}

.knowledge-hub-folder-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 8px;
  align-items: end;
}

.knowledge-hub-field,
.knowledge-hub-search {
  display: grid;
  gap: 8px;
}

.knowledge-hub-field span {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.knowledge-hub-field select,
.knowledge-hub-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.knowledge-hub-field select:focus,
.knowledge-hub-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.knowledge-hub-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.knowledge-hub-metric-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 14px 16px;
}

.knowledge-hub-metric-card span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-hub-metric-card strong {
  color: var(--brand-strong);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

.knowledge-hub-note-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.knowledge-hub-list,
.knowledge-hub-feedback-list {
  display: grid;
  gap: 12px;
}

.knowledge-hub-empty,
.knowledge-hub-entry,
.knowledge-hub-feedback-entry {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  padding: 16px;
}

.knowledge-hub-empty,
.knowledge-hub-entry,
.knowledge-hub-feedback-entry {
  display: grid;
  gap: 12px;
}

.knowledge-hub-feedback-entry.is-reviewed {
  opacity: 0.72;
}

.knowledge-hub-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-hub-entry-name {
  margin: 0;
  font-size: 1.02rem;
}

.knowledge-hub-entry-path {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.knowledge-hub-badge-row,
.knowledge-hub-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-hub-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--brand-subtle) 64%, transparent);
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knowledge-hub-badge.is-muted {
  background: var(--surface-3);
  color: var(--text-soft);
}

.knowledge-hub-excerpt,
.knowledge-hub-feedback-line {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.orin-assistant {
  position: fixed;
  left: auto;
  top: auto;
  right: 18px;
  bottom: 18px;
  z-index: 9020;
  font: inherit;
}

.orin-launcher {
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line-strong));
  border-radius: 14px;
  background: var(--surface-1);
  color: var(--brand-strong);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  font-weight: 900;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  animation: none;
}

.orin-launcher::after {
  display: none;
}

.orin-launcher:hover,
.orin-assistant.is-open .orin-launcher {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line-strong));
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  filter: none;
}

.orin-launcher-icon {
  position: relative;
  width: 27px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 8px;
  z-index: 1;
}

.orin-launcher-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: -6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  background: transparent;
}

.orin-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(420px, calc(100vw - 28px));
  height: min(640px, calc(100vh - 108px));
  max-height: min(640px, calc(100vh - 108px));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.24);
  display: grid;
  grid-template-rows: auto minmax(245px, 1fr) auto;
  overflow: hidden;
}

.orin-panel[hidden] {
  display: none;
}

.orin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}

.orin-kicker {
  margin: 0 0 3px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.orin-panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.orin-panel-actions {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 46px;
}

.orin-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.orin-close span {
  font-size: 1.45rem;
  line-height: 1;
  transform: translateY(-1px);
}

.orin-response-path {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1;
  opacity: 0.72;
}

.orin-close:hover {
  transform: rotate(8deg) scale(1.08);
  border-color: color-mix(in srgb, var(--brand) 44%, var(--line-strong));
  background: var(--surface-2);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.orin-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
  scrollbar-color: color-mix(in srgb, var(--brand) 42%, var(--line-strong)) transparent;
}

.orin-bubble,
.orin-results,
.orin-review-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--surface-2);
}

.orin-bubble p,
.orin-result-card p,
.orin-review-box p {
  margin: 0;
  line-height: 1.45;
}

.orin-bubble.is-user {
  margin-left: 42px;
  background: color-mix(in srgb, var(--brand-subtle) 70%, var(--surface-1));
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
}

.orin-bubble.is-bot {
  margin-right: 20px;
}

.orin-bubble.is-loading p::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: middle;
  animation: orinSearchingPulse 900ms ease-in-out infinite;
}

.orin-intro {
  display: grid;
  gap: 10px;
}

.orin-bubble,
.orin-intro,
.orin-review-box {
  animation: orinMessageIn 180ms ease both;
}

.orin-bubble.is-removing,
.orin-intro.is-removing {
  animation: orinMessageOut 180ms ease forwards;
}

.orin-results {
  display: grid;
  gap: 9px;
}

.orin-results.is-provisional {
  opacity: 0.78;
}

.orin-result-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-1);
  padding: 10px;
  animation: orinResultIn 260ms ease both;
  animation-delay: calc(var(--orin-card-index, 0) * 95ms);
}

.orin-result-card.is-best-result {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line-strong));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 13%, transparent);
}

.orin-result-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.orin-result-title {
  color: var(--brand-strong);
  font-weight: 900;
  text-decoration: none;
  min-width: 0;
}

.orin-result-title:hover {
  text-decoration: underline;
}

.orin-result-path,
.orin-result-meta,
.orin-feedback-note {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.orin-feedback-muted {
  opacity: 0.86;
}

.orin-result-path {
  overflow-wrap: anywhere;
}

.orin-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orin-best-result-tag {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--brand) 54%, var(--line-strong));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-subtle) 78%, var(--surface-1));
  color: var(--brand-strong);
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
}

.orin-outdated-btn {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.orin-review-box {
  display: grid;
  gap: 8px;
}

.orin-review-stars {
  display: flex;
  gap: 6px;
}

.orin-review-stars button {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.02rem;
  line-height: 1;
  opacity: 0.62;
  transition: transform 150ms ease, color 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.orin-review-stars button:hover,
.orin-review-stars button.is-selected {
  color: #b7791f;
  background: color-mix(in srgb, #facc15 13%, var(--surface-1));
  border-color: color-mix(in srgb, #b7791f 44%, var(--line-strong));
  opacity: 1;
  transform: translateY(-1px);
}

.orin-review-box textarea,
.orin-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
}

.orin-form textarea {
  min-height: 62px;
  max-height: 132px;
  line-height: 1.35;
}

.orin-review-box textarea:focus,
.orin-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.orin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.orin-send-btn {
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line-strong));
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: var(--brand-contrast);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 0;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 18%, transparent);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease, border-color 150ms ease;
}

.orin-send-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 68%, var(--line-strong));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 26%, transparent);
  filter: saturate(1.08);
}

.orin-send-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 18%, transparent);
}

.orin-send-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring), 0 10px 22px color-mix(in srgb, var(--brand) 22%, transparent);
}

.orin-send-icon {
  width: 21px;
  height: 21px;
  display: block;
  translate: 1px 0;
}

.orin-send-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes orinLauncherFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@keyframes orinLauncherPulse {
  0%,
  100% {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
  }
  50% {
    box-shadow: 0 16px 42px color-mix(in srgb, var(--brand) 32%, rgba(15, 23, 42, 0.2));
  }
}

@keyframes orinSearchingPulse {
  0% {
    opacity: 0.3;
    transform: scale(0.72);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.72);
  }
}

@keyframes orinMessageIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes orinMessageOut {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
  }
}

@keyframes orinResultIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .knowledge-hub-card-head,
  .knowledge-hub-entry-head {
    display: grid;
  }

  .knowledge-hub-actions,
  .knowledge-hub-entry-actions {
    justify-content: stretch;
  }

  .knowledge-hub-actions .btn,
  .knowledge-hub-entry-actions .btn,
  .knowledge-hub-folder-tools .btn {
    width: 100%;
  }

  .knowledge-hub-folder-tools {
    grid-template-columns: 1fr;
  }

  .knowledge-hub-metric-grid {
    grid-template-columns: 1fr;
  }

  .orin-assistant {
    right: 12px;
    bottom: 12px;
  }

  .orin-panel {
    width: calc(100vw - 24px);
    height: min(690px, calc(100vh - 90px));
    max-height: calc(100vh - 90px);
    bottom: 56px;
  }

  .orin-form {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .orin-send-btn {
    width: 42px;
    height: 42px;
  }
}

.vpc-matrix-table col.vpc-matrix-col-code {
  width: 104px;
}

.vpc-matrix-table col.vpc-matrix-col-value,
.vpc-matrix-table col.vpc-matrix-col-total {
  width: 96px;
}

.vpc-matrix-table th,
.vpc-matrix-table td {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.vpc-matrix-table th:first-child,
.vpc-matrix-table td:first-child {
  min-width: 110px;
  width: 110px;
}

.vpc-matrix-table thead th {
  text-align: center;
}

.vpc-matrix-table td:not(.vpc-matrix-description-cell) {
  text-align: center;
}

.vpc-matrix-table .vpc-matrix-description-cell {
  text-align: left;
}

.vpc-matrix-table .vpc-matrix-code-cell,
.vpc-matrix-table .vpc-matrix-type-cell,
.vpc-matrix-table .vpc-matrix-value-cell,
.vpc-matrix-table .vpc-matrix-total-cell,
.vpc-matrix-table .vpc-matrix-grand-total-cell {
  vertical-align: middle;
}

.vpc-matrix-table .vpc-matrix-code-cell strong {
  display: block;
  letter-spacing: 0.03em;
}

.vpc-matrix-table .vpc-matrix-spacer td {
  padding: 0;
  height: 8px;
  border: 0;
  background: transparent;
}

.vpc-matrix-table .vpc-matrix-grand-total-label,
.vpc-matrix-table .vpc-matrix-grand-total-meta,
.vpc-matrix-table .vpc-matrix-grand-total-cell {
  font-weight: 800;
  background: var(--surface-accent);
}

.vpc-matrix-table .vpc-matrix-grand-total-label {
  text-align: left;
}

.vpc-matrix-table .vpc-matrix-grand-total-cell,
.vpc-matrix-table .vpc-matrix-grand-total-meta {
  text-align: center;
}

.vpc-matrix-table .vpc-matrix-grand-total-cell.is-overall {
  background: #dbeafe;
}

.vpc-preview-table .vpc-preview-index {
  text-align: center;
}

.vpc-preview-table td.is-highlight,
.vpc-preview-table th.is-highlight {
  background: var(--surface-accent-2);
}

.vpc-preview-empty {
  padding: 16px 18px;
  color: var(--text-soft);
  font-style: italic;
}

.vpc-summary-panel {
  display: grid;
  gap: 10px;
}

.vpc-summary-panel-head {
  display: grid;
  gap: 4px;
}

.vpc-summary-panel-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.role-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.role-card {
  padding: 16px;
}

.role-card h2 {
  margin-bottom: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.14rem;
}

.role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.role-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-search-input {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  min-width: 280px;
}

.role-card select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.role-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.role-permission-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.role-permission-group-title,
.role-permission-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.role-permission-option,
.role-permission-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  padding: 6px 8px;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
}

.role-permission-option input,
.role-permission-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.role-library-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.required-mark {
  display: inline-block;
  color: var(--danger, #dc2626);
  font-weight: 900;
  margin-left: 3px;
  vertical-align: baseline;
}

.field-label-text {
  display: inline-flex;
  align-items: baseline;
  width: fit-content;
}

.role-table-wrap {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  max-height: 760px;
  background: var(--surface-1);
}

.role-table {
  width: 100%;
  border-collapse: collapse;
}

.role-table th,
.role-table td {
  border: 1px solid var(--line-muted);
  padding: 8px 10px;
  font-size: 0.86rem;
  text-align: left;
  white-space: nowrap;
}

.role-table th {
  position: sticky;
  top: 0;
  background: var(--surface-3);
  color: var(--text-soft);
  z-index: 1;
}

.role-table tbody tr:hover {
  background: var(--surface-4);
}

.tenant-admin-page {
  display: grid;
  gap: 14px;
}

.tenant-admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: stretch;
  gap: 14px;
}

.tenant-admin-host-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.tenant-admin-host-label,
.tenant-admin-meta {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-admin-host-link {
  color: var(--brand-strong);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.tenant-admin-host-link:hover {
  text-decoration: underline;
}

.tenant-admin-host-link[aria-disabled="true"] {
  color: var(--text-soft);
  pointer-events: none;
}

.tenant-admin-host-note {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.tenant-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto minmax(180px, 0.7fr);
  align-items: end;
  gap: 10px;
}

.tenant-admin-field {
  display: grid;
  gap: 5px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tenant-admin-field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.tenant-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.tenant-stat-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
}

.tenant-stat-card span {
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-stat-card strong {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 850;
}

.tenant-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tenant-admin-wide {
  grid-column: 1 / -1;
}

.tenant-admin-panel {
  min-width: 0;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.tenant-admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.tenant-admin-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.tenant-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.tenant-feature-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 86%, var(--surface-2));
  padding: 12px;
  display: grid;
  gap: 8px;
}

.tenant-feature-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.tenant-feature-card strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.tenant-feature-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.tenant-admin-list {
  display: grid;
  gap: 8px;
}

.tenant-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  padding: 9px 10px;
}

.tenant-admin-row-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tenant-admin-row-main strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tenant-admin-row-main span {
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tenant-admin-pill {
  justify-self: start;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-subtle) 68%, var(--surface-1));
  color: var(--brand-strong);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.tenant-admin-row-link {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.tenant-admin-row-link:hover {
  text-decoration: underline;
}

.tenant-admin-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  padding: 12px;
  font-size: 0.84rem;
  font-weight: 750;
}

.tenant-admin-log-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tenant-admin-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-delete-btn {
  min-width: 34px;
  padding: 6px 10px;
}

.role-action-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.role-password-reset-btn {
  min-width: 112px;
  padding: 5px 8px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.role-name-action-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-mfa-reset-btn {
  min-width: 78px;
  padding: 5px 8px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.role-emulate-btn {
  min-width: 72px;
  padding: 5px 8px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.contact-panel {
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  gap: 10px;
}

.claim-notifer-workspace {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 2.4vw, 22px);
}

.claim-notifer-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.claim-notifer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.claim-notifer-actions-left {
  align-items: center;
}

.claim-notifer-actions-right {
  margin-left: auto;
}

.claim-notifer-contacts {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 2.4vw, 22px);
}

.claim-notifer-divisions {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2);
}

.claim-notifer-divisions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.claim-notifer-divisions-head h3 {
  margin: 0;
  font-size: 1rem;
}

.claim-notifer-divisions-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.claim-notifer-divisions-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.claim-notifer-division-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface-1);
  color: var(--text);
  font-size: 0.9rem;
}

.claim-notifer-division-pill input[type="checkbox"] {
  accent-color: var(--brand);
}

.claim-notifer-contacts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.claim-notifer-contacts-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#claim-notifer-contacts-search {
  width: min(360px, 82vw);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
}

.claim-notifer-contacts .role-table td input,
.claim-notifer-contacts .role-table td select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  padding: 7px 8px;
  font: inherit;
  min-width: 160px;
}

.claim-notifer-contacts .role-table td {
  vertical-align: middle;
}

.claim-notifer-contacts-empty td {
  color: var(--text-soft);
  text-align: center;
  padding: 16px 10px;
  font-style: italic;
}

.claim-notifer-row-invalid td {
  background: rgba(242, 79, 111, 0.08);
}

@media (max-width: 820px) {
  .claim-notifer-actions-right {
    margin-left: 0;
  }
}

.contact-panel h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.contact-panel p {
  color: var(--text-soft);
}

.support-ticket-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.45fr);
  gap: 12px;
}

.support-ticket-submit-card,
.support-ticket-inbox-card {
  padding: clamp(16px, 2.2vw, 22px);
  display: grid;
  gap: 12px;
}

.support-ticket-form-grid {
  display: grid;
  gap: 10px;
}

.support-ticket-form-grid label,
.support-ticket-reply-grid label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.support-ticket-form-grid input,
.support-ticket-form-grid select,
.support-ticket-form-grid textarea,
.support-ticket-reply-grid select,
.support-ticket-reply-grid textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
}

.support-ticket-confidential-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.support-ticket-check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px !important;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-1);
  padding: 7px 9px;
  color: var(--text);
}

.support-ticket-check input {
  width: auto;
  accent-color: var(--brand);
}

.support-ticket-manage-check {
  align-self: end;
}

.support-ticket-inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.support-ticket-inbox-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.support-ticket-inbox-actions input,
.support-ticket-inbox-actions select {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 6px 9px;
  font: inherit;
  font-size: 0.8rem;
}

.support-ticket-company-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.support-ticket-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.support-ticket-item {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.support-ticket-item:hover,
.support-ticket-item.is-selected {
  border-color: var(--line-info);
  background: var(--surface-accent);
}

.support-ticket-item-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.support-ticket-item-main strong,
.support-ticket-item-main span {
  overflow-wrap: anywhere;
}

.support-ticket-item-main span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.support-ticket-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.support-ticket-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.support-ticket-status.is-open {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
  color: var(--ok);
}

.support-ticket-status.is-pending {
  border-color: color-mix(in srgb, #a16207 50%, var(--line));
  color: #a16207;
}

.support-ticket-status.is-resolved {
  border-color: color-mix(in srgb, var(--ok) 42%, var(--line));
  color: var(--ok);
}

.support-ticket-status.is-in-review {
  border-color: color-mix(in srgb, #d19a36 50%, var(--line));
  color: #d19a36;
}

.support-ticket-status.is-closed {
  color: var(--text-muted);
}

.support-ticket-priority.is-urgent,
.support-ticket-priority.is-high {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
  color: var(--danger);
}

.support-ticket-priority.is-critical {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--line));
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-2));
  color: var(--danger);
}

.support-ticket-priority.is-low {
  color: var(--text-muted);
}

.support-ticket-visibility {
  display: inline-flex;
  width: fit-content;
  border: 1px solid color-mix(in srgb, #a16207 42%, var(--line));
  border-radius: 999px;
  color: #a16207;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 900;
}

.support-ticket-visibility.is-highly-confidential {
  border-color: color-mix(in srgb, var(--danger) 58%, var(--line));
  color: var(--danger);
}

.support-ticket-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.support-ticket-summary-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text-soft);
  padding: 5px 9px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
}

.support-ticket-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-1);
  padding: 14px;
  display: grid;
  gap: 12px;
  min-height: 220px;
}

.support-ticket-detail-head {
  display: grid;
  gap: 5px;
}

.support-ticket-detail-head h2 {
  font-size: 1.12rem;
}

.support-ticket-detail-head p {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.support-ticket-detail-grid,
.support-ticket-manage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.support-ticket-detail-metric {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  padding: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.support-ticket-detail-metric span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.support-ticket-detail-metric strong {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.support-ticket-thread {
  display: grid;
  gap: 8px;
}

.support-ticket-message {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.support-ticket-message.is-admin {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background: color-mix(in srgb, var(--brand-subtle) 62%, var(--surface-2));
}

.support-ticket-message > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.support-ticket-message p {
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.support-ticket-reply-grid {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line-muted);
  padding-top: 12px;
}

.support-ticket-reply-grid input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
}

.support-ticket-reply-grid .support-ticket-check input,
.support-ticket-form-grid .support-ticket-check input {
  width: auto;
  min-height: 0;
  border: 0;
  padding: 0;
}

@media (max-width: 920px) {
  .support-ticket-layout {
    grid-template-columns: 1fr;
  }

  .support-ticket-detail-grid,
  .support-ticket-manage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.supplier-master-layout,
.sql-workspace-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.supplier-master-layout {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.35fr);
}

.sql-workspace-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.6fr);
}

.sql-lakehouse-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sql-workspace-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.sql-results-card {
  grid-column: 1 / -1;
}

.supplier-master-card,
.supplier-master-list-card,
.sql-editor-card,
.sql-datasets-card,
.sql-results-card,
.sql-history-card {
  padding: clamp(16px, 2.2vw, 22px);
}

.supplier-master-form {
  display: grid;
  gap: 10px;
}

.supplier-master-form label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.supplier-master-form input,
.supplier-master-form select,
.supplier-master-form textarea,
.sql-workspace-query {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--theme-input-background);
  color: var(--text);
  font: inherit;
}

.supplier-master-form input,
.supplier-master-form select {
  min-height: 42px;
  padding: 10px 12px;
}

.supplier-master-form textarea,
.sql-workspace-query {
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.supplier-master-checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.supplier-master-checkbox input {
  width: 18px;
  min-height: 18px;
}

.supplier-master-actions,
.sql-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sql-editor-head {
  align-items: center;
  margin-bottom: 6px;
}

.sql-title-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#sql-workspace-msg:empty {
  display: none;
}

.sql-workspace-title {
  width: min(420px, 100%);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 800 1.05rem "Plus Jakarta Sans", sans-serif;
  padding: 4px 0;
}

.sql-workspace-title:focus {
  outline: none;
  border-bottom-color: var(--brand);
}

.sql-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sql-toolbar .btn {
  min-height: 32px;
  white-space: nowrap;
}

.sql-export-menu-wrap {
  position: relative;
}

.sql-export-menu {
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 3px;
  min-width: 132px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}

.sql-export-menu[hidden] {
  display: none;
}

.sql-export-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 9px;
  text-align: left;
}

.sql-export-menu button:hover,
.sql-export-menu button:focus-visible {
  background: var(--surface-2);
  outline: none;
}

.sql-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sql-catalog-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--theme-input-background);
  color: var(--text);
  padding: 9px 11px;
  margin-bottom: 10px;
}

.supplier-master-table-wrap,
.sql-results-wrap {
  max-height: 560px;
  overflow: auto;
}

.supplier-master-table,
.sql-results-table {
  min-width: 980px;
}

.supplier-master-table td,
.sql-results-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.sql-dataset-list {
  display: grid;
  gap: 6px;
  max-height: 720px;
  overflow: auto;
  padding-right: 2px;
}

.sql-table-list-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  text-align: left;
}

.sql-table-list-item:hover,
.sql-table-list-item:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
  outline: none;
}

.sql-table-list-item strong {
  font-size: 0.84rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sql-table-list-item span {
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sql-dataset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  padding: 12px;
  cursor: pointer;
  display: grid;
  gap: 8px;
}

.sql-dataset-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.sql-dataset-card h3 {
  margin: 0;
  font-size: 0.94rem;
}

.sql-dataset-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sql-dataset-card-head span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  text-transform: uppercase;
}

.sql-dataset-card code {
  display: inline-block;
  color: var(--text);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.sql-dataset-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sql-dataset-actions,
.sql-example-row,
.sql-column-chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sql-example-row {
  margin-bottom: 10px;
}

.sql-mini-btn,
.sql-example-btn,
.sql-column-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  min-height: 26px;
  padding: 4px 9px;
}

.sql-column-chip {
  color: var(--text-soft);
  font-size: 0.72rem;
  max-width: 100%;
}

.sql-mini-btn:hover,
.sql-example-btn:hover,
.sql-column-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.sql-workspace-query {
  min-height: 190px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  tab-size: 2;
}

.sql-editor-shell {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: 190px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--theme-input-background);
  overflow: hidden;
}

.sql-editor-shell:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sql-editor-shell .sql-workspace-query,
.sql-workspace-highlight {
  box-sizing: border-box;
  min-height: 190px;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-kerning: none;
  font-variant-ligatures: none;
  letter-spacing: 0;
  line-height: 20px;
  padding: 10px 12px;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  overflow-x: auto;
}

.sql-editor-shell .sql-workspace-query {
  position: relative;
  z-index: 1;
  color: transparent;
  caret-color: var(--text);
  resize: vertical;
  -webkit-text-fill-color: transparent;
}

.sql-editor-shell .sql-workspace-query::placeholder {
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}

.sql-editor-shell .sql-workspace-query::selection {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  -webkit-text-fill-color: transparent;
}

.sql-workspace-highlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: var(--text);
  overflow: hidden;
  scrollbar-width: none;
}

.sql-autocomplete-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: min(420px, calc(100% - 20px));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-1) 96%, transparent);
  color: var(--text-soft);
  box-shadow: 0 10px 24px rgba(25, 31, 55, 0.12);
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 8px;
  pointer-events: auto;
}

.sql-autocomplete-hint[hidden] {
  display: none;
}

.sql-autocomplete-prompt {
  color: var(--text-soft);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sql-autocomplete-options {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  max-height: 210px;
  overflow: auto;
}

.sql-autocomplete-option {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-width: 0;
  padding: 6px 7px;
  text-align: left;
}

.sql-autocomplete-option:hover,
.sql-autocomplete-option.is-active {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand-subtle) 46%, transparent);
}

.sql-autocomplete-option-type {
  color: var(--text-soft);
  flex: 0 0 auto;
  font-size: 0.66rem;
  margin-left: 10px;
  text-transform: uppercase;
}

.sql-token-ghost {
  color: color-mix(in srgb, var(--text-soft) 32%, transparent);
  font-style: italic;
}

.sql-token-fix-added,
.sql-token-fix-removed {
  color: #dc2626;
  background: color-mix(in srgb, #dc2626 10%, transparent);
  border-radius: 4px;
  padding: 0 2px;
}

.sql-token-fix-added {
  text-decoration: none;
}

.sql-token-fix-removed {
  margin-right: 4px;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.sql-fix-preview {
  display: block;
  margin-top: 6px;
  max-height: 116px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.sql-fix-prompt {
  color: #dc2626;
}

.sql-state-cell {
  color: var(--text-soft);
  font-weight: 800;
  padding: 18px 12px;
  text-align: center;
}

.sql-engine-loader {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  display: grid;
  gap: 12px;
  margin: 2px auto;
  max-width: 760px;
  overflow: hidden;
  padding: 16px;
  position: relative;
  text-align: left;
}

.sql-engine-loader::before {
  animation: sqlEngineLoaderSweep 1.8s linear infinite;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 20%, transparent), transparent);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transform: translateX(-100%);
}

.sql-engine-loader-copy,
.sql-engine-timeline,
.sql-engine-plan,
.sql-engine-nodes {
  position: relative;
  z-index: 1;
}

.sql-engine-loader-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sql-engine-loader-copy strong {
  color: var(--text);
  font-size: 0.94rem;
}

.sql-engine-loader-copy span {
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
}

.sql-engine-timeline {
  counter-reset: sql-step;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.sql-engine-timeline li {
  animation: sqlEngineStep 1.35s ease-in-out infinite;
  background: color-mix(in srgb, var(--surface-2) 84%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 0;
  padding: 7px 8px;
  text-align: center;
}

.sql-engine-plan {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.sql-engine-plan span {
  animation: sqlEnginePlanLine 1.2s ease-in-out infinite alternate;
  color: var(--text-soft);
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sql-engine-nodes {
  align-items: center;
  display: flex;
  gap: 7px;
}

.sql-engine-nodes i {
  animation: sqlEngineNodePulse 1.1s ease-in-out infinite alternate;
  background: var(--text);
  border-radius: 999px;
  display: block;
  height: 8px;
  opacity: 0.28;
  width: 8px;
}

@keyframes sqlEngineLoaderSweep {
  to {
    transform: translateX(100%);
  }
}

@keyframes sqlEngineStep {
  0%,
  100% {
    border-color: var(--line);
    transform: translateY(0);
  }
  45% {
    border-color: var(--text);
    transform: translateY(-1px);
  }
}

@keyframes sqlEnginePlanLine {
  from {
    opacity: 0.52;
  }
  to {
    opacity: 1;
  }
}

@keyframes sqlEngineNodePulse {
  from {
    opacity: 0.28;
  }
  to {
    opacity: 0.9;
  }
}

.sql-map-panel {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-1);
  margin-top: 12px;
  max-height: 620px;
  overflow: auto;
  padding: 12px;
}

.sql-map-panel[hidden] {
  display: none;
}

.sql-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.sql-map-head h3,
.sql-map-section h4 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.9rem;
}

.sql-map-body,
.sql-map-section,
.sql-map-table-grid,
.sql-map-bridge-list {
  display: grid;
  gap: 8px;
}

.sql-map-table-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.sql-map-table-node,
.sql-map-bridge {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  text-align: left;
}

.sql-map-table-node:hover,
.sql-map-table-node:focus-visible,
.sql-map-bridge:hover,
.sql-map-bridge:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-3);
  outline: none;
}

.sql-map-table-node strong,
.sql-map-bridge strong {
  font-size: 0.76rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sql-map-table-node span,
.sql-map-bridge span {
  color: var(--text-soft);
  font-size: 0.68rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.sql-map-open {
  overflow: hidden;
}

.sql-map-overlay {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 12px;
  position: fixed;
  z-index: 10000;
}

.sql-map-overlay[hidden] {
  display: none;
}

.sql-map-backdrop {
  background: rgba(17, 24, 39, 0.58);
  border: 0;
  cursor: default;
  inset: 0;
  padding: 0;
  position: absolute;
}

.sql-map-dialog {
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  color: var(--text);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  position: relative;
  width: min(1500px, calc(100vw - 24px));
}

.sql-map-modal-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.sql-map-modal-head h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  margin: 2px 0 0;
}

.sql-map-modal-body {
  display: grid;
  grid-template-columns: minmax(220px, 268px) minmax(0, 1fr);
  min-height: min(800px, calc(100vh - 110px));
}

.sql-map-side {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.sql-map-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.sql-map-bridge-card {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-top: 10px;
}

.sql-map-bridge-card > strong {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sql-map-bridge-summary,
.sql-map-bridge-selected-label,
.sql-map-bridge-empty {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1.3;
}

.sql-map-bridge-summary {
  color: var(--text);
}

.sql-map-bridge[data-sql-map-bridge-direction="inbound"] {
  border-left: 3px solid color-mix(in srgb, var(--brand-strong) 68%, var(--line-strong));
}

.sql-map-bridge[data-sql-map-bridge-direction="outbound"] {
  border-right: 3px solid color-mix(in srgb, var(--brand-strong) 68%, var(--line-strong));
}

.sql-map-bridge-fields {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.sql-map-canvas {
  background:
    radial-gradient(circle at 50% 44%, var(--surface-1) 0 0, transparent 48%),
    linear-gradient(135deg, var(--surface-2), var(--surface-1));
  cursor: grab;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  touch-action: none;
}

.sql-map-canvas.is-panning {
  cursor: grabbing;
}

.sql-map-controls {
  display: flex;
  gap: 6px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
}

.sql-map-stage {
  height: 1320px;
  left: 0;
  position: relative;
  top: 0;
  transform-origin: 0 0;
  width: 2200px;
  will-change: transform;
}

.sql-map-edges,
.sql-map-nodes {
  inset: 0;
  position: absolute;
}

.sql-map-edges {
  height: 100%;
  width: 100%;
}

.sql-map-edge {
  fill: none;
  stroke: color-mix(in srgb, var(--text-soft) 34%, transparent);
  stroke-width: 1.35;
}

.sql-map-edge.is-active {
  stroke: var(--text);
  stroke-width: 2.4;
}

.sql-map-node {
  background: color-mix(in srgb, var(--surface-1) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.11);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 8px;
  position: absolute;
  text-align: left;
  transform: translate(-50%, -50%);
  width: 188px;
}

.sql-map-node:hover,
.sql-map-node:focus-visible,
.sql-map-node.is-active {
  background: var(--surface-1);
  border-color: var(--text);
  outline: none;
  z-index: 3;
}

.sql-map-node.is-connected {
  border-color: color-mix(in srgb, var(--brand-strong) 58%, var(--line-strong));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--brand-subtle) 78%, transparent),
    0 12px 28px rgba(0, 0, 0, 0.11);
}

.sql-map-node small {
  color: var(--text-soft);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sql-map-node strong {
  font-size: 0.78rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sql-map-node span {
  color: var(--text-soft);
  font-size: 0.67rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 840px) {
  .sql-map-overlay {
    padding: 10px;
  }

  .sql-map-dialog {
    max-height: calc(100vh - 20px);
    width: calc(100vw - 20px);
  }

  .sql-map-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(170px, 30vh) minmax(0, 1fr);
  }

  .sql-map-side {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
}

.sql-token-keyword {
  color: #005cc5;
  font-weight: 800;
}

.sql-token-clause {
  color: #b42318;
  font-weight: 900;
}

.sql-token-function {
  color: #6f42c1;
  font-weight: 750;
}

.sql-token-name {
  color: #24292f;
}

.sql-token-string {
  color: #116329;
}

.sql-token-number {
  color: #953800;
}

.sql-token-identifier {
  color: #0550ae;
}

.sql-token-literal {
  color: #8250df;
  font-weight: 800;
}

.sql-token-operator {
  color: #cf222e;
  font-weight: 850;
}

.sql-token-punctuation {
  color: #57606a;
  font-weight: 800;
}

.sql-token-comment,
.sql-token-muted {
  color: #6e7781;
  font-style: italic;
}

:root[data-theme="dark"] .sql-token-keyword {
  color: #79c0ff;
}

:root[data-theme="dark"] .sql-token-clause {
  color: #ff7b72;
}

:root[data-theme="dark"] .sql-token-function {
  color: #d2a8ff;
}

:root[data-theme="dark"] .sql-token-name {
  color: #e6edf3;
}

:root[data-theme="dark"] .sql-token-string {
  color: #a5d6ff;
}

:root[data-theme="dark"] .sql-token-number {
  color: #ffa657;
}

:root[data-theme="dark"] .sql-token-identifier {
  color: #7ee787;
}

:root[data-theme="dark"] .sql-token-literal {
  color: #d2a8ff;
}

:root[data-theme="dark"] .sql-token-operator {
  color: #ff7b72;
}

:root[data-theme="dark"] .sql-token-punctuation {
  color: #c9d1d9;
}

:root[data-theme="dark"] .sql-token-comment,
:root[data-theme="dark"] .sql-token-muted {
  color: #8b949e;
}

body[data-module-page="sql"],
body[data-module-page="sql"] .protected-content {
  overflow-x: hidden;
}

body[data-module-page="sql"] .page-main,
.sql-lakehouse-layout,
.sql-workspace-stack,
.sql-editor-card,
.sql-datasets-card,
.sql-results-card,
.sql-history-card {
  min-width: 0;
  max-width: 100%;
}

body[data-module-page="sql"] .sql-results-wrap {
  overflow: auto;
  max-width: 100%;
  overscroll-behavior: contain;
}

body[data-module-page="sql"] .sql-results-table {
  min-width: max-content;
  width: max-content;
  table-layout: auto;
}

body[data-module-page="sql"] .sql-results-table th,
body[data-module-page="sql"] .sql-results-table td {
  max-width: 360px;
  min-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.sql-query-id {
  text-align: right;
}

.sql-history-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.sql-history-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
}

.sql-history-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.sql-history-item span {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.sql-history-item code {
  color: var(--text-muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.operations-module-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}

.operations-module-side,
.operations-module-table-card,
.operations-module-stat {
  padding: clamp(16px, 2.2vw, 22px);
}

.operations-module-side,
.operations-module-form,
.operations-module-fields,
.operations-module-main,
.operations-module-stat {
  display: grid;
  gap: 12px;
}

.operations-module-form label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.operations-module-record-picker {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.operations-module-form input,
.operations-module-form select,
.operations-module-record-picker select,
.operations-module-toolbar input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
}

.operations-module-actions,
.operations-module-toolbar,
.operations-module-toolbar-actions,
.operations-module-row-actions,
.operations-module-quick-actions,
.operations-module-record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.operations-module-options-wrap {
  position: relative;
  display: inline-flex;
}

.operations-module-icon-btn {
  width: 32px;
  min-width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.operations-module-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.operations-module-options-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(260px, 82vw);
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: grid;
  gap: 7px;
}

.operations-module-options-panel[hidden],
.operations-module-record-actions[hidden] {
  display: none !important;
}

.operations-module-options-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.operations-module-column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.operations-module-options-footer {
  border-top: 1px solid var(--line-muted);
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.operations-module-record-actions {
  position: sticky;
  left: 0;
  bottom: 0;
  z-index: 5;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-1) 96%, transparent);
  padding: 8px 0 0;
  margin-top: 8px;
}

.operations-module-record-actions-label {
  min-width: min(320px, 100%);
  margin-right: auto;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-module-quick-actions {
  grid-column: 1 / -1;
}

.operations-module-main {
  min-width: 0;
  gap: 16px;
}

.operations-module-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.operations-module-stat span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.operations-module-stat strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.operations-module-toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.operations-module-toolbar h2 {
  font-size: 1.1rem;
}

.operations-module-stat-grid[hidden],
.operations-module-heading[hidden] {
  display: none !important;
}

.operations-module-toolbar-actions,
.operations-module-row-actions {
  justify-content: flex-end;
}

.operations-module-toolbar input {
  width: min(280px, 64vw);
}

.operations-module-table-wrap {
  max-height: min(58vh, 620px);
}

.operations-module-table th,
.operations-module-table td {
  padding: 4px 7px;
  font-size: 0.76rem;
  line-height: 1.08;
  vertical-align: middle;
  white-space: nowrap;
}

.operations-module-table td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operations-module-table tbody tr {
  cursor: pointer;
}

.operations-module-table tbody tr.is-selected {
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--brand-subtle) 58%, var(--surface-1));
}

.operations-module-load-more-row td {
  text-align: center;
  background: var(--surface-2);
}

.operations-module-load-more-row button {
  min-width: min(240px, 100%);
}

.rf-gun-page {
  --rf-terminal: #111827;
  --rf-terminal-text: #f9fafb;
}

.rf-gun-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
}

.rf-gun-panel,
.rf-gun-context-card,
.rf-gun-log-card {
  padding: clamp(16px, 2.2vw, 22px);
}

.rf-gun-panel,
.rf-gun-form,
.rf-gun-work,
.rf-gun-context-card,
.rf-gun-log-card {
  display: grid;
  gap: 12px;
}

.rf-gun-screen {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 8px;
  background: var(--rf-terminal);
  color: var(--rf-terminal-text);
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.rf-gun-screen-label,
.rf-gun-screen span:last-child {
  color: rgba(249, 250, 251, 0.72);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rf-gun-screen strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: 0;
}

.rf-gun-form label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.rf-gun-form input,
.rf-gun-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--theme-input-background, var(--surface-1));
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
}

.rf-gun-form input:focus,
.rf-gun-form select:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 1px;
}

.rf-gun-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rf-gun-actions,
.rf-gun-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rf-gun-actions {
  justify-content: flex-start;
}

.rf-gun-section-head {
  justify-content: space-between;
}

.rf-gun-section-head h1,
.rf-gun-section-head h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.rf-gun-section-head span {
  min-width: 28px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.rf-gun-context {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 460px);
  overflow: auto;
}

.rf-gun-context-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  padding: 10px 12px;
}

.rf-gun-context-item span {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.rf-gun-context-item strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.rf-gun-log-wrap {
  max-height: min(40vh, 420px);
  overflow: auto;
}

.rf-gun-log-table th,
.rf-gun-log-table td {
  white-space: nowrap;
}

.rf-gun-log-ok td:last-child {
  color: var(--success);
  font-weight: 760;
}

.rf-gun-log-error td:last-child {
  color: var(--danger);
  font-weight: 760;
}

@media (max-width: 980px) {
  .supplier-master-layout,
  .sql-workspace-layout,
  .sql-lakehouse-layout,
  .operations-module-shell,
  .rf-gun-shell {
    grid-template-columns: 1fr;
  }

  .sql-dataset-list {
    max-height: 360px;
  }

  .operations-module-stat-grid {
    grid-template-columns: 1fr;
  }

  .rf-gun-field-grid {
    grid-template-columns: 1fr;
  }
}

body[data-module-page="version-history"] .topbar {
  align-items: flex-start;
}

body[data-module-page="version-history"] .brand {
  max-width: min(31ch, 24vw);
}

body[data-module-page="version-history"] .topbar-actions {
  grid-template-columns: max-content;
  grid-template-areas: "theme";
  gap: 6px;
}

body[data-module-page="version-history"] .warehouse-chip {
  display: none !important;
}

body[data-module-page="version-history"] .session-chip {
  max-width: 100%;
}

.version-history-page {
  display: grid;
  gap: 14px;
}

.version-history-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.85fr);
  gap: 16px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--brand-subtle) 70%, transparent) 0%, transparent 48%),
    linear-gradient(145deg, var(--panel-grad-start), var(--panel-grad-end));
}

.version-history-hero::after {
  content: "";
  position: absolute;
  right: -68px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.version-history-hero-copy,
.version-history-spotlight {
  position: relative;
  z-index: 1;
}

.version-history-hero-copy h1 {
  margin: 8px 0 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.version-history-hero-copy p {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--text-soft);
  line-height: 1.7;
}

.version-history-spotlight {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-1) 82%, transparent);
  padding: 16px 18px;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: 0 10px 24px rgba(10, 26, 54, 0.08);
}

.version-history-spotlight-label,
.version-history-stat-label {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.version-history-spotlight-version {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.version-history-spotlight-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.version-history-stat-value {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.02rem, 1.9vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  word-break: break-word;
}

.version-history-spotlight-note,
.version-history-stat p,
.version-history-panel-note,
.version-history-entry p,
.version-history-empty {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.version-history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.version-history-stat {
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.version-history-panel {
  padding: clamp(18px, 2.8vw, 28px);
  display: grid;
  gap: 16px;
}

.version-history-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.version-history-panel-head h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.version-history-list {
  display: grid;
  gap: 12px;
}

.version-history-entry {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.version-history-entry.is-current {
  border-color: var(--line-info);
  background: linear-gradient(145deg, var(--surface-accent), var(--surface-1));
  box-shadow: 0 14px 28px rgba(17, 40, 79, 0.1);
}

.version-history-entry-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.version-history-entry-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.version-history-badge,
.version-history-state {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.version-history-badge {
  background: var(--brand-subtle);
  color: var(--brand-strong);
}

.version-history-state {
  background: var(--surface-3);
  color: var(--text-soft);
}

.version-history-entry h3 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
}

.version-history-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.version-history-meta-row {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.version-history-meta-row-secondary {
  color: var(--text-soft);
}

.version-history-meta-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.version-history-meta-value {
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.version-history-meta-secondary {
  font-size: 0.8rem;
  font-weight: 700;
}

.version-history-list-loader {
  min-height: 20px;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.version-history-list-loader.is-hidden {
  display: none;
}
.open-page {
  display: grid;
  gap: 12px;
}

.open-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.95fr);
  gap: 14px;
  padding: clamp(16px, 2.3vw, 22px);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--brand-subtle) 76%, transparent) 0%, transparent 46%),
    linear-gradient(145deg, var(--panel-grad-start), var(--panel-grad-end));
}

.open-hero-kicker {
  font-size: 0.64rem;
  margin-bottom: 4px;
}

.open-hero-copy h1,
.open-card-head h2 {
  margin: 6px 0 0;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.open-hero-copy p,
.open-results-summary {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.open-hero-side {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-1) 84%, transparent);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.open-hero-side-label,
.open-summary-label {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.open-hero-checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 8px;
}

.open-example-link {
  justify-self: start;
}

.open-example-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-1), var(--surface-2));
  display: grid;
  gap: 0;
}

.open-example-shot {
  width: 100%;
  min-height: 180px;
  max-height: 260px;
  object-fit: cover;
  object-position: top center;
  background: var(--surface-3);
}

.open-example-copy {
  padding: 14px 14px 0;
  display: grid;
  gap: 6px;
}

.open-example-copy strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.98rem;
}

.open-example-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.open-example-actions {
  padding: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.open-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.open-upload-card,
.open-results-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.5vw, 24px);
}

.open-card-subtitle,
.open-item-source-note,
.open-fragment-label {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.open-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.open-card-head h2 {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.open-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.open-dropzone {
  width: 100%;
  border: 1.5px dashed var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-accent) 52%, transparent), transparent),
    var(--surface-2);
  padding: 30px 18px;
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.open-dropzone:hover,
.open-dropzone.is-dragover {
  border-color: var(--brand);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-subtle) 72%, transparent), transparent),
    var(--surface-1);
  transform: translateY(-1px);
}

.open-dropzone-title {
  font-weight: 800;
  font-size: 1rem;
}

.open-dropzone-note,
.open-inline-note,
.open-item-meta,
.open-preview-meta span {
  color: var(--text-soft);
}

.open-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.open-preview-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
  color: var(--text-soft);
  background: var(--surface-2);
}

.open-preview-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  display: grid;
}

.open-preview-shot {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-3);
}

.open-preview-meta {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.open-guidance-field {
  display: grid;
  gap: 8px;
}

.open-guidance-field > span,
.open-calc-field > span,
.open-allocation-panel > span {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-soft);
}

.open-guidance-field textarea,
.open-weight-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-1);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.open-guidance-field textarea {
  min-height: 178px;
  resize: vertical;
}

.open-guidance-field textarea:focus,
.open-weight-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.open-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.open-results-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.open-summary-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.open-summary-tile strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.2rem;
}

.open-results-banner {
  border: 1px solid var(--line-info);
  border-radius: 14px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface-accent) 72%, transparent);
  color: var(--brand-strong);
  font-weight: 800;
}

.open-pill-row,
.open-fragment-list,
.open-allocation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.open-flag-pill,
.open-fragment-pill,
.open-allocation-pill,
.open-item-count,
.open-page-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.open-flag-pill {
  background: var(--surface-accent-2);
  color: var(--brand-strong);
}

.open-fragment-pill {
  background: var(--surface-3);
  color: var(--text-soft);
}

.open-allocation-pill,
.open-item-count {
  background: var(--surface-success);
  color: var(--ok);
}

.open-item-count.is-multipage,
.open-page-pill {
  background: var(--surface-accent-2);
  color: var(--brand-strong);
}

.open-note-list {
  display: grid;
  gap: 8px;
}

.open-note-row {
  margin: 0;
  color: var(--text-soft);
}

.open-items-grid {
  display: grid;
  gap: 12px;
}

.open-item-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--surface-1), var(--surface-2));
  padding: 16px;
  display: grid;
  gap: 12px;
}

.open-item-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.open-item-title-wrap h3 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
}

.open-item-meta,
.open-item-merged {
  margin: 0;
}

.open-item-merged {
  line-height: 1.6;
}

.open-calc-field,
.open-allocation-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-1);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.open-calc-output strong {
  font-size: 1.05rem;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.open-json-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.open-json-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.open-results-json {
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-3);
  overflow: auto;
  font-size: 0.84rem;
  line-height: 1.55;
}

body[data-page="open"] .form-msg.is-error {
  color: var(--danger);
}

@media (max-width: 980px) {
  .open-hero,
  .open-grid,
  .open-results-summary-grid,
  .open-calc-grid {
    grid-template-columns: 1fr;
  }
}

.email-link {
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.email-link:hover {
  text-decoration: underline;
}

.session-chip {
  grid-area: session;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: 999px;
  padding: 4px 4px 4px 10px;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 700;
}

body[data-page="protected"] .protected-content {
  visibility: hidden;
}

body[data-page="protected"][data-auth-ready="true"] .protected-content {
  visibility: visible;
}

.access-blocked-card {
  padding: clamp(18px, 2.9vw, 28px);
  display: grid;
  gap: 10px;
}

.access-blocked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 1000px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav"
      "actions";
    align-items: stretch;
  }

  .brand {
    width: min(100%, 460px);
    max-width: 100%;
  }

  body[data-page="nan"] .brand-tools,
  body[data-page="sosa"] .brand-tools {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "theme"
      "notifications"
      "company"
      "warehouse"
      "session";
    gap: 8px;
  }

  .theme-toggle,
  .notification-inbox,
  .notification-inbox-button,
  .company-chip,
  .warehouse-chip,
  .session-chip {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }

}

@media (max-width: 920px) {
  body[data-page="auth"] {
    padding: 14px 0;
  }

  .auth-layout,
  .module-grid,
  .vis-dry-layout,
  .variable-item-sheets-grid,
  .putaway-layout,
  .role-layout,
  .area-loader-card {
    grid-template-columns: 1fr;
  }

  .page-head-split {
    display: grid;
    gap: 10px;
  }

  .active-warehouse-panel {
    width: 100%;
  }

  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav"
      "actions";
    align-items: stretch;
  }

  .brand {
    width: min(100%, 460px);
    max-width: 100%;
  }

  .brand-tools {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .brand-history {
    width: 100%;
  }

  .brand-teams {
    width: 100%;
    min-width: 0;
  }

  .brand-visualizing {
    width: 100%;
    min-width: 0;
  }

  .brand-logic {
    width: 100%;
    min-width: 0;
  }

  .brand-refresh {
    width: 100%;
    min-width: 0;
  }

  .brand-reports {
    width: 100%;
    min-width: 0;
  }

  .topnav {
    width: 100%;
    border-radius: 18px;
    justify-content: flex-start;
  }

  .session-chip {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "theme"
      "notifications"
      "company"
      "warehouse"
      "session";
    gap: 8px;
  }

  .theme-toggle,
  .notification-inbox,
  .notification-inbox-button {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }

  .company-chip,
  .warehouse-chip {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }

  .company-select,
  .warehouse-select {
    width: 100%;
    min-width: 0;
  }

  .version-history-hero,
  .version-history-stats,
  .version-history-entry {
    grid-template-columns: 1fr;
  }

  .version-history-meta {
    justify-items: start;
    text-align: left;
  }

  .role-card-head {
    display: grid;
    gap: 8px;
  }

  .role-card-actions {
    width: 100%;
    display: grid;
    gap: 8px;
  }

  .role-search-input {
    width: 100%;
    min-width: 0;
  }

  .vis-assignment-head {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .sap-variable-head-grid,
  .sap-variable-command-grid {
    grid-template-columns: 1fr;
  }

  .sap-variable-actions {
    justify-content: flex-start;
  }

  .sap-variable-sheet-head {
    display: grid;
    gap: 10px;
    align-items: flex-start;
  }

  .sap-variable-table-shell {
    padding: 10px;
  }

  .sap-variable-sheet-wrap {
    min-height: 460px;
  }

  .variable-item-upload-main {
    display: grid;
    grid-template-columns: 1fr;
  }

  .variable-item-upload-source {
    grid-template-columns: 1fr;
  }

  .variable-item-upload-main .btn {
    width: 100%;
  }

  .vis-search-bar {
    grid-template-columns: 1fr;
  }

  .vis-search-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .vis-upload-status-grid {
    grid-template-columns: 1fr;
  }

  .vpc-monthly-layout,
  .vpc-summary-grid {
    grid-template-columns: 1fr;
  }

  .vpc-monthly-card-head {
    display: grid;
  }

  .vpc-monthly-actions {
    justify-content: flex-start;
  }

  body[data-module-page="putaway-audit"] .shell {
    width: min(1900px, 98vw);
  }

  body[data-module-page="vis-dry-store-set"] .shell,
  body[data-module-page="vis-dry"] .shell,
  body[data-module-page="vis-cooler"] .shell,
  body[data-module-page="vis-freezer"] .shell,
  body[data-module-page="variable-item-parser"] .shell,
  body[data-module-page="vpc-monthly-report"] .shell,
  body[data-module-page="file-hosting"] .shell,
  body[data-module-page="monthly-item-launch"] .shell,
  body[data-module-page="variable-item-sap-variable"] .shell,
  body[data-module-page="variable-item-store-sets"] .shell,
  body[data-module-page="variable-item-due-date"] .shell,
  body[data-module-page="variable-item-temp-translation"] .shell {
    width: min(1700px, 98vw);
  }

  .file-hosting-card-head,
  .file-hosting-entry-head {
    display: grid;
  }

  .file-hosting-actions,
  .file-hosting-entry-actions {
    justify-content: flex-start;
  }

  .file-hosting-metric-grid {
    grid-template-columns: 1fr;
  }
}

.nan-main {
  display: grid;
  gap: 18px;
  padding-block: 24px 36px;
}

.nan-page-credit {
  position: fixed;
  right: 8px;
  bottom: 5px;
  z-index: 40;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.48rem;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.32;
  pointer-events: none;
}

body.nan-modal-open .nan-page-credit {
  opacity: 0;
}

.nan-division-panel {
  min-width: 220px;
}

.nan-lookup-card,
.nan-map-card,
.nan-result-card,
.nan-directory-card,
.nan-security-card {
  display: grid;
  gap: 16px;
}

.nan-lookup-head,
.nan-directory-head,
.nan-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.nan-lookup-head h2,
.nan-directory-head h2,
.nan-result-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.nan-route-pill {
  border: 1px solid var(--line-info);
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 14px;
}

.nan-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.nan-field {
  display: grid;
  gap: 8px;
}

.nan-field span {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.nan-field input,
.nan-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
}

.nan-field input:focus,
.nan-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.nan-muted {
  margin: 0;
  color: var(--text-soft);
}

.nan-result-body {
  min-height: 112px;
}

.nan-result-shell,
.nan-result-empty {
  display: grid;
  gap: 14px;
}

.nan-result-callout {
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nan-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nan-detail-row,
.nan-secondary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-muted);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.nan-detail-row span,
.nan-secondary-row span {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.nan-detail-row strong,
.nan-secondary-row strong {
  color: var(--text);
  text-align: right;
}

.nan-secondary-block {
  display: grid;
  gap: 8px;
}

.nan-secondary-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.nan-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.nan-copy-btn {
  min-height: 42px;
  padding-inline: 16px;
}

.nan-badge {
  border: 1px solid var(--line-info);
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  text-transform: uppercase;
}

.nan-division-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.nan-division-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  color: var(--text);
  padding: 14px 12px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.nan-division-link:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.nan-division-link strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.nan-division-link span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.nan-division-link.is-active {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--surface-accent), var(--surface-accent-2));
}

.nan-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nan-security-item {
  border: 1px solid var(--line-muted);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 14px;
}

.nan-security-item h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.nan-security-item p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

@media (max-width: 960px) {
  .nan-form,
  .nan-security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nan-lookup-head,
  .nan-directory-head,
  .nan-result-head {
    flex-direction: column;
  }

  .nan-form,
  .nan-detail-grid,
  .nan-security-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-result-actions {
    justify-content: flex-start;
  }

  .nan-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.nan-main {
  display: grid;
  gap: 20px;
  padding-block: 24px 42px;
}

.nan-top-disclosure {
  display: grid;
  gap: 20px;
}

.nan-scope-strip {
  display: grid;
  gap: 4px;
  padding: 0;
  position: relative;
  z-index: 120;
}

.nan-scope-label {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.nan-scope-strip .nan-division-dropdown {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 86%, transparent);
  background-clip: padding-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  transition: border-color 140ms ease, background 140ms ease;
}

.nan-scope-strip .nan-division-dropdown:hover,
.nan-scope-strip .nan-division-dropdown:focus-within {
  border-color: color-mix(in srgb, var(--brand-strong) 24%, var(--line));
  background: color-mix(in srgb, var(--surface-1) 91%, var(--brand-subtle));
}

.nan-scope-strip .nan-division-button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  background-clip: padding-box;
  box-shadow: none;
  padding-inline: 12px 38px;
  transition: background 140ms ease, color 140ms ease;
}

.nan-scope-strip .nan-division-button:hover,
.nan-scope-strip .nan-division-button:focus-visible {
  background: color-mix(in srgb, var(--brand-subtle) 5%, transparent);
  box-shadow: none;
  outline: none;
}

.nan-scope-strip .nan-division-button span {
  transform: none;
  transition: none;
}

.nan-scope-strip .nan-division-button:hover span,
.nan-scope-strip .nan-division-button:focus-visible span {
  transform: none;
}

.nan-scope-strip .nan-division-button[aria-expanded="true"] {
  background: color-mix(in srgb, var(--brand-subtle) 7%, transparent);
  box-shadow: none;
}

.nan-scope-strip .nan-division-button::after {
  right: 12px;
  transition: none;
}

.nan-scope-strip .nan-division-button[aria-expanded="true"]::after {
  border-color: var(--text-soft);
  transform: translateY(-35%) rotate(225deg);
  transition: none;
}

.nan-scope-strip .nan-division-menu {
  top: calc(100% + 7px);
  border-radius: 8px;
  z-index: 130;
}

.nan-division-picker-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  position: relative;
  overflow: visible;
}

.nan-division-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nan-division-picker-head h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.nan-division-dropdown {
  position: relative;
  width: min(100%, 420px);
}

.nan-division-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font: inherit;
  font-weight: 850;
  line-height: 1.2;
  padding: 0 44px 0 14px;
  position: relative;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nan-division-button::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.nan-division-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--brand-strong) 55%, var(--line));
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.nan-division-button[aria-expanded="true"]::after {
  border-color: var(--brand-strong);
  transform: translateY(-35%) rotate(225deg);
}

.nan-division-menu {
  position: absolute;
  z-index: 50;
  inset-inline: 0;
  top: calc(100% + 6px);
  max-height: min(360px, 56vh);
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  width: auto;
  min-width: 0;
  max-width: none;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 34%, var(--line));
  border-radius: 10px;
  background: var(--surface-1);
  box-shadow: 0 18px 46px rgba(5, 13, 28, 0.18);
  padding: 6px;
  contain: paint;
}

.nan-division-menu::-webkit-scrollbar:horizontal {
  display: none;
  height: 0;
}

.nan-division-option {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 10px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nan-division-option:hover,
.nan-division-option:focus-visible {
  background: var(--surface-accent);
  outline: none;
}

.nan-division-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--brand-strong) 13%, var(--surface-1));
  color: var(--brand-strong);
}

.nan-native-division-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nan-top-summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nan-top-summary::-webkit-details-marker,
.nan-upload-summary::-webkit-details-marker {
  display: none;
}

.nan-top-summary::after,
.nan-upload-summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  transform: translateY(-64%) rotate(45deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.nan-top-disclosure[open] .nan-top-summary::after,
.nan-upload-disclosure[open] .nan-upload-summary::after {
  transform: translateY(-36%) rotate(225deg);
  border-color: var(--brand-strong);
}

.nan-top-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nan-top-summary-copy {
  display: grid;
  gap: 4px;
}

.nan-top-summary-title {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nan-top-summary-note {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.nan-top-summary:hover .nan-top-summary-title {
  color: var(--brand-strong);
}

.nan-top-body {
  display: grid;
  gap: 20px;
}

.nan-top-disclosure[open] .nan-top-body,
.nan-upload-disclosure[open] .nan-upload-body,
.nan-detail-disclosure[open] .nan-detail-grid {
  animation: nanDropdownReveal 190ms ease-out both;
  transform-origin: top center;
}

.nan-hero,
.nan-lookup-card,
.nan-result-card,
.nan-directory-card,
.nan-security-card {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 2.2vw, 30px);
}

.nan-hero {
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(33, 133, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(242, 248, 255, 0.98), rgba(232, 242, 255, 0.88));
}

[data-theme="dark"] .nan-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 34%),
    linear-gradient(135deg, rgba(4, 4, 4, 0.98), rgba(0, 0, 0, 0.94));
}

.nan-hero-solo {
  grid-template-columns: minmax(0, 1fr);
}

.nan-hero-copy {
  display: grid;
  gap: 14px;
}

.nan-hero-text {
  margin: 0;
  max-width: 66ch;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.nan-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nan-route-pill,
.nan-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nan-route-pill {
  border: 1px solid var(--line-info);
  background: var(--surface-accent);
  color: var(--brand-strong);
}

.nan-status-pill {
  border: 1px solid rgba(17, 126, 84, 0.25);
  background: rgba(62, 178, 127, 0.12);
  color: #0f7b4d;
}

[data-theme="dark"] .nan-status-pill {
  border-color: rgba(94, 213, 153, 0.24);
  background: rgba(62, 178, 127, 0.18);
  color: #9ce6be;
}

.nan-hero-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(24, 66, 128, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: clamp(18px, 1.8vw, 24px);
  box-shadow: 0 20px 40px rgba(24, 61, 113, 0.08);
}

[data-theme="dark"] .nan-hero-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 8, 0.72);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
}

.nan-panel-label,
.nan-sidebar-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nan-panel-value {
  margin: 0;
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nan-panel-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.nan-division-field {
  gap: 6px;
}

.nan-hero-panel .nan-field span {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nan-top-load {
  display: grid;
  padding: 5px 7px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background:
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 244, 244, 0.9));
  box-shadow: none;
}

[data-theme="dark"] .nan-top-load {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(0, 0, 0, 0.94));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.nan-top-load-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  min-height: 12px;
}

.nan-top-load-copy {
  display: grid;
  gap: 6px;
}

.nan-top-load-copy .eyebrow {
  margin: 0;
}

.nan-top-load-title,
#nan-dataset-load-title {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nan-top-load-value {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nan-top-load .nan-progress-track {
  height: 5px;
}

.nan-top-load.is-ready {
  border-color: rgba(17, 126, 84, 0.18);
  background:
    radial-gradient(circle at top right, rgba(44, 187, 121, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(240, 253, 247, 0.98), rgba(230, 248, 239, 0.94));
}

[data-theme="dark"] .nan-top-load.is-ready {
  border-color: rgba(94, 213, 153, 0.22);
  background:
    radial-gradient(circle at top right, rgba(44, 187, 121, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(10, 18, 14, 0.95), rgba(0, 0, 0, 0.93));
}

.nan-top-load.is-ready .nan-top-load-value,
.nan-top-load.is-ready #nan-dataset-load-title {
  color: var(--ok);
}

.nan-top-load.is-ready .nan-progress-bar {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04)),
    linear-gradient(90deg, #1f9d63, #31c27f);
  box-shadow: 0 0 18px rgba(49, 194, 127, 0.24);
}

.nan-top-load.is-error {
  border-color: rgba(197, 76, 76, 0.22);
  background:
    radial-gradient(circle at top right, rgba(214, 77, 77, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(255, 237, 237, 0.94));
}

[data-theme="dark"] .nan-top-load.is-error {
  border-color: rgba(255, 129, 129, 0.24);
  background:
    radial-gradient(circle at top right, rgba(214, 77, 77, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(24, 8, 8, 0.95), rgba(0, 0, 0, 0.93));
}

.nan-top-load.is-error .nan-top-load-value,
.nan-top-load.is-error #nan-dataset-load-title {
  color: var(--danger);
}

.nan-top-load.is-error .nan-progress-bar {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
    linear-gradient(90deg, #d44d4d, #f16f6f);
  box-shadow: 0 0 18px rgba(212, 77, 77, 0.24);
}

.nan-workbench {
  display: grid;
  grid-template-columns: minmax(340px, 0.76fr) minmax(0, 1.24fr);
  gap: 20px;
  align-items: start;
}

.nan-side-stack {
  display: grid;
  gap: 20px;
}

.nan-result-stack {
  display: grid;
  gap: 12px;
}

.nan-quick-entry-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.nan-quick-entry-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.nan-quick-entry-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nan-quick-entry-title > span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nan-superslot-cycle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  color: var(--text-soft);
  min-height: 32px;
  padding: 3px 4px 3px 10px;
  cursor: pointer;
  font: inherit;
  transform: translateZ(0);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  user-select: none;
}

.nan-superslot-cycle:hover {
  border-color: rgba(24, 66, 128, 0.28);
  box-shadow: 0 5px 12px rgba(24, 66, 128, 0.06);
  transform: translateY(-1px);
}

.nan-superslot-cycle:active {
  transform: translateY(0) scale(0.98);
}

.nan-superslot-cycle span {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nan-superslot-cycle strong {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-strong);
  color: var(--brand-contrast);
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(24, 66, 128, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.nan-superslot-cycle.is-active {
  border-color: rgba(24, 66, 128, 0.26);
}

.nan-superslot-cycle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.nan-superslot-cycle.is-cycling strong {
  animation: nan-superslot-pop 180ms ease-out;
}

.nan-superslot-cycle.is-cycling {
  animation: nan-superslot-shell 180ms ease-out;
}

@keyframes nan-superslot-pop {
  0% {
    transform: scale(0.97);
  }
  55% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes nan-superslot-shell {
  0% {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  45% {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
  }
  100% {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
}

@keyframes nan-slot-map-fill {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
  45% {
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.14);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

.nan-quick-entry-card .nan-field {
  gap: 5px;
}

.nan-quick-entry-card .nan-field span {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nan-quick-entry-card .nan-field .nan-field-hint {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.nan-quick-entry-card .nan-field input {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 12px;
}

.nan-slot-field {
  position: relative;
  z-index: 6;
}

.nan-slot-combobox {
  position: relative;
}

.nan-slot-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  gap: 4px;
  max-height: 238px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-1);
  box-shadow: 0 18px 44px rgba(17, 39, 74, 0.18);
}

.nan-slot-suggestions[hidden] {
  display: none;
}

.nan-slot-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  padding: 8px 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nan-slot-suggestion:hover,
.nan-slot-suggestion.is-active {
  background: var(--surface-3);
}

.nan-slot-suggestion strong {
  color: var(--text);
  font-size: 0.84rem;
}

.nan-slot-suggestion em {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-style: normal;
  white-space: nowrap;
}

.nan-quick-entry-card .nan-field input.is-map-filled {
  animation: nan-slot-map-fill 420ms ease-out;
}

.nan-quick-output {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nan-quick-output div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line-muted);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 9px 10px;
}

.nan-quick-output span {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nan-quick-output strong {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
}

.nan-quick-output input {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: 800 0.98rem "Plus Jakarta Sans", sans-serif;
}

.nan-quick-output input:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--brand);
}

.nan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.nan-card-head h2 {
  margin: 0;
  font-size: 1.18rem;
}

.nan-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.nan-field {
  display: grid;
  gap: 8px;
}

.nan-field-wide {
  min-width: 0;
}

.nan-field span {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.nan-field input,
.nan-field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  color: var(--text);
  padding: 0 16px;
  font: inherit;
}

.nan-field select {
  appearance: none;
  cursor: pointer;
  color-scheme: light;
}

[data-theme="dark"] .nan-field select {
  color-scheme: dark;
}

.nan-field select option {
  background: #ffffff;
  color: #1d2735;
}

[data-theme="dark"] .nan-field select option {
  background: #0b0b0b;
  color: #f4f4f5;
}

.nan-field input:focus,
.nan-field select:focus,
.nan-editor-text:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.nan-progress {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.08), transparent 28%),
    linear-gradient(180deg, var(--surface-1), var(--surface-3));
  box-shadow: var(--shadow);
}

.nan-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nan-progress-track {
  width: 100%;
  height: 12px;
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  overflow: hidden;
}

.nan-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.06)),
    linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow: 0 0 18px rgba(31, 110, 255, 0.26);
  transition: width 180ms ease;
}

.nan-muted {
  margin: 0;
  color: var(--text-soft);
}

.nan-editor-triggers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nan-editor-trigger {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  color: var(--text);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.nan-data-card .nan-editor-trigger {
  min-height: 112px;
  align-content: center;
}

.nan-editor-trigger:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.nan-editor-trigger-label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.nan-editor-trigger-meta {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.nan-result-body {
  min-height: 220px;
}

.nan-result-shell {
  display: grid;
  gap: 14px;
}

.nan-result-callout {
  margin: 0;
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nan-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.nan-priority-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.nan-exemption-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 55%, var(--line-muted));
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  color: var(--brand-contrast);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  min-height: 44px;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.nan-exemption-action:hover,
.nan-exemption-action:focus-visible {
  border-color: color-mix(in srgb, var(--brand-strong) 75%, #fff);
  box-shadow: 0 10px 24px rgba(10, 26, 54, 0.16);
  filter: brightness(1.04);
  outline: none;
  transform: translateY(-1px);
}

[data-theme="dark"] .nan-exemption-action {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, #3a3a3a, #171717);
}

.nan-exemption-action-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 42%, var(--line-muted));
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-strong) 16%, var(--surface-1));
  box-shadow: 0 10px 22px rgba(10, 26, 54, 0.08);
}

.nan-exemption-action-group .nan-exemption-action,
.nan-exemption-action-group .nan-recommend-slot-action {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 7px 9px;
}

.nan-exemption-action-group .nan-exemption-action {
  border-right: 1px solid rgba(255, 255, 255, 0.32);
}

.nan-exemption-action-group .nan-exemption-action:hover,
.nan-exemption-action-group .nan-exemption-action:focus-visible {
  transform: none;
}

.nan-recommend-slot-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff, #e8f1ff);
  color: #05264a;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-size: 0.79rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease, filter 150ms ease;
}

.nan-recommend-slot-action span {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: opacity 240ms ease, transform 240ms ease;
}

.nan-recommend-slot-action:hover,
.nan-recommend-slot-action:focus-visible {
  background: linear-gradient(180deg, #ffffff, #edf5ff);
  filter: brightness(1.02);
  outline: none;
}

.nan-recommend-slot-action.is-showing-result {
  background: linear-gradient(180deg, #edf9ff, #bfe9ff);
  color: #001a35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.74);
}

.nan-recommend-slot-action.is-fading-back span {
  opacity: 0.78;
  transform: translateY(-1px);
}

[data-theme="dark"] .nan-exemption-action-group {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(12, 12, 12, 0.9);
}

[data-theme="dark"] .nan-recommend-slot-action {
  background: linear-gradient(180deg, #ffffff, #e5f2ff);
  color: #001d3d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] .nan-recommend-slot-action.is-showing-result {
  background: linear-gradient(180deg, #f0faff, #a9dcff);
  color: #001225;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.86);
}

.nan-priority-exemption-action {
  align-self: start;
  justify-self: end;
  min-height: 0;
  width: min(100%, 244px);
}

.nan-priority-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(18, 87, 182, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(236, 245, 255, 0.92), rgba(248, 251, 255, 0.98));
  padding: 18px;
}

[data-theme="dark"] .nan-priority-card {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.92), rgba(6, 6, 6, 0.96));
}

.nan-priority-card span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nan-priority-card strong {
  color: var(--brand-strong);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
  line-height: 1.35;
  white-space: pre-line;
}

.nan-priority-card.is-placeholder strong,
.nan-detail-row.is-muted strong {
  color: var(--text-soft);
}

.nan-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.nan-detail-disclosure {
  display: grid;
  gap: 0;
  border: 1px solid var(--line-muted);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
  overflow: hidden;
}

.nan-detail-summary {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  transition: background 180ms ease, border-color 180ms ease;
}

.nan-detail-summary::-webkit-details-marker {
  display: none;
}

.nan-detail-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nan-detail-summary-caret {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-soft);
  border-bottom: 2px solid var(--text-soft);
  transform: rotate(-45deg);
  transition: transform 140ms ease, border-color 140ms ease;
}

.nan-detail-summary-title {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nan-detail-disclosure[open] .nan-detail-summary {
  border-bottom: 1px solid var(--line-muted);
}

.nan-detail-disclosure[open] .nan-detail-summary-caret {
  transform: rotate(45deg);
}

.nan-detail-disclosure .nan-detail-grid {
  padding: 14px;
}

.nan-detail-row,
.nan-secondary-row,
.nan-summary-row,
.nan-note-block {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-muted);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px 16px;
}

.nan-detail-row span,
.nan-secondary-row span,
.nan-note-block span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.nan-detail-row strong,
.nan-secondary-row strong,
.nan-note-block strong {
  color: var(--text);
  line-height: 1.55;
}

.nan-note-block strong {
  text-align: left;
}

.nan-note-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
  line-height: 1.55;
}

.nan-note-list li {
  margin: 0;
}

.nan-secondary-block {
  display: grid;
  gap: 8px;
}

.nan-secondary-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.nan-map-card {
  min-height: 280px;
}

.nan-map-body {
  min-height: 220px;
}

.nan-map-block {
  --nan-map-area-color: #467cd6;
  --nan-map-area-rgb: 70, 124, 214;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(var(--nan-map-area-rgb), 0.26);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(var(--nan-map-area-rgb), 0.14), transparent 32%),
    linear-gradient(180deg, rgba(248, 250, 255, 0.98), rgba(var(--nan-map-area-rgb), 0.08));
  padding: 16px;
}

[data-theme="dark"] .nan-map-block {
  border-color: rgba(var(--nan-map-area-rgb), 0.34);
  background:
    radial-gradient(circle at top right, rgba(var(--nan-map-area-rgb), 0.16), transparent 34%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(0, 0, 0, 0.94));
}

.nan-map-head {
  display: grid;
  gap: 6px;
}

.nan-map-head strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

.nan-map-context {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.nan-map-sheet {
  display: block;
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  padding-right: 10px;
  padding-bottom: 8px;
}

.nan-map-column {
  display: grid;
  gap: 0;
  width: 100%;
  border: 1px solid rgba(var(--nan-map-area-rgb), 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(var(--nan-map-area-rgb), 0.13));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  overflow: hidden;
  background-clip: padding-box;
}

[data-theme="dark"] .nan-map-column {
  border-color: rgba(var(--nan-map-area-rgb), 0.32);
  background: linear-gradient(180deg, rgba(var(--nan-map-area-rgb), 0.12), rgba(8, 8, 8, 0.94));
}

.nan-map-lane-row {
  display: grid;
  gap: 2px;
}

.nan-map-lane {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 0;
  border-top: 1px solid rgba(var(--nan-map-area-rgb), 0.24);
  background: rgba(255, 255, 255, 0.08);
  align-items: stretch;
}

.nan-map-lane[data-nan-map-slot] {
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.nan-map-lane[data-nan-map-slot]:hover,
.nan-map-lane[data-nan-map-slot]:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(28, 50, 87, 0.1);
}

.nan-map-lane[data-nan-map-slot]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.nan-map-column .nan-map-lane:first-child {
  border-top: 0;
}

.nan-map-column .nan-map-lane:last-child {
  border-bottom: 1px solid rgba(var(--nan-map-area-rgb), 0.24);
}

[data-theme="dark"] .nan-map-lane {
  border-top-color: rgba(var(--nan-map-area-rgb), 0.18);
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .nan-map-column .nan-map-lane:last-child {
  border-bottom-color: rgba(var(--nan-map-area-rgb), 0.18);
}

.nan-map-lane-slot {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 4px;
  border-right: 2px solid rgba(var(--nan-map-area-rgb), 0.3);
  background: rgba(var(--nan-map-area-rgb), 0.12);
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .nan-map-lane-slot {
  border-right-color: rgba(var(--nan-map-area-rgb), 0.2);
  background: rgba(var(--nan-map-area-rgb), 0.1);
  color: rgba(253, 237, 244, 0.98);
}

.nan-map-lane-track {
  display: grid;
  gap: 3px;
  align-content: start;
  padding: 8px 8px 8px 10px;
  min-height: 64px;
  background: transparent;
}

.nan-map-lane-main {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

[data-theme="dark"] .nan-map-lane-main {
  color: rgba(253, 237, 244, 0.98);
}

.nan-map-lane-meta {
  color: var(--text-soft);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

[data-theme="dark"] .nan-map-lane-meta {
  color: rgba(236, 204, 218, 0.92);
}

.nan-map-lane.is-self .nan-map-lane-track {
  box-shadow: inset 3px 0 0 rgba(21, 143, 96, 0.9);
}

.nan-map-lane.is-target .nan-map-lane-track {
  box-shadow: inset 3px 0 0 rgba(var(--nan-map-area-rgb), 0.95);
  background: rgba(var(--nan-map-area-rgb), 0.16);
}

[data-theme="dark"] .nan-map-lane.is-target .nan-map-lane-track {
  background: rgba(var(--nan-map-area-rgb), 0.18);
}

.nan-map-lane.is-empty .nan-map-lane-main {
  color: var(--text-soft);
}

.nan-map-lane.is-empty .nan-map-lane-track {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nan-map-lane.is-empty .nan-map-lane-track {
  background: rgba(255, 255, 255, 0.04);
}

.nan-map-lane.is-missing .nan-map-lane-track {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .nan-map-lane.is-missing .nan-map-lane-track {
  background: rgba(255, 255, 255, 0.02);
}

.nan-map-lane.is-seasonal .nan-map-lane-slot {
  box-shadow: inset 4px 0 0 #d8a31f;
}

.nan-map-lane.is-freeze-thaw .nan-map-lane-slot {
  box-shadow: inset -4px 0 0 #6a4de2;
}

.nan-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(40, 71, 120, 0.12);
}

[data-theme="dark"] .nan-map-legend {
  border-top-color: rgba(117, 157, 222, 0.14);
}

.nan-map-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nan-map-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(67, 97, 138, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .nan-map-legend-swatch {
  border-color: rgba(117, 145, 190, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.nan-map-legend-chip.is-seasonal .nan-map-legend-swatch {
  background: linear-gradient(90deg, #d8a31f 0 3px, rgba(255, 255, 255, 0.8) 3px 100%);
}

.nan-map-legend-chip.is-self .nan-map-legend-swatch {
  background: linear-gradient(90deg, #158f60 0 3px, rgba(255, 255, 255, 0.8) 3px 100%);
}

.nan-map-legend-chip.is-freeze-thaw .nan-map-legend-swatch {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0 calc(100% - 3px), #6a4de2 calc(100% - 3px) 100%);
}

.nan-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nan-badge {
  border: 1px solid var(--line-info);
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  text-transform: uppercase;
}

.nan-division-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.nan-division-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  color: var(--text);
  padding: 16px 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.nan-division-link:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.nan-division-link strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.nan-division-link span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.nan-division-link.is-active {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--surface-accent), var(--surface-accent-2));
}

.nan-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.nan-modal-open {
  overflow: hidden;
}

.nan-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.nan-modal[hidden] {
  display: none;
}

.nan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(8px);
}

:root[data-theme="dark"] .nan-modal-backdrop {
  background: rgba(4, 15, 29, 0.62);
}

.nan-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: min(88vh, 980px);
  overflow: auto;
  padding: clamp(20px, 2vw, 28px);
}

.nan-modal-head,
.nan-editor-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.nan-modal-head h2 {
  margin: 0;
}

.nan-modal-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  min-height: 40px;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
}

.nan-modal-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.nan-logic-grid {
  align-items: start;
}

.nan-logic-stack,
.nan-logic-list,
.nan-logic-steps {
  display: grid;
  gap: 12px;
}

.nan-logic-list,
.nan-logic-steps {
  margin: 0;
  padding-left: 18px;
}

.nan-logic-list li,
.nan-logic-steps li {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.nan-logic-list strong,
.nan-logic-steps strong {
  color: var(--text);
}

.nan-logic-kicker {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nan-dashboard-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1340px, 98vw);
  height: min(92vh, 1040px);
  max-height: min(92vh, 1040px);
  overflow: hidden;
  padding: 0;
}

.nan-modal-dialog.nan-dashboard-dialog {
  padding: 0;
}

.nan-dashboard-dialog .nan-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  position: relative;
  z-index: 10;
  margin: 0;
  padding: clamp(14px, 1.4vw, 18px) clamp(20px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.nan-dashboard-dialog .nan-dashboard-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  right: auto;
  margin-left: auto;
}

.nan-dashboard-head-refresh {
  order: 1;
}

.nan-dashboard-dialog .nan-modal-close {
  order: 2;
}

.nan-dashboard-dialog .nan-modal-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-weight: 900;
  line-height: 1;
}

.nan-dashboard {
  display: block;
  height: 100%;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
  padding: 0;
}

.nan-dashboard-panel {
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.07), transparent 52%),
    var(--surface);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.nan-dashboard-hero,
.nan-dashboard-chart-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.nan-dashboard-hero {
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
}

.nan-dashboard-division-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.nan-dashboard-division-dropdown {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 86%, transparent);
  background-clip: padding-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  transition: border-color 140ms ease, background 140ms ease;
}

.nan-dashboard-division-dropdown:hover,
.nan-dashboard-division-dropdown:focus-within {
  border-color: color-mix(in srgb, var(--brand-strong) 24%, var(--line));
  background: color-mix(in srgb, var(--surface-1) 91%, var(--brand-subtle));
}

.nan-dashboard-division-button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  background-clip: padding-box;
  box-shadow: none;
  padding-inline: 12px 38px;
  transition: background 140ms ease, color 140ms ease;
}

.nan-dashboard-division-button:hover,
.nan-dashboard-division-button:focus-visible {
  background: color-mix(in srgb, var(--brand-subtle) 5%, transparent);
  box-shadow: none;
  outline: none;
}

.nan-dashboard-division-button span {
  transform: none;
  transition: none;
}

.nan-dashboard-division-button:hover span,
.nan-dashboard-division-button:focus-visible span {
  transform: none;
}

.nan-dashboard-division-button[aria-expanded="true"] {
  background: color-mix(in srgb, var(--brand-subtle) 7%, transparent);
  border-color: transparent;
  box-shadow: none;
}

.nan-dashboard-division-button::after {
  right: 12px;
  transition: none;
}

.nan-dashboard-division-button[aria-expanded="true"]::after {
  border-color: var(--text-soft);
  transform: translateY(-35%) rotate(225deg);
  transition: none;
}

.nan-dashboard-division-menu {
  top: calc(100% + 7px);
  border-radius: 8px;
  z-index: 130;
}

.nan-dashboard-hero h3,
.nan-dashboard-chart-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.15;
}

.nan-dashboard-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nan-dashboard-caption {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.nan-dashboard-caption:empty {
  display: none;
}

.nan-dashboard-refresh {
  display: inline-grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  min-height: 38px;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.nan-dashboard-head-refresh {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 0.96rem;
  line-height: 1;
}

.nan-dashboard-refresh-glyph {
  display: inline-grid;
  place-items: center;
  color: currentColor;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", system-ui, sans-serif;
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
  transition: opacity 140ms ease, transform 180ms ease;
}

.nan-dashboard-refresh-loader {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 3px);
  align-items: end;
  gap: 3px;
  width: 18px;
  height: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 140ms ease, transform 180ms ease;
}

.nan-dashboard-refresh-loader i {
  display: block;
  width: 3px;
  min-height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand-strong) 88%, white),
    var(--brand)
  );
  box-shadow: 0 0 8px rgba(var(--brand-rgb), 0.34);
  opacity: 0.52;
  transform-origin: 50% 100%;
}

.nan-dashboard-refresh-loader i:nth-child(1) {
  animation-delay: -160ms;
}

.nan-dashboard-refresh-loader i:nth-child(2) {
  animation-delay: 0ms;
}

.nan-dashboard-refresh-loader i:nth-child(3) {
  animation-delay: 160ms;
}

.nan-dashboard-refresh.is-refreshing {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background:
    linear-gradient(
      110deg,
      color-mix(in srgb, var(--brand-subtle) 24%, var(--surface-2)) 0%,
      color-mix(in srgb, var(--brand) 16%, var(--surface-2)) 48%,
      color-mix(in srgb, var(--brand-subtle) 24%, var(--surface-2)) 100%
    );
  background-size: 220% 100%;
  box-shadow:
    0 0 0 3px rgba(var(--brand-rgb), 0.11),
    0 8px 18px rgba(var(--brand-rgb), 0.12);
  color: var(--brand-strong);
  cursor: progress;
  animation: nan-dashboard-refresh-sheen 1.05s ease-in-out infinite;
}

.nan-dashboard-refresh.is-refreshing .nan-dashboard-refresh-glyph {
  opacity: 0;
  transform: translateY(-1px) scale(0.5) rotate(-28deg);
}

.nan-dashboard-refresh.is-refreshing .nan-dashboard-refresh-loader {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.nan-dashboard-refresh.is-refreshing .nan-dashboard-refresh-loader i {
  animation-name: nan-dashboard-refresh-bar;
  animation-duration: 780ms;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.nan-dashboard-refresh:hover,
.nan-dashboard-refresh:focus-visible {
  border-color: rgba(var(--brand-rgb), 0.58);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.12);
}

@keyframes nan-dashboard-refresh-bar {
  0%,
  100% {
    height: 6px;
    opacity: 0.45;
    transform: scaleY(0.72);
  }

  45% {
    height: 17px;
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes nan-dashboard-refresh-sheen {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.nan-dashboard-scroll {
  height: 100%;
  min-height: 0;
  display: grid;
  gap: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 12px 16px 16px;
  scrollbar-color: color-mix(in srgb, var(--brand) 42%, var(--surface-3)) transparent;
  scrollbar-width: thin;
}

.nan-dashboard-scroll::-webkit-scrollbar {
  width: 11px;
}

.nan-dashboard-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.nan-dashboard-scroll::-webkit-scrollbar-thumb {
  min-height: 58px;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 48%, var(--surface-3)),
    color-mix(in srgb, var(--brand-strong) 42%, var(--surface-3))
  );
}

.nan-dashboard-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 62%, var(--surface-3)),
    color-mix(in srgb, var(--brand-strong) 58%, var(--surface-3))
  );
}

.nan-dashboard-chart-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.nan-dashboard-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nan-dashboard-metric {
  display: grid;
  gap: 1px;
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px 10px;
}

.nan-dashboard-metric strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.1;
}

.nan-dashboard-metric em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.nan-dashboard-chart {
  min-height: 320px;
  overflow: visible;
  border-radius: 8px;
  background: transparent;
}

.nan-dashboard-area-panels {
  display: grid;
  gap: 14px;
}

.nan-dashboard-area-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--area-color) 34%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--area-color) 12%, transparent), transparent 58%),
    var(--surface-2);
  padding: 12px;
}

.nan-dashboard-area-panel.is-empty {
  opacity: 0.72;
}

.nan-dashboard-area-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.nan-dashboard-area-panel h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.15;
}

.nan-dashboard-area-panel h4 strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nan-dashboard-area-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--area-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--area-color) 18%, transparent);
}

.nan-dashboard-guard-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 4px;
}

.nan-dashboard-guard-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 3px;
  border: 1px solid color-mix(in srgb, var(--area-color) 32%, var(--line));
  border-radius: 7px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--area-color) 10%, transparent), transparent 70%),
    var(--surface);
  color: var(--text-soft);
  padding: 2px 5px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.nan-dashboard-guard-control em {
  grid-column: 1 / -1;
  color: color-mix(in srgb, var(--text-soft) 82%, var(--surface));
  font-size: 0.54rem;
  font-style: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nan-dashboard-guard-control input {
  width: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1;
  outline: none;
  padding: 1px 0;
  text-align: right;
}

.nan-dashboard-guard-control.is-tilt input {
  width: 34px;
}

.nan-dashboard-guard-apply {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--area-color) 38%, var(--line));
  border-radius: 6px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--area-color) 14%, transparent), transparent 70%),
    var(--surface);
  color: color-mix(in srgb, var(--area-color) 78%, var(--text));
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  padding: 0;
}

.nan-dashboard-guard-controls.is-pending .nan-dashboard-guard-apply {
  border-color: color-mix(in srgb, #16a34a 58%, var(--area-color));
  background:
    linear-gradient(135deg, color-mix(in srgb, #16a34a 22%, transparent), transparent 72%),
    var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 13%, transparent);
  color: #15803d;
}

.nan-dashboard-guard-apply:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--area-color) 58%, var(--brand));
  outline-offset: 2px;
}

.nan-dashboard-guard-control input::-webkit-outer-spin-button,
.nan-dashboard-guard-control input::-webkit-inner-spin-button {
  margin: 0;
}

.nan-dashboard-guard-control span {
  color: var(--text-soft);
}

.nan-dashboard-area-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nan-dashboard-area-outliers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 7px;
  align-items: stretch;
  border-top: 1px solid color-mix(in srgb, var(--area-color) 18%, var(--line));
  padding-top: 10px;
}

.nan-dashboard-area-stats span,
.nan-dashboard-outlier-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
}

.nan-dashboard-area-stats .is-alert,
.nan-dashboard-outlier-chip:not(.is-clear) {
  border-color: rgba(220, 38, 38, 0.42);
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.12), transparent 72%),
    var(--surface);
  color: #b91c1c;
}

:root[data-theme="dark"] .nan-dashboard-area-stats .is-alert,
:root[data-theme="dark"] .nan-dashboard-outlier-chip:not(.is-clear) {
  color: #fecaca;
}

.nan-dashboard-area-stats .is-compliance {
  border-color: rgba(22, 163, 74, 0.42);
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.13), transparent 72%),
    var(--surface);
  color: #15803d;
}

.nan-dashboard-area-stats .is-compliance.is-warning {
  border-color: rgba(217, 119, 6, 0.42);
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.14), transparent 72%),
    var(--surface);
  color: #b45309;
}

.nan-dashboard-area-stats .is-store-set,
.nan-dashboard-outlier-chip.is-store-set {
  border-color: rgba(217, 119, 6, 0.44);
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.14), transparent 72%),
    var(--surface);
  color: #b45309;
}

.nan-dashboard-outlier-chip.is-exemption {
  border-color: color-mix(in srgb, var(--area-color, var(--brand)) 46%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--area-color, var(--brand)) 16%, transparent), transparent 72%),
    var(--surface);
  color: var(--text);
}

.nan-dashboard-outlier-chip.is-hazmat-exemption {
  border-color: color-mix(in srgb, #7030a0 52%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #7030a0 16%, transparent), transparent 72%),
    var(--surface);
}

.nan-dashboard-outlier-chip.is-tissue-paper-exemption {
  border-color: color-mix(in srgb, #0284c7 50%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #0ea5e9 14%, transparent), transparent 72%),
    var(--surface);
}

.nan-dashboard-outlier-chip.is-heavy-weight-exemption {
  border-color: color-mix(in srgb, #dc2626 48%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #dc2626 14%, transparent), transparent 72%),
    var(--surface);
}

.nan-dashboard-outlier-chip.is-seasonal-find-exemption {
  border-color: color-mix(in srgb, #d8a31f 52%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #d8a31f 17%, transparent), transparent 72%),
    var(--surface);
}

.nan-dashboard-outlier-chip.is-seasonal-find-move {
  border-color: color-mix(in srgb, #ca8a04 58%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #ca8a04 20%, transparent), transparent 72%),
    var(--surface);
  color: #a16207;
}

.nan-dashboard-outlier-chip.is-freeze-thaw-exemption {
  border-color: color-mix(in srgb, #6a4de2 50%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #6a4de2 16%, transparent), transparent 72%),
    var(--surface);
}

.nan-dashboard-outlier-chip.is-cooler-line {
  border-color: color-mix(in srgb, #0f9f8f 50%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #0f9f8f 15%, transparent), transparent 72%),
    var(--surface);
}

.nan-dashboard-outlier-chip.is-osd-band {
  border-color: rgba(37, 99, 235, 0.38);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 72%),
    var(--surface);
  color: #1d4ed8;
}

:root[data-theme="dark"] .nan-dashboard-area-stats .is-compliance {
  color: #bbf7d0;
}

:root[data-theme="dark"] .nan-dashboard-area-stats .is-compliance.is-warning,
:root[data-theme="dark"] .nan-dashboard-area-stats .is-store-set,
:root[data-theme="dark"] .nan-dashboard-outlier-chip.is-store-set,
:root[data-theme="dark"] .nan-dashboard-outlier-chip.is-seasonal-find-move,
:root[data-theme="dark"] .nan-dashboard-outlier-chip.is-exemption,
:root[data-theme="dark"] .nan-dashboard-outlier-chip.is-osd-band {
  color: #fed7aa;
}

.nan-dashboard-outlier-chip:not(.is-clear) {
  display: grid;
  gap: 2px;
  min-width: 148px;
  max-width: none;
  text-align: left;
}

.nan-dashboard-outlier-chip strong,
.nan-dashboard-outlier-chip em,
.nan-dashboard-outlier-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nan-dashboard-outlier-chip strong {
  color: var(--text);
  font-size: 0.72rem;
}

.nan-dashboard-outlier-chip em,
.nan-dashboard-outlier-chip span {
  font-size: 0.66rem;
  font-style: normal;
}

.nan-dashboard-pick-chart {
  min-height: 320px;
  overflow-x: hidden;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--area-color) 9%, transparent), transparent 68%),
    var(--surface-2);
}

.nan-dashboard-pick-chart.is-lazy-loading {
  display: grid;
  place-items: center;
}

.nan-dashboard-chart-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 280px;
  overflow: hidden;
  color: var(--text-soft);
  font-weight: 900;
  text-align: center;
}

.nan-dashboard-chart-placeholder::before {
  content: none;
}

.nan-dashboard-chart-placeholder-line {
  position: relative;
  width: min(74%, 640px);
  height: 84px;
  border-bottom: 3px solid color-mix(in srgb, var(--area-color) 44%, var(--brand));
  border-radius: 50%;
  opacity: 0.72;
  transform: rotate(-5deg);
}

.nan-dashboard-chart-placeholder strong,
.nan-dashboard-chart-placeholder em {
  position: relative;
  z-index: 1;
}

.nan-dashboard-chart-placeholder strong {
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.nan-dashboard-chart-placeholder em {
  max-width: 260px;
  font-size: 0.7rem;
  font-style: normal;
  line-height: 1.25;
}

.nan-dashboard-subcharts {
  display: grid;
  gap: 12px;
  padding: 10px;
}

.nan-dashboard-subchart {
  display: grid;
  gap: 6px;
}

.nan-dashboard-subchart > span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nan-dashboard-area-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-weight: 800;
  text-align: center;
}

.nan-dashboard-svg {
  display: block;
  width: 100%;
  height: clamp(248px, 25vw, 320px);
  min-height: 248px;
  color: var(--brand);
}

.nan-dashboard-pick-svg {
  width: 100%;
  min-width: 100%;
  height: clamp(248px, 25vw, 320px);
}

.nan-dashboard-plot-surface {
  fill: color-mix(in srgb, var(--surface) 88%, var(--area-color, var(--brand)) 12%);
  stroke: color-mix(in srgb, var(--area-color, var(--brand)) 30%, var(--line));
  stroke-width: 1.4;
}

.nan-dashboard-axis-line,
.nan-dashboard-axis-tick {
  fill: none;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.nan-dashboard-axis-line {
  stroke: color-mix(in srgb, var(--text-soft) 48%, transparent);
  stroke-width: 1.4;
}

.nan-dashboard-axis-tick {
  display: none;
}

.nan-dashboard-pick-axis-line,
.nan-dashboard-pick-axis-tick {
  fill: none;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.nan-dashboard-pick-axis-line {
  stroke: color-mix(in srgb, var(--area-color, var(--brand)) 32%, var(--line));
  stroke-width: 1.25;
}

.nan-dashboard-pick-axis-tick {
  stroke: color-mix(in srgb, var(--area-color, var(--brand)) 46%, var(--text-soft));
  stroke-width: 1.1;
}

.nan-dashboard-axis-label {
  fill: color-mix(in srgb, var(--text-soft) 88%, var(--text));
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
  text-anchor: end;
}

.nan-dashboard-pick-axis-label {
  fill: color-mix(in srgb, var(--text-soft) 76%, var(--text));
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
  text-anchor: middle;
}

.nan-dashboard-profile-area {
  fill: color-mix(in srgb, var(--area-color, var(--brand)) 13%, transparent);
  pointer-events: none;
}

.nan-dashboard-profile-line {
  fill: none;
  stroke: color-mix(in srgb, var(--area-color, var(--brand)) 62%, var(--text-soft));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  opacity: 0.72;
  pointer-events: none;
}

.nan-dashboard-actual-line-halo,
.nan-dashboard-actual-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.nan-dashboard-actual-line-halo {
  stroke: color-mix(in srgb, var(--surface-1) 88%, #ffffff);
  stroke-width: 7.5;
  opacity: 0.96;
}

.nan-dashboard-actual-line {
  stroke: color-mix(in srgb, var(--area-color, var(--brand)) 82%, var(--text));
  stroke-width: 3.6;
  opacity: 0.98;
  filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--area-color, var(--brand)) 28%, transparent));
}

.nan-dashboard-guard-rail {
  fill: none;
  stroke: color-mix(in srgb, var(--text-soft) 68%, var(--surface-1));
  stroke-dasharray: 9 10;
  stroke-linecap: round;
  stroke-width: 2.1;
  opacity: 0.78;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.nan-dashboard-guard-rail.is-lower {
  opacity: 0.58;
}

.nan-dashboard-guard-label {
  fill: color-mix(in srgb, var(--text-soft) 86%, var(--surface-1));
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  paint-order: stroke;
  pointer-events: none;
  stroke: var(--surface-1);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.nan-dashboard-actual-line.is-osd-band {
  stroke: var(--osd-color, var(--area-color, var(--brand)));
}

.nan-dashboard-actual-line-halo.is-osd-band {
  stroke: color-mix(in srgb, var(--surface-1) 84%, var(--osd-color, var(--area-color)) 16%);
}

.nan-dashboard-actual-line.is-cooler-line {
  stroke: var(--line-color, var(--area-color, var(--brand)));
}

.nan-dashboard-actual-line-halo.is-cooler-line {
  stroke: color-mix(in srgb, var(--surface-1) 84%, var(--line-color, var(--area-color)) 16%);
}

.nan-dashboard-exemption-band {
  fill: color-mix(in srgb, #b45309 13%, transparent);
  pointer-events: none;
}

.nan-dashboard-exemption-band.is-hazmat {
  fill: color-mix(in srgb, #7030a0 14%, transparent);
}

.nan-dashboard-exemption-band.is-seasonal-find {
  fill: color-mix(in srgb, #d8a31f 15%, transparent);
}

.nan-dashboard-exemption-band.is-freeze-thaw {
  fill: color-mix(in srgb, #6a4de2 14%, transparent);
}

.nan-dashboard-exemption-band.is-heavy-weight {
  fill: color-mix(in srgb, #dc2626 12%, transparent);
}

.nan-dashboard-exemption-band.is-late-af {
  fill: color-mix(in srgb, #d8a31f 15%, transparent);
}

.nan-dashboard-exemption-boundary {
  stroke: color-mix(in srgb, #b45309 78%, var(--text));
  stroke-width: 3;
  stroke-dasharray: 8 7;
  opacity: 0.98;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.nan-dashboard-exemption-boundary.is-hazmat {
  stroke: color-mix(in srgb, #7030a0 82%, var(--text));
}

.nan-dashboard-exemption-boundary.is-seasonal-find {
  stroke: color-mix(in srgb, #d8a31f 86%, var(--text));
}

.nan-dashboard-exemption-boundary.is-freeze-thaw {
  stroke: color-mix(in srgb, #6a4de2 82%, var(--text));
}

.nan-dashboard-exemption-boundary.is-heavy-weight {
  stroke: color-mix(in srgb, #dc2626 80%, var(--text));
}

.nan-dashboard-exemption-boundary.is-late-af {
  stroke: color-mix(in srgb, #d8a31f 86%, var(--text));
}

.nan-dashboard-exemption-label {
  fill: color-mix(in srgb, #92400e 78%, var(--text));
  font-size: 13px;
  font-weight: 950;
  paint-order: stroke;
  pointer-events: none;
  stroke: var(--surface-1);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.nan-dashboard-exemption-label.is-hazmat {
  fill: color-mix(in srgb, #7030a0 82%, var(--text));
}

.nan-dashboard-exemption-label.is-seasonal-find {
  fill: color-mix(in srgb, #b7791f 86%, var(--text));
}

.nan-dashboard-exemption-label.is-freeze-thaw {
  fill: color-mix(in srgb, #5b4bc4 84%, var(--text));
}

.nan-dashboard-exemption-label.is-heavy-weight {
  fill: color-mix(in srgb, #dc2626 80%, var(--text));
}

.nan-dashboard-exemption-label.is-late-af {
  fill: color-mix(in srgb, #b7791f 86%, var(--text));
}

.nan-dashboard-osd-label {
  fill: color-mix(in srgb, var(--osd-color, var(--area-color)) 82%, var(--text));
  font-size: 12px;
  font-weight: 950;
  paint-order: stroke;
  pointer-events: none;
  stroke: var(--surface-1);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.nan-dashboard-cooler-label {
  fill: color-mix(in srgb, var(--line-color, var(--area-color)) 84%, var(--text));
  font-size: 12px;
  font-weight: 950;
  paint-order: stroke;
  pointer-events: none;
  stroke: var(--surface-1);
  stroke-linejoin: round;
  stroke-width: 5px;
}

:root[data-theme="dark"] .nan-dashboard-actual-line-halo {
  stroke: color-mix(in srgb, var(--surface-1) 76%, #000000);
  opacity: 0.92;
}

:root[data-theme="dark"] .nan-dashboard-exemption-label {
  fill: #fed7aa;
  stroke: var(--surface-1);
}

:root[data-theme="dark"] .nan-dashboard-osd-label {
  fill: var(--osd-color, #bfdbfe);
  stroke: var(--surface-1);
}

:root[data-theme="dark"] .nan-dashboard-cooler-label {
  fill: var(--line-color, #99f6e4);
  stroke: var(--surface-1);
}

.nan-dashboard-point circle {
  fill: var(--area-color);
  stroke: color-mix(in srgb, var(--surface) 92%, #ffffff);
  stroke-width: 3;
  cursor: help;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.22));
}

.nan-dashboard-point {
  outline: none;
}

.nan-dashboard-point:hover circle,
.nan-dashboard-point:focus-visible circle,
.nan-dashboard-point.is-tooltip-active circle {
  stroke: var(--text);
  stroke-width: 5;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--area-color) 48%, transparent));
}

.nan-dashboard-point.is-empty circle {
  fill: transparent;
  stroke: var(--area-color);
  stroke-opacity: 0.36;
  filter: none;
}

.nan-dashboard-point.is-outlier circle {
  fill: #dc2626;
  stroke: color-mix(in srgb, var(--surface) 86%, #ffffff);
  stroke-width: 4;
  filter: drop-shadow(0 0 12px rgba(220, 38, 38, 0.52));
}

.nan-dashboard-point.is-low circle {
  fill: #2563eb;
  filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.42));
}

.nan-dashboard-point.is-store-set circle {
  fill: #d97706;
  stroke: color-mix(in srgb, var(--surface) 84%, #ffffff);
  stroke-width: 4.5;
  filter: drop-shadow(0 0 12px rgba(217, 119, 6, 0.48));
}

.nan-dashboard-point.is-seasonal-find-move circle {
  fill: #ca8a04;
  stroke: color-mix(in srgb, var(--surface) 84%, #ffffff);
  stroke-width: 4.5;
  filter: drop-shadow(0 0 12px rgba(202, 138, 4, 0.5));
}

.nan-dashboard-point-tooltip {
  position: fixed;
  z-index: 25000;
  display: grid;
  gap: 4px;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid color-mix(in srgb, var(--brand) 36%, var(--line));
  border-radius: 8px;
  background-color: var(--surface-1);
  background-image: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand) 9%, var(--surface-1)) 0%,
    var(--surface-1) 72%
  );
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28), 0 0 0 1px color-mix(in srgb, #ffffff 38%, transparent) inset;
  color: var(--text);
  padding: 10px 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.nan-dashboard-point-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nan-dashboard-point-tooltip strong,
.nan-dashboard-point-tooltip span,
.nan-dashboard-point-tooltip em,
.nan-dashboard-point-tooltip small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nan-dashboard-point-tooltip strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.nan-dashboard-point-tooltip span {
  color: #b45309;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
}

.nan-dashboard-point-tooltip em,
.nan-dashboard-point-tooltip small {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

:root[data-theme="dark"] .nan-dashboard-point-tooltip span {
  color: #fed7aa;
}

.nan-dashboard-area-label {
  fill: var(--text);
  font-weight: 900;
  text-anchor: middle;
}

.nan-dashboard-area-label {
  font-size: 13px;
}

.nan-dashboard-chart-note {
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 10px 14px 12px;
}

.nan-dashboard-loading,
.nan-dashboard-empty {
  min-height: 330px;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-weight: 800;
  text-align: center;
  padding: 24px;
}

.nan-dashboard-loading {
  grid-template-rows: auto auto;
  align-content: center;
}

.nan-dashboard-loading strong {
  max-width: 320px;
  color: var(--text);
}

.nan-dashboard-loading-visual {
  position: relative;
  width: min(360px, 76vw);
  height: 150px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--surface) 88%, transparent) 0,
      color-mix(in srgb, var(--brand) 10%, transparent) 50%,
      color-mix(in srgb, var(--surface) 88%, transparent) 100%
    );
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 35%, transparent);
}

.nan-dashboard-loading-baseline {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 28px;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.nan-dashboard-loading-bar {
  position: absolute;
  left: var(--x);
  bottom: 30px;
  width: 11%;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: color-mix(in srgb, var(--brand) 68%, var(--surface));
  opacity: 0.28;
  transform-origin: bottom;
  animation: nan-dashboard-loading-bar 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.09s);
}

.nan-dashboard-loading-point {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(var(--brand-rgb), 0.14);
  animation: nan-dashboard-loading-point 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.11s);
}

@keyframes nan-dashboard-loading-bar {
  0%,
  100% {
    opacity: 0.24;
    transform: scaleY(0.72);
  }

  45% {
    opacity: 0.74;
    transform: scaleY(1);
  }
}

@keyframes nan-dashboard-loading-point {
  0%,
  100% {
    opacity: 0.42;
    transform: translateY(8px) scale(0.82);
  }

  45% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
}

.nan-dashboard-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.nan-dashboard-area-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "swatch area"
    "swatch value"
    "swatch count";
  column-gap: 9px;
  align-items: center;
  min-height: 84px;
  border: 1px solid color-mix(in srgb, var(--area-color) 38%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--area-color) 18%, transparent), transparent 64%),
    var(--surface);
  padding: 10px;
  min-width: 0;
}

.nan-dashboard-area-card.is-empty {
  opacity: 0.62;
}

.nan-dashboard-area-card.has-outliers {
  border-color: rgba(220, 38, 38, 0.48);
  box-shadow: inset 3px 0 0 #dc2626;
}

.nan-dashboard-area-swatch {
  grid-area: swatch;
  width: 12px;
  height: 52px;
  border-radius: 999px;
  background: var(--area-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--area-color) 18%, transparent);
}

.nan-dashboard-area-card strong {
  grid-area: area;
  color: var(--text);
  font-size: 0.96rem;
}

.nan-dashboard-area-card span:not(.nan-dashboard-area-swatch) {
  grid-area: value;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.nan-dashboard-area-card em {
  grid-area: count;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 720px) {
  .nan-dashboard-hero,
  .nan-dashboard-chart-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .nan-dashboard-refresh {
    justify-self: start;
  }

  .nan-dashboard-metrics {
    justify-content: flex-start;
  }

  .nan-dashboard-svg {
    width: 100%;
    height: 260px;
  }

  .nan-dashboard-pick-svg {
    width: 100%;
    height: 260px;
  }

  .nan-dashboard-area-panel-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-dashboard-area-stats {
    justify-content: flex-start;
  }

  .nan-dashboard-area-outliers {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-dashboard-area-grid {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }
}
.nan-visual-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1480px, 98vw);
  height: min(96vh, 1120px);
  max-height: min(96vh, 1120px);
  overflow: hidden;
}

.nan-visual-modal .nan-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.nan-visual-head-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.nan-visual-modal .nan-modal-close {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-weight: 900;
  line-height: 1;
}

.nan-visual-modal .nan-visual-head-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

.nan-visual-control-stack {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 0;
}

.nan-visual-theme-toggle {
  grid-area: auto;
  justify-self: end;
  --theme-switch-width: 52px;
  --theme-switch-height: 26px;
  --theme-knob-size: 18px;
  --theme-knob-offset: 4px;
  padding: 2px;
  font-size: 0.72rem;
  min-height: 30px;
}

.nan-visual-zoom-stack {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  display: grid;
  grid-template-columns: 30px 46px 30px;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  column-gap: 4px;
  row-gap: 8px;
}

.nan-visual-zoom-controls {
  grid-column: 1 / span 3;
  grid-row: 1;
  display: inline-grid;
  grid-template-columns: 30px 46px 30px;
  align-items: center;
  justify-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-1) 92%, transparent);
  padding: 4px;
  box-shadow: 0 10px 24px rgba(10, 26, 54, 0.08);
}

#nan-visual-zoom-out {
  grid-column: 1;
  grid-row: 1;
}

#nan-visual-zoom-value {
  grid-column: 2;
  grid-row: 1;
}

#nan-visual-zoom-in {
  grid-column: 3;
  grid-row: 1;
}

.nan-visual-history-controls {
  grid-column: 1 / span 3;
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  margin-top: 2px;
}

.nan-visual-zoom-controls button,
.nan-visual-undo-control,
.nan-visual-redo-control {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-strong);
  color: var(--brand-contrast);
  cursor: pointer;
  font: 900 1rem/1 "Plus Jakarta Sans", sans-serif;
  padding: 0 0 2px;
}

.nan-visual-zoom-controls button:disabled,
.nan-visual-undo-control:disabled,
.nan-visual-redo-control:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

body[data-page="nan"] button:not(:disabled),
body[data-page="nan"] .btn:not(:disabled) {
  transform-origin: center;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    filter 180ms ease,
    transform 160ms cubic-bezier(0.2, 0.9, 0.22, 1);
}

body[data-page="nan"] button:not(:disabled):hover,
body[data-page="nan"] .btn:not(:disabled):hover {
  filter: saturate(1.08);
  transform: translateY(-1px) scale(1.018);
  box-shadow: 0 10px 22px rgba(10, 26, 54, 0.13);
}

body[data-page="nan"] button:not(:disabled):active,
body[data-page="nan"] .btn:not(:disabled):active {
  filter: saturate(0.98);
  transform: translateY(0) scale(0.975);
  transition-duration: 70ms;
}

body[data-page="nan"] .nan-modal-backdrop:not(:disabled):hover,
body[data-page="nan"] .nan-modal-backdrop:not(:disabled):active {
  box-shadow: none;
  filter: none;
  transform: none;
}

body[data-page="nan"] .nan-visual-cell:not(:disabled):hover {
  transform: scale(1.08);
}

body[data-page="nan"] .nan-visual-cell:not(:disabled):active {
  transform: scale(1.02);
}

body[data-page="nan"] .nan-scope-strip .nan-division-button:not(:disabled),
body[data-page="nan"] .nan-scope-strip .nan-division-button:not(:disabled):hover,
body[data-page="nan"] .nan-scope-strip .nan-division-button:not(:disabled):focus-visible,
body[data-page="nan"] .nan-scope-strip .nan-division-button:not(:disabled):active,
body[data-page="nan"] .nan-dashboard-division-button:not(:disabled),
body[data-page="nan"] .nan-dashboard-division-button:not(:disabled):hover,
body[data-page="nan"] .nan-dashboard-division-button:not(:disabled):focus-visible,
body[data-page="nan"] .nan-dashboard-division-button:not(:disabled):active {
  box-shadow: none;
  filter: none;
  transform: none;
  transition: background 140ms ease, color 140ms ease;
}

.nan-visual-zoom-controls span {
  min-width: 46px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.nan-visual-toggle-stack {
  display: grid;
  grid-template-columns: minmax(124px, 132px) minmax(88px, 96px);
  grid-template-areas:
    "mode sorter"
    "heat plan";
  gap: 5px 7px;
  justify-content: start;
  align-self: start;
  min-width: 219px;
}

.nan-visual-mode-toggle {
  grid-area: mode;
}

.nan-visual-heat-toggle {
  grid-area: heat;
}

.nan-visual-sorter-toggle {
  grid-area: sorter;
}

.nan-visual-plan-toggle {
  grid-area: plan;
}

.nan-visual-superslot-note {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.15;
  padding-left: 2px;
}

.nan-visual-mode-toggle,
.nan-visual-heat-toggle,
.nan-visual-sorter-toggle,
.nan-visual-plan-toggle {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(36px, 1fr));
  align-items: center;
  min-width: 88px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  font: 900 0.61rem/1 "Plus Jakarta Sans", sans-serif;
  padding: 3px;
  overflow: hidden;
}

.nan-visual-heat-toggle {
  grid-template-columns: repeat(2, minmax(56px, 1fr));
  min-width: 124px;
  background: linear-gradient(90deg, #d1d5db, #f6c744 54%, #de7629);
  color: rgba(4, 14, 28, 0.78);
}

.nan-visual-plan-toggle {
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  min-width: 94px;
  background: linear-gradient(90deg, #e5e7eb, #dbeafe 54%, #4b9dda);
  color: rgba(4, 14, 28, 0.78);
}

.nan-visual-sorter-toggle {
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  min-width: 94px;
  background: linear-gradient(90deg, #e5e7eb, #fef3c7 54%, #f47b20);
  color: rgba(4, 14, 28, 0.78);
}

.nan-visual-mode-thumb,
.nan-visual-heat-thumb,
.nan-visual-sorter-thumb,
.nan-visual-plan-thumb {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--brand-strong);
  box-shadow: 0 8px 18px rgba(10, 26, 54, 0.16);
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform 180ms ease;
  will-change: transform;
}

.nan-visual-heat-thumb {
  background: rgba(4, 14, 28, 0.78);
  transition: transform 240ms cubic-bezier(0.2, 0.82, 0.2, 1), box-shadow 180ms ease;
}

.nan-visual-plan-thumb {
  background: rgba(0, 59, 113, 0.88);
}

.nan-visual-sorter-thumb {
  background: rgba(146, 64, 14, 0.9);
}

.nan-visual-mode-toggle[data-mode="PER"] .nan-visual-mode-thumb {
  transform: translate3d(100%, 0, 0);
}

.nan-visual-heat-toggle[data-heat="on"] .nan-visual-heat-thumb {
  transform: translate3d(100%, 0, 0);
}

.nan-visual-sorter-toggle[data-sorter="on"] .nan-visual-sorter-thumb {
  transform: translate3d(100%, 0, 0);
}

.nan-visual-plan-toggle[data-plan="on"] .nan-visual-plan-thumb {
  transform: translate3d(100%, 0, 0);
}

.nan-visual-mode-option,
.nan-visual-heat-option,
.nan-visual-sorter-option,
.nan-visual-plan-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 5px;
  color: var(--text-soft);
  transition: color 180ms ease;
  white-space: nowrap;
}

.nan-visual-heat-option {
  color: var(--brand-contrast);
  font-size: 0.56rem;
  letter-spacing: 0;
  padding-inline: 3px;
  text-shadow: 0 1px 1px rgba(4, 14, 28, 0.24);
}

.nan-visual-plan-option {
  color: rgba(4, 14, 28, 0.86);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.nan-visual-sorter-option {
  color: rgba(4, 14, 28, 0.86);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.nan-visual-mode-toggle[data-mode="AMB"] .nan-visual-mode-thumb + .nan-visual-mode-option,
.nan-visual-mode-toggle[data-mode="PER"] .nan-visual-mode-option:last-of-type,
.nan-visual-heat-toggle[data-heat="off"] .nan-visual-heat-thumb + .nan-visual-heat-option,
.nan-visual-heat-toggle[data-heat="on"] .nan-visual-heat-option:last-of-type,
.nan-visual-sorter-toggle[data-sorter="off"] .nan-visual-sorter-thumb + .nan-visual-sorter-option,
.nan-visual-sorter-toggle[data-sorter="on"] .nan-visual-sorter-option:last-of-type,
.nan-visual-plan-toggle[data-plan="off"] .nan-visual-plan-thumb + .nan-visual-plan-option,
.nan-visual-plan-toggle[data-plan="on"] .nan-visual-plan-option:last-of-type {
  color: var(--brand-contrast);
  text-shadow: 0 1px 1px rgba(4, 14, 28, 0.22);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-mode-toggle,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-heat-toggle,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-sorter-toggle,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-plan-toggle {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(180deg, #f8fafc, #e4ebf3);
  color: #263243;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-heat-toggle {
  background: linear-gradient(90deg, #f8fafc, #ffe79b 54%, #f28c28);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-sorter-toggle {
  background: linear-gradient(90deg, #f8fafc, #fde9bb 54%, #f47b20);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-plan-toggle {
  background: linear-gradient(90deg, #f8fafc, #dceeff 54%, #4b9dda);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-mode-thumb {
  background: #ffffff;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-heat-thumb {
  background: #c65d18;
  box-shadow: 0 7px 16px rgba(198, 93, 24, 0.26);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-sorter-thumb {
  background: #d56a16;
  box-shadow: 0 7px 16px rgba(213, 106, 22, 0.26);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-plan-thumb {
  background: #2779bd;
  box-shadow: 0 7px 16px rgba(39, 121, 189, 0.28);
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-mode-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-heat-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-sorter-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-plan-option {
  color: rgba(15, 23, 42, 0.74);
  text-shadow: none;
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-mode-toggle[data-mode="AMB"] .nan-visual-mode-thumb + .nan-visual-mode-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-mode-toggle[data-mode="PER"] .nan-visual-mode-option:last-of-type {
  color: #111111;
  text-shadow: none;
}

:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-heat-toggle[data-heat="off"] .nan-visual-heat-thumb + .nan-visual-heat-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-heat-toggle[data-heat="on"] .nan-visual-heat-option:last-of-type,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-sorter-toggle[data-sorter="off"] .nan-visual-sorter-thumb + .nan-visual-sorter-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-sorter-toggle[data-sorter="on"] .nan-visual-sorter-option:last-of-type,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-plan-toggle[data-plan="off"] .nan-visual-plan-thumb + .nan-visual-plan-option,
:root[data-theme="dark"][data-theme-palette="default"] .nan-visual-plan-toggle[data-plan="on"] .nan-visual-plan-option:last-of-type {
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(4, 14, 28, 0.28);
}

.nan-visual-toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px) minmax(226px, 246px);
  gap: 12px;
  align-items: center;
  margin: 0;
  min-width: 0;
}

.nan-visual-toolbar .nan-muted {
  margin: 0;
  line-height: 1.45;
}

.nan-visual-slot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 38px;
}

.nan-visual-slot-actions[hidden] {
  display: none;
}

.nan-visual-slot-actions .nan-exemption-action-group {
  width: 100%;
}

.nan-visual-status-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nan-visual-area-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.nan-visual-area-filters[hidden] {
  display: none;
}

.nan-visual-area-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  font: 900 0.72rem/1 "Plus Jakarta Sans", sans-serif;
  padding: 0 10px;
  white-space: nowrap;
}

.nan-visual-area-filter[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--brand-strong) 72%, var(--line));
  background: var(--brand-strong);
  color: var(--brand-contrast);
  box-shadow: 0 8px 18px rgba(10, 26, 54, 0.13);
}

.nan-visual-area-filter.is-all {
  min-width: 46px;
}

.nan-visual-search-wrap {
  position: relative;
  z-index: 20;
  display: grid;
  min-width: 0;
}

.nan-visual-search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  max-height: min(320px, 42vh);
  overflow: auto;
  border: 1px solid var(--line-muted);
  border-radius: 14px;
  background: var(--theme-menu-background, var(--surface-1));
  padding: 8px;
  box-shadow: 0 18px 36px rgba(10, 26, 54, 0.18);
}

.nan-visual-search-suggestions[hidden] {
  display: none;
}

.nan-visual-search-suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.nan-visual-search-suggestion:hover,
.nan-visual-search-suggestion.is-active {
  border-color: var(--line-info);
  background: var(--surface-accent);
  transform: none;
}

.nan-visual-search-suggestion strong,
.nan-visual-search-suggestion span,
.nan-visual-search-suggestion small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.nan-visual-search-suggestion strong {
  color: var(--brand-strong);
  font-size: 0.86rem;
  font-weight: 900;
}

.nan-visual-search-suggestion span,
.nan-visual-search-empty {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.nan-visual-search-suggestion small {
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.25;
}

.nan-visual-search-empty {
  padding: 8px 10px;
}

.nan-visual-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 6px;
  align-items: start;
  min-height: 34px;
  margin: 0;
  min-width: 0;
}

.nan-visual-detail-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line-muted);
  border-radius: var(--theme-control-radius, 10px);
  background: color-mix(in srgb, var(--theme-control-background, var(--surface-2)) 82%, transparent);
  padding: 3px 4px 8px;
  scrollbar-gutter: auto;
  width: 100%;
}

.nan-visual-detail-cards::-webkit-scrollbar {
  height: 8px;
}

.nan-visual-detail-cards::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.nan-visual-detail-cards::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--scrollbar-thumb);
  min-width: 32px;
}

[data-theme="dark"] .nan-visual-detail-cards {
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
}

.nan-visual-detail-cards > span {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0 6px;
}

.nan-visual-detail-cards article,
.nan-visual-detail-cards button {
  display: inline-grid;
  flex: 0 0 auto;
  gap: 1px;
  width: max-content;
  min-width: 0;
  max-width: min(72vw, 220px);
  border: 1px solid var(--line-muted);
  border-radius: var(--theme-detail-radius, 8px);
  background: var(--theme-card-background, var(--surface-1));
  color: inherit;
  font: inherit;
  padding: 4px 14px 4px 7px;
  position: relative;
  text-align: left;
}

.nan-visual-detail-cards.is-placeholder article,
.nan-visual-detail-cards.is-placeholder button {
  align-content: center;
  min-height: 29px;
  background: color-mix(in srgb, var(--theme-card-background, var(--surface-1)) 64%, transparent);
}

.nan-visual-detail-cards.is-placeholder article span,
.nan-visual-detail-cards.is-placeholder button span {
  color: var(--text-muted);
}

.nan-visual-detail-cards button {
  appearance: none;
}

.nan-visual-detail-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
}

.nan-visual-detail .nan-exemption-action-group {
  align-self: flex-start;
  flex: 0 1 246px;
  margin-left: 0;
  min-width: 226px;
  width: 100%;
}

.nan-visual-detail .nan-exemption-action-group .nan-exemption-action,
.nan-visual-detail .nan-exemption-action-group .nan-recommend-slot-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
}

.nan-visual-detail [data-nan-visual-detail-filter] {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nan-visual-detail [data-nan-visual-detail-filter]:hover,
.nan-visual-detail [data-nan-visual-detail-filter]:focus-visible {
  border-color: color-mix(in srgb, var(--brand-strong) 45%, var(--line-muted));
  background: var(--surface-accent);
  box-shadow: 0 8px 18px rgba(10, 26, 54, 0.1);
  outline: none;
}

.nan-visual-detail [data-nan-visual-detail-filter].is-active {
  border-color: color-mix(in srgb, var(--brand-strong) 58%, var(--line-muted));
  background: var(--surface-accent);
  box-shadow:
    0 0 0 2px var(--focus-ring),
    0 8px 18px rgba(10, 26, 54, 0.1);
}

.nan-visual-detail [data-nan-visual-detail-card-key] {
  cursor: grab;
  user-select: none;
}

.nan-visual-detail [data-nan-visual-detail-card-key]:active,
.nan-visual-detail [data-nan-visual-detail-card-key].is-dragging {
  cursor: grabbing;
}

.nan-visual-detail-drag-handle {
  position: absolute;
  top: 50%;
  right: 0;
  display: block;
  width: 7px;
  height: 22px;
  border-radius: 999px;
  cursor: grab;
  opacity: 0;
  transform: translateY(-50%);
}

.nan-visual-detail-drag-handle:active,
.nan-visual-detail [data-nan-visual-detail-card-key].is-dragging .nan-visual-detail-drag-handle {
  cursor: grabbing;
}

.nan-visual-detail-cards.is-reordering {
  scroll-behavior: auto;
}

.nan-visual-detail-cards .is-dragging {
  opacity: 0.58;
  box-shadow:
    0 0 0 2px var(--focus-ring),
    0 10px 22px rgba(10, 26, 54, 0.14);
}

.nan-tutorial-running {
  overflow: hidden;
}

.nan-tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9400;
  pointer-events: none;
}

.nan-tutorial-dim {
  position: absolute;
  inset: 0;
  background: rgba(5, 13, 28, 0.58);
}

.nan-tutorial-spotlight {
  position: absolute;
  border: 2px solid color-mix(in srgb, var(--brand-strong) 72%, #ffffff);
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(5, 13, 28, 0.48),
    0 0 0 6px var(--focus-ring),
    0 16px 42px rgba(5, 13, 28, 0.28);
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease;
}

.nan-tutorial-card {
  position: fixed;
  z-index: 9410;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  border: 1px solid color-mix(in srgb, var(--brand-strong) 42%, var(--line-muted));
  border-radius: 12px;
  background: var(--surface-1);
  box-shadow: 0 22px 58px rgba(5, 13, 28, 0.28);
  color: var(--text);
  padding: 14px;
  pointer-events: auto;
}

.nan-tutorial-head {
  display: grid;
  gap: 3px;
}

.nan-tutorial-head span {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.nan-tutorial-head strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.15;
}

.nan-tutorial-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.42;
}

.nan-tutorial-card small {
  display: block;
  border: 1px solid var(--line-muted);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.3;
  padding: 8px;
}

.nan-tutorial-card small span {
  display: block;
}

.nan-tutorial-card small .nan-tutorial-requirement-heading {
  color: var(--text-soft);
}

.nan-tutorial-card small ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.nan-tutorial-card small .nan-tutorial-checklist {
  display: grid;
  gap: 4px;
  list-style: none;
  padding-left: 0;
}

.nan-tutorial-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 18px;
  color: var(--text-soft);
  transition: color 160ms ease, transform 160ms ease;
}

.nan-tutorial-checklist li.is-complete {
  color: var(--ok);
  font-weight: 950;
}

.nan-tutorial-card small .nan-tutorial-check {
  display: inline-grid;
  flex: 0 0 14px;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border: 1px solid color-mix(in srgb, var(--ok) 70%, var(--line-muted));
  border-radius: 4px;
  background: var(--ok);
  opacity: 0;
  transform: scale(0.62);
}

.nan-tutorial-card small .nan-tutorial-check::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--surface-1);
  border-bottom: 2px solid var(--surface-1);
  transform: translateY(-1px) rotate(-45deg);
}

.nan-tutorial-card small .nan-tutorial-check-text {
  min-width: 0;
}

.nan-tutorial-checklist li.is-complete .nan-tutorial-check {
  opacity: 1;
  transform: scale(1);
  animation: nanTutorialChecklistCheck 220ms cubic-bezier(0.18, 0.9, 0.22, 1.25) both;
}

.nan-tutorial-card small li + li {
  margin-top: 3px;
}

.nan-tutorial-card small .nan-tutorial-checklist li + li {
  margin-top: 0;
}

.nan-tutorial-card.is-step-complete small {
  border-color: color-mix(in srgb, var(--ok) 42%, var(--line-muted));
  background: var(--surface-success);
  color: var(--ok);
}

.nan-tutorial-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nan-tutorial-skip {
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  min-height: 36px;
  padding: 0 12px;
}

.nan-tutorial-skip:hover,
.nan-tutorial-skip:focus-visible {
  border-color: color-mix(in srgb, var(--brand-strong) 36%, var(--line-muted));
  background: var(--surface-accent);
  color: var(--text);
}

.nan-tutorial-skip:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.nan-tutorial-skip-all {
  margin-right: auto;
}

.nan-tutorial-card.is-blocking {
  animation: nanTutorialBlockShake 180ms ease;
}

.nan-tutorial-target {
  position: relative !important;
  z-index: 9420 !important;
  outline: 3px solid color-mix(in srgb, var(--brand-strong) 74%, #ffffff) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 7px var(--focus-ring), 0 14px 32px rgba(5, 13, 28, 0.22) !important;
}

.nan-tutorial-extra-target {
  z-index: 9420 !important;
  outline: 2px solid color-mix(in srgb, var(--brand-strong) 68%, #ffffff) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px var(--focus-ring), 0 14px 32px rgba(5, 13, 28, 0.2) !important;
}

.nan-division-menu.nan-tutorial-extra-target {
  z-index: 9421 !important;
}

body.nan-modal-open .topbar .nan-tutorial-target,
body.nan-modal-open .page-main .nan-tutorial-target {
  z-index: 1 !important;
  pointer-events: none;
}

.nan-tutorial-confetti {
  position: fixed;
  top: 16%;
  left: 50%;
  z-index: 9800;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.nan-tutorial-confetti strong {
  border: 1px solid color-mix(in srgb, var(--ok) 48%, var(--line-muted));
  border-radius: 999px;
  background: var(--surface-1);
  box-shadow: 0 18px 42px rgba(5, 13, 28, 0.22);
  color: var(--ok);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  padding: 10px 14px;
  text-transform: uppercase;
  animation: nanTutorialCompleteBadge 2400ms ease both;
}

.nan-tutorial-confetti i {
  position: absolute;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--confetti-color, var(--brand-strong));
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: nanTutorialConfettiPop 2100ms cubic-bezier(0.17, 0.84, 0.44, 1) var(--confetti-delay, 0ms) both;
}

@keyframes nanTutorialBlockShake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-5px);
  }
  70% {
    transform: translateX(5px);
  }
}

@keyframes nanTutorialCompleteBadge {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  15%,
  72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

@keyframes nanTutorialChecklistCheck {
  0% {
    opacity: 0;
    transform: scale(0.42);
  }
  72% {
    opacity: 1;
    transform: scale(1.16);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes nanTutorialConfettiPop {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--confetti-x, 0), var(--confetti-y, -70px), 0) rotate(var(--confetti-r, 90deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nan-dashboard-refresh.is-refreshing,
  .nan-dashboard-refresh.is-refreshing .nan-dashboard-refresh-loader i {
    animation: none;
  }

  .nan-tutorial-checklist li.is-complete .nan-tutorial-check {
    animation: none;
  }

  .nan-tutorial-confetti strong {
    animation-duration: 1500ms;
  }

  .nan-tutorial-confetti i {
    display: none;
  }
}

.nan-visual-detail article span,
.nan-visual-detail button span {
  color: var(--text-soft);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.nan-visual-detail article strong,
.nan-visual-detail button strong {
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.nan-visual-detail article.is-muted strong,
.nan-visual-detail button.is-muted strong {
  color: var(--text-soft);
}

.nan-visual-detail article.is-danger,
.nan-visual-detail button.is-danger,
.nan-detail-row.is-danger {
  border-color: rgba(185, 28, 28, 0.34);
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.96), rgba(255, 241, 242, 0.96));
}

.nan-visual-detail article.is-danger span,
.nan-visual-detail article.is-danger strong,
.nan-visual-detail button.is-danger span,
.nan-visual-detail button.is-danger strong,
.nan-detail-row.is-danger span,
.nan-detail-row.is-danger strong {
  color: #991b1b;
}

[data-theme="dark"] .nan-visual-detail article.is-danger,
[data-theme="dark"] .nan-visual-detail button.is-danger,
[data-theme="dark"] .nan-detail-row.is-danger {
  border-color: rgba(248, 113, 113, 0.4);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.46), rgba(69, 10, 10, 0.34));
}

[data-theme="dark"] .nan-visual-detail article.is-danger span,
[data-theme="dark"] .nan-visual-detail article.is-danger strong,
[data-theme="dark"] .nan-visual-detail button.is-danger span,
[data-theme="dark"] .nan-visual-detail button.is-danger strong,
[data-theme="dark"] .nan-detail-row.is-danger span,
[data-theme="dark"] .nan-detail-row.is-danger strong {
  color: #fecaca;
}

.nan-visual-detail.is-selected {
  border-color: color-mix(in srgb, var(--brand-strong) 28%, var(--line-muted));
}

.nan-visual-body {
  display: grid;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.nan-visual-division-empty {
  display: grid;
  align-content: start;
  width: min(100%, 560px);
  margin: 0 auto;
  padding-top: clamp(18px, 8vh, 72px);
}

.nan-visual-division-empty .nan-scope-strip {
  width: 100%;
}

.nan-visual-division-empty .nan-division-menu {
  z-index: 220;
}

.nan-visual-load-issue {
  display: grid;
  gap: 10px;
  align-content: start;
  width: min(100%, 620px);
  margin: 0 auto;
  padding-top: clamp(18px, 8vh, 72px);
}

.nan-visual-load-issue strong,
.nan-visual-load-issue span,
.nan-visual-load-issue small {
  display: block;
}

.nan-visual-load-issue strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.nan-visual-load-issue span,
.nan-visual-load-issue small {
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}

.nan-visual-load-issue small {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.nan-visual-load-issue .btn {
  justify-self: start;
}

.nan-visual-map-frame {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
}

.nan-visual-map-frame.is-sorter-busy .nan-visual-body {
  filter: saturate(0.82);
  opacity: 0.68;
  pointer-events: none;
}

.nan-visual-sorter-busy,
.nan-visual-sorter-progress {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 60;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  width: min(560px, calc(100% - 32px));
  border: 1px solid color-mix(in srgb, #f47b20 42%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-1) 90%, #fff4df);
  box-shadow:
    0 16px 42px rgba(10, 26, 54, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  color: var(--text);
  padding: 9px 14px;
  pointer-events: none;
  transform: translateX(-50%);
}

.nan-visual-sorter-progress {
  position: fixed;
  top: clamp(72px, 9vh, 120px);
  z-index: 5000;
  outline: 1px solid rgba(244, 123, 32, 0.18);
}

.nan-visual-sorter-busy[hidden],
.nan-visual-sorter-progress[hidden] {
  display: none;
}

.nan-visual-sorter-busy-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(244, 123, 32, 0.2);
  border-top-color: #f47b20;
  border-radius: 50%;
  animation: nanSorterBusySpin 780ms linear infinite;
  flex: 0 0 auto;
}

.nan-visual-sorter-busy strong,
.nan-visual-sorter-busy small,
.nan-visual-sorter-progress strong,
.nan-visual-sorter-progress small {
  display: block;
  letter-spacing: 0;
}

.nan-visual-sorter-busy strong,
.nan-visual-sorter-progress strong {
  font: 900 0.78rem/1.15 "Plus Jakarta Sans", sans-serif;
}

.nan-visual-sorter-busy small,
.nan-visual-sorter-progress small {
  color: var(--text-muted);
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

@keyframes nanSorterBusySpin {
  to {
    transform: rotate(360deg);
  }
}

.nan-visual-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-muted);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 10px 12px;
}

.nan-visual-summary span,
.nan-visual-summary strong,
.nan-visual-summary em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.nan-visual-summary span {
  background: var(--brand-strong);
  color: var(--brand-contrast);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nan-visual-summary strong {
  border: 1px solid var(--line-muted);
  background: var(--surface-1);
  color: var(--text);
}

.nan-visual-summary em {
  color: var(--text-soft);
  font-style: normal;
}

.nan-visual-scroll {
  --visual-cell-max: 58px;
  --visual-cell-min: 42px;
  --visual-flow-font: 0.64rem;
  --visual-flow-stroke: 4.6px;
  --visual-flow-thickness: 10px;
  --visual-gap: 0px;
  --visual-item-size: 0.6rem;
  --visual-label-size: 0.72rem;
  --visual-row-max: 48px;
  --visual-row-min: 34px;
  position: relative;
  overflow: hidden;
  overscroll-behavior: contain;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 211, 68, 0.12), transparent 30%),
    linear-gradient(180deg, var(--surface-1), var(--surface-3));
  cursor: grab;
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  contain: layout paint style;
  touch-action: none;
  user-select: none;
}

.nan-visual-scroll[data-nan-visual-mode-label="PER"]::after {
  content: "IN DEVELOPMENT";
  position: absolute;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  color: rgba(15, 23, 42, 0.12);
  font: 900 clamp(2.8rem, 9vw, 8rem) / 1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.12em;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-18deg);
  transform-origin: center;
  user-select: none;
}

[data-theme="dark"] .nan-visual-scroll[data-nan-visual-mode-label="PER"]::after {
  color: rgba(255, 255, 255, 0.11);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.nan-visual-scroll.is-dragging {
  cursor: grabbing;
}

.nan-visual-scroll.is-wheel-panning {
  cursor: grabbing;
}

.nan-visual-scroll:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.nan-visual-scroll.is-dragging .nan-visual-cell {
  cursor: grabbing;
}

.nan-visual-scroll.is-drag-performance .nan-visual-flow-svg,
.nan-visual-scroll.is-drag-performance .nan-visual-static-canvas,
.nan-visual-scroll.is-drag-performance .nan-visual-flow-label,
.nan-visual-scroll.is-drag-performance .nan-visual-area-outline,
.nan-visual-scroll.is-drag-performance .nan-visual-area-indicator {
  opacity: 0;
  visibility: hidden;
}

.nan-visual-grid {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(var(--visual-cols), minmax(var(--visual-cell-min), var(--visual-cell-max)));
  grid-template-rows: repeat(var(--visual-rows), minmax(var(--visual-row-min), var(--visual-row-max)));
  gap: var(--visual-gap);
  width: max-content;
  align-items: stretch;
  backface-visibility: hidden;
  contain: layout paint style;
  transform: var(--visual-transform, translate(0, 0) scale(1));
  transform-origin: left top;
  will-change: transform;
}

.nan-visual-cell-layer {
  display: contents;
}

.nan-visual-scroll.is-wheel-panning .nan-visual-grid,
.nan-visual-scroll.is-wheel-zooming .nan-visual-grid,
.nan-visual-scroll.is-dragging .nan-visual-grid {
  transition: none;
}

.nan-visual-scroll.is-wheel-zooming .nan-visual-cell,
.nan-visual-scroll.is-wheel-zooming .nan-visual-flow-path,
.nan-visual-scroll.is-wheel-zooming .nan-visual-flow-direction,
.nan-visual-scroll.is-wheel-zooming .nan-visual-static-canvas,
.nan-visual-scroll.is-wheel-zooming .nan-visual-flow-label,
.nan-visual-scroll.is-wheel-zooming .nan-visual-area-outline,
.nan-visual-scroll.is-wheel-zooming .nan-visual-area-indicator {
  transition: none;
  filter: none;
}

.nan-visual-scroll.is-wheel-zooming .nan-visual-cell {
  box-shadow: none;
}

.nan-visual-legend {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 32;
  display: grid;
  gap: 5px;
  max-width: min(360px, calc(100% - 20px));
  max-height: min(72vh, calc(100% - 20px));
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  box-shadow: 0 10px 22px rgba(10, 26, 54, 0.12);
  padding: 8px 9px;
  overflow: hidden;
  pointer-events: none;
}

.nan-visual-legend[hidden] {
  display: none;
}

.nan-visual-legend strong {
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.nan-visual-legend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.nan-visual-legend-head em {
  max-width: 178px;
  color: var(--text-muted);
  font-size: 0.48rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.12;
  text-align: right;
}

.nan-visual-legend div {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  max-height: min(62vh, calc(100vh - 190px));
  overflow: hidden;
}

.nan-visual-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 18px;
  border: 1px solid color-mix(in srgb, var(--line-muted) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  color: var(--text-soft);
  padding: 1px 6px 1px 4px;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  white-space: normal;
}

.nan-visual-legend-item i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(3, 12, 24, 0.22);
  border-radius: 50%;
  background: var(--legend-color, #bfc5ce);
}

.nan-visual-legend em {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

[data-theme="dark"] .nan-visual-legend {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 8, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .nan-visual-legend-item {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 18, 0.78);
}

.nan-visual-reference-rail,
.nan-visual-area-outline,
.nan-visual-area-indicator,
.nan-visual-warehouse-boundary {
  pointer-events: none;
}

.nan-visual-warehouse-boundary {
  position: relative;
  z-index: 6;
  border: 2px solid #111827;
  border-radius: 10px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface-1) 54%, transparent);
}

:root[data-theme="dark"] .nan-visual-warehouse-boundary {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px color-mix(in srgb, #ffffff 28%, transparent);
}

.nan-visual-reference-rail {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--text-soft) 82%, transparent);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.72;
}

.nan-visual-reference-rail span {
  display: inline-flex;
  align-items: center;
  min-height: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 48%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-1) 76%, transparent);
  padding: 2px 7px;
  white-space: nowrap;
}

.nan-visual-reference-rail.is-top {
  top: 3px;
  right: 0;
  left: 0;
}

.nan-visual-reference-rail.is-bottom {
  right: 0;
  bottom: 3px;
  left: 0;
}

.nan-visual-reference-rail.is-left,
.nan-visual-reference-rail.is-right {
  top: 0;
  bottom: 0;
  width: 18px;
}

.nan-visual-reference-rail.is-left {
  left: 3px;
}

.nan-visual-reference-rail.is-right {
  right: 3px;
}

.nan-visual-reference-rail.is-left span,
.nan-visual-reference-rail.is-right span {
  transform: rotate(-90deg);
  transform-origin: center;
}

.nan-visual-area-outline {
  position: relative;
  z-index: 2;
  margin: -1px;
  border: 2px solid var(--slot-color);
  border-radius: 9px;
  background: var(--slot-color);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    0 0 0 1px var(--slot-color);
  opacity: 0.24;
}

@supports (color: color-mix(in srgb, red, transparent)) {
  .nan-visual-area-outline {
    border-color: color-mix(in srgb, var(--slot-color) 92%, transparent);
    background: color-mix(in srgb, var(--slot-color) 30%, transparent);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--surface-1) 36%, transparent),
      0 0 0 2px color-mix(in srgb, var(--slot-color) 48%, transparent),
      0 10px 18px color-mix(in srgb, var(--slot-color) 18%, transparent);
    opacity: 0.92;
  }
}
.nan-visual-area-indicator {
  position: relative;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  align-self: start;
  justify-self: start;
  min-height: 13px;
  margin: 2px 0 0 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-1) 72%, transparent);
  color: color-mix(in srgb, var(--slot-color) 58%, var(--text));
  font-size: 0.46rem;
  font-weight: 900;
  line-height: 1;
  padding: 1px 5px;
  white-space: nowrap;
}

.nan-visual-area-outline.is-area-hidden,
.nan-visual-area-indicator.is-area-hidden {
  opacity: 0;
  visibility: hidden;
}

.nan-visual-flow-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.nan-visual-static-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  backface-visibility: hidden;
  will-change: transform;
}

.nan-visual-slot-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  backface-visibility: hidden;
  will-change: transform;
}

.nan-visual-scroll.has-canvas-slots .nan-visual-cell {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  content-visibility: visible;
  transition: none;
}

.nan-visual-scroll.has-canvas-slots .nan-visual-cell span,
.nan-visual-scroll.has-canvas-slots .nan-visual-cell small,
.nan-visual-scroll.has-canvas-slots .nan-visual-cell em {
  visibility: hidden;
}

.nan-visual-scroll.has-canvas-slots.is-heat-map .nan-visual-cell.is-label {
  z-index: 3;
}

.nan-visual-flow-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.nan-visual-flow-path {
  stroke-width: var(--visual-flow-stroke);
  filter: drop-shadow(0 5px 8px rgba(4, 14, 28, 0.18));
  opacity: 0.84;
}

.nan-visual-flow-direction {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  filter: drop-shadow(0 3px 5px rgba(4, 14, 28, 0.18));
  opacity: 0.94;
  vector-effect: non-scaling-stroke;
}

.nan-visual-cross-pick-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: calc(var(--visual-flow-stroke) * 0.64);
  filter:
    drop-shadow(0 0 0 rgba(255, 255, 255, 0.92))
    drop-shadow(0 4px 6px rgba(4, 14, 28, 0.18));
  opacity: 0.94;
  vector-effect: non-scaling-stroke;
}

.nan-visual-flow-path.is-area-hidden,
.nan-visual-flow-direction.is-area-hidden,
.nan-visual-cross-pick-path.is-area-hidden {
  opacity: 0;
  visibility: hidden;
}

.nan-visual-cell.is-area-hidden,
.nan-visual-flow-label.is-area-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.nan-visual-flow-label {
  z-index: 2;
  display: inline-flex;
  grid-column: var(--visual-column);
  grid-row: var(--visual-row);
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  min-width: max-content;
  max-width: calc(var(--visual-cell-max) * 4.6);
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--slot-color) 84%, rgba(3, 12, 24, 0.34));
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--slot-color) 62%, #ffffff),
    color-mix(in srgb, var(--slot-color) 84%, #ffffff)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 8px 18px color-mix(in srgb, var(--slot-color) 24%, transparent);
  color: rgba(4, 14, 28, 0.95);
  opacity: 0.95;
  pointer-events: none;
  text-align: center;
}

.nan-visual-flow-label strong {
  display: block;
  overflow: hidden;
  color: rgba(4, 14, 28, 0.95);
  font-size: max(0.52rem, calc(var(--visual-label-size) * 0.9));
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nan-visual-cell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-column: var(--visual-column);
  grid-row: var(--visual-row);
  place-items: center;
  min-width: 0;
  min-height: 18px;
  border: 1px solid color-mix(in srgb, var(--slot-color) 58%, rgba(3, 12, 24, 0.38));
  border-radius: 5px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--slot-color) 84%, #fff), var(--slot-color));
  color: rgba(4, 14, 28, 0.92);
  font: inherit;
  padding: 1px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  contain: layout paint style;
  contain-intrinsic-size: 42px 34px;
  content-visibility: auto;
  cursor: grab;
  transition: opacity 120ms ease, filter 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.nan-visual-scroll.is-heat-map .nan-visual-cell {
  border-color: color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 72%, rgba(3, 12, 24, 0.46));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 76%, #fff), var(--slot-heat-color, #bfc5ce));
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.is-heat-missing {
  border-color: color-mix(in srgb, #aeb4bd 58%, rgba(3, 12, 24, 0.38));
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0 2px, rgba(255, 255, 255, 0) 2px 7px),
    linear-gradient(180deg, #d8dde3, #bfc5ce);
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.is-heat-muted {
  border-color: color-mix(in srgb, #aeb4bd 58%, rgba(3, 12, 24, 0.38));
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 2px, rgba(255, 255, 255, 0) 2px 7px),
    linear-gradient(180deg, #d8dde3, #bfc5ce);
}

.nan-visual-scroll.has-canvas-slots.is-heat-map .nan-visual-cell,
.nan-visual-scroll.has-canvas-slots.is-heat-map .nan-visual-cell.is-heat-missing,
.nan-visual-scroll.has-canvas-slots.is-heat-map .nan-visual-cell.is-heat-muted {
  border-color: transparent;
  background: transparent;
}

.nan-visual-scroll.is-cell-window-refreshing .nan-visual-cell,
.nan-visual-scroll.is-cell-window-refreshing .nan-visual-flow-label {
  animation: none;
  transition: none;
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.has-heat-weight {
  align-content: center;
  gap: 1px;
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.is-label span,
.nan-visual-scroll.is-heat-map .nan-visual-cell.is-label small {
  border-radius: 999px;
  border: 1px solid rgba(4, 14, 28, 0.18);
  background: color-mix(in srgb, #ffffff 90%, var(--slot-heat-color, #bfc5ce));
  box-shadow: 0 1px 4px rgba(4, 14, 28, 0.16);
  color: rgba(4, 14, 28, 0.96);
  padding: 1px 4px;
  text-shadow: none;
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.is-label small {
  color: rgba(4, 14, 28, 0.82);
}

.nan-visual-scroll.is-heat-map.is-tutorial-heat-focus .nan-visual-cell.has-heat-weight:not(.is-heat-muted):not(.is-heat-missing) {
  z-index: 2;
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 72%, #ffffff),
    0 0 0 2px color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 52%, transparent),
    0 10px 22px color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 28%, transparent);
  animation: nanTutorialHeatColorPop 900ms ease-out 1;
}

.nan-visual-scroll.is-heat-map.is-tutorial-heat-focus .nan-visual-cell.has-heat-weight em {
  border-radius: 999px;
  background: color-mix(in srgb, #ffffff 76%, var(--slot-heat-color, #bfc5ce));
  color: rgba(4, 14, 28, 0.92);
  padding: 1px 4px;
}

@keyframes nanTutorialHeatColorPop {
  0% {
    filter: saturate(0.72);
    transform: scale(0.96);
  }
  55% {
    filter: saturate(1.34);
    transform: scale(1.04);
  }
  100% {
    filter: saturate(1);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nan-visual-scroll.is-heat-map.is-tutorial-heat-focus .nan-visual-cell.has-heat-weight:not(.is-heat-muted):not(.is-heat-missing) {
    animation: none;
    transform: none;
  }
}

.nan-visual-scroll.is-drag-performance .nan-visual-cell {
  border-color: color-mix(in srgb, var(--slot-color) 72%, rgba(3, 12, 24, 0.34));
  background: var(--slot-color);
  box-shadow: none;
  filter: none;
  pointer-events: none;
  transition: none;
}

.nan-visual-scroll.is-drag-performance.is-heat-map .nan-visual-cell {
  border-color: color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 76%, rgba(3, 12, 24, 0.34));
  background: var(--slot-heat-color, #bfc5ce);
}

.nan-visual-scroll.is-drag-performance .nan-visual-cell span,
.nan-visual-scroll.is-drag-performance .nan-visual-cell small,
.nan-visual-scroll.is-drag-performance .nan-visual-cell em {
  visibility: hidden;
}

.nan-visual-scroll.is-drag-performance .nan-visual-cell.is-search-hit,
.nan-visual-scroll.is-drag-performance .nan-visual-cell.is-selected {
  box-shadow: none;
}

body[data-page="nan"] .nan-visual-scroll.is-dragging .nan-visual-cell:not(:disabled),
body[data-page="nan"] .nan-visual-scroll.is-drag-performance .nan-visual-cell:not(:disabled) {
  transform: none;
}

body[data-simple-access-locked="true"] {
  min-height: 100vh;
  overflow: hidden;
}

body[data-simple-access-locked="true"] > :not([data-simple-access-gate]) {
  display: none !important;
}

html[data-test-site-unlocked="true"] body[data-test-site="true"] .simple-access-gate {
  display: none !important;
}

html[data-test-site-unlocked="true"] body[data-test-site="true"][data-simple-access-locked="true"] {
  overflow: auto;
}

html[data-test-site-unlocked="true"] body[data-test-site="true"][data-simple-access-locked="true"] > :not([data-simple-access-gate]) {
  display: revert !important;
}

.test-site-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-bottom: 1px solid #7f1d1d;
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

body[data-test-site="true"] .simple-access-card .eyebrow {
  color: #dc2626;
}

.simple-access-gate {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(7, 20, 42, 0.94), rgba(3, 10, 24, 0.96)),
    var(--bg);
  padding: 20px;
}

.simple-access-gate[hidden],
body:not([data-simple-access-locked="true"]) .simple-access-gate {
  display: none;
}

.simple-access-card {
  display: grid;
  gap: 14px;
  width: min(380px, 100%);
  border: 1px solid rgba(160, 190, 235, 0.34);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: 0 24px 70px rgba(4, 14, 28, 0.42);
  color: var(--text);
  padding: 22px;
}

.simple-access-card h1,
.simple-access-card p {
  margin: 0;
}

.simple-access-card h1 {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.simple-access-field {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.simple-access-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
  padding: 10px 12px;
}

.simple-access-field input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.simple-access-message {
  min-height: 1.25em;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

body.nan-access-locked {
  overflow: hidden;
}

body.nan-access-locked .nan-main,
body.nan-access-locked .nan-modal {
  pointer-events: none;
  user-select: none;
}

.nan-access-lock {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, rgba(4, 14, 28, 0.86) 92%, var(--surface-1));
  padding: 20px;
}

.nan-access-lock[hidden] {
  display: none;
}

.nan-access-lock-card {
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  border: 1px solid rgba(170, 196, 232, 0.36);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: 0 24px 70px rgba(4, 14, 28, 0.42);
  color: var(--text);
  padding: 22px;
}

.nan-access-lock-card h2,
.nan-access-lock-card p {
  margin: 0;
}

.nan-access-lock-card h2 {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.nan-access-lock-card p:not(.eyebrow) {
  color: var(--text-muted);
  line-height: 1.55;
}

.nan-visual-cell:hover,
.nan-visual-cell:focus-visible {
  z-index: 3;
  transform: none;
  outline: 0;
  box-shadow:
    inset 0 0 0 2px var(--focus-ring),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nan-visual-scroll.is-plan-mode .nan-visual-cell:not(:disabled).is-occupied {
  cursor: grab;
}

.nan-visual-scroll.is-sorter-mode,
.nan-visual-scroll.is-sorter-mode .nan-visual-cell:not(:disabled) {
  cursor: crosshair;
}

.nan-visual-scroll.is-sorter-selecting,
.nan-visual-scroll.is-sorter-selecting .nan-visual-cell:not(:disabled) {
  cursor: crosshair;
}

.nan-visual-scroll.is-plan-dragging,
.nan-visual-scroll.is-plan-dragging .nan-visual-cell:not(:disabled) {
  cursor: grabbing;
}

.nan-visual-cell.is-plan-source {
  opacity: 0.54;
  outline: 2px solid color-mix(in srgb, #4b9dda 80%, #fff);
  outline-offset: 2px;
}

.nan-visual-cell.is-plan-target {
  z-index: 4;
  box-shadow:
    inset 0 0 0 2px #4b9dda,
    0 0 0 3px rgba(75, 157, 218, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nan-visual-cell.is-plan-moved {
  box-shadow:
    inset 0 0 0 2px rgba(75, 157, 218, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nan-visual-cell.is-sorter-selected {
  z-index: 5;
  box-shadow:
    inset 0 0 0 2px #f47b20,
    0 0 0 3px rgba(244, 123, 32, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nan-visual-sorter-selection {
  position: fixed;
  z-index: 9430;
  border: 1px solid rgba(244, 123, 32, 0.86);
  border-radius: 8px;
  background: rgba(244, 123, 32, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 10px 24px rgba(10, 26, 54, 0.14);
  pointer-events: none;
}

.nan-visual-plan-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
  display: grid;
  gap: 2px;
  max-width: 210px;
  border: 1px solid rgba(75, 157, 218, 0.52);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-1) 92%, #dbeafe);
  box-shadow: 0 16px 34px rgba(10, 26, 54, 0.22);
  color: var(--text);
  opacity: 0.96;
  padding: 8px 10px;
  pointer-events: none;
  transform: translate3d(-999px, -999px, 0);
  will-change: transform;
}

.nan-visual-plan-ghost strong,
.nan-visual-plan-ghost span,
.nan-visual-plan-ghost small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nan-visual-plan-ghost strong {
  font-size: 0.72rem;
  font-weight: 900;
}

.nan-visual-plan-ghost span {
  color: var(--brand-strong);
  font-size: 0.58rem;
  font-weight: 900;
}

.nan-visual-plan-ghost small {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-weight: 800;
}

[data-theme="dark"] .nan-visual-plan-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.nan-visual-cell span,
.nan-visual-cell small,
.nan-visual-cell em {
  display: none;
}

.nan-visual-cell.is-label span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: rgba(4, 14, 28, 0.94);
  font-size: var(--visual-label-size);
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

.nan-visual-cell.is-area-mini-label span {
  justify-self: center;
  border: 1px solid color-mix(in srgb, var(--slot-color) 88%, rgba(4, 14, 28, 0.3));
  border-radius: 999px;
  background: color-mix(in srgb, var(--slot-color) 76%, rgba(255, 255, 255, 0.86));
  box-shadow: 0 1px 3px rgba(4, 14, 28, 0.16);
  color: rgba(4, 14, 28, 0.92);
  font-size: max(0.48rem, calc(var(--visual-label-size) * 0.78));
  letter-spacing: 0.02em;
  padding: 1px 4px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
}

.nan-visual-cell.is-label small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: rgba(4, 14, 28, 0.72);
  font-size: var(--visual-item-size);
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nan-visual-cell.is-label.is-area-mini-label small,
.nan-visual-scroll.is-heat-map .nan-visual-cell.is-label.is-area-mini-label em {
  display: none;
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.has-heat-weight em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(4, 14, 28, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(4, 14, 28, 0.94);
  font-size: max(0.5rem, calc(var(--visual-item-size) * 0.9));
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 1px 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nan-visual-cell.is-occupied {
  box-shadow:
    inset 0 0 0 2px rgba(7, 95, 66, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nan-visual-cell.is-superslot {
  z-index: 4;
  border-color: rgba(255, 203, 77, 0.98);
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 207, 0.9),
    0 0 0 2px rgba(255, 203, 77, 0.72),
    0 0 20px rgba(245, 184, 45, 0.62);
}

.nan-visual-cell.is-superslot-covered {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.nan-visual-cell.is-disabled,
.nan-visual-cell.is-disabled:disabled {
  cursor: not-allowed;
  background:
    repeating-linear-gradient(135deg, rgba(4, 14, 28, 0.62) 0 2px, rgba(4, 14, 28, 0) 2px 7px),
    linear-gradient(180deg, color-mix(in srgb, var(--slot-color) 84%, #fff), var(--slot-color));
  filter: saturate(0.72);
  opacity: 1;
  pointer-events: none;
}

.nan-visual-cell.is-disabled span,
.nan-visual-cell.is-disabled small {
  color: rgba(4, 14, 28, 0.88);
}

.nan-visual-cell.is-disabled.is-area-mini-label span {
  color: rgba(4, 14, 28, 0.92);
}

.nan-visual-scroll.is-wheel-zooming .nan-visual-cell.is-area-mini-label span {
  opacity: 0;
  visibility: hidden;
}

.nan-visual-cell.is-search-hit {
  z-index: 4;
  opacity: 1;
  filter: saturate(1.25);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.88),
    inset 0 0 0 5px rgba(24, 66, 128, 0.45);
}

.nan-visual-cell.is-selected {
  z-index: 5;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.92),
    inset 0 0 0 6px color-mix(in srgb, var(--slot-color) 68%, transparent),
    0 0 0 2px color-mix(in srgb, var(--slot-color) 58%, transparent),
    0 0 18px 5px color-mix(in srgb, var(--slot-color) 42%, transparent);
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.is-selected {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.92),
    inset 0 0 0 6px color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 72%, transparent),
    0 0 0 2px color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 58%, transparent),
    0 0 18px 5px color-mix(in srgb, var(--slot-heat-color, #bfc5ce) 44%, transparent);
}

.nan-visual-cell.is-dimmed {
  opacity: 0.3;
  filter: grayscale(1) saturate(0.24);
}

.nan-visual-scroll.is-heat-map .nan-visual-cell.is-dimmed {
  opacity: 0.82;
  filter: saturate(0.72);
}

.nan-visual-skeleton {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 360px;
  border: 1px solid var(--line-muted);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 211, 68, 0.12), transparent 30%),
    linear-gradient(180deg, var(--surface-1), var(--surface-3));
  padding: 14px;
  overflow: hidden;
}

.nan-visual-skeleton-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nan-visual-skeleton-head {
  justify-content: space-between;
}

.nan-visual-skeleton-line,
.nan-visual-skeleton-cell {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: var(--skeleton-base);
  opacity: var(--skeleton-opacity, 0.88);
}

.nan-visual-skeleton-line::after,
.nan-visual-skeleton-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: translateX(-130%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--skeleton-sheen) 72%, transparent) 46%,
    transparent 78%
  );
  animation: nanVisualSkeletonSweep var(--skeleton-duration, 2600ms) cubic-bezier(0.34, 0.02, 0.24, 1) infinite;
  animation-delay: var(--skeleton-delay, -700ms);
}

.nan-visual-skeleton-line.is-reverse::after,
.nan-visual-skeleton-cell.is-reverse::after {
  animation-direction: reverse;
}

.nan-visual-skeleton-cell.is-reverse {
  animation-direction: reverse;
}

.nan-visual-skeleton-line.is-title {
  width: min(420px, 74%);
  height: 24px;
  border-radius: 12px;
}

.nan-visual-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  justify-content: stretch;
  align-content: stretch;
  gap: 7px;
  min-height: 0;
}

.nan-visual-skeleton-cell {
  min-width: 0;
  min-height: 100%;
  border: 1px solid color-mix(in srgb, var(--line-muted) 82%, transparent);
  border-radius: 8px;
  opacity: var(--skeleton-opacity, 0.88);
  animation: nanVisualSkeletonCellFade var(--skeleton-fade-duration, 3200ms) ease-in-out infinite;
  animation-delay: var(--skeleton-fade-delay, -900ms);
  transform: translate3d(0, 0, 0);
}

.nan-visual-skeleton-cell.is-wide {
  grid-column: auto;
}

.nan-visual-skeleton-cell.is-accent {
  background: color-mix(in srgb, var(--brand-strong) 24%, var(--skeleton-base));
}

.nan-visual-skeleton-cell.is-dark {
  z-index: 1;
  background: color-mix(in srgb, var(--brand-strong) 12%, var(--skeleton-base));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--brand-strong) 22%, transparent),
    0 8px 16px rgba(16, 36, 70, 0.12);
  animation:
    nanVisualSkeletonCellFade var(--skeleton-fade-duration, 3200ms) ease-in-out infinite,
    nanVisualSkeletonDarkHop var(--skeleton-hop-duration, 3400ms) steps(1, end) infinite;
  animation-delay: var(--skeleton-fade-delay, -900ms), var(--skeleton-hop-delay, -1200ms);
}

.nan-visual-skeleton-cell.is-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: color-mix(in srgb, #07101f 58%, var(--brand-strong));
  opacity: 0;
  transform: scale(0.86);
  animation: nanVisualSkeletonDarkBurst var(--skeleton-dark-duration, 3600ms) cubic-bezier(0.22, 0.8, 0.24, 1) infinite;
  animation-delay: var(--skeleton-dark-delay, -1200ms);
}

.nan-visual-skeleton-cell.is-dark.is-reverse {
  animation-direction: reverse, reverse;
}

.nan-visual-skeleton-cell.is-dark.is-reverse::before {
  animation-direction: reverse;
}

.nan-visual-skeleton-cell.is-muted {
  opacity: 0.54;
}

@keyframes nanVisualSkeletonCellFade {
  0%,
  100% {
    opacity: var(--skeleton-opacity-low, 0.42);
  }

  38% {
    opacity: var(--skeleton-opacity-high, 1);
  }

  64% {
    opacity: var(--skeleton-opacity-mid, 0.64);
  }
}

@keyframes nanVisualSkeletonDarkBurst {
  0%,
  18%,
  100% {
    opacity: 0;
    transform: scale(0.82);
  }

  28%,
  52% {
    opacity: var(--skeleton-dark-opacity, 0.82);
    transform: scale(1);
  }

  66% {
    opacity: 0.16;
    transform: scale(0.96);
  }
}

@keyframes nanVisualSkeletonDarkHop {
  0%,
  20% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  21%,
  44% {
    transform: translate3d(var(--skeleton-hop-x, 4px), var(--skeleton-hop-y, -4px), 0) scale(1.04);
  }

  45%,
  70% {
    transform: translate3d(var(--skeleton-hop-alt-x, -3px), var(--skeleton-hop-alt-y, -3px), 0) scale(0.98);
  }

  71%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes nanVisualSkeletonSweep {
  0% {
    opacity: 0;
    transform: translateX(-130%);
  }

  18% {
    opacity: 0.72;
  }

  68% {
    opacity: 0.38;
    transform: translateX(145%);
  }

  100% {
    opacity: 0;
    transform: translateX(145%);
  }
}

[data-theme="dark"] .nan-visual-scroll {
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, var(--surface-1), var(--surface-3));
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.nan-modal-sidebar,
.nan-modal-main,
.nan-sidebar-block {
  display: grid;
  gap: 14px;
}

.nan-editor-summary,
.nan-editor-columns {
  display: grid;
  gap: 8px;
}

.nan-column-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.nan-editor-columns {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.nan-editor-text {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  color: var(--text);
  padding: 18px;
  font: 500 0.95rem/1.55 "Manrope", sans-serif;
  resize: vertical;
}
@media (max-width: 1120px) {
  .nan-hero,
  .nan-workbench,
  .nan-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-priority-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nan-security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nan-priority-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-priority-exemption-action {
    min-height: 0;
    width: 100%;
  }

  .nan-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nan-visual-modal .nan-modal-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-visual-head-actions {
    justify-self: end;
  }
}

@media (max-width: 720px) {
  .nan-hero,
  .nan-lookup-card,
  .nan-map-card,
  .nan-result-card,
  .nan-directory-card,
  .nan-security-card,
  .nan-modal-dialog {
    padding: 18px;
  }

  .nan-card-head,
  .nan-modal-head,
  .nan-editor-toolbar {
    flex-direction: column;
  }

  .nan-form,
  .nan-editor-triggers,
  .nan-visual-toolbar,
  .nan-quick-entry-card,
  .nan-quick-output,
  .nan-detail-grid,
  .nan-security-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-visual-modal .nan-modal-head {
    display: grid;
  }

  .nan-dashboard-dialog .nan-modal-head {
    flex-direction: row;
    align-items: center;
  }

  .nan-priority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nan-visual-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-visual-detail-actions {
    width: 100%;
  }

  .nan-visual-detail .nan-exemption-action-group {
    margin-left: 0;
    min-width: 0;
    width: 100%;
  }

  .nan-result-actions {
    justify-content: flex-start;
  }

  .nan-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .nan-visual-skeleton-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .nan-visual-skeleton-line.is-title {
    width: 100%;
    min-width: 0;
  }

  .nan-top-load-head {
    flex-direction: column;
  }

  .nan-top-load-value {
    min-width: 0;
    text-align: left;
  }

  .nan-modal {
    padding: 12px;
  }
}


.btn-secondary {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--surface-accent), var(--surface-2));
}

.nan-hero,
.nan-data-card,
.nan-lookup-card,
.nan-map-card,
.nan-result-card,
.nan-security-card,
.nan-modal-dialog {
  padding: clamp(22px, 2.4vw, 32px);
}

.nan-card-head,
.nan-modal-head {
  gap: 18px;
}

.nan-visual-modal {
  align-items: start;
  justify-items: center;
  padding: 2px 8px 4px;
}

.nan-modal-dialog.nan-visual-dialog {
  height: min(calc(100vh - 6px), 1140px);
  max-height: min(calc(100vh - 6px), 1140px);
  padding: clamp(10px, 1vw, 16px);
}

.nan-visual-modal .nan-modal-head {
  gap: 8px;
}

.nan-visual-head-main {
  gap: 6px;
}

.nan-visual-toolbar {
  gap: 8px;
}

.nan-card-head > div,
.nan-modal-head > div,
.nan-editor-toolbar-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.nan-card-head .nan-muted,
.nan-modal-head .nan-muted,
.nan-sheet-hint {
  max-width: 62ch;
  line-height: 1.65;
}

.nan-editor-triggers {
  gap: 14px;
}

.nan-editor-trigger {
  padding: 20px 22px;
}

.nan-editor-trigger-label,
.nan-editor-trigger-meta {
  line-height: 1.45;
}

.nan-result-body,
.nan-security-grid,
.nan-detail-grid,
.nan-priority-grid,
.nan-editor-columns,
.nan-editor-summary {
  gap: 12px;
}

.nan-detail-row,
.nan-secondary-row,
.nan-summary-row,
.nan-note-block,
.nan-security-item,
.nan-priority-card {
  padding: 16px 18px;
}

.nan-result-shell,
.nan-result-callout,
.nan-priority-card,
.nan-detail-row,
.nan-secondary-row,
.nan-note-block {
  text-align: left;
  justify-items: start;
  align-content: start;
}

.nan-priority-card span,
.nan-priority-card strong,
.nan-detail-row span,
.nan-detail-row strong,
.nan-secondary-row span,
.nan-secondary-row strong,
.nan-note-block span,
.nan-note-block strong,
.nan-note-list {
  width: 100%;
  text-align: left;
}

.nan-note-block.is-warning {
  border-color: rgba(186, 118, 8, 0.28);
  background: linear-gradient(180deg, rgba(255, 246, 224, 0.98), rgba(255, 251, 238, 0.98));
}

[data-theme="dark"] .nan-note-block.is-warning {
  border-color: rgba(245, 184, 71, 0.35);
  background: linear-gradient(180deg, rgba(61, 38, 6, 0.96), rgba(42, 26, 4, 0.98));
}

.nan-note-block.is-warning span {
  color: #9a5a00;
}

[data-theme="dark"] .nan-note-block.is-warning span {
  color: #ffd38a;
}

.nan-note-block.is-warning strong {
  color: #6d4300;
}

[data-theme="dark"] .nan-note-block.is-warning strong {
  color: #fff2d4;
}

.nan-modal-grid {
  gap: 22px;
  align-items: start;
}

.nan-modal-sidebar,
.nan-modal-main {
  min-width: 0;
}

.nan-sidebar-block {
  border: 1px solid var(--line-muted);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 16px 18px;
}

.nan-editor-toolbar {
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line-muted);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 16px 18px;
}

.nan-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nan-toolbar-actions .btn {
  min-height: 42px;
  padding-inline: 16px;
}

.nan-sheet-hint {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.nan-sheet-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
  padding: 12px;
  overflow: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nan-sheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.nan-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  border-top: 1px solid var(--line-muted);
  background: linear-gradient(180deg, var(--surface-accent), var(--surface-2));
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nan-sheet-table th,
.nan-sheet-table td {
  border-right: 1px solid var(--line-muted);
  border-bottom: 1px solid var(--line-muted);
  padding: 0;
}

.nan-sheet-table th:first-child,
.nan-sheet-table td:first-child {
  border-left: 1px solid var(--line-muted);
}

.nan-sheet-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.nan-sheet-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

.nan-sheet-index {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 52px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  color: var(--text-soft);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.nan-sheet-table tbody .nan-sheet-index {
  z-index: 2;
}

.nan-sheet-input {
  width: 100%;
  min-width: 180px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  font: 600 0.92rem/1.4 "Manrope", system-ui, sans-serif;
}

.nan-sheet-input::placeholder {
  color: var(--text-muted);
}

.nan-sheet-input:focus {
  outline: none;
  background: color-mix(in srgb, var(--surface-accent) 72%, transparent);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.nan-sheet-required {
  margin-left: 4px;
  color: var(--brand);
}

.nan-column-chip.is-required {
  border-color: var(--line-info);
  background: var(--surface-accent);
}

@media (max-width: 1120px) {
  .nan-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .nan-editor-toolbar,
  .nan-toolbar-actions {
    width: 100%;
  }

  .nan-toolbar-actions {
    justify-content: stretch;
  }

  .nan-toolbar-actions .btn {
    width: 100%;
  }

  .nan-sheet-wrap {
    padding: 8px;
  }

  .nan-sheet-input {
    min-width: 140px;
  }
}

.nan-upload-section,
.nan-admin-card,
.nan-admin-locked {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 2.4vw, 32px);
}

.nan-upload-disclosure {
  padding: 0;
  overflow: hidden;
  margin-top: -8px;
}

.nan-upload-summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 14px 52px 14px 20px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nan-upload-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nan-upload-summary-copy {
  display: grid;
  gap: 4px;
}

.nan-upload-summary-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nan-upload-summary-reset {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.nan-fd-sync-interval {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.nan-fd-sync-interval input {
  width: 58px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: center;
}

.nan-fd-sync-status {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 52px;
  white-space: nowrap;
}

.nan-upload-summary-title {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nan-upload-summary-note {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.nan-upload-summary:hover .nan-upload-summary-title {
  color: var(--brand-strong);
}

.nan-upload-disclosure[open] .nan-upload-summary {
  border-bottom: 1px solid var(--line-muted);
}

.nan-upload-body {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.nan-upload-group {
  display: grid;
  gap: 14px;
}

.nan-upload-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.nan-upload-group-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.2;
}

.nan-upload-group-head .nan-muted {
  margin: 0;
}

.nan-upload-divider {
  height: 1px;
  background: var(--line);
}

.nan-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  grid-auto-flow: row dense;
}

.nan-upload-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 123, 255, 0.08), transparent 30%),
    linear-gradient(180deg, var(--surface-1), var(--surface-3));
  padding: 22px;
  min-width: 0;
  min-height: 520px;
  box-shadow: var(--shadow);
  align-items: start;
  align-content: start;
}

[data-theme="dark"] .nan-upload-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(0, 0, 0, 0.94));
}

.nan-upload-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.nan-upload-head > div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.nan-upload-head h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nan-upload-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  border: 1px solid var(--line-info);
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--brand-strong);
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nan-upload-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nan-stat-row {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line-muted);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 14px 16px;
}

.nan-stat-row span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nan-stat-row strong {
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nan-upload-status {
  margin: 0;
  min-height: 1.4em;
  color: var(--text-soft);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.nan-upload-card.is-loading .nan-upload-status {
  color: var(--text);
}

.nan-upload-status.ok {
  color: #117e54;
}

.nan-upload-status.error {
  color: #a12d2d;
}

.nan-upload-auto-sync {
  margin: -6px 0 0;
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  padding: 7px 11px;
  width: fit-content;
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nan-upload-auto-sync.ok {
  border-color: rgba(17, 126, 84, 0.24);
  background: rgba(17, 126, 84, 0.08);
  color: #117e54;
}

.nan-upload-auto-sync.error {
  border-color: rgba(161, 45, 45, 0.24);
  background: rgba(161, 45, 45, 0.08);
  color: #a12d2d;
}

[data-theme="dark"] .nan-upload-status.ok {
  color: #8fe0b5;
}

[data-theme="dark"] .nan-upload-status.error {
  color: #ff9f9f;
}

[data-theme="dark"] .nan-upload-auto-sync.ok {
  color: #8fe0b5;
}

[data-theme="dark"] .nan-upload-auto-sync.error {
  color: #ff9f9f;
}

.nan-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nan-upload-action-stack {
  display: grid;
  gap: 12px;
  flex: 1 1 220px;
  min-width: 220px;
}

.nan-upload-action-stack .btn {
  width: 100%;
}

.nan-upload-actions .btn {
  min-height: 46px;
  padding-inline: 16px;
}

.nan-upload-download.is-disabled,
.nan-upload-save.is-disabled {
  opacity: 0.62;
}

.nan-upload-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.nan-preview-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nan-preview-shell {
  border: 1px solid var(--line-muted);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-4));
  padding: 10px;
  overflow: auto;
  max-height: 240px;
}

.nan-preview-shell.is-loading {
  overflow: hidden;
}

.nan-preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.nan-preview-table th,
.nan-preview-table td {
  border-right: 1px solid var(--line-muted);
  border-bottom: 1px solid var(--line-muted);
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
}

.nan-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, var(--surface-accent), var(--surface-2));
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nan-preview-table tr > *:first-child {
  border-left: 1px solid var(--line-muted);
}

.nan-preview-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.nan-preview-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

.nan-preview-table tbody td {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.nan-skeleton-line {
  display: block;
  width: 100%;
  min-width: 80px;
  height: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(166, 180, 198, 0.18) 0%,
    rgba(166, 180, 198, 0.4) 50%,
    rgba(166, 180, 198, 0.18) 100%
  );
  background-size: 220% 100%;
  animation: nanShimmer 1.2s linear infinite;
}

[data-theme="dark"] .nan-skeleton-line {
  background: linear-gradient(
    90deg,
    rgba(126, 151, 184, 0.18) 0%,
    rgba(126, 151, 184, 0.34) 50%,
    rgba(126, 151, 184, 0.18) 100%
  );
  background-size: 220% 100%;
}

@keyframes nanShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -20% 0;
  }
}

@keyframes nanDropdownReveal {
  0% {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.nan-admin-locked {
  border-style: dashed;
}

.nan-admin-locked .nan-muted {
  max-width: 72ch;
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  .nan-top-summary,
  .nan-upload-summary,
  .nan-detail-summary,
  .nan-top-summary::after,
  .nan-upload-summary::after,
  .nan-detail-summary-caret,
  .nan-map-lane[data-nan-map-slot] {
    transition: none;
  }

  .nan-quick-entry-card .nan-field input.is-map-filled,
  .nan-top-disclosure[open] .nan-top-body,
  .nan-upload-disclosure[open] .nan-upload-body,
  .nan-detail-disclosure[open] .nan-detail-grid {
    animation: none;
  }

  .brand-home,
  .brand-text,
  .theme-toggle,
  .theme-toggle-switch,
  .theme-toggle-switch::before,
  .theme-toggle-switch::after,
  .theme-toggle-knob,
  .theme-toggle-knob::before,
  .theme-toggle-knob::after,
  .notification-inbox-button,
  .notification-inbox-dot,
  .notification-inbox-icon,
  .notification-panel,
  .sql-engine-loader::before,
  .sql-engine-loader-orb,
  .sql-engine-loader-bars i {
    transition: none;
    animation: none;
  }

  .brand-home:hover,
  .brand-home:active,
  .brand-home:hover .brand-text,
  .theme-toggle-switch:hover,
  .notification-inbox-button:hover {
    transform: none;
  }
}

@media (max-width: 1120px) {
  .nan-upload-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nan-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nan-top-summary-row,
  .nan-upload-summary-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .nan-upload-summary-controls {
    justify-content: space-between;
    margin-left: 0;
    width: 100%;
  }

  .nan-upload-section,
  .nan-admin-card,
  .nan-admin-locked,
  .nan-upload-card {
    padding: 18px;
  }

  .nan-upload-head,
  .nan-upload-group-head,
  .nan-upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nan-upload-action-stack {
    min-width: 0;
  }

  .nan-upload-actions .btn {
    width: 100%;
  }

  .nan-upload-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .nan-upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Celonis-inspired enterprise shell refresh. Keep this final so it can normalize
   legacy module surfaces without changing module markup or runtime behavior. */
:root {
  --bg: #f7f8fc;
  --bg-accent: #f1f3f8;
  --card: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #f2f4fa;
  --surface-4: #eceff7;
  --surface: var(--surface-1);
  --surface-accent: #eef2ff;
  --surface-accent-2: #e1e7ff;
  --surface-success: #eefaf4;
  --line: #e4e7f1;
  --line-strong: #cfd5e4;
  --line-muted: #eef0f6;
  --line-info: #8ea0d7;
  --line-success: #8fc5a8;
  --text: #15192c;
  --text-soft: #4f5872;
  --text-muted: #7f879d;
  --brand: #3c5cf6;
  --brand-strong: #2447e8;
  --brand-subtle: #eef2ff;
  --brand-contrast: #ffffff;
  --focus-ring: rgba(60, 92, 246, 0.2);
  --bg-grad-start: #f9fafc;
  --bg-grad-mid: #f7f8fc;
  --bg-grad-end: #f4f6fb;
  --panel-grad-start: #ffffff;
  --panel-grad-end: #fbfcff;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(25, 31, 55, 0.06);
  --theme-card-border-width: 1px;
  --theme-card-border-style: solid;
  --theme-control-radius: 7px;
  --theme-detail-radius: 7px;
  --theme-card-background: #ffffff;
  --theme-card-shadow: 0 10px 28px rgba(25, 31, 55, 0.06);
  --theme-panel-background: #ffffff;
  --theme-control-background: #ffffff;
  --theme-menu-background: #ffffff;
  --theme-input-background: #ffffff;
  --theme-nav-background: transparent;
  --theme-nav-radius: 0;
  --theme-nav-item-radius: 7px;
  --theme-primary-button-background: linear-gradient(180deg, #4364ff, #2548e8);
  --theme-button-shadow: none;
}

:root[data-theme="dark"] {
  --bg: #07080a;
  --bg-accent: #0b0d10;
  --card: #111318;
  --surface-1: #111318;
  --surface-2: #171a20;
  --surface-3: #1e2229;
  --surface-4: #262b34;
  --surface-accent: #182033;
  --surface-accent-2: #202a42;
  --line: #2b313b;
  --line-strong: #414a58;
  --line-muted: #20252d;
  --line-info: #5266d8;
  --text: #f5f7fb;
  --text-soft: #c8cedb;
  --text-muted: #8f98a8;
  --brand: #8fb4ff;
  --brand-strong: #c6d8ff;
  --brand-subtle: #172033;
  --brand-contrast: #07101e;
  --bg-grad-start: #07080a;
  --bg-grad-mid: #090b0e;
  --bg-grad-end: #0d1014;
  --panel-grad-start: #151922;
  --panel-grad-end: #11151c;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  --theme-card-background: #111522;
  --theme-card-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  --theme-panel-background: #111522;
  --theme-control-background: #171a20;
  --theme-menu-background: #171a20;
  --theme-input-background: #111318;
}

body[data-page="protected"],
body[data-page="nan"]:not([data-welcome-demo="true"]),
body[data-page="sosa"],
body[data-page="open"],
body[data-page="testing"],
body[data-page="version-history"] {
  background: linear-gradient(180deg, var(--bg-grad-start), var(--bg-grad-end));
}

.card,
.sosa-filter-panel,
.sosa-upload-panel,
.sosa-status-panel,
.sosa-metric-card,
.sosa-chart-card,
.sosa-table-card,
.sosa-title-row,
.nan-data-card,
.nan-lookup-card,
.nan-map-card,
.nan-result-card,
.nan-directory-card,
.nan-security-card,
.nan-priority-card,
.nan-quick-entry-card,
.nan-sidebar-block,
.nan-upload-card,
.nan-admin-card,
.nan-admin-locked {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--theme-card-background);
  box-shadow: 0 10px 28px rgba(25, 31, 55, 0.06);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .sosa-filter-panel,
:root[data-theme="dark"] .sosa-upload-panel,
:root[data-theme="dark"] .sosa-status-panel,
:root[data-theme="dark"] .sosa-metric-card,
:root[data-theme="dark"] .sosa-chart-card,
:root[data-theme="dark"] .sosa-table-card,
:root[data-theme="dark"] .sosa-title-row,
:root[data-theme="dark"] .nan-data-card,
:root[data-theme="dark"] .nan-lookup-card,
:root[data-theme="dark"] .nan-map-card,
:root[data-theme="dark"] .nan-result-card,
:root[data-theme="dark"] .nan-directory-card,
:root[data-theme="dark"] .nan-security-card,
:root[data-theme="dark"] .nan-priority-card,
:root[data-theme="dark"] .nan-quick-entry-card,
:root[data-theme="dark"] .nan-sidebar-block,
:root[data-theme="dark"] .nan-upload-card,
:root[data-theme="dark"] .nan-admin-card,
:root[data-theme="dark"] .nan-admin-locked {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

.page-main {
  padding-bottom: 34px;
}

.page-head,
.sosa-title-row,
.nan-hero {
  padding: 18px 20px;
}

.page-head h1,
.sosa-title-row h1,
.nan-hero h1 {
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  letter-spacing: 0;
}

.eyebrow,
.sosa-panel-label,
.sosa-panel-title,
.module-search-label,
.active-warehouse-label {
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}

.btn,
.sosa-clear-button,
.sosa-secondary-button,
.sosa-upload-button,
button,
select,
input,
textarea {
  border-radius: 7px;
}

.btn {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 750;
}

.btn:hover {
  transform: none;
}

.btn-primary,
.btn.btn-primary {
  border-color: transparent;
  background: var(--theme-primary-button-background);
  color: var(--brand-contrast);
}

.btn-ghost,
.btn-outline,
.sosa-clear-button,
.sosa-secondary-button,
.sosa-upload-button {
  border-color: var(--line);
  background: var(--surface-1);
  color: var(--text-soft);
}

.btn-ghost:hover,
.btn-outline:hover,
.sosa-clear-button:hover,
.sosa-secondary-button:hover,
.sosa-upload-button:hover {
  border-color: color-mix(in srgb, var(--brand) 44%, var(--line));
  background: var(--brand-subtle);
  color: var(--brand-strong);
}

input,
select,
textarea,
.module-search-input,
.warehouse-select {
  border-color: var(--line);
  background: var(--theme-input-background);
  color: var(--text);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.module-search-input:focus,
.warehouse-select:focus {
  outline: 3px solid var(--focus-ring);
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line-strong));
}

.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  min-height: 112px;
  align-content: start;
  border-radius: 8px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.module-card:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  box-shadow: 0 14px 32px rgba(25, 31, 55, 0.09);
  transform: translateY(-1px);
}

.module-card-recommended {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-subtle) 58%, var(--surface-1)), var(--surface-1));
  box-shadow:
    inset 0 3px 0 color-mix(in srgb, var(--brand) 84%, transparent),
    0 10px 28px rgba(25, 31, 55, 0.06);
}

.module-recommended-badge {
  border-radius: 6px;
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  background: var(--brand-subtle);
  color: var(--brand-strong);
}

.active-warehouse-panel,
.module-search-panel {
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: none;
}

.topnav a[href="/account-creation"],
.topnav a[href="/division-creation"] {
  display: none;
}

body[data-current-user-admin="true"] .topnav a[href="/account-creation"],
body[data-current-user-admin="true"] .topnav a[href="/division-creation"] {
  display: flex;
}

.topnav a[href="/contact"] {
  display: none;
}

body[data-current-user-manager="true"] .topnav a[href="/contact"] {
  display: flex;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-card {
  min-width: 0;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) #role-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) #role-form .password-field {
  grid-column: span 2;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-division-field {
  transform: none;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) #role-warehouse {
  transform: none;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) #role-save-btn {
  min-height: 42px;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-library-form {
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
  align-items: end;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-permission-grid {
  grid-column: 1 / -1;
  align-items: start;
}

.role-library-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.role-library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 9px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--text-strong);
}

@media (max-width: 980px) {
  .tenant-admin-hero,
  .tenant-admin-toolbar,
  .tenant-admin-grid,
  .tenant-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tenant-admin-toolbar {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .tenant-admin-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .tenant-admin-row {
    justify-items: start;
  }

  .tenant-feature-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tenant-admin-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  :is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-library-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.role-library-item > span,
.role-library-item > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.division-library-form {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  align-items: end;
}

.division-library-form > input[type="hidden"],
.division-library-form .division-library-form-actions {
  grid-column: 1 / -1;
}

.division-library-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.division-library-item {
  align-items: start;
}

.division-library-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.division-library-main span {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-card-head {
  flex-wrap: wrap;
  align-items: flex-start;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-card-actions {
  flex: 1 1 340px;
  justify-content: flex-end;
  min-width: 0;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-search-input {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 420px;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-table-wrap {
  max-width: 100%;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-table {
  min-width: 1080px;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-table th,
:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-table td {
  padding: 7px 8px;
  font-size: 0.8rem;
  vertical-align: middle;
}

.role-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

:is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .orin-assistant {
  display: none;
}

@media (min-width: 1001px) {
  html {
    font-size: 13px;
  }

  .page-main {
    gap: 14px;
  }

  .card,
  .page-head,
  .module-card {
    border-radius: 7px;
  }

  .module-grid {
    gap: 10px;
  }

  .module-card {
    padding: 14px;
  }

  body[data-page="protected"],
  body[data-page="nan"]:not([data-welcome-demo="true"]),
  body[data-page="sosa"],
  body[data-page="open"],
  body[data-page="testing"],
  body[data-page="version-history"] {
    padding-top: 44px;
    padding-left: 64px;
  }

  body[data-page="protected"] .shell:not(.topbar),
  body[data-page="nan"]:not([data-welcome-demo="true"]) .shell:not(.topbar),
  body[data-page="sosa"] .shell:not(.topbar),
  body[data-page="open"] .shell:not(.topbar),
  body[data-page="testing"] .shell:not(.topbar),
  body[data-page="version-history"] .shell:not(.topbar) {
    width: min(1480px, calc(100vw - 96px));
    max-width: none;
  }

  body[data-page="nan"]:not([data-welcome-demo="true"]) .shell:not(.topbar),
  body[data-page="sosa"] .shell:not(.topbar),
  body[data-module-page="putaway-audit"] .shell:not(.topbar),
  body[data-module-page="vis-dry-store-set"] .shell:not(.topbar),
  body[data-module-page="vis-dry"] .shell:not(.topbar),
  body[data-module-page="vis-cooler"] .shell:not(.topbar),
  body[data-module-page="vis-freezer"] .shell:not(.topbar),
  body[data-module-page="variable-item-parser"] .shell:not(.topbar),
  body[data-module-page="vpc-monthly-report"] .shell:not(.topbar),
  body[data-module-page="file-hosting"] .shell:not(.topbar),
  body[data-module-page="monthly-item-launch"] .shell:not(.topbar),
  body[data-module-page="workspace"] .shell:not(.topbar),
  body[data-module-page="variable-item-sap-variable"] .shell:not(.topbar),
  body[data-module-page="variable-item-store-sets"] .shell:not(.topbar),
  body[data-module-page="variable-item-due-date"] .shell:not(.topbar),
  body[data-module-page="variable-item-temp-translation"] .shell:not(.topbar) {
    width: calc(100vw - 92px);
    max-width: none;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .page-main {
    padding-top: 56px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 9000;
    width: 64px;
    min-height: 100vh;
    margin: 0;
    padding: 10px 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "nav"
      ".";
    align-items: start;
    gap: 14px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-1) 96%, transparent);
    box-shadow: 4px 0 22px rgba(25, 31, 55, 0.05);
    overflow: hidden;
    transition:
      width 260ms cubic-bezier(0.22, 1, 0.36, 1),
      padding 260ms cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 220ms ease;
    will-change: width;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:hover),
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:focus-within) {
    width: 164px;
    padding: 10px 8px;
    box-shadow: 8px 0 32px rgba(25, 31, 55, 0.11);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar::after {
    content: "";
    position: fixed;
    top: 0;
    left: 64px;
    right: 0;
    height: 48px;
    z-index: -1;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-1) 96%, transparent);
    box-shadow: 0 5px 20px rgba(25, 31, 55, 0.04);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar > .brand {
    width: 100%;
    max-width: 100%;
    min-height: 34px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 2px 0 10px;
    border-bottom: 1px solid var(--line-muted);
    text-decoration: none;
    overflow: hidden;
    transition:
      gap 260ms cubic-bezier(0.22, 1, 0.36, 1),
      padding 260ms cubic-bezier(0.22, 1, 0.36, 1),
      justify-content 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:hover) > .brand,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:focus-within) > .brand {
    justify-content: flex-start;
    gap: 8px;
    padding: 2px 4px 10px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar > .brand .vellwick-logo-mark {
    width: 32px;
    height: 27px;
    border-radius: 0;
    box-shadow: none;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar > .brand .vellwick-logo-image {
    top: 50%;
    left: 50%;
    width: 100%;
    height: auto;
    max-height: 100%;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar > .brand .brand-text {
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--text);
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translateX(-6px);
    transition:
      max-width 260ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 180ms ease,
      transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:hover) > .brand .brand-text,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:focus-within) > .brand .brand-text {
    max-width: 100px;
    opacity: 1;
    transform: translateX(0);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar > .topnav {
    width: 100%;
    display: grid;
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav a {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 7px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
    padding: 6px 0;
    overflow: hidden;
    transition:
      gap 250ms cubic-bezier(0.22, 1, 0.36, 1),
      padding 250ms cubic-bezier(0.22, 1, 0.36, 1),
      background-color 160ms ease,
      color 160ms ease;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:hover) .topnav a,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:focus-within) .topnav a {
    justify-content: flex-start;
    gap: 7px;
    padding: 6px 7px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav-label {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translateX(-6px);
    transition:
      max-width 250ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 170ms ease,
      transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:hover) .topnav-label,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar.shell:has(> .topnav:focus-within) .topnav-label {
    max-width: 128px;
    opacity: 1;
    transform: translateX(0);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav a::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 4px;
    opacity: 0.68;
    box-shadow: inset 0 0 0 3px color-mix(in srgb, currentColor 8%, transparent);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav a[data-nav-icon="true"]::before {
    display: none;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav a.is-current,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav a:hover {
    color: var(--brand-strong);
    background: var(--brand-subtle);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topnav a.is-current::before {
    background: currentColor;
    box-shadow: inset 0 0 0 4px var(--brand-subtle);
    opacity: 1;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar > .topbar-actions {
    position: fixed;
    top: 8px;
    right: 12px;
    left: 170px;
    z-index: 9010;
    width: auto;
    max-width: calc(100vw - 182px);
    min-height: 32px;
    max-height: 34px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    overflow: visible;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar-actions .theme-toggle,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar-actions .notification-inbox-button,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .company-chip,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .warehouse-chip,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .session-chip {
    min-height: 30px;
    border-radius: 7px;
    background: var(--surface-1);
    box-shadow: none;
    font-size: 0.73rem;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .topbar-actions .theme-toggle {
    flex: 0 0 auto;
    padding: 3px 7px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .theme-toggle-label {
    font-size: 0.72rem;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .notification-inbox-button {
    flex: 0 0 auto;
    padding: 5px 9px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .company-chip,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .warehouse-chip {
    flex: 0 1 190px;
    max-width: min(190px, 21vw);
    padding: 4px 8px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .warehouse-chip:has(.warehouse-readonly:not(.hidden)) {
    flex: 0 0 auto;
    max-width: 108px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .warehouse-readonly {
    max-width: 62px;
  }

  body[data-emulated-view="true"] .session-chip .emulation-chip-label {
    display: none;
  }

  body[data-emulated-view="true"] .session-chip {
    flex: 0 1 170px;
    max-width: min(170px, 18vw);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .company-chip-label,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .warehouse-chip-label {
    flex: 0 0 auto;
    font-size: 0.72rem;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .company-select,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .warehouse-select {
    min-width: 96px;
    max-width: 118px;
    height: 26px;
    padding: 3px 24px 3px 8px;
    font-size: 0.72rem;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .session-chip {
    flex: 0 0 auto;
    width: fit-content;
    max-width: min(180px, 22vw);
    min-width: 0;
    padding: 3px 3px 3px 8px;
  }

  body[data-emulated-view="true"] .session-chip {
    flex: 0 1 220px;
    max-width: min(220px, 24vw);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .session-chip [data-auth-username],
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .session-chip [data-auth-email] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .session-chip .btn {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  @media (max-width: 1220px) {
    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .topbar > .topbar-actions {
      gap: 6px;
    }

    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .theme-toggle-label,
    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .notification-inbox-label,
    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .company-chip-label,
    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .warehouse-chip-label {
      display: none;
    }

    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .company-chip,
    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .warehouse-chip {
      flex-basis: 136px;
      max-width: 136px;
    }

    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .warehouse-chip:has(.warehouse-readonly:not(.hidden)) {
      flex-basis: auto;
      max-width: 96px;
    }

    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .company-select,
    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .warehouse-select {
      min-width: 0;
      max-width: 118px;
      width: 118px;
    }

    :is(
      body[data-page="protected"],
      body[data-page="nan"]:not([data-welcome-demo="true"]),
      body[data-page="sosa"],
      body[data-page="open"],
      body[data-page="testing"],
      body[data-page="version-history"]
    ) .session-chip {
      flex-basis: auto;
      max-width: min(170px, 22vw);
    }

    body[data-emulated-view="true"] .session-chip {
      flex-basis: 180px;
      max-width: 180px;
    }
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .brand-tools {
    display: grid;
    gap: 6px;
    flex: 0 0 100%;
    width: 100%;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .brand-history,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .brand-teams,
  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .brand-refresh {
    width: 100%;
    flex-basis: auto;
    border-radius: 7px;
    box-shadow: none;
  }

  body[data-page="sosa"] .sosa-brand-refresh {
    min-width: 0;
    overflow: hidden;
  }

  body[data-page="sosa"] .sosa-brand-refresh .brand-teams-value {
    display: grid;
    min-width: 0;
    max-width: 100%;
    gap: 2px;
    padding-right: 22px;
    font-size: 0.68rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
    white-space: pre-line;
  }

  body[data-page="sosa"] .sosa-brand-refresh .brand-refresh-label {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  body[data-page="sosa"] .sosa-brand-refresh .brand-refresh-skeleton-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  body[data-page="sosa"] .sosa-brand-refresh .brand-refresh-skeleton {
    width: min(86px, 100%);
  }

  body[data-page="sosa"] .sosa-brand-refresh .brand-refresh-skeleton.is-medium,
  body[data-page="sosa"] .sosa-brand-refresh .brand-refresh-skeleton.is-long {
    width: min(96px, 100%);
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .orin-assistant {
    left: auto;
    right: 18px;
    bottom: 18px;
  }

  :is(
    body[data-page="protected"],
    body[data-page="nan"]:not([data-welcome-demo="true"]),
    body[data-page="sosa"],
    body[data-page="open"],
    body[data-page="testing"],
    body[data-page="version-history"]
  ) .orin-panel {
    left: auto;
    right: 0;
    transform-origin: bottom right;
  }

  body[data-module-page="workspace"] {
    padding: 0;
  }

  body[data-module-page="workspace"] .shell:not(.topbar) {
    width: 100vw;
    max-width: none;
  }

  body[data-module-page="workspace"] .topbar.shell {
    display: none;
  }

  body[data-module-page="workspace"] .topbar.shell:hover,
  body[data-module-page="workspace"] .topbar.shell:focus-within {
    display: none;
  }

  body[data-module-page="workspace"] .topbar::after {
    display: none;
  }

  body[data-module-page="workspace"] .topbar > .brand {
    min-height: 30px;
    padding-bottom: 8px;
  }

  body[data-module-page="workspace"] .topbar > .brand .vellwick-logo-mark {
    width: 32px;
    height: 27px;
  }

  body[data-module-page="workspace"] .topnav a {
    min-height: 30px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body[data-module-page="workspace"] .topbar > .topbar-actions {
    display: none;
  }

  body[data-module-page="workspace"] .page-main {
    padding: 0;
  }
}

@media (max-width: 1000px) {
  body[data-page="protected"],
  body[data-page="nan"],
  body[data-page="sosa"],
  body[data-page="open"],
  body[data-page="testing"],
  body[data-page="version-history"] {
    background: linear-gradient(180deg, var(--bg-grad-start), var(--bg-grad-end));
  }

  .topbar {
    border-bottom: 1px solid var(--line);
    background: var(--surface-1);
    padding: 10px 0;
  }

  .topnav {
    border-radius: 8px;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) .role-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) #role-form {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(body[data-module-page="role-assignment"], body[data-module-page="account-creation"]) #role-form .password-field {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .module-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head-split {
    display: grid;
  }

  body[data-module-page="workspace"] .workspace-brand-watermark {
    gap: 10px;
    max-width: 92vw;
  }

  body[data-module-page="workspace"] .workspace-brand-watermark-mark {
    width: clamp(58px, 17vw, 86px);
    height: clamp(58px, 17vw, 86px);
  }

  body[data-module-page="workspace"] .workspace-brand-watermark-text {
    font-size: clamp(2.8rem, 17vw, 5.5rem);
  }
}

body:not([data-current-user-admin="true"]) .topnav a[href="/account-creation"],
.topnav a[href="/account-creation"][hidden],
body:not([data-current-user-admin="true"]) .topnav a[href="/division-creation"],
.topnav a[href="/division-creation"][hidden],
body:not([data-current-user-manager="true"]) .topnav a[href="/contact"],
.topnav a[href="/contact"][hidden] {
  display: none !important;
}

body[data-page="nan"] .nan-main > .brand-tools.nan-page-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

body[data-page="nan"] .nan-main > .brand-tools.nan-page-tools .brand-teams {
  flex: 0 1 150px;
  width: auto;
  min-width: min(150px, 100%);
  border-radius: 8px;
}

body[data-page="nan"] .nan-main > .brand-tools.nan-page-tools .brand-reports {
  flex-basis: 124px;
  min-width: min(124px, 100%);
}

body[data-page="nan"] .nan-main > .brand-tools.nan-page-tools .brand-refresh {
  flex: 1 1 330px;
  width: auto;
  min-width: min(304px, 100%);
  max-width: 460px;
  border-radius: 8px;
}
