:root {
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
  --background: #f7f7fc;
  --surface: #fff;
  --surface-alt: #faf9fe;
  --surface-hover: #f8f6ff;
  --text: #201b35;
  --muted: #625d75;
  --muted-soft: #746f88;
  --border: #e9e6f2;
  --border-strong: #ded9ec;
  --accent: #6746e9;
  --accent-hover: #5533d6;
  --accent-text: #5d3bd4;
  --accent-soft: #f0ebff;
  --accent-ring: #ac98ff;
  --sidebar: #1c1732;
  --sidebar-text: #d6cfe9;
  --sidebar-muted: #aca0c5;
  --sidebar-active: #382956;
  --sidebar-highlight: #d5c1ff;
  --danger: #c53255;
  --danger-hover: #a91e43;
  --danger-soft: #fff0f4;
  --shadow: 0 1px 2px #281d4510, 0 10px 26px #24164b03;
  --floating-shadow: 0 15px 55px #20143322, 0 3px 10px #2516350e;
  --sidebar-width: 222px;
  --gutter: clamp(22px, 3.15vw, 52px);
  --navbar-height: 66px;
  --radius: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #161522;
  --surface: #201d30;
  --surface-alt: #252135;
  --surface-hover: #2d2641;
  --text: #f5f0ff;
  --muted: #bdb2d0;
  --muted-soft: #a79bbd;
  --border: #362f48;
  --border-strong: #4b405f;
  --accent: #7653ee;
  --accent-hover: #8969f7;
  --accent-text: #c3aeff;
  --accent-soft: #382957;
  --accent-ring: #b69eff;
  --sidebar: #171326;
  --sidebar-text: #d9d1ed;
  --sidebar-muted: #a99bc3;
  --sidebar-active: #3a2b58;
  --sidebar-highlight: #dacbff;
  --danger: #dd4b72;
  --danger-hover: #e7668a;
  --danger-soft: #432438;
  --shadow: 0 1px 2px #05030844;
  --floating-shadow: 0 16px 60px #0008, 0 3px 10px #0006;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--text); }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
::selection { background: #aa92f6; color: #17112d; }
.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;
}
.muted { color: var(--muted); }
.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-color: currentColor;
  mask-image: url("/icons.png");
  mask-size: 800% 500%;
  mask-repeat: no-repeat;
  vertical-align: middle;
}
.i-layers { mask-position: 0.000000% 0.000000%; }
.i-inbox { mask-position: 14.285714% 0.000000%; }
.i-chat { mask-position: 28.571429% 0.000000%; }
.i-bell { mask-position: 42.857143% 0.000000%; }
.i-users { mask-position: 57.142857% 0.000000%; }
.i-building { mask-position: 71.428571% 0.000000%; }
.i-moon { mask-position: 85.714286% 0.000000%; }
.i-sun { mask-position: 100.000000% 0.000000%; }
.i-plus { mask-position: 0.000000% 25.000000%; }
.i-all { mask-position: 14.285714% 25.000000%; }
.i-clock { mask-position: 28.571429% 25.000000%; }
.i-progress { mask-position: 42.857143% 25.000000%; }
.i-check-circle { mask-position: 57.142857% 25.000000%; }
.i-cancel-circle { mask-position: 71.428571% 25.000000%; }
.i-search { mask-position: 85.714286% 25.000000%; }
.i-chevron { mask-position: 100.000000% 25.000000%; }
.i-right { mask-position: 0.000000% 50.000000%; }
.i-dots { mask-position: 14.285714% 50.000000%; }
.i-close { mask-position: 28.571429% 50.000000%; }
.i-link { mask-position: 42.857143% 50.000000%; }
.i-clip { mask-position: 57.142857% 50.000000%; }
.i-send { mask-position: 71.428571% 50.000000%; }
.i-globe { mask-position: 85.714286% 50.000000%; }
.i-menu { mask-position: 100.000000% 50.000000%; }
.i-user { mask-position: 0.000000% 75.000000%; }
.i-key { mask-position: 14.285714% 75.000000%; }
.i-logout { mask-position: 28.571429% 75.000000%; }
.i-edit { mask-position: 42.857143% 75.000000%; }
.i-trash { mask-position: 57.142857% 75.000000%; }
.i-flag { mask-position: 71.428571% 75.000000%; }
.i-check { mask-position: 85.714286% 75.000000%; }
.i-settings { mask-position: 100.000000% 75.000000%; }
.i-folder { mask-position: 0.000000% 100.000000%; }
.i-sliders { mask-position: 14.285714% 100.000000%; }
.i-download { mask-position: 28.571429% 100.000000%; }
.i-archive { mask-position: 42.857143% 100.000000%; }
.i-back { mask-position: 57.142857% 100.000000%; }
.i-external { mask-position: 71.428571% 100.000000%; }
.i-info { mask-position: 85.714286% 100.000000%; }
.i-refresh { mask-position: 100.000000% 100.000000%; }

.layout { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 10;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background: var(--sidebar);
  color: var(--sidebar-text);
}
.sidebar-brand, .startup-brand, .auth-brand, .auth-art-brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  font-weight: 750;
  font-size: 1.37rem;
  letter-spacing: -.045em;
}
.sidebar-brand { align-self: flex-start; color: #fff; margin: 0 10px 30px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #9974ff, #6747ef);
  color: #fff;
  box-shadow: 0 4px 10px #7654f13b, inset 0 1px #fff4;
}
.brand-mark .icon { width: 23px; height: 23px; }
.navigation { display: grid; gap: 5px; }
.nav-label {
  padding: 0 11px 4px;
  color: var(--sidebar-muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.admin-nav-title { padding-top: 25px; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: .91rem;
  font-weight: 550;
}
.nav-link > .icon { color: var(--sidebar-muted); }
.nav-link:hover { background: #ffffff0c; color: white; }
.nav-link.is-active { background: var(--sidebar-active); color: #f9f5ff; }
.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 18px;
  border-radius: 0 5px 5px 0;
  background: #ae86ff;
}
.nav-link.is-active > .icon { color: var(--sidebar-highlight); }
.unread-badge {
  background: var(--accent);
  color: #fff;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  min-width: 19px;
  min-height: 19px;
  padding: 1px 4px;
  font-size: .71rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.nav-link .unread-badge { margin-left: auto; background: #573e84; color: #f0e8ff; }
.sidebar-foot { margin-top: auto; }
.sidebar-language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--sidebar-muted);
  padding: 0 10px 15px;
}
.sidebar-language > .icon { width: 17px; height: 17px; }
.language-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.language-switch button {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 27px;
  padding: 3px 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.language-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow); }
.sidebar-language .language-switch { background: #171127; border-color: #ffffff14; }
.sidebar-language .language-switch button { color: var(--sidebar-muted); }
.sidebar-language .language-switch button[aria-pressed="true"] { color: #f5eeff; background: #463360; }
.account-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 2px;
  text-align: left;
  border: 0;
  border-top: 1px solid #ffffff1c;
  color: var(--sidebar-text);
  background: transparent;
}
.account-button:hover strong { color: #fff; }
.account-text { display: grid; gap: 4px; min-width: 0; flex: 1 1 auto; }
.account-text strong, .account-text small { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.account-text strong { font-size: .83rem; }
.account-text small { color: var(--sidebar-muted); font-size: .72rem; white-space: normal; line-height: 1.2; }
.account-button > .icon { width: 16px; height: 16px; color: var(--sidebar-muted); }

.main-area { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: var(--navbar-height);
  padding: 0 var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs, .top-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumbs { font-size: .875rem; color: var(--muted); }
.breadcrumbs strong { color: var(--text); font-weight: 700; }
.breadcrumbs > .icon { width: 13px; height: 13px; color: var(--muted-soft); }
.top-actions { gap: 10px; }
.demo-label {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .75rem;
  font-weight: 680;
  white-space: nowrap;
  margin-right: 3px;
}
.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
}
.icon-button:hover { color: var(--accent-text); background: var(--surface-hover); border-color: var(--border-strong); }
.bell-button .icon { width: 19px; height: 19px; }
.bell-badge {
  position: absolute; top: -5px; right: -5px; border: 1.5px solid var(--surface);
  min-width: 17px; min-height: 17px; font-size: .63rem;
}
.mobile-nav, .nav-scrim { display: none; }
.workspace { padding: 28px var(--gutter) 46px; max-width: 1660px; margin-inline: auto; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 209px;
  padding: 24px clamp(22px, 3vw, 38px) 26px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(108deg, #5e40df 0%, #6038dd 52%, #542cc9 86%);
  box-shadow: 0 10px 26px #5633d221, inset 0 1px #ffffff30;
}
.hero::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 1% 115%, #b47bff59, transparent 55%),
    radial-gradient(circle at 70% -15%, #ad91ff6b, transparent 42%);
}
.hero-image {
  position: absolute;
  z-index: -1;
  width: 414px;
  inset: -48px 22px -49px auto;
  background: url("/hero.webp") center right / 100% auto no-repeat;
  mask-image: linear-gradient(90deg, transparent 0, #000 29%, #000 94%, transparent 100%);
}
.hero-content { max-width: 67%; }
.hero-context {
  display: flex; gap: 6px; align-items: center;
  margin: 0 0 6px;
  color: #f4ecff;
  font-size: .78rem;
  font-weight: 730;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.hero-context .icon { width: 16px; height: 16px; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.08rem, 3.45vw, 3.12rem);
  font-weight: 780;
  letter-spacing: -.055em;
  line-height: 1.12;
}
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin: 8px 0 16px; color: #f4edff; font-size: .91rem; }
.hero-meta > span { color: #d4c1ff; }
:root[data-theme="dark"] .hero { background: linear-gradient(108deg, #5038c0, #552dc2 62%, #5029b9); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.button .icon { width: 18px; height: 18px; }
.button.primary { color: #fff; background: var(--accent); box-shadow: 0 2px 4px #5f3ed92a; }
.button.primary:hover:enabled { background: var(--accent-hover); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.button.secondary:hover:enabled, .button.subtle:hover:enabled { background: var(--surface-hover); color: var(--accent-text); }
.button.subtle { color: var(--accent-text); background: transparent; }
.button.danger { color: #fff; background: var(--danger); }
.button.danger:hover:enabled { background: var(--danger-hover); }
.button.hero-button { min-height: 40px; color: #4223a9; background: #fff; box-shadow: 0 3px 10px #2f16864f; }
.button.hero-button:hover { background: #f1eaff; }

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin: 19px 0 22px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.15vw, 17px);
  min-height: 83px;
  padding: 13px clamp(9px, 1.25vw, 17px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}
.stat-card:hover { border-color: var(--accent-ring); background: var(--surface-hover); }
.stat-card[aria-pressed="true"] { border-color: var(--accent-ring); background: var(--surface-hover); box-shadow: inset 0 0 0 1px #af96ff22; }
.stat-icon, .org-icon, .notification-icon, .empty-icon, .file-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  color: var(--tone-text, var(--accent-text));
  background: var(--tone-bg, var(--accent-soft));
  border-radius: 12px;
}
.stat-icon { width: 42px; height: 42px; }
.stat-icon .icon { width: 21px; height: 21px; }
.stat-text { display: grid; gap: 2px; min-width: 0; }
.stat-count { font-size: 1.54rem; font-weight: 780; letter-spacing: -.045em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .84rem; line-height: 1.2; font-weight: 550; }
.stat-all, .tone-1, .role-admin { --tone-text: #6340de; --tone-bg: #eee7ff; }
.stat-todo, .tone-2, .role-executor { --tone-text: #355aba; --tone-bg: #e8efff; }
.stat-progress, .tone-5 { --tone-text: #9a4f06; --tone-bg: #ffefd9; }
.stat-done, .tone-3 { --tone-text: #117352; --tone-bg: #e3f8ed; }
.stat-canceled, .tone-4 { --tone-text: #a93662; --tone-bg: #ffebf2; }
.tone-0, .role-submitter { --tone-text: #5f517b; --tone-bg: #f0eaf7; }
:root[data-theme="dark"] :is(.stat-all, .tone-1, .role-admin) { --tone-text: #d0bcff; --tone-bg: #412c66; }
:root[data-theme="dark"] :is(.stat-todo, .tone-2, .role-executor) { --tone-text: #b4c9ff; --tone-bg: #293b62; }
:root[data-theme="dark"] :is(.stat-progress, .tone-5) { --tone-text: #ffd08d; --tone-bg: #52391e; }
:root[data-theme="dark"] :is(.stat-done, .tone-3) { --tone-text: #9ce7c6; --tone-bg: #234737; }
:root[data-theme="dark"] :is(.stat-canceled, .tone-4) { --tone-text: #ffb6d1; --tone-bg: #4f2a45; }
:root[data-theme="dark"] :is(.tone-0, .role-submitter) { --tone-text: #e1caef; --tone-bg: #3d3355; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--tone-bg);
  color: var(--tone-text);
  font-size: .61rem;
  font-weight: 760;
  letter-spacing: -.02em;
}
.avatar-md { width: 35px; height: 35px; font-size: .76rem; }
.account-button .avatar { background: #6345a0; color: white; }
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.queue-header, .queue-toolbar, .page-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding-inline: 19px;
}
.queue-header { justify-content: space-between; min-height: 52px; padding-top: 10px; }
.queue-title { display: flex; gap: 10px; align-items: center; }
.queue-title h2 { margin: 0; font-weight: 750; letter-spacing: -.029em; font-size: 1.13rem; }
.results-count, .mini-count {
  background: var(--accent-soft); color: var(--accent-text); padding: 4px 8px; border-radius: 999px;
  font-size: .73rem; font-weight: 680; white-space: nowrap;
}
.filter-reset { min-height: 33px; padding: 5px 9px; font-size: .8rem; }
.queue-toolbar { justify-content: space-between; padding-top: 5px; padding-bottom: 13px; }
.search-box {
  display: flex; align-items: center; min-height: 39px; gap: 8px; padding: 0 11px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 9px; color: var(--muted-soft);
  min-width: 0;
}
.search-box:focus-within { border-color: var(--accent-ring); box-shadow: 0 0 0 2px var(--accent-soft); }
.search-box .icon { width: 17px; height: 17px; }
.search-box input {
  width: 100%; min-width: 0; border: 0; background: transparent; outline: none;
  color: var(--text); font-size: .875rem;
}
.search-box input::placeholder { color: var(--muted-soft); }
.queue-toolbar .search-box { flex: 1; max-width: 360px; }
.filters { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inline-select {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 39px; padding-left: 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  white-space: nowrap; color: var(--muted); font-size: .81rem;
}
.inline-select > span:first-child { pointer-events: none; }
.inline-select select {
  min-width: 0; max-width: 132px; appearance: none; align-self: stretch; border: 0;
  background: transparent; color: var(--text); padding: 0 26px 0 2px; border-radius: 8px; font-weight: 650;
  cursor: pointer;
}
.inline-select .icon { position: absolute; pointer-events: none; right: 7px; width: 15px; height: 15px; }
.filters .icon-button { width: 39px; height: 39px; }
.filters .icon-button .icon { width: 17px; height: 17px; }

.table-scroller { overflow-x: auto; }
.task-table, .data-table { border-collapse: collapse; width: 100%; }
.task-table { table-layout: fixed; font-size: .86rem; }
.task-table th, .data-table th {
  padding: 12px 9px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: left; background: var(--surface-alt); color: var(--muted);
  font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .048em;
}
.task-table td { padding: 10px 9px; border-bottom: 1px solid var(--border); height: 59px; }
.task-table tbody:last-child tr:last-child td, .data-table tbody tr:last-child td { border-bottom: 0; }
.task-row:is(:hover, :focus-within) { background: var(--surface-hover); }
.task-table :is(th, td):first-child { padding-left: 18px; }
.task-table :is(th, td):last-child { padding-right: 12px; }
.task-table .col-task { width: 26%; }
.task-table .col-project { width: 12%; }
.task-table .col-requester { width: 11%; }
.task-table .col-assignee { width: 13%; }
.task-table .col-queue { width: 7.5%; }
.task-table .col-priority { width: 8.5%; }
.task-table .col-status { width: 12.5%; }
.task-table .col-updated { width: 5.5%; }
.task-table .col-actions { width: 4%; }
.task-table td.col-project, .task-table td.col-requester, .task-table td.col-queue, .task-table td.col-updated { color: var(--muted); }
.task-table td.col-queue, .task-table td.col-updated { font-size: .79rem; }
.task-table td.col-updated { white-space: nowrap; }
.task-table .table-group td { border-bottom: 1px solid var(--border); padding: 0; height: auto; }
.table-group button {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%;
  min-height: 34px; border: 0; padding: 4px 15px; color: var(--muted); background: var(--surface-alt);
  text-align: left; font-size: .77rem; font-weight: 750;
}
.table-group button:hover { color: var(--accent-text); background: var(--surface-hover); }
.table-group .icon { width: 15px; height: 15px; }
.group-dot, .status-dot, .meta-dot, .unread-dot { display: inline-block; flex: 0 0 auto; border-radius: 50%; }
.group-dot { width: 7px; height: 7px; background: var(--group-color, #9c80ed); }
.group-todo { --group-color: #7896e7; }
.group-progress, .group-medium { --group-color: #dc8e2a; }
.group-done, .group-low { --group-color: #3cb388; }
.group-canceled, .group-high { --group-color: #e486a3; }
.group-count { padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: .69rem; }
.cell-truncate { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enquiry-link { display: block; max-width: max-content; font-size: .89rem; line-height: 1.28; font-weight: 730; }
.enquiry-link:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.task-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  color: var(--muted-soft); font-size: .72rem; white-space: nowrap;
}
.task-key { font-variant-numeric: tabular-nums; font-weight: 680; }
.meta-dot { width: 3px; height: 3px; margin-inline: 1px; background: currentColor; opacity: .65; vertical-align: middle; }
.task-org { overflow: hidden; text-overflow: ellipsis; }
.attachment-count { display: inline-flex; align-items: center; gap: 1px; }
.attachment-count .icon { width: 13px; height: 13px; }
.person-cell { display: inline-flex; gap: 7px; align-items: center; min-width: 0; max-width: 100%; }
.priority-pill, .status-pill, .status-select, .role-chip, .account-status {
  display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%;
  min-height: 25px; padding: 3px 7px; border-radius: 7px; font-size: .75rem;
  font-weight: 700; white-space: nowrap; line-height: 1.2;
}
.priority-pill .icon { width: 13px; height: 13px; }
.priority-pill { color: var(--priority-text); background: var(--priority-bg); }
.priority-high { --priority-text: #ad3251; --priority-bg: #ffedf2; }
.priority-medium { --priority-text: #925211; --priority-bg: #fff1de; }
.priority-low { --priority-text: #35647c; --priority-bg: #eaf5fa; }
.status-pill, .status-select { color: var(--status-text); background: var(--status-bg); }
.status-dot { width: 6px; height: 6px; background: var(--status-dot); }
.status-todo { --status-text: #3e59ac; --status-bg: #ebf0ff; --status-dot: #6284e1; }
.status-progress { --status-text: #95540d; --status-bg: #fff0d9; --status-dot: #dc922e; }
.status-done { --status-text: #146b4c; --status-bg: #e3f8ed; --status-dot: #31a477; }
.status-canceled { --status-text: #755668; --status-bg: #f2eaf1; --status-dot: #b98fa8; }
:root[data-theme="dark"] .priority-high { --priority-text: #ffb3c7; --priority-bg: #4c273d; }
:root[data-theme="dark"] .priority-medium { --priority-text: #ffd09c; --priority-bg: #513a26; }
:root[data-theme="dark"] .priority-low { --priority-text: #b7e6fe; --priority-bg: #263b4b; }
:root[data-theme="dark"] .status-todo { --status-text: #bdcfff; --status-bg: #2b3860; --status-dot: #8ba4fb; }
:root[data-theme="dark"] .status-progress { --status-text: #ffd092; --status-bg: #52391e; --status-dot: #f2ad52; }
:root[data-theme="dark"] .status-done { --status-text: #a5edcf; --status-bg: #234737; --status-dot: #68caa3; }
:root[data-theme="dark"] .status-canceled { --status-text: #ebc8de; --status-bg: #433344; --status-dot: #c194b0; }
.status-select { position: relative; padding-block: 0; padding-inline: 7px 0; }
.status-select:hover { filter: saturate(1.28); }
.status-select > select {
  appearance: none; border: 0; background: transparent; color: inherit;
  font: inherit; min-height: 27px; padding: 2px 21px 2px 0; cursor: pointer; border-radius: 6px;
}
.status-select > .icon { pointer-events: none; position: absolute; right: 5px; width: 13px; height: 13px; }
.status-select .status-dot { pointer-events: none; }
select option { color: var(--text); background: var(--surface); }
.col-actions .icon-button { width: 30px; height: 32px; border-color: transparent; background: transparent; }
.col-actions .icon-button .icon { width: 17px; height: 17px; }
.col-actions .icon-button:hover, .col-actions .icon-button[aria-expanded="true"] { border-color: var(--border); background: var(--surface-hover); }
.tint-priority .task-row[data-priority="high"], .tint-status .task-row[data-status="canceled"] { --row-tint: #e7578a; }
.tint-priority .task-row[data-priority="medium"], .tint-status .task-row[data-status="progress"] { --row-tint: #f1ae4c; }
.tint-priority .task-row[data-priority="low"], .tint-status .task-row[data-status="todo"] { --row-tint: #7092ec; }
.tint-status .task-row[data-status="done"] { --row-tint: #44c391; }
.task-row:where([data-status]) { background-color: color-mix(in srgb, var(--row-tint, transparent) 8%, var(--surface)); }
.task-row:where([data-status]):hover { background-color: var(--surface-hover); }
.task-row td:first-child { box-shadow: inset 2px 0 color-mix(in srgb, var(--row-tint, transparent) 73%, transparent); }
.queue .table-scroller, .team-panel .table-scroller { border-radius: 0 0 var(--radius) var(--radius); }

.empty-state { display: grid; justify-items: center; gap: 9px; padding: 44px 20px; text-align: center; color: var(--text); }
.empty-state h3 { margin: 3px 0 0; font-size: 1.05rem; letter-spacing: -.02em; }
.empty-state p { margin: 0 0 5px; color: var(--muted); font-size: .88rem; }
.empty-icon { width: 45px; height: 45px; border-radius: 14px; }
.empty-icon .icon { width: 22px; height: 22px; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin: 3px 0 23px; }
.page-heading h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 780; letter-spacing: -.052em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); font-size: .95rem; }
.page-heading .button { flex: 0 0 auto; margin-bottom: 2px; }
.page-toolbar { min-height: 65px; }
.page-toolbar .search-box { width: min(100%, 340px); }
.data-table { font-size: .875rem; }
.data-table td { height: 61px; padding: 11px; border-bottom: 1px solid var(--border); }
.data-table :is(td, th):first-child { padding-left: 19px; min-width: 175px; }
.data-table :is(td, th):last-child { padding-right: 16px; }
.data-table tr:hover td { background: var(--surface-hover); }
.data-table td strong { font-weight: 700; }
.inline-actions { display: flex; gap: 5px; }
.inline-actions .icon-button { width: 33px; height: 33px; }
.inline-actions .icon-button .icon { width: 16px; height: 16px; }
.role-chip { color: var(--tone-text); background: var(--tone-bg); }
.account-status.active { color: var(--tone-text); background: var(--tone-bg); --tone-text: #117352; --tone-bg: #e3f8ed; }
.account-status.archived { color: var(--muted); background: var(--surface-alt); border: 1px solid var(--border); }
:root[data-theme="dark"] .account-status.active { --tone-text: #9ce7c6; --tone-bg: #234737; }
.org-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.org-card { padding: 19px; }
.org-top { display: flex; align-items: start; justify-content: space-between; gap: 9px; }
.org-icon { width: 43px; height: 43px; }
.org-card h2 { margin: 16px 0 4px; font-size: 1.15rem; letter-spacing: -.025em; }
.org-card p { margin: 0 0 18px; color: var(--muted); font-size: .88rem; }

.messenger { display: grid; grid-template-columns: minmax(200px, 290px) 1fr; overflow: hidden; min-height: 486px; height: min(70vh, 760px); }
.contacts { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); }
.contact-search { padding: 13px; border-bottom: 1px solid var(--border); }
.contact-list { display: grid; align-content: start; gap: 2px; padding: 8px; overflow: auto; }
.contact {
  display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); text-align: left;
}
.contact:hover { background: var(--surface-hover); }
.contact-active { border-color: var(--border-strong); background: var(--surface-hover); }
.contact-info { display: grid; min-width: 0; flex: 1; gap: 4px; }
.contact-info strong { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact small { color: var(--muted); font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-side { display: grid; justify-items: end; gap: 4px; max-width: 87px; }
.contact-side .unread-badge { min-width: 16px; min-height: 16px; }
.list-empty { margin: 0; padding: 13px; color: var(--muted); font-size: .875rem; }
.chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-empty { display: grid; flex: 1; place-items: center; background: var(--surface-alt); }
.chat-header { display: flex; align-items: center; gap: 9px; min-height: 65px; padding: 10px 15px; border-bottom: 1px solid var(--border); }
.chat-header h2 { font-size: .97rem; margin: 0 0 1px; }
.chat-header p { color: var(--muted); margin: 0; font-size: .78rem; }
.chat-back { display: none; }
.chat-history {
  flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column;
  gap: 11px; background: var(--surface-alt);
}
.chat-history .empty-state { margin: auto; }
.earlier-messages { text-align: center; margin-bottom: 5px; }
.bubble {
  align-self: flex-start; max-width: min(83%, 530px); min-width: 105px;
  padding: 10px 11px 7px; border-radius: 14px 14px 14px 4px; border: 1px solid var(--border);
  background: var(--surface); overflow-wrap: anywhere;
}
.bubble-mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--accent-soft); border-color: transparent; }
.bubble-text { white-space: pre-wrap; line-height: 1.45; font-size: .91rem; }
.bubble time { display: block; margin-top: 4px; text-align: right; font-size: .73rem; color: var(--muted); }
.chat-form {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px;
  padding: 11px; border-top: 1px solid var(--border);
}
.chat-form textarea { min-height: 41px; max-height: 130px; }
.chat-form .button { min-width: 43px; min-height: 41px; }
.chat-form .form-error { grid-column: 1 / -1; }
.chat-form-readonly { padding: 13px; font-size: .85rem; color: var(--muted); }

.tabs { display: flex; gap: 8px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.tab {
  border: 0; padding: 7px 11px; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: .875rem; font-weight: 700;
}
.tab[aria-pressed="true"], .tab:hover { background: var(--accent-soft); color: var(--accent-text); }
.notification {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 68px; padding: 13px 17px;
  color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--border); text-align: left;
}
.notification:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.notification-unread, .notification:hover { background: var(--surface-hover); }
.notification-icon { width: 36px; height: 36px; border-radius: 10px; }
.notification-icon .icon { width: 18px; height: 18px; }
.notification-content { flex: 1; min-width: 0; display: grid; gap: 4px; }
.notification-content strong { font-size: .9rem; }
.notification-content > span, .notification time { color: var(--muted); font-size: .78rem; }
.unread-dot { width: 7px; height: 7px; background: var(--accent); }

.floating-menu {
  position: fixed;
  z-index: 25;
  display: grid;
  gap: 2px;
  min-width: 179px;
  max-width: min(300px, calc(100vw - 20px));
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--floating-shadow);
  color: var(--text);
}
.menu-item {
  text-align: left; display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 34px;
  border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: .83rem; font-weight: 590;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-hover); }
.menu-item:focus-visible { outline-offset: -2px; }
.menu-item .icon { width: 16px; height: 16px; color: var(--muted-soft); }
.menu-item.danger-ink, .menu-item.danger-ink .icon { color: var(--danger); }
.menu-divider { height: 1px; margin: 2px 5px; background: var(--border); }
.menu-label { padding: 6px 9px 3px; color: var(--muted); font-size: .74rem; font-weight: 750; }

dialog {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0;
  box-shadow: var(--floating-shadow);
  overflow: hidden;
}
dialog[open] { display: flex; }
dialog::backdrop { background: #170f32a1; backdrop-filter: blur(2px); }
.dialog-modal { width: min(530px, calc(100vw - 26px)); max-height: min(87dvh, 880px); border-radius: 17px; }
.dialog-drawer {
  inset: 0 0 0 auto; margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh;
  width: min(100%, 588px); max-width: 100vw; border-block: 0; border-right: 0; border-radius: 19px 0 0 19px;
}
.dialog-frame { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.dialog-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border); padding: 18px 22px; flex: 0 0 auto;
}
.dialog-header h2 { margin: 0; font-size: clamp(1.24rem, 3.5vw, 1.5rem); line-height: 1.2; letter-spacing: -.035em; }
.dialog-header .icon-button { width: 33px; height: 33px; }
.dialog-header .icon-button .icon { width: 16px; height: 16px; }
.dialog-lead { margin-bottom: 7px; }
.detail-key {
  display: inline-block; color: var(--accent-text); border-radius: 7px; background: var(--accent-soft);
  padding: 3px 6px; font-size: .73rem; font-weight: 750; letter-spacing: .03em;
}
.dialog-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.dialog-body { overflow: auto; padding: 19px 22px 22px; }
.dialog-drawer .dialog-body { flex: 1; }
.dialog-footer { border-top: 1px solid var(--border); padding: 13px 22px; background: var(--surface); flex-shrink: 0; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dialog-footer .form-error:not([hidden]), .dialog-footer .field-hint { margin: 0 0 9px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0,1fr); column-gap: 13px; row-gap: 14px; align-content: start; }
.field-span { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 13px; align-content: start; }
.form-stack > p { margin: 0; }
.field { display: grid; align-content: start; min-width: 0; gap: 6px; color: var(--text); font-size: .875rem; font-weight: 680; }
.required { color: var(--danger); }
.field input:not([type="checkbox"], [type="file"]), .field textarea, .field select, .chat-form textarea, .comment-form textarea {
  width: 100%; min-width: 0; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text);
  background: var(--surface-alt); font-weight: 520; padding: 9px 10px; font-size: .9rem;
}
.field :is(input, select) { min-height: 40px; }
.field :is(input, textarea)::placeholder, .chat-form textarea::placeholder, .comment-form textarea::placeholder { color: var(--muted-soft); }
.field :is(input, textarea, select):focus, .chat-form textarea:focus, .comment-form textarea:focus {
  border-color: var(--accent-ring); outline: 2px solid var(--accent-soft); outline-offset: 1px;
}
.field select:disabled { opacity: .65; cursor: not-allowed; }
.select-field, .prefixed-input { position: relative; display: block; }
.select-field select { appearance: none; padding-right: 31px; }
.select-field .icon { position: absolute; right: 8px; top: 12px; width: 16px; height: 16px; color: var(--muted-soft); pointer-events: none; }
.prefixed-input > span { position: absolute; top: 10px; left: 10px; color: var(--muted-soft); }
.field .prefixed-input input { padding-left: 28px; }
.field textarea, .comment-form textarea { min-height: 75px; resize: vertical; }
.field-hint { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; font-weight: 500; }
.form-error {
  margin: 0;
  padding: 8px 10px; color: var(--danger); background: var(--danger-soft); border-radius: 7px;
  font-size: .83rem; font-weight: 600;
}
.confirm-body { display: grid; gap: 8px; }
.confirm-body p { margin: 0; line-height: 1.5; }
.confirm-body p:first-child { font-weight: 700; }
.checklist { margin: 0; border: 1px solid var(--border); border-radius: 9px; padding: 9px; min-width: 0; }
.checklist legend { padding: 0 5px; font-size: .85rem; font-weight: 680; }
.checklist-items { display: grid; max-height: 220px; overflow: auto; gap: 4px; }
.checkbox { display: flex; align-items: center; gap: 7px; padding: 4px 3px; font-size: .875rem; }
.checkbox input { accent-color: var(--accent); }
.drop-zone {
  position: relative; display: flex; gap: 9px; align-items: center; min-height: 66px; padding: 8px 10px;
  border: 1px dashed var(--border-strong); border-radius: 9px; background: var(--surface-alt);
  color: var(--muted); font-size: .82rem; font-weight: 500; cursor: pointer;
}
.drop-zone:is(:hover, .drag-over, :focus-within) { border-color: var(--accent-ring); background: var(--surface-hover); }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone strong, .text-link { color: var(--accent-text); font-weight: 680; }
.text-link:hover { text-decoration: underline; }
.drop-zone small { display: block; margin-top: 2px; }
.files-list { display: grid; gap: 5px; }
.file-item {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 7px;
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
a.file-item:hover { background: var(--surface-hover); }
.file-icon { width: 27px; height: 27px; border-radius: 7px; }
.file-icon .icon { width: 16px; height: 16px; }
.file-name { min-width: 0; flex: 1; display: grid; gap: 2px; }
.file-name strong { font-size: .83rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name small { font-size: .71rem; color: var(--muted); }
.file-item > .icon { width: 17px; height: 17px; margin-inline: 3px; color: var(--muted); }
.file-item .icon-button { width: 27px; height: 27px; }
.file-item .icon-button .icon { width: 14px; height: 14px; }

.detail-body { display: grid; gap: 18px; align-content: start; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.detail-action-space { flex: 1; }
.detail-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-alt);
}
.detail-grid dt { color: var(--muted); font-size: .78rem; margin: 0 0 3px; }
.detail-grid dd { margin: 0; font-size: .91rem; font-weight: 620; overflow-wrap: anywhere; }
.detail-section > h3 { display: flex; gap: 7px; align-items: center; margin: 0 0 8px; font-size: .98rem; }
.detail-section p { margin: 0; }
.detail-section .muted { font-size: .875rem; }
.task-description, .comment p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: .9rem; }
.comment-section { display: grid; gap: 8px; }
.comment-section > h3 { margin-bottom: 0; }
.comment-list { display: grid; gap: 8px; }
.comment {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 9px;
}
.comment > div { min-width: 0; flex: 1; }
.comment-header { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 0 0 4px; }
.comment-header strong { font-size: .85rem; }
.comment-header time { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.comment-form { display: grid; gap: 5px; }
.comment-form .button { justify-self: end; }
.toast {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: var(--floating-shadow);
  font-size: .87rem; font-weight: 630; max-width: min(420px, calc(100vw - 30px));
}
.toast .icon { color: #2ca87e; width: 18px; height: 18px; }
.toast-error .icon { color: var(--danger); }
.toasts { position: fixed; z-index: 30; right: 14px; bottom: 14px; display: grid; gap: 6px; pointer-events: none; }
body:has(dialog[open]) .toasts { bottom: auto; top: 8px; }

.startup { display: grid; align-content: center; justify-items: center; gap: 14px; min-height: 100vh; color: var(--muted); padding: 24px; text-align: center; }
.startup-brand { color: var(--text); }
.startup p { margin: 0; color: var(--muted); }
.loading-line { width: 62px; height: 4px; border-radius: 7px; background: var(--accent-soft); overflow: hidden; }
.loading-line::before { content: ""; display: block; width: 45%; height: 4px; border-radius: 7px; background: var(--accent); animation: progress-line .8s ease-in-out infinite alternate; }
@keyframes progress-line { from { transform: translateX(-50%); } to { transform: translateX(165%); } }
.auth-layout { display: grid; grid-template-columns: minmax(260px, 43%) 1fr; min-height: 100vh; }
.auth-art { position: relative; isolation: isolate; overflow: hidden; background: #582dcc; color: #fff; padding: 45px clamp(25px, 4vw, 62px); }
.auth-art-brand { position: relative; }
.auth-art-title { position: relative; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.05; max-width: 440px; font-weight: 770; letter-spacing: -.055em; margin: 42px 0; }
.auth-art-image {
  position: absolute; z-index: -1; inset: 22% -10% 2% 0;
  background: url("/hero.webp") center right / min(100%, 660px) auto no-repeat;
  mask-image: linear-gradient(180deg, transparent 2%, black 35%, black 80%, transparent 100%);
}
.auth-main { position: relative; display: grid; place-items: center; padding: 70px 24px 30px; }
.auth-toolbar { position: absolute; inset: 17px 17px auto auto; display: flex; gap: 8px; }
.auth-panel {
  width: min(400px, 100%); display: grid; gap: 15px; padding: 23px;
  border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow);
}
.auth-brand { color: var(--text); }
.auth-panel h1 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: -.04em; }
.auth-form { display: grid; gap: 12px; }
.auth-form > .button { margin-top: 3px; }
.demo-enter { width: 100%; }

@media (min-width: 1280px) {
  .task-table .col-task { width: 24%; }
  .task-table .col-project { width: 11%; }
  .task-table .col-requester { width: 10%; }
  .task-table .col-assignee { width: 12%; }
  .task-table .col-queue { width: 8%; }
  .task-table .col-priority { width: 9%; }
  .task-table .col-status { width: 12.5%; }
  .task-table .col-updated { width: 9%; }
  .task-table .col-actions { width: 4.5%; }
}
@media (max-width: 1279px) {
  :root { --sidebar-width: 199px; --gutter: clamp(20px, 2.65vw, 39px); }
  .task-table .col-requester { display: none; }
  .task-table .col-task { width: 26%; }
  .task-table .col-project { width: 12%; }
  .task-table .col-assignee { width: 14%; }
  .task-table .col-queue { width: 9%; }
  .task-table .col-priority { width: 9%; }
  .task-table .col-status { width: 13.5%; }
  .task-table .col-updated { width: 10.5%; }
  .task-table .col-actions { width: 5%; }
}
@media (max-width: 1050px) {
  :root { --sidebar-width: 181px; --gutter: 23px; }
  .sidebar { padding-inline: 10px; }
  .hero-image { width: 411px; right: 2px; }
  .queue-toolbar, .queue-header { padding-inline: 15px; }
  .inline-select { gap: 4px; padding-left: 7px; }
  .inline-select select { max-width: 110px; padding-right: 20px; }
  .inline-select .icon { right: 4px; }
  .task-table .col-updated { display: none; }
  .task-table .col-task { width: 28%; }
  .task-table .col-project { width: 12%; }
  .task-table .col-assignee { width: 16%; }
  .task-table .col-queue { width: 10%; }
  .task-table .col-priority { width: 11%; }
  .task-table .col-status { width: 17%; }
  .task-table .col-actions { width: 6%; }
}
@media (max-width: 860px) {
  :root { --sidebar-width: 228px; --navbar-height: 60px; }
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .18s ease, visibility .18s;
    padding-inline: 14px;
  }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .nav-scrim:not([hidden]) { display: block; position: fixed; z-index: 9; inset: 0; background: #1a123a80; border: 0; }
  .main-area { margin-left: 0; }
  .mobile-nav { display: inline-grid; width: 34px; height: 34px; }
  .mobile-nav .icon { width: 18px; height: 18px; }
  .workspace { padding-top: 22px; }
}
@media (max-width: 680px) {
  :root { --gutter: 16px; }
  .topbar { gap: 8px; }
  .hero { min-height: 196px; border-radius: 16px; }
  .hero-content { max-width: 74%; }
  .hero-image { width: 335px; right: -44px; opacity: .85; }
  .hero-meta { display: block; line-height: 1.35; margin-bottom: 13px; }
  .hero-meta span { margin-inline: 2px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 13px 0 16px; }
  .stat-card { min-height: 67px; padding: 8px; gap: 7px; border-radius: 11px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat-icon .icon { width: 18px; height: 18px; }
  .stat-count { font-size: 1.15rem; }
  .stat-label { font-size: .76rem; }
  .queue-header { min-height: 47px; }
  .queue-title h2 { font-size: 1rem; }
  .queue-title { gap: 5px; }
  .queue-toolbar { flex-wrap: wrap; padding-bottom: 9px; }
  .queue-toolbar .search-box { flex: 1 0 100%; max-width: none; }
  .filters { flex-wrap: wrap; gap: 5px; }
  .inline-select { min-height: 36px; }
  .filters .icon-button { width: 36px; height: 36px; }
  .task-table { display: block; border-top: 1px solid var(--border); }
  .task-table thead { display: none; }
  .task-table tbody, .task-table .table-group, .task-table .table-group td { display: block; width: 100%; }
  .task-table .task-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) auto auto;
    grid-template-areas: "task task status status" "project assignee priority actions";
    gap: 4px 7px;
    padding: 9px 10px 8px 13px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    box-shadow: inset 2px 0 color-mix(in srgb, var(--row-tint, transparent) 73%, transparent);
  }
  .task-table tbody:last-child .task-row:last-child { border-bottom: 0; }
  .task-table .task-row td { display: block; height: auto; width: auto; padding: 0; border: 0; box-shadow: none; min-width: 0; }
  .task-table .task-row :is(.col-requester, .col-queue, .col-updated) { display: none; }
  .task-table .task-row .col-task { grid-area: task; }
  .task-table .task-row .col-project { grid-area: project; font-size: .79rem; }
  .task-table .task-row .col-assignee { grid-area: assignee; font-size: .79rem; }
  .task-table .task-row .col-assignee .avatar { width: 20px; height: 20px; font-size: .54rem; }
  .task-table .task-row .col-priority { grid-area: priority; justify-self: end; }
  .task-table .task-row .col-status { grid-area: status; justify-self: end; }
  .task-table .task-row .col-actions { grid-area: actions; justify-self: end; }
  .task-table .enquiry-link { line-height: 1.3; overflow-wrap: anywhere; }
  .col-actions .icon-button { width: 29px; height: 28px; }
  .page-heading { gap: 8px; margin-bottom: 15px; align-items: flex-start; }
  .page-heading .button { max-width: 47%; }
  .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .messenger { display: flex; min-height: 400px; height: min(76dvh, 680px); }
  .messenger .contacts, .messenger .chat { width: 100%; }
  .messenger .contacts { border: 0; }
  .messenger:not(.chat-open) .chat, .messenger.chat-open .contacts { display: none; }
  .chat-back { display: inline-grid; width: 32px; height: 32px; }
  .notification { gap: 7px; padding: 10px; }
  .notification time { max-width: 75px; text-align: right; }
}
@media (max-width: 480px) {
  :root { --gutter: 12px; }
  .sidebar-brand { margin-bottom: 26px; }
  .breadcrumbs { gap: 7px; }
  .breadcrumbs > span:not(.icon), .breadcrumbs > .icon { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .icon-button { width: 34px; height: 34px; }
  .demo-label { padding: 4px 7px; font-size: .69rem; margin-right: 0; }
  .hero { padding-inline: 16px; }
  .hero-image { width: 277px; right: -54px; opacity: .58; }
  .hero-content { max-width: 86%; }
  .workspace { padding-top: 14px; }
  .queue-header, .queue-toolbar, .page-toolbar { padding-inline: 11px; }
  .filters { gap: 6px; }
  .inline-select { font-size: .75rem; }
  .inline-select select { max-width: 90px; }
  .filter-reset { font-size: .72rem; padding-inline: 4px; }
  .org-grid { grid-template-columns: 1fr; }
  .auth-layout { display: block; }
  .auth-art { display: none; }
  .auth-main { min-height: 100dvh; }
  .dialog-drawer { border-radius: 0; border: 0; }
  .dialog-header, .dialog-body, .dialog-footer { padding-inline: 13px; }
  .form-grid { column-gap: 8px; }
  .field input:not([type="checkbox"], [type="file"]), .field textarea, .chat-form textarea, .comment-form textarea, .search-box input { font-size: 1rem; }
}
@media (max-width: 350px) {
  .form-grid { grid-template-columns: 1fr; }
  .stat-label { font-size: .69rem; }
  .stat-card { gap: 4px; }
  .stat-icon { width: 28px; height: 28px; }
}
@media (max-height: 450px) {
  .sidebar { overflow: auto; }
  .sidebar-foot { padding-top: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
