:root {
  /* Temen Systems — Signal Blueprint v1.2 */
  --temen-blueprint-navy: #07111f;
  --temen-deep-navy: #0b1728;
  --temen-graphite: #141c26;
  --temen-signal-teal: #21c7b7;
  --temen-cloud-blue: #3b82f6;
  --temen-success-green: #55d98b;
  --temen-cloud-white: #f5f8fc;
  --temen-mist: #dce5ef;
  --temen-slate: #a8b6c6;
  --temen-white: #ffffff;

  --temen-color-bg-dark: var(--temen-blueprint-navy);
  --temen-color-bg-dark-secondary: var(--temen-deep-navy);
  --temen-color-surface-dark: var(--temen-graphite);
  --temen-color-bg-light: var(--temen-cloud-white);
  --temen-color-surface-light: var(--temen-white);
  --temen-color-border: var(--temen-mist);
  --temen-color-text-dark: var(--temen-blueprint-navy);
  --temen-color-text-light: var(--temen-cloud-white);
  --temen-color-text-muted: #536579;
  --temen-color-action: var(--temen-signal-teal);
  --temen-color-platform: var(--temen-cloud-blue);
  --temen-color-success: var(--temen-success-green);

  --temen-font-display: "Aptos Display", Aptos, Arial, sans-serif;
  --temen-font-body: Aptos, Arial, sans-serif;
  --temen-font-mono: "Aptos Mono", "Cascadia Mono", Consolas, monospace;

  --temen-space-1: 4px;
  --temen-space-2: 8px;
  --temen-space-3: 12px;
  --temen-space-4: 16px;
  --temen-space-5: 24px;
  --temen-space-6: 32px;
  --temen-space-7: 48px;
  --temen-space-8: 64px;

  --temen-radius-sm: 3px;
  --temen-radius-md: 6px;
  --temen-radius-lg: 10px;
  --temen-line-thin: 1px;
  --temen-line-signal: 3px;
  --temen-shadow-card: 0 8px 24px rgb(7 17 31 / 10%);
  --temen-focus-ring: 0 0 0 3px #f5f8fc, 0 0 0 6px #21c7b7;
}

/* Temen Systems Signal Blueprint v1.2. Load after upstream styles.
 * Lock brand tokens across component theme scopes and lazy-loaded route CSS.
 * Semantic error/warning/success scales remain owned by the upstream UI. */
:root, .light, .dark, :root[data-platform="apple"] {
  --gtm-font-sans: Aptos, "Segoe UI", Arial, sans-serif !important;
  --gtm-font-display: "Aptos Display", Aptos, "Segoe UI", Arial, sans-serif !important;
  --gtm-font-mono: "Aptos Mono", "Cascadia Mono", Consolas, monospace !important;
  --t-font-family: var(--gtm-font-sans) !important;
  --gtm-accent: #21c7b7 !important;
  --gtm-accent-hover: #55d9cc !important;
  --gtm-accent-foreground: #07111f !important;
  --gtm-focus-ring: rgb(33 199 183 / 55%) !important;
  --gtm-selection: rgb(33 199 183 / 18%) !important;
  --t-border-radius-sm: 3px !important;
  --t-border-radius-md: 6px !important;
  --t-border-radius-lg: 10px !important;
  --gtm-radius-card: 10px !important;
  --gtm-radius-frame: 10px !important;
  --gtm-radius-window: 10px !important;
  /* Bridge both upstream component libraries to the same brand palette. */
  --primary: #21c7b7 !important;
  --primary-foreground: #07111f !important;
  --sidebar-primary: #21c7b7 !important;
  --sidebar-primary-foreground: #07111f !important;
  --ring: rgb(33 199 183 / 55%) !important;
  --chart-1: #21c7b7 !important;
  --chart-2: #3b82f6 !important;
  --chart-3: #55d98b !important;
  --chart-4: #a8b6c6 !important;
  --chart-5: #536579 !important;
  --t-accent-primary: var(--t-accent-accent4) !important;
  --t-accent-secondary: var(--t-accent-accent4) !important;
  --t-accent-tertiary: var(--t-accent-accent3) !important;
  --t-accent-quaternary: var(--t-accent-accent2) !important;
  --t-accent-accent3570: rgb(33 199 183 / 12%) !important;
  --t-accent-accent4060: rgb(33 199 183 / 18%) !important;
  --t-color-blue: #3b82f6 !important;
  --t-color-turquoise: #21c7b7 !important;
  --t-background-transparent-blue: rgb(59 130 246 / 10%) !important;
  --t-border-color-blue: rgb(59 130 246 / 35%) !important;
}
:root, .light {
  --t-background-primary: #ffffff !important;
  --t-background-secondary: #f5f8fc !important;
  --t-background-tertiary: #edf2f8 !important;
  --t-background-quaternary: #dce5ef !important;
  --t-font-color-primary: #07111f !important;
  --t-font-color-secondary: #536579 !important;
  --t-font-color-tertiary: #607286 !important;
  --t-border-color-medium: #dce5ef !important;
  --gtm-material-sidebar: #f5f8fc !important;
  --gtm-material-toolbar: rgb(245 248 252 / 94%) !important;
  --gtm-material-menu: #ffffff !important;
  --gtm-sky-top: #dce5ef !important;
  --gtm-sky-mid: #f5f8fc !important;
  --gtm-sky-wash: rgb(33 199 183 / 8%) !important;
  --gtm-control-bezel: #ffffff !important;
  --gtm-glass: rgb(255 255 255 / 94%) !important;
  --gtm-glass-strong: #ffffff !important;
  --gtm-glass-edge: #dce5ef !important;
  --t-accent-accent1: #f5fdfa !important;
  --t-accent-accent2: #edfdf9 !important;
  --t-accent-accent3: #d4f7f1 !important;
  --t-accent-accent4: #b7eee4 !important;
  --t-accent-accent5: #8ce1d4 !important;
  --t-accent-accent6: #60d2c2 !important;
  --t-accent-accent7: #36b9aa !important;
  --t-accent-accent8: #159b8e !important;
  --t-accent-accent9: #21c7b7 !important;
  --t-accent-accent10: #16b1a3 !important;
  --t-accent-accent11: #087b73 !important;
  --t-accent-accent12: #073f3a !important;
  --t-color-blue9: #3b82f6 !important;
  --t-color-blue10: #2563eb !important;
  --t-color-blue11: #1d4ed8 !important;
  --t-color-turquoise9: #21c7b7 !important;
  --t-color-turquoise10: #16b1a3 !important;
  --t-color-turquoise11: #087b73 !important;
}
.dark {
  --t-background-primary: #07111f !important;
  --t-background-secondary: #0b1728 !important;
  --t-background-tertiary: #141c26 !important;
  --t-background-quaternary: #1c2938 !important;
  --t-font-color-primary: #f5f8fc !important;
  --t-font-color-secondary: #a8b6c6 !important;
  --t-font-color-tertiary: #a8b6c6 !important;
  --t-border-color-light: rgb(220 229 239 / 10%) !important;
  --t-border-color-medium: rgb(220 229 239 / 16%) !important;
  --t-border-color-strong: rgb(220 229 239 / 28%) !important;
  --gtm-material-sidebar: #0b1728 !important;
  --gtm-material-toolbar: rgb(11 23 40 / 94%) !important;
  --gtm-material-menu: #141c26 !important;
  --gtm-control-bezel: #141c26 !important;
  --gtm-sky-top: #0b1728 !important;
  --gtm-sky-mid: #07111f !important;
  --gtm-sky-wash: rgb(33 199 183 / 8%) !important;
  --gtm-glass: rgb(20 28 38 / 90%) !important;
  --gtm-glass-strong: #141c26 !important;
  --gtm-glass-edge: rgb(220 229 239 / 14%) !important;
  --t-accent-accent1: #07111f !important;
  --t-accent-accent2: #0b1b27 !important;
  --t-accent-accent3: #0d2a32 !important;
  --t-accent-accent4: #0e3940 !important;
  --t-accent-accent5: #124a4e !important;
  --t-accent-accent6: #165d5f !important;
  --t-accent-accent7: #197575 !important;
  --t-accent-accent8: #1b9690 !important;
  --t-accent-accent9: #21c7b7 !important;
  --t-accent-accent10: #3ad6c5 !important;
  --t-accent-accent11: #67e3d3 !important;
  --t-accent-accent12: #c2f8ee !important;
  --t-color-blue9: #3b82f6 !important;
  --t-color-blue10: #60a5fa !important;
  --t-color-blue11: #93c5fd !important;
  --t-color-turquoise9: #21c7b7 !important;
  --t-color-turquoise10: #3ad6c5 !important;
  --t-color-turquoise11: #67e3d3 !important;
}
body { font-family: var(--gtm-font-sans); }
h1, h2, h3 { font-family: var(--gtm-font-display); }
.light .text-primary { color: #087b73; }
.gtm-shell-logo { background: #ffffff; border: 1px solid #dce5ef; border-radius: 6px; box-shadow: none; }
.gtm-shell-logo img { width: 24px; height: 24px; object-fit: contain; }
/* Keep the application chrome recognizably Temen in either content theme. */
[data-slot="sidebar-inner"].gtm-material-sidebar {
  --t-font-color-primary: #f5f8fc !important;
  --t-font-color-secondary: #a8b6c6 !important;
  --t-font-color-tertiary: #a8b6c6 !important;
  --foreground: #f5f8fc !important;
  --muted-foreground: #a8b6c6 !important;
  --sidebar: #0b1728 !important;
  --sidebar-foreground: #f5f8fc !important;
  --sidebar-accent: rgb(33 199 183 / 16%) !important;
  --sidebar-accent-foreground: #f5f8fc !important;
  --sidebar-border: rgb(220 229 239 / 16%) !important;
  --border: rgb(220 229 239 / 16%) !important;
  background: #0b1728;
  color: #f5f8fc;
}
[data-slot="sidebar-inner"] [data-slot="sidebar-menu-button"][data-active="true"] {
  background: rgb(33 199 183 / 16%);
  color: #67e3d3;
  box-shadow: inset 3px 0 #21c7b7;
}
[data-slot="sidebar-inner"] [data-slot="sidebar-group-label"] { color: #a8b6c6; }
main:has(> .gtm-login-sky) { padding: 0 !important; background: #07111f; min-height: 100dvh; }
.gtm-login-sky {
  min-height: 100dvh !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: #07111f;
  background-image: linear-gradient(rgb(33 199 183 / 7%) 1px, transparent 1px), linear-gradient(90deg, rgb(33 199 183 / 7%) 1px, transparent 1px);
  background-size: 48px 48px;
  border-color: #141c26;
}
.gtm-login-clouds, .gtm-login-scene, .gtm-login-arcs { display: none; }
.gtm-login-sky header > div > span:first-child { background: #ffffff; border-radius: 6px; box-shadow: none; }
.gtm-login-sky header > div > span:last-child { color: #f5f8fc; }
.gtm-login-card { background: #ffffff; border-color: #dce5ef; box-shadow: 0 24px 64px rgb(0 0 0 / 30%); }
.gtm-login-field { background: #f5f8fc; border-color: #dce5ef; }
.gtm-login-card a[href="/auth/sso/temen-systems/login"] {
  background: #21c7b7;
  color: #07111f;
  font-weight: 700;
  border: 1px solid #21c7b7;
  border-radius: 6px;
  box-shadow: none;
}
.gtm-login-card button[type="submit"] { background: #07111f; color: #f5f8fc; border-radius: 6px; }
.gtm-login-sky footer { color: #a8b6c6; }
/* Route styles load lazily, so override their decorative sky/card colors here. */
.gtm-chat-sky { background: linear-gradient(180deg, var(--t-background-secondary), var(--t-background-primary) 65%) !important; }
.gtm-chat-clouds, .gtm-chat-arcs { display: none !important; }
.gtm-chat-card-icon { --tone: #21c7b7 !important; }
.gtm-chat-card[data-tone="violet"] .gtm-chat-card-icon,
.gtm-chat-card[data-tone="slate"] .gtm-chat-card-icon { --tone: #3b82f6 !important; }
.gtm-chat-card[data-tone="emerald"] .gtm-chat-card-icon { --tone: #55d98b !important; }
.gtm-send { background: #21c7b7 !important; color: #07111f !important; }
.gtm-composer-box, .gtm-slash-menu, .gtm-chat-card, .gtm-chat-recent, .gtm-chat-pill {
  background: var(--gtm-glass-strong) !important;
  border-color: var(--gtm-glass-edge) !important;
}
