@font-face {
  font-family: "Atyaf Arabic";
  src: url("/assets/fonts/plex-arabic.891662a6e9d2.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Product-specific compositions. */
.boot-screen,.connection-error { min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:32px;text-align:center; }
.boot-screen { font-size:24px; }
.loading-surface { margin-block-start:36px;min-height:260px;display:grid;place-items:center; }
.section-padding,.activity-surface { padding:24px; }
.section-spaced { margin-block-start:24px; }
.attention-panel { margin-block-end:26px; }
.quiet-note { padding:25px;margin-block-start:24px; }
.quiet-note>svg { color:var(--muted);width:24px;height:24px; }
.quiet-note h3 { font-size:16px;margin-block:15px 8px; }
.quiet-note p { font-size:14px;color:var(--muted);line-height:1.9; }
.onboarding-step { border:0;background:transparent;width:100%;text-align:start;font:inherit; }
.onboarding-step small { display:block;color:var(--muted);font-size:13px;font-weight:400;margin-block-start:3px; }
.onboarding-step>svg:last-child { margin-inline-start:auto;width:15px;color:var(--subtle); }
.task-circle { display:grid;place-items:center;width:20px;height:20px;border:1.5px solid var(--line-strong);border-radius:50%;flex:none; }
.task-circle.done { background:var(--green-soft);color:var(--green);border-color:transparent; }
.task-circle svg { width:13px;height:13px; }
.task-row>svg:last-child { width:15px;color:var(--subtle); }
.text-button { padding:0;border:0;background:none;color:inherit;text-align:start;font:inherit; }
.text-button:hover { color:var(--accent); }
.modal>form { display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden; }
.modal-body { max-height:calc(100dvh - 220px); }
.modal-body>.field+.field { margin-block-start:18px; }
.modal-body>.form-grid { margin-block:18px; }
.modal-body>.inline-alert { margin-block-start:18px; }
.error-message:not([hidden]) { margin-block:15px; }
.advanced { border-block-start:1px solid var(--line);margin-block-start:20px;padding-block-start:16px; }
.advanced summary { cursor:pointer;font-size:14px;font-weight:500;min-height:32px; }
.advanced[open] summary { margin-block-end:15px; }
.advanced .form-grid { margin-block-start:16px; }
.advanced .field+.field { margin-block-start:16px; }
.advanced .form-grid .field { margin-block-start:0; }
.workspace-switcher .menu { width:100%;max-height:60dvh;overflow-y:auto; }
.workspace-menu .menu-item .small-label { display:block; }
.workspace-menu .button { width:100%;justify-content:flex-start; }
.template-list { display:flex;flex-direction:column;gap:10px; }
.template-option { display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--line);border-radius:12px;cursor:pointer; }
.template-option:has(input:checked) { border-color:var(--accent);background:var(--accent-soft); }
.template-option input { accent-color:var(--accent); }
.template-option strong { display:block;font-size:15px; }
.template-option small { display:block;font-size:13px;color:var(--muted);margin-block-start:4px; }
.connection-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px; }
.connection-card h3 { font-size:16px; }
.connection-model { margin-block:20px 10px;font-size:14px;overflow-wrap:anywhere; }
.connection-actions { display:flex;align-items:center;gap:8px;margin-block-start:22px; }
.connection-actions .button { margin-inline-end:auto; }
.connection-icon { display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;background:var(--accent-soft);border-radius:12px;color:var(--accent);flex:none; }
.settings-form { max-width:790px;padding:28px; }
.settings-form form>.field { margin-block-end:20px; }
.settings-form form>.button { margin-block-start:22px; }
.settings-form .form-grid { margin-block-start:20px; }
.settings-form .field-hint { max-width:60ch; }
.auth-submit { width:100%;justify-content:center; }
.form-footer svg { width:13px;height:13px;margin-inline-end:5px; }
.detail-section { margin-block-start:28px;padding-block-start:24px;border-block-start:1px solid var(--line); }
.detail-description,.knowledge-prose { margin-block-start:15px; }
.result-prose { padding-block:15px; }
.prose { overflow-wrap:anywhere; }
.prose h3 { font-size:16px;margin-block:16px 8px; }
.run-log { border:1px solid var(--line);border-radius:12px;margin-block-start:12px;padding:14px; }
.run-log summary { display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);cursor:pointer; }
.run-log .activity-content p { font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted); }
.approval-destination { padding:18px;border:1px solid var(--line);border-radius:12px;margin-block:20px; }
.approval-destination strong { display:block;margin-block:5px; }
.approval-destination p { font-size:13px;overflow-wrap:anywhere;color:var(--muted); }
.mobile-more-list .menu-item { min-height:48px;font-size:15px; }
.agent-layout { display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start; }
.chat-panel { overflow:hidden; }
.chat-messages { min-height:330px;max-height:560px;overflow:auto;padding:26px;scroll-behavior:smooth; }
.chat-empty { min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;padding:20px; }
.chat-empty h2 { font-size:20px;font-weight:500; }
.chat-empty p { font-size:14px;color:var(--muted);max-width:35ch; }
.chat-turn { margin-block-end:27px; }
.chat-message { max-width:92%;font-size:15px;line-height:1.9;padding:16px 18px;border-radius:14px;margin-block-end:14px;overflow-wrap:anywhere; }
.chat-message .small-label { display:block;margin-block-end:7px; }
.chat-message.user { background:#f0f3f8;margin-inline-start:auto; }
.chat-message.assistant { border:1px solid var(--line);margin-inline-end:auto; }
.chat-composer { padding:20px;border-block-start:1px solid var(--line);background:#fcfcfd; }
.chat-composer textarea { resize:vertical;min-height:82px; }
.chat-composer-footer { display:flex;justify-content:space-between;align-items:center;gap:15px;margin-block-start:12px; }
.permission-item { display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);padding-block:7px; }
.permission-item svg { width:15px;height:15px;color:var(--green); }
.compact-task { display:flex;align-items:center;gap:10px;justify-content:space-between;border:0;border-block-end:1px solid var(--line);width:100%;padding:14px 0;background:none;font-size:13px;text-align:start; }
.compact-task:last-child { border:0; }
.typing-indicator { display:flex;gap:5px;padding:8px 0; }
.typing-indicator span { width:5px;height:5px;background:var(--subtle);border-radius:50%;animation:pulse 1.3s infinite; }
.typing-indicator span:nth-child(2){animation-delay:.15s}.typing-indicator span:nth-child(3){animation-delay:.3s}
.usage-surface { padding-block-end:26px; }
.usage-chart { display:flex;align-items:flex-end;justify-content:flex-start;gap:20px;overflow-x:auto;padding:25px;min-height:220px;direction:ltr; }
.chart-column { display:flex;align-items:center;flex-direction:column;justify-content:flex-end;gap:10px;min-width:55px; }
.chart-bar { width:30px;background:var(--accent);border-radius:6px 6px 0 0;min-height:3px; }
.chart-label { font-size:11px;color:var(--muted); }
.status.ready { background:var(--green-soft);color:var(--green); }
.status.untested { background:var(--amber-soft);color:var(--amber); }
.toggle-row { cursor:pointer; }
.toggle-row .switch { margin-inline-start:20px; }
@keyframes pulse {0%,100%{opacity:.35}50%{opacity:1}}
@media(max-width:1100px){.agent-layout{grid-template-columns:minmax(0,1fr) 260px;gap:18px}}
@media(max-width:900px){.agent-layout{grid-template-columns:minmax(0,1fr)}.agent-layout>aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}.agent-layout>aside>.section-spaced{margin-block-start:0}}
@media(max-width:640px){.settings-form{padding:21px}.agent-layout>aside{display:block}.agent-layout>aside>.section-spaced{margin-block-start:18px}.chat-messages{padding:18px;min-height:300px;max-height:55dvh}.chat-composer{padding:15px}.chat-composer-footer .small-label{max-width:24ch;font-size:11px}.section-padding,.activity-surface{padding:20px}.modal-backdrop{padding:12px}.modal{max-height:calc(100dvh - 24px)}.modal-body{max-height:calc(100dvh - 190px)}.connection-grid{grid-template-columns:minmax(0,1fr)}.task-row{padding:16px}.task-row .status{font-size:11px;padding-inline:6px}.task-row>.task-circle{display:none}.template-option{padding:13px}.approval-destination{padding:14px}.chat-message{max-width:100%}.settings-form .setting-row{align-items:flex-start;flex-direction:column;gap:15px}}
@media(prefers-reduced-motion:reduce){.typing-indicator span{animation:none}.chat-messages{scroll-behavior:auto}}
@font-face {
  font-family: "Atyaf Arabic";
  src: url("/assets/fonts/plex-arabic-medium.ab75df621fac.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Atyaf Arabic";
  src: url("/assets/fonts/plex-arabic-semibold.452ddb9edea6.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --font: "Atyaf Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --sidebar: #f5f6f8;
  --ink: #1d222b;
  --muted: #737b89;
  --subtle: #9299a5;
  --line: #e8ebf0;
  --line-strong: #d7dce5;
  --accent: #2867e8;
  --accent-hover: #1f56cc;
  --accent-soft: #edf3ff;
  --green: #237b55;
  --green-soft: #eaf5ee;
  --amber: #996818;
  --amber-soft: #fff5df;
  --red: #bd4448;
  --red-soft: #fceff0;
  --violet: #7562ba;
  --violet-soft: #f1eef9;
  --orange: #a56a35;
  --orange-soft: #faf0e7;
  --sidebar-width: 248px;
  --radius: 16px;
  --shadow-popover: 0 12px 40px rgb(22 33 53 / 10%), 0 2px 6px rgb(22 33 53 / 4%);
  --shadow-dialog: 0 28px 100px rgb(16 25 43 / 20%);
  color-scheme: light;
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.65; }
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
button:disabled, .button[aria-disabled="true"] { opacity: .48; pointer-events: none; }
button, a, input, textarea, select { touch-action: manipulation; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid rgb(40 103 232 / 35%);
  outline-offset: 3px;
}
button svg, a svg, .nav-icon svg, .activity-icon svg, .connection-icon svg {
  width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.7;
}
svg { vertical-align: middle; flex-shrink: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4, strong, b { font-weight: 600; }
ul, ol { margin-block: 0; }
label { cursor: default; }
::selection { color: var(--ink); background: #dce8ff; }
[hidden], .hidden { display: none !important; }

.app-shell { min-height: 100dvh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 45;
  display: flex; flex-direction: column; width: var(--sidebar-width);
  padding: 27px 16px 16px; background: var(--sidebar);
  border-inline-end: 1px solid var(--line); overflow-y: auto;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.sidebar > .brand { margin-inline: 12px; margin-block-end: 29px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  background: #222b3a; color: #fff; font-size: 23px; font-weight: 600;
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-name { display: block; font-size: 22px; font-weight: 600; line-height: 1.35; }
.brand-caption { display: block; margin-block-start: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.workspace-switcher, .user-menu, .menu-anchor { position: relative; }
.workspace-button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px;
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); text-align: start; transition: border-color .16s, background .16s;
}
.workspace-button:hover { border-color: #b6c4df; }
.workspace-button > svg:last-child { margin-inline-start: auto; width: 15px; color: var(--muted); }
.workspace-avatar {
  width: 34px; height: 34px; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 10px;
  color: #536884; background: #eef1f6; font-size: 15px; font-weight: 500;
}
.workspace-meta { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.workspace-meta strong, .workspace-meta > span:first-child { display: block; font-weight: 500; }
.workspace-meta small, .workspace-meta .muted { display: block; margin-block-start: 2px; font-size: 12px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; margin-block-start: 25px; }
.nav-group > .small-label, .nav-group > .eyebrow { margin: 0 14px 8px; color: var(--muted); font-size: 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%;
  border: 0; border-radius: 10px; padding: 10px 13px;
  background: transparent; color: #657082; text-align: start;
  font-size: 14px; font-weight: 500; transition: background .16s, color .16s;
}
.nav-item:hover { color: var(--ink); background: #eceff4; }
.nav-item.active, .nav-item[aria-current="page"] { color: var(--accent); background: #e8effc; }
.nav-icon { display: inline-flex; width: 21px; justify-content: center; }
.nav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 21px; height: 21px; margin-inline-start: auto; padding-inline: 6px;
  border-radius: 6px; background: #e8ebf1; color: #657082; font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count { background: #d9e6ff; color: var(--accent); }
.sidebar-bottom { margin-block-start: auto; padding-block-start: 26px; }
.sidebar-bottom .nav-group { margin-block: 0 16px; }
.user-button {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 56px;
  padding: 12px 10px 2px; border: 0; border-block-start: 1px solid var(--line);
  text-align: start; background: transparent; font-size: 14px;
}
.user-button > svg:last-child { margin-inline-start: auto; color: var(--muted); width: 16px; }
.user-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 33px; height: 33px; border-radius: 50%; color: #667387; background: #e3e8f0;
  font-size: 13px; font-weight: 500;
}
.user-button small { display: block; color: var(--muted); font-size: 12px; }

.main { min-height: 100dvh; min-width: 0; margin-inline-start: var(--sidebar-width); }
.topbar {
  position: sticky; inset-block-start: 0; z-index: 35; display: flex;
  align-items: center; justify-content: space-between; gap: 20px; min-height: 76px;
  padding-inline: 40px; border-block-end: 1px solid var(--line);
  background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb > :last-child { color: var(--ink); font-weight: 500; }
.breadcrumb-separator { display: inline-flex; color: #c1c6d0; }
.breadcrumb-separator svg { width: 14px; height: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 9px; min-height: 38px;
  padding: 7px 10px; border: 0; border-radius: 9px; color: var(--muted);
  background: transparent; font-size: 13px; text-align: start;
}
.search-trigger:hover { background: var(--canvas); }
.search-trigger kbd { margin-inline-start: 15px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; font: 11px system-ui, sans-serif; line-height: 20px; }
.page { max-width: 1512px; margin-inline: auto; padding: 34px 40px 52px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-block-end: 30px; }
.page-title { color: var(--ink); font-size: 29px; line-height: 1.55; font-weight: 500; letter-spacing: -.3px; }
.page-description { margin-block-start: 5px; color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 66ch; }
.eyebrow { margin-block-end: 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; flex-shrink: 0; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 43px; padding: 9px 17px; border: 1px solid transparent; border-radius: 10px;
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500;
  line-height: 1.6; text-align: center; text-decoration: none; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .12s;
}
.button:hover { background: #f1f3f6; }
.button:active, .icon-button:active { transform: translateY(1px); }
.button.primary, .button-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 3px rgb(40 103 232 / 9%); }
.button.primary:hover, .button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.secondary, .button-secondary { border-color: var(--line-strong); background: var(--surface); color: #4a5566; }
.button.secondary:hover, .button-secondary:hover { background: #f7f9fc; border-color: #c2cbd9; }
.button.ghost, .button-ghost { background: transparent; color: var(--muted); }
.button.ghost:hover, .button-ghost:hover { background: #edf0f5; color: var(--ink); }
.button.danger, .button-danger { color: var(--red); border-color: #edced0; background: var(--surface); }
.button.danger:hover, .button-danger:hover { background: var(--red-soft); }
.button.small, .button-small { min-height: 35px; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.button.block, .button-block { width: 100%; }
.button svg { width: 17px; height: 17px; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); transition: background .16s, color .16s, transform .12s;
}
.icon-button:hover { background: #eef1f5; color: var(--ink); }
.icon-button.active { color: var(--accent); background: var(--accent-soft); }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.surface.padded { padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-block-end: 17px; }
.section-title { font-size: 17px; line-height: 1.6; font-weight: 500; }
.section-subtitle { margin-block-start: 4px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.surface > .section-heading { padding: 21px 23px 0; }
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0; margin-block-end: 28px; padding: 21px 4px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.stat { min-width: 0; padding-inline: 25px; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat-value { display: block; font-size: 29px; line-height: 1.5; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-block-start: 3px; color: var(--muted); font-size: 14px; }
.stat small { color: var(--subtle); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.dashboard-grid > * { min-width: 0; }
.dashboard-column { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.onboarding { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-block-end: 26px; }
.onboarding-step { display: flex; align-items: center; gap: 13px; padding-block: 15px; }
.onboarding-step + .onboarding-step { border-block-start: 1px solid var(--line); }
.onboarding-step:last-child { padding-block-end: 0; }
.onboarding-step > div:not(.step-check) { flex: 1; min-width: 0; }
.onboarding-step h3, .onboarding-step strong { font-size: 14px; font-weight: 500; }
.onboarding-step p { margin-block-start: 3px; color: var(--muted); font-size: 13px; }
.step-check { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--subtle); font-size: 12px; }
.step-check svg { width: 15px; height: 15px; }
.step-check.done, .onboarding-step.done .step-check { border-color: var(--green-soft); color: var(--green); background: var(--green-soft); }

.task-list { min-width: 0; }
.task-row { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 17px 22px; border-block-end: 1px solid var(--line); transition: background .15s; }
.task-row:last-child { border-block-end: 0; }
.task-row.clickable, button.task-row, a.task-row { width: 100%; cursor: pointer; text-align: start; color: inherit; background: transparent; border-inline: 0; border-block-start: 0; }
.task-row.clickable:hover, button.task-row:hover, a.task-row:hover { background: #fafbfd; }
.task-row:first-child { border-start-start-radius: var(--radius); border-start-end-radius: var(--radius); }
.task-row:last-child { border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.task-main { flex: 1; min-width: 0; }
.task-title { color: var(--ink); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.task-title a { color: inherit; }
.task-title a:hover { color: var(--accent); }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; column-gap: 13px; row-gap: 3px; margin-block-start: 5px; color: var(--muted); font-size: 13px; }
.task-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.task-meta svg { width: 13px; height: 13px; }
.task-row > .icon-button { opacity: .55; }
.task-row:hover > .icon-button, .task-row:focus-within > .icon-button { opacity: 1; }
.status, .badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 3px 9px; border-radius: 6px; background: #eff1f5; color: #748093; font-size: 13px; font-weight: 500; line-height: 1.7; white-space: nowrap; }
.status.active, .status.running, .status.queued, .status[data-status="running"], .status[data-status="queued"] { background: var(--accent-soft); color: var(--accent); }
.status.done, .status.succeeded, .status.completed, .status.connected, .status.approved, .status[data-status="succeeded"], .status[data-status="completed"] { background: var(--green-soft); color: var(--green); }
.status.pending, .status.waiting, .status.awaiting_approval, .status.needs_setup, .status[data-status="awaiting_approval"] { background: var(--amber-soft); color: var(--amber); }
.status.failed, .status.error, .status.rejected, .status[data-status="failed"] { background: var(--red-soft); color: var(--red); }
.status.paused, .status.draft, .status.cancelled, .status.offline { background: #eff1f5; color: #748093; }
.status svg, .badge svg { width: 12px; height: 12px; }
.priority { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.priority.high { color: var(--red); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px; color: #66778f; background: #eef1f5; font-size: 18px; font-weight: 500; }
.avatar svg { width: 22px; height: 22px; }
.avatar.small { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.avatar.large { width: 58px; height: 58px; border-radius: 17px; font-size: 23px; }
.avatar.blue { background: #eaf1ff; color: #4a73b5; }
.avatar.green { background: #eaf5ee; color: #5a8870; }
.avatar.violet { background: var(--violet-soft); color: #8774b2; }
.avatar.orange { background: var(--orange-soft); color: #b08461; }
.avatar.slate { background: #eaf0f3; color: #6a8192; }
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 20px; }
.employee-card { display: flex; flex-direction: column; min-width: 0; min-height: 220px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .18s, box-shadow .18s; }
.employee-card:hover { border-color: #ced8e8; box-shadow: 0 3px 14px rgb(24 43 75 / 3%); }
.employee-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-block-end: 17px; }
.employee-card h2, .employee-card h3 { font-size: 17px; line-height: 1.7; font-weight: 500; overflow-wrap: anywhere; }
.employee-role { margin-block-start: 4px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.employee-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-start: auto; padding-block-start: 21px; color: var(--muted); font-size: 12px; }
.employee-footer svg { width: 14px; height: 14px; }
.employee-footer .button { margin-inline-end: -7px; }

.tabs { display: flex; align-items: center; gap: 24px; margin-block-end: 25px; border-block-end: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 47px; padding: 10px 0 13px; border: 0; border-block-end: 2px solid transparent; margin-block-end: -1px; color: var(--muted); background: transparent; font-size: 14px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active, .tab[aria-selected="true"] { color: var(--accent); border-block-end-color: var(--accent); font-weight: 500; }
.tab .nav-count { margin-inline-start: 2px; font-size: 11px; height: 19px; min-width: 19px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block-end: 20px; }
.filters .input, .filters select { width: auto; min-width: 130px; min-height: 39px; font-size: 13px; padding-block: 7px; }
.search-field { position: relative; min-width: 180px; }
.search-field > svg { position: absolute; inset-inline-start: 13px; inset-block-start: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--subtle); pointer-events: none; }
.search-field .input { padding-inline-start: 39px; width: 100%; }
.input, select.input, textarea.input {
  display: block; width: 100%; min-width: 0; min-height: 45px; padding: 10px 13px;
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font-size: 14px; line-height: 1.7; transition: border-color .16s, box-shadow .16s;
}
.input::placeholder { color: #a0a6b0; opacity: 1; }
.input:hover { border-color: #bfc9d8; }
.input:focus { outline: none; border-color: #7ca4f2; box-shadow: 0 0 0 3px rgb(40 103 232 / 10%); }
.input[aria-invalid="true"], .field.error .input { border-color: #d99296; }
.input:disabled { background: #f5f6f8; color: var(--muted); }
textarea.input { min-height: 115px; resize: vertical; }
select.input {
  appearance: none; padding-inline-end: 35px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23737b89' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 15px; background-position: left 12px center;
}
[dir="ltr"] select.input { background-position: right 12px center; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { display: block; color: #424c5c; font-size: 14px; font-weight: 500; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.8; }
.field + .field { margin-block-start: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid > .field + .field { margin-block-start: 0; }
.form-grid > .full, .form-grid > .full-width { grid-column: 1 / -1; }
.form-section + .form-section { margin-block-start: 28px; padding-block-start: 24px; border-block-start: 1px solid var(--line); }
.form-section > .section-heading { margin-block-end: 18px; }
.toggle-row, .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-block: 18px; }
.toggle-row + .toggle-row, .setting-row + .setting-row { border-block-start: 1px solid var(--line); }
.toggle-row p, .setting-row p { margin-block-start: 3px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.toggle-row strong, .setting-row strong { font-size: 14px; font-weight: 500; }
.switch { appearance: none; position: relative; width: 39px !important; height: 23px !important; min-width: 39px; border: 0; border-radius: 30px; background: #d3d9e2; cursor: pointer; transition: background .18s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 15%); transition: inset-inline-start .18s; }
.switch:checked, .switch[aria-checked="true"] { background: var(--accent); }
.switch:checked::after, .switch[aria-checked="true"]::after { inset-inline-start: 19px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding-block: 8px; color: #586273; font-size: 14px; cursor: pointer; }
.checkbox-row input { margin-block-start: 5px; }
.permissions-list { display: flex; flex-direction: column; gap: 4px; }
.permissions-list .checkbox-row { padding-block: 10px; }

.knowledge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.knowledge-card { padding: 22px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.knowledge-card h3 { margin-block: 15px 7px; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.knowledge-card p { color: var(--muted); font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.knowledge-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-start: 20px; color: var(--subtle); font-size: 12px; }
.activity-list { min-width: 0; }
.activity-row { position: relative; display: flex; gap: 13px; padding-block: 13px; }
.activity-row + .activity-row { border-block-start: 1px solid #f0f2f5; }
.activity-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: #f2f4f8; color: #7c899b; }
.activity-icon svg { width: 15px; height: 15px; }
.activity-content { flex: 1; min-width: 0; color: #536071; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.activity-content strong { color: var(--ink); font-weight: 500; }
.activity-content time, .activity-content > small { display: block; margin-block-start: 3px; color: var(--subtle); font-size: 12px; }
.approval-card { display: flex; align-items: flex-start; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.approval-card + .approval-card { margin-block-start: 15px; }
.approval-content { flex: 1; min-width: 0; }
.approval-content h3 { font-size: 16px; font-weight: 500; }
.approval-content p { margin-block-start: 5px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.approval-content .page-actions { margin-block-start: 18px; }
.approval-preview { margin-block-start: 16px; padding: 17px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose { color: #465263; font-size: 14px; line-height: 2; overflow-wrap: anywhere; }
.prose > * + * { margin-block-start: 15px; }
.prose h1, .prose h2, .prose h3 { color: var(--ink); line-height: 1.7; font-weight: 500; }
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 17px; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose li + li { margin-block-start: 7px; }
.prose blockquote { margin-inline: 0; padding-inline-start: 18px; border-inline-start: 3px solid #d5e1f6; color: var(--muted); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.code-block, .prose pre { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: #f5f7fa; direction: ltr; text-align: left; font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; overflow: auto; white-space: pre; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; min-height: 270px; text-align: center; }
.empty-icon { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-block-end: 19px; border-radius: 17px; background: #f0f3f8; color: #9aa8bb; }
.empty-icon svg { width: 27px; height: 27px; stroke-width: 1.5; }
.empty-title { color: #404b5b; font-size: 18px; font-weight: 500; }
.empty-description { max-width: 39ch; margin-block-start: 7px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.empty-state > .button, .empty-state > .page-actions { margin-block-start: 22px; }
.empty-state.compact { min-height: 210px; padding-block: 40px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 26px; align-items: start; }
.detail-header { display: flex; align-items: flex-start; gap: 18px; padding-block-end: 24px; margin-block-end: 24px; border-block-end: 1px solid var(--line); }
.detail-header h1, .detail-header h2 { font-size: 23px; font-weight: 500; line-height: 1.7; }
.detail-header .page-actions { margin-inline-start: auto; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-block-start: 8px; color: var(--muted); font-size: 13px; }
.detail-body { min-width: 0; }
.detail-body > .surface, .detail-body > .form-section { margin-block-end: 24px; }
.meta-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-block: 13px; color: #596577; font-size: 14px; }
.meta-item + .meta-item { border-block-start: 1px solid var(--line); }
.meta-item > :first-child { color: var(--muted); }
.meta-item > :last-child { text-align: end; overflow-wrap: anywhere; }

.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgb(21 30 47 / 26%); animation: backdrop-in .16s ease both; }
.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 110; display: flex; flex-direction: column; width: min(570px, 100%); height: 100dvh; background: var(--surface); box-shadow: var(--shadow-dialog); animation: drawer-in .2s ease both; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-shrink: 0; min-height: 82px; padding: 20px 27px; border-block-end: 1px solid var(--line); }
.drawer-header h2 { font-size: 20px; font-weight: 500; }
.drawer-body { flex: 1; min-height: 0; padding: 27px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; padding: 19px 27px; border-block-start: 1px solid var(--line); background: var(--surface); }
.modal-backdrop { display: grid; place-items: center; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.modal { position: relative; display: flex; flex-direction: column; width: min(620px, 100%); max-height: calc(100dvh - 48px); border: 1px solid rgb(255 255 255 / 60%); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-dialog); overflow: hidden; animation: modal-in .18s ease both; }
.modal.wide { width: min(840px, 100%); }
.modal.narrow { width: min(440px, 100%); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 22px 27px; border-block-end: 1px solid var(--line); }
.modal-header h2 { font-size: 21px; font-weight: 500; }
.modal-header p { margin-block-start: 3px; color: var(--muted); font-size: 13px; }
.modal-body { flex: 1; min-height: 0; padding: 27px; overflow-y: auto; overscroll-behavior: contain; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; padding: 18px 27px; border-block-start: 1px solid var(--line); background: #fdfdfe; }
.modal-footer > .muted, .modal-footer > .field-hint { margin-inline-end: auto; }
.toast-stack { position: fixed; inset-inline-end: 28px; inset-block-end: 28px; z-index: 220; display: flex; flex-direction: column; gap: 10px; width: min(410px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 11px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-popover); color: #465366; font-size: 14px; animation: toast-in .18s ease both; }
.toast > svg { width: 19px; height: 19px; color: var(--green); }
.toast.error > svg { color: var(--red); }
.toast .icon-button { margin-inline-start: auto; width: 28px; height: 28px; }
.menu, .popover { position: absolute; inset-inline-start: 0; inset-block-start: calc(100% + 8px); z-index: 85; width: 280px; max-width: calc(100vw - 32px); padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-popover); animation: modal-in .12s ease both; }
.menu.end, .popover.end { inset-inline-start: auto; inset-inline-end: 0; }
.menu-heading { padding: 8px 10px; color: var(--muted); font-size: 12px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 41px; padding: 9px 10px; border: 0; border-radius: 8px; text-align: start; font-size: 13px; color: #586475; background: transparent; }
.menu-item:hover, .menu-item.active { background: var(--accent-soft); color: var(--accent); }
.menu-item.danger { color: var(--red); }
.menu-item > svg:last-child { margin-inline-start: auto; }
.menu .divider { margin-block: 6px; }
.mobile-nav, .mobile-more, .mobile-workspace, .mobile-menu-toggle, .sidebar-backdrop { display: none; }

.login-shell { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 100dvh; background: var(--surface); }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 70px clamp(35px, 6vw, 100px); background: #f1f3f7; overflow: hidden; }
.login-story > .brand { position: absolute; inset-block-start: 40px; inset-inline-start: clamp(35px, 6vw, 100px); }
.login-story h1 { max-width: 13ch; font-size: clamp(32px, 3.2vw, 49px); font-weight: 500; line-height: 1.65; letter-spacing: -.5px; }
.login-story > p { max-width: 39ch; margin-block-start: 18px; color: #798291; font-size: 16px; line-height: 2; }
.login-story .eyebrow { color: var(--accent); }
.login-feature { display: flex; align-items: center; gap: 12px; margin-block-start: 22px; color: #68768a; font-size: 14px; }
.login-feature svg { width: 19px; height: 19px; color: #8799b4; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 60px 40px; min-width: 0; }
.login-form { width: min(100%, 390px); }
.login-form > .brand { margin-block-end: 42px; }
.login-heading { font-size: 29px; line-height: 1.6; font-weight: 500; }
.login-subtitle { margin-block: 8px 30px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.login-form .input { min-height: 48px; }
.login-form .button.primary { min-height: 48px; margin-block-start: 24px; }
.login-form .form-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-block-start: 20px; color: var(--muted); font-size: 13px; }
.login-form .field + .field { margin-block-start: 20px; }
.login-art { margin-block-start: 40px; width: min(100%, 470px); border: 1px solid #e0e5ee; border-radius: 18px; background: rgb(255 255 255 / 70%); padding: 24px; }
.login-art .section-title { font-size: 15px; }
.login-art .activity-row { padding-block: 11px; }
.brand-watermark { position: absolute; inset-inline-start: 0; inset-block-end: -30px; font-size: 150px; font-weight: 600; line-height: 1.5; color: #e6eaf1; pointer-events: none; user-select: none; }
.login-story > :not(.brand-watermark) { z-index: 1; }
.activation-notice { margin-block: 20px; padding: 14px 16px; border: 1px solid #dbe6fc; border-radius: 10px; background: #f3f7ff; color: #57739c; font-size: 13px; line-height: 1.9; }
.error-message { color: var(--red); font-size: 13px; line-height: 1.8; }
.success-message { color: var(--green); font-size: 13px; line-height: 1.8; }
.inline-alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 17px; border: 1px solid #e6dfc9; border-radius: 10px; color: #927441; background: #fffcf2; font-size: 13px; line-height: 1.9; }
.inline-alert > svg { margin-block-start: 3px; width: 17px; height: 17px; }
.inline-alert.error { background: var(--red-soft); color: var(--red); border-color: #f1d7d9; }
.inline-alert.info { background: var(--accent-soft); color: #5273a6; border-color: #dce7fd; }
.inline-alert.success { background: var(--green-soft); color: var(--green); border-color: #d9ecdf; }
.skeleton { min-height: 17px; border-radius: 5px; background: #eceff4; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton.title { width: 45%; height: 28px; }
.skeleton.line { width: 100%; margin-block-start: 12px; }
.skeleton.circle { width: 40px; height: 40px; border-radius: 50%; }
.usage-chart { display: flex; align-items: flex-end; justify-content: space-around; gap: 16px; min-width: 0; height: 195px; margin-block: 28px 40px; padding-inline: 14px; border-block-end: 1px solid var(--line); }
.chart-bar { position: relative; flex: 1; max-width: 54px; min-width: 8px; height: var(--bar-height, var(--value, 0%)); border-radius: 5px 5px 0 0; background: #7c9fe8; }
.chart-bar.active { background: var(--accent); }
.chart-label { position: absolute; inset-block-start: calc(100% + 11px); inset-inline-start: 50%; transform: translateX(50%); color: var(--muted); font-size: 12px; white-space: nowrap; }
[dir="ltr"] .chart-label { transform: translateX(-50%); }
.usage-breakdown { display: flex; flex-direction: column; gap: 0; }
.usage-breakdown > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; font-size: 14px; }
.usage-breakdown > div + div { border-block-start: 1px solid var(--line); }
progress { display: block; appearance: none; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 9px; background: #edf0f5; }
progress::-webkit-progress-bar { background: #edf0f5; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 9px; }
.connection-card { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.connection-card + .connection-card { margin-block-start: 13px; }
.connection-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 43px; height: 43px; border-radius: 12px; background: #f1f3f7; color: #74849c; }
.connection-card h3 { font-size: 15px; font-weight: 500; }
.connection-card p { margin-block-start: 3px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.connection-card > div:not(.connection-icon) { min-width: 0; }
.connection-card > .button, .connection-card > .status { margin-inline-start: auto; }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav .nav-item { min-height: 42px; }
.settings-content { max-width: 820px; min-width: 0; }
.settings-content > .surface { padding: 25px; margin-block-end: 22px; }
.member-row { display: flex; align-items: center; gap: 13px; padding-block: 17px; min-width: 0; }
.member-row + .member-row { border-block-start: 1px solid var(--line); }
.member-row strong { font-size: 14px; font-weight: 500; }
.member-row small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.member-row > .badge, .member-row > .input, .member-row > .button { margin-inline-start: auto; }
.member-row > .input { width: auto; min-width: 120px; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: inherit; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: start; }
th { padding: 13px 20px; color: var(--muted); font-size: 12px; font-weight: 500; text-align: start; background: #fafbfd; border-block-end: 1px solid var(--line); }
td { padding: 15px 20px; color: #526074; text-align: start; border-block-end: 1px solid var(--line); }
tr:last-child td { border-block-end: 0; }
td.numeric, th.numeric { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-ltr { direction: ltr; unicode-bidi: isolate; text-align: left; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small-label { font-size: 12px; line-height: 1.8; color: var(--muted); }
.divider { height: 1px; border: 0; margin-block: 22px; background: var(--line); }
.spinner { display: inline-block; flex-shrink: 0; width: 17px; height: 17px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; opacity: .8; animation: spin .7s linear infinite; }
.flex { display: flex; align-items: center; gap: 12px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.text-end { text-align: end; }
.nowrap { white-space: nowrap; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mb-0 { margin-block-end: 0 !important; }
.mt-0 { margin-block-start: 0 !important; }
.mt-16 { margin-block-start: 16px; }
.mt-24 { margin-block-start: 24px; }
.mb-24 { margin-block-end: 24px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes skeleton-pulse { 50% { opacity: .45; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes drawer-in { from { opacity: .5; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }
[dir="ltr"] .drawer { animation-name: drawer-in-ltr; }
@keyframes drawer-in-ltr { from { opacity: .5; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) {
  .page { padding-inline: 52px; }
  .topbar { padding-inline: 52px; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 224px; }
  .sidebar { padding-inline: 12px; }
  .page { padding: 29px 28px 44px; }
  .topbar { padding-inline: 28px; }
  .dashboard-grid { gap: 20px; }
  .employee-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 17px; }
  .split-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; }
  .stat { padding-inline: 20px; }
}
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .split-layout { grid-template-columns: minmax(0, 1fr); }
  .split-layout > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .settings-nav .nav-item { width: auto; padding-inline: 15px; }
  .login-shell { grid-template-columns: .9fr 1fr; }
  .login-story { padding-inline: 38px; }
  .login-story > .brand { inset-inline-start: 38px; }
  .login-art { padding: 18px; }
}
@media (max-width: 800px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-form-panel { min-height: 100dvh; padding: 40px 24px; }
  .login-form { max-width: 400px; }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .main { margin-inline-start: 0; }
  .topbar { min-height: 65px; padding-inline: 20px; gap: 12px; }
  .topbar-actions { gap: 5px; }
  .breadcrumb { gap: 7px; font-size: 13px; }
  .breadcrumb > :first-child:not(:last-child) { max-width: 115px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search-trigger { width: 38px; height: 38px; justify-content: center; padding: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .page { padding: 25px 20px calc(105px + env(safe-area-inset-bottom)); }
  .page-header { gap: 17px; margin-block-end: 24px; }
  .page-title { font-size: 26px; }
  .page-description { font-size: 14px; line-height: 1.9; }
  .page-actions { gap: 7px; }
  .button { padding-inline: 14px; }
  .stats-strip { margin-block-end: 22px; padding-block: 19px; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .stat { padding-inline: 22px; }
  .stat:nth-child(2n) { border-inline-end: 0; }
  .stat-value { font-size: 27px; }
  .employee-grid, .knowledge-grid { gap: 16px; }
  .tabs { gap: 23px; overflow-x: auto; scrollbar-width: none; margin-block-end: 21px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; font-size: 13px; }
  .mobile-nav {
    position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); min-height: 70px;
    border-block-start: 1px solid var(--line); background: rgb(255 255 255 / 97%);
    backdrop-filter: blur(14px);
  }
  .mobile-nav > button, .mobile-nav > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 7px 4px; min-height: 52px; border: 0; border-radius: 10px; background: transparent; color: #8992a1; font-size: 11px; line-height: 1.5; text-align: center; }
  .mobile-nav > .active, .mobile-nav > [aria-current="page"] { color: var(--accent); }
  .mobile-nav svg { width: 21px; height: 21px; }
  .mobile-more, .mobile-menu-toggle { display: inline-flex; }
  .mobile-workspace { display: flex; min-width: 0; }
  .mobile-workspace .workspace-button { border: 0; min-height: 47px; padding: 0; background: transparent; }
  .mobile-workspace .workspace-avatar { width: 31px; height: 31px; }
  .sidebar.mobile-open, .sidebar.open { display: flex; width: min(290px, calc(100vw - 45px)); z-index: 150; box-shadow: var(--shadow-dialog); padding-block-start: 27px; }
  .sidebar-backdrop.active { display: block; position: fixed; inset: 0; z-index: 140; background: rgb(21 30 47 / 26%); }
  .drawer { width: 100%; }
  .drawer-header { min-height: 72px; padding: 16px 20px; }
  .drawer-body { padding: 23px 20px; }
  .drawer-footer { padding: 17px 20px calc(17px + env(safe-area-inset-bottom)); }
  .modal-backdrop { padding: 14px; }
  .modal { max-height: calc(100dvh - 28px); border-radius: 17px; }
  .modal-header { padding: 19px 21px; }
  .modal-body { padding: 23px 21px; }
  .modal-footer { padding: 17px 21px; }
  .toast-stack { inset-inline-end: 18px; inset-block-end: calc(88px + env(safe-area-inset-bottom)); width: min(410px, calc(100vw - 36px)); }
  .table-wrap th, .table-wrap td { padding-inline: 16px; }
}
@media (max-width: 540px) {
  .page-header { align-items: flex-start; flex-wrap: wrap; }
  .page-header > :first-child { flex: 1 1 200px; min-width: 0; }
  .page-header > .page-actions { flex: 0 1 auto; }
  .employee-grid, .knowledge-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { gap: 18px; }
  .form-grid > .full, .form-grid > .full-width { grid-column: auto; }
  .employee-card { min-height: 207px; padding: 22px; }
  .task-row { gap: 11px; padding: 16px; flex-wrap: wrap; }
  .task-main { flex-basis: calc(100% - 60px); }
  .task-row > .status { margin-inline-start: 0; }
  .task-meta { column-gap: 10px; font-size: 13px; }
  .surface > .section-heading { padding-inline: 18px; }
  .section-heading { gap: 12px; }
  .section-title { font-size: 16px; }
  .surface.padded, .onboarding { padding: 20px; }
  .onboarding-step { align-items: flex-start; flex-wrap: wrap; }
  .onboarding-step .step-check { margin-block-start: 3px; }
  .onboarding-step > .button { margin-inline-start: 40px; }
  .filters { gap: 8px; }
  .filters > .search-field { flex-basis: 100%; width: 100%; }
  .filters .input, .filters select { min-width: 115px; flex: 1; }
  .search-field { min-width: 0; }
  .approval-card { gap: 12px; padding: 19px; }
  .approval-card > .avatar { width: 35px; height: 35px; border-radius: 10px; }
  .approval-content .page-actions { gap: 8px; }
  .detail-header { gap: 13px; flex-wrap: wrap; }
  .detail-header h1, .detail-header h2 { font-size: 21px; }
  .detail-header .page-actions { margin-inline-start: 0; }
  .split-layout > aside { grid-template-columns: minmax(0, 1fr); }
  .empty-state { padding: 48px 23px; min-height: 260px; }
  .empty-title { font-size: 17px; }
  .empty-description { font-size: 14px; }
  .settings-content > .surface { padding: 20px; }
  .setting-row, .toggle-row { gap: 14px; align-items: flex-start; }
  .setting-row > .button { flex-shrink: 0; }
  .setting-row .switch, .toggle-row .switch { margin-block-start: 4px; }
  .connection-card { gap: 12px; padding: 18px; flex-wrap: wrap; }
  .connection-card .grow { flex-basis: calc(100% - 60px); }
  .connection-card > .button { margin-inline-start: 55px; }
  .connection-card > .status { margin-inline-start: 55px; }
  .member-row { flex-wrap: wrap; }
  .member-row > .grow { flex-basis: calc(100% - 60px); }
  .member-row > .input, .member-row > .badge { margin-inline-start: 46px; }
  .member-row > .icon-button { margin-inline-start: auto; }
  .usage-chart { gap: 10px; padding-inline: 3px; height: 160px; }
  .chart-label { font-size: 11px; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer > .button { flex: 1; }
  .modal-footer > .muted, .modal-footer > .field-hint { flex-basis: 100%; margin-block-end: 3px; }
  .drawer-footer > .button { flex: 1; }
  .login-form-panel { padding: 36px 25px; }
  .login-form > .brand { margin-block-end: 36px; }
}
@media (max-width: 390px) {
  .page { padding-inline: 16px; }
  .topbar { padding-inline: 16px; }
  .page-title { font-size: 24px; }
  .page-header { gap: 15px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 0 1 auto; }
  .topbar-actions { gap: 1px; }
  .breadcrumb { gap: 5px; font-size: 12px; }
  .breadcrumb > :first-child:not(:last-child) { max-width: 94px; }
  .stat { padding-inline: 18px; }
  .stat-value { font-size: 25px; }
  .stat-label { font-size: 12px; }
  .employee-card { padding: 20px; }
  .button { padding-inline: 13px; }
  .modal-backdrop { padding: 9px; }
  .modal { max-height: calc(100dvh - 18px); }
  .modal-header, .modal-body, .modal-footer { padding-inline: 18px; }
  .modal-header h2 { font-size: 19px; }
  .login-form-panel { padding-inline: 21px; }
  .login-heading { font-size: 27px; }
}
@media (pointer: coarse) {
  .button, .button.small, .icon-button, .tab, .menu-item, .search-trigger { min-height: 44px; }
  .icon-button, .search-trigger, .button.small { min-width: 44px; }
  .toast .icon-button { min-height: 44px; min-width: 44px; }
  .input, select.input, textarea.input { font-size: 16px; }
  .checkbox-row { min-height: 44px; }
  .task-row > .icon-button { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .page-actions, .toast-stack { display: none !important; }
  .main { margin: 0; }
  .page { max-width: none; padding: 0; }
  .surface, .employee-card, .knowledge-card { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}

/* Balanced intermediate widths; notifications stay clear of form actions. */
.stats-strip { display:grid;grid-template-columns:repeat(4,minmax(0,1fr)); }
.stat { min-width:0; }
body.dialog-open .toast-stack { inset-block-end:100px; }
@media (min-width:769px) and (max-width:1199px) { .stats-strip{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:22px}.stat:nth-child(2n){border-inline-end:0} }
@media (max-width:960px) and (min-width:769px) {
  :root{--sidebar-width:0px}.sidebar{display:none}.main{margin-inline-start:0}.topbar{padding-inline:24px}.page{padding-bottom:105px}
  .mobile-menu-toggle{display:inline-flex}.sidebar.mobile-open{display:flex;width:290px;z-index:150;box-shadow:var(--shadow-dialog)}
  .mobile-nav{position:fixed;inset-inline:0;inset-block-end:0;z-index:60;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:7px 12px;min-height:70px;border-block-start:1px solid var(--line);background:#fff}
  .mobile-nav>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 4px;min-height:52px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:12px}.mobile-nav>.active{color:var(--accent)}
  .sidebar-backdrop.active{display:block;position:fixed;inset:0;z-index:140;background:rgb(21 30 47 / 26%)}
}
@media(max-width:768px){.stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:960px){.breadcrumb{min-width:0;flex:1}.breadcrumb>span:first-of-type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}.topbar-actions{flex-shrink:0}}
@media(max-width:640px){.topbar-actions>.button{display:none}.breadcrumb>span:first-of-type{max-width:140px}}
