:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172033;
  --muted: #7b879d;
  --line: #e5e9f1;
  --accent: #5a53e8;
  --accent-dark: #4943c7;
  --accent-soft: #efefff;
  --blue: #3f7df6;
  --success: #14a47b;
  --success-soft: #e9faf4;
  --warning: #e9982e;
  --warning-soft: #fff6e9;
  --danger: #e55564;
  --danger-soft: #fff0f2;
  --sidebar: #151c2b;
  --sidebar-muted: #98a3b8;
  --shadow: 0 12px 32px rgba(32, 43, 72, 0.08);
  --radius: 16px;
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
body.dark {
  --bg: #0e1421;
  --surface: #151d2c;
  --surface-soft: #1b2535;
  --ink: #f0f3fb;
  --muted: #95a1b5;
  --line: #293447;
  --accent-soft: #242451;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 256px;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 16px;
  flex: 0 0 256px;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 25px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  background: linear-gradient(145deg, #827aff, #4f48d7);
  box-shadow: 0 8px 18px rgba(90, 83, 232, 0.3);
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 15px;
}
.brand-caption {
  color: #8d99ae;
  font-size: 10px;
  margin-top: 3px;
}
.sidebar-close {
  display: none;
  margin-left: auto;
  color: #99a4b8;
}
.workspace-switcher {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #2d3951;
  color: #fff;
  background: #1b2537;
  border-radius: 11px;
  padding: 10px 11px;
  text-align: left;
}
.workspace-switcher:hover {
  background: #222e44;
}
.workspace-avatar {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #bfc6ff;
  background: #393978;
  font-size: 11px;
  font-weight: 800;
}
.workspace-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.workspace-copy b {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
}
.workspace-copy small {
  color: #8895ab;
  font-size: 10px;
}
.chevron {
  color: #8b96aa;
  font-size: 18px;
  margin-top: -4px;
}
.primary-nav {
  margin-top: 26px;
}
.nav-label {
  padding: 0 12px 9px;
  color: #69758c;
  font-size: 10px;
  letter-spacing: 0.11em;
  font-weight: 700;
}
.nav-label-spaced {
  margin-top: 28px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  color: #abb5c8;
  background: transparent;
  border-radius: 10px;
  text-align: left;
  padding: 11px 11px;
  font-size: 13px;
  margin: 2px 0;
  transition: 0.18s ease;
}
.nav-item:hover {
  background: #202b40;
  color: #fff;
}
.nav-item.active {
  background: #2d367c;
  color: #fff;
  box-shadow: inset 3px 0 0 #827aff;
}
.nav-icon {
  width: 18px;
  color: #8592a9;
  font-size: 16px;
  text-align: center;
  line-height: 1;
}
.nav-item.active .nav-icon {
  color: #bab7ff;
}
.nav-item em {
  margin-left: auto;
  color: #6f7d95;
  font-size: 11px;
  font-style: normal;
  background: #222d41;
  min-width: 24px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 9px;
}
.nav-item em.nav-alert {
  background: #443a55;
  color: #f49ca6;
}
.sidebar-bottom {
  margin-top: auto;
}
.help-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #1b2537;
  border: 1px solid #2c3850;
  border-radius: 12px;
  padding: 10px 10px;
  margin: 15px 4px;
}
.help-card > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.help-card b {
  font-size: 11px;
}
.help-card small {
  color: #8793a9;
  font-size: 9px;
}
.help-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #2d376d;
  color: #b9b7ff;
  font-weight: 700;
}
.arrow {
  color: #818ea5;
  font-size: 15px;
}
.profile-mini {
  border: 0;
  background: transparent;
  color: #fff;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 7px 0;
  border-top: 1px solid #29344a;
  text-align: left;
}
.profile-mini > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.profile-mini b {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-mini small {
  font-size: 10px;
  color: #8995aa;
}
.more {
  color: #748199;
  letter-spacing: 1px;
}
.avatar {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 auto;
}
.avatar-blue {
  color: #d7ddff;
  background: #3c4db0;
}

.main-area {
  min-width: 0;
  flex: 1;
}
.topbar {
  height: 72px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
body.dark .topbar {
  background: rgba(21, 29, 44, 0.8);
}
.menu-toggle {
  display: none;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumbs b {
  color: #c4cada;
  font-weight: 400;
}
.breadcrumbs strong {
  color: var(--ink);
  font-size: 13px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 290px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0 10px;
  color: #9aa5b8;
}
.global-search span {
  font-size: 22px;
  line-height: 0;
  transform: rotate(-18deg);
}
.global-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}
.global-search kbd {
  font-family: inherit;
  font-size: 10px;
  color: #99a5b6;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}
.icon-button,
.theme-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.icon-button:hover,
.theme-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}
.notification-button {
  position: relative;
  font-size: 18px;
}
.notification-button i {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
  background: #e85b6d;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--surface);
}
.top-avatar {
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.page-content {
  padding: 31px 36px 48px;
  max-width: 1600px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 9px;
}
h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.page-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: 0.18s ease;
}
.button:hover {
  border-color: #bdc5d4;
  box-shadow: 0 4px 12px rgba(44, 53, 84, 0.08);
  transform: translateY(-1px);
}
.button-primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 7px 15px rgba(90, 83, 232, 0.2);
}
.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}
.button-ghost {
  background: transparent;
}
.button-danger {
  color: var(--danger);
  border-color: #f0c1c7;
  background: var(--danger-soft);
}
.button-small {
  padding: 7px 10px;
  font-size: 11px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}
.hero-card {
  min-height: 232px;
  color: #fff;
  border-radius: var(--radius);
  padding: 25px 28px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(122deg, #22274e 0%, #3b3a86 58%, #5d55dc 100%);
  box-shadow: 0 16px 32px rgba(53, 51, 120, 0.22);
}
.hero-card:after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  right: -50px;
  top: -110px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 0 0 26px rgba(255, 255, 255, 0.035),
    0 0 0 53px rgba(255, 255, 255, 0.025);
}
.hero-card > * {
  position: relative;
  z-index: 1;
}
.hero-card .eyebrow {
  color: #aca9ff;
}
.hero-card h2 {
  margin: 0;
  max-width: 460px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.hero-card p {
  margin: 10px 0 21px;
  color: #d4d5f7;
  font-size: 12px;
  max-width: 445px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.hero-card .button-primary {
  color: #313081;
  background: #fff;
  border-color: #fff;
  box-shadow: none;
}
.hero-card .button-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.focus-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
}
.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.card-kicker a {
  color: var(--accent);
  font-size: 10px;
  text-decoration: none;
}
.focus-card h3 {
  margin: 14px 0 15px;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.focus-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.focus-row:first-of-type {
  border-top: 0;
}
.focus-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
  flex: 0 0 auto;
}
.focus-dot.blue {
  background: var(--blue);
  box-shadow: 0 0 0 4px #edf3ff;
}
.focus-copy {
  flex: 1;
  min-width: 0;
}
.focus-copy b {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.focus-copy small {
  color: var(--muted);
  font-size: 10px;
  display: block;
  margin-top: 4px;
}
.focus-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 18px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 17px 15px;
  min-width: 0;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.metric-label {
  color: var(--muted);
  font-size: 11px;
}
.metric-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 15px;
}
.metric-card:nth-child(2) .metric-icon {
  color: var(--blue);
  background: #edf3ff;
}
.metric-card:nth-child(3) .metric-icon {
  color: var(--warning);
  background: var(--warning-soft);
}
.metric-card:nth-child(4) .metric-icon {
  color: var(--success);
  background: var(--success-soft);
}
.metric-value {
  margin-top: 15px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.metric-trend {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.trend-up {
  color: var(--success);
  font-weight: 700;
}
.trend-down {
  color: var(--danger);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 17px;
}
.panel-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.panel-head small,
.panel-link {
  color: var(--muted);
  font-size: 10px;
}
.panel-link {
  color: var(--accent);
  text-decoration: none;
}
.activity-list {
  display: flex;
  flex-direction: column;
}
.activity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity:last-child {
  border-bottom: 0;
  padding-bottom: 1px;
}
.activity-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: #6b70e8;
  flex: 0 0 auto;
}
.activity-avatar.green {
  background: #23b181;
}
.activity-avatar.orange {
  background: #e99a43;
}
.activity-avatar.pink {
  background: #dc6aa1;
}
.activity-copy {
  flex: 1;
  min-width: 0;
}
.activity-copy b {
  font-size: 11px;
  font-weight: 650;
}
.activity-copy span {
  color: var(--muted);
  font-size: 10px;
}
.activity-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.workload-bars {
  display: flex;
  align-items: end;
  height: 142px;
  gap: 9px;
  padding: 12px 4px 0;
  border-bottom: 1px solid var(--line);
}
.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  position: relative;
}
.bar-col:after {
  content: "";
  position: absolute;
  bottom: -18px;
  font-size: 9px;
  color: var(--muted);
}
.bar-col:nth-child(1):after {
  content: "Пн";
}
.bar-col:nth-child(2):after {
  content: "Вт";
}
.bar-col:nth-child(3):after {
  content: "Ср";
}
.bar-col:nth-child(4):after {
  content: "Чт";
}
.bar-col:nth-child(5):after {
  content: "Пт";
}
.bar-col:nth-child(6):after {
  content: "Сб";
}
.bar-col:nth-child(7):after {
  content: "Вс";
}
.bar {
  width: 100%;
  max-width: 26px;
  border-radius: 7px 7px 2px 2px;
  background: #dddefa;
  min-height: 16px;
}
.bar.active {
  background: var(--accent);
}
.bar.mid {
  background: #9293e9;
}
.workload-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 29px;
  font-size: 10px;
  color: var(--muted);
}
.legend-key {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}
.table-toolbar {
  padding: 18px 21px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.table-toolbar h3 {
  margin: 0;
  font-size: 15px;
}
.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.input-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--muted);
}
.input-wrap input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  width: 155px;
}
.select-control {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  height: 34px;
  font-size: 11px;
  padding: 0 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
th {
  background: var(--surface-soft);
  color: var(--muted);
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  padding: 11px 21px;
  white-space: nowrap;
}
td {
  padding: 13px 21px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr {
  transition: 0.15s ease;
}
tbody tr:hover {
  background: var(--surface-soft);
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.person-cell b {
  font-size: 11px;
  display: block;
}
.person-cell small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.table-avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  background: #6471dd;
}
.table-avatar.pink {
  background: #d9689f;
}
.table-avatar.orange {
  background: #e79c51;
}
.table-avatar.green {
  background: #2ba87e;
}
.table-avatar.gray {
  background: #8792a8;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 5px 8px;
  font-size: 10px;
  white-space: nowrap;
}
.status:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status.success {
  color: var(--success);
  background: var(--success-soft);
}
.status.warning {
  color: var(--warning);
  background: var(--warning-soft);
}
.status.danger {
  color: var(--danger);
  background: var(--danger-soft);
}
.status.neutral {
  color: var(--muted);
  background: var(--surface-soft);
}
.tag {
  display: inline-flex;
  border-radius: 6px;
  padding: 4px 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
}
.row-action {
  color: var(--accent);
  border: 0;
  background: transparent;
  font-size: 11px;
  padding: 5px 0;
}
.empty-state {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}

.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.view-tabs {
  display: flex;
  background: var(--surface-soft);
  padding: 3px;
  border-radius: 9px;
}
.view-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 11px;
}
.view-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(30, 42, 75, 0.09);
}
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  align-items: start;
}
.kanban-col {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 13px;
  min-height: 430px;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}
.kanban-col-head h3 {
  margin: 0;
  font-size: 12px;
}
.count {
  border-radius: 6px;
  padding: 3px 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
  margin-bottom: 9px;
  box-shadow: 0 3px 8px rgba(28, 36, 64, 0.035);
  cursor: pointer;
  transition: 0.17s ease;
}
.task-card:hover {
  transform: translateY(-2px);
  border-color: #c5c5f8;
  box-shadow: 0 8px 18px rgba(43, 45, 101, 0.08);
}
.task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}
.priority {
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 750;
}
.priority.high {
  background: var(--warning-soft);
  color: #d97a12;
}
.priority.critical {
  background: var(--danger-soft);
  color: var(--danger);
}
.priority.medium {
  background: #eff3ff;
  color: var(--blue);
}
.priority.low {
  background: var(--success-soft);
  color: var(--success);
}
.task-due {
  color: var(--muted);
  font-size: 9px;
}
.task-card h4 {
  margin: 0 0 9px;
  font-size: 12px;
  line-height: 1.35;
}
.task-card p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.task-tag {
  font-size: 9px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 5px;
  padding: 4px 6px;
}
.mini-avatars {
  display: flex;
}
.mini-avatar {
  width: 22px;
  height: 22px;
  border: 2px solid var(--surface);
  margin-left: -4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #6774de;
  font-size: 8px;
  font-weight: 700;
}
.mini-avatar:first-child {
  margin-left: 0;
}
.mini-avatar.pink {
  background: #d9689f;
}
.mini-avatar.green {
  background: #2ba87e;
}
.add-task {
  width: 100%;
  border: 1px dashed #c8d0de;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 9px;
  font-size: 10px;
  margin-top: 3px;
}
.add-task:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.inventory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}
.session-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.session-card:first-of-type {
  border-top: 0;
}
.session-icon {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.session-copy {
  flex: 1;
}
.session-copy b {
  font-size: 12px;
  display: block;
}
.session-copy small {
  color: var(--muted);
  font-size: 10px;
  display: block;
  margin-top: 4px;
}
.progress-wrap {
  width: 130px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 5px;
}
.progress {
  height: 6px;
  border-radius: 10px;
  background: var(--line);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.quick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
}
.quick-action:hover {
  border-color: #bdbbf8;
  background: var(--accent-soft);
}
.quick-action span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--accent);
}
.quick-action b {
  font-size: 11px;
}
.quick-action small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 18px;
}
.analytics-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.analytics-card h3 {
  margin: 0;
  font-size: 12px;
}
.analytics-number {
  font-size: 26px;
  font-weight: 750;
  margin: 15px 0 5px;
  letter-spacing: -0.05em;
}
.sparkline {
  height: 37px;
  display: flex;
  align-items: end;
  gap: 4px;
}
.sparkline i {
  flex: 1;
  background: #deddfb;
  border-radius: 3px 3px 0 0;
}
.sparkline i.active {
  background: var(--accent);
}
.analytics-note {
  font-size: 10px;
  color: var(--muted);
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.report-item:last-child {
  border-bottom: 0;
}
.report-item span:last-child {
  font-weight: 700;
}

.settings-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 17px;
}
.settings-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  height: max-content;
}
.settings-nav button {
  display: block;
  width: 100%;
  border: 0;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.settings-nav button.active,
.settings-nav button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.settings-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 21px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  outline: 0;
  font-size: 11px;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #a7a3f8;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 17, 28, 0.45);
  backdrop-filter: blur(3px);
  z-index: 30;
}
.overlay.visible {
  display: block;
}
.modal {
  display: none;
  position: fixed;
  width: min(600px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(12, 18, 38, 0.25);
}
.modal.visible {
  display: block;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.modal-close {
  border: 0;
  background: var(--surface-soft);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 17px;
}
.modal-body {
  padding: 22px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}
.drawer {
  display: none;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(470px, calc(100vw - 25px));
  background: var(--surface);
  z-index: 41;
  box-shadow: -18px 0 50px rgba(16, 26, 47, 0.2);
  overflow: auto;
}
.drawer.visible {
  display: block;
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 23px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 {
  margin: 0;
  font-size: 18px;
}
.drawer-body {
  padding: 23px;
}
.drawer-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.drawer-section:first-child {
  padding-top: 0;
}
.drawer-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 750;
  margin-bottom: 9px;
}
.detail-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}
.detail-subtitle {
  color: var(--muted);
  font-size: 11px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.detail-item small {
  color: var(--muted);
  font-size: 10px;
  display: block;
  margin-bottom: 5px;
}
.detail-item b {
  font-size: 11px;
}
.event-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: relative;
  padding: 0 0 16px 0;
}
.event-line:last-child {
  padding-bottom: 0;
}
.event-line:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: 0 0 auto;
}
.event-line:not(:last-child):after {
  content: "";
  position: absolute;
  left: 3px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.event-copy b {
  font-size: 11px;
  display: block;
}
.event-copy small {
  color: var(--muted);
  font-size: 10px;
  display: block;
  margin-top: 4px;
}
.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.toast {
  background: #20283a;
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(12, 18, 37, 0.2);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toast-in 0.22s ease;
}
.toast i {
  width: 7px;
  height: 7px;
  background: #5fe0af;
  border-radius: 50%;
}
.toast.danger i {
  background: #fa8792;
}
@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .sidebar {
    width: 224px;
    flex-basis: 224px;
  }
  .page-content {
    padding-left: 24px;
    padding-right: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .global-search {
    width: 230px;
  }
  .hero-grid,
  .dashboard-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: fixed;
    z-index: 60;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: 0.22s ease;
    width: 270px;
    box-shadow: 20px 0 40px rgba(11, 17, 32, 0.2);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: grid;
  }
  .menu-toggle {
    display: grid;
  }
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .breadcrumbs span,
  .breadcrumbs b {
    display: none;
  }
  .topbar-actions {
    gap: 6px;
  }
  .global-search {
    width: 35px;
    border: 0;
    padding: 0;
    background: transparent;
  }
  .global-search input,
  .global-search kbd {
    display: none;
  }
  .global-search span {
    font-size: 24px;
  }
  .page-content {
    padding: 23px 16px 35px;
  }
  .page-head {
    flex-direction: column;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .button {
    flex: 1;
  }
  .kanban {
    grid-template-columns: 1fr;
  }
  .kanban-col {
    min-height: auto;
  }
  .analytics-grid,
  .report-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  table {
    min-width: 670px;
  }
  .table-panel {
    overflow: auto;
  }
  .table-toolbar {
    min-width: 670px;
  }
  .drawer {
    width: 100%;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 23px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .metric-card {
    padding: 13px;
  }
  .metric-value {
    font-size: 21px;
  }
  .hero-card {
    padding: 20px;
  }
  .hero-card h2 {
    font-size: 20px;
  }
  .focus-card,
  .panel {
    padding: 16px;
  }
  .page-actions {
    flex-wrap: wrap;
  }
  .page-actions .button {
    flex-basis: 45%;
  }
}

/* Viewport workspace: each screen owns its available height. */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  height: 100dvh;
}
button:disabled {
  cursor: default;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

.sidebar {
  transition: none;
}
.app-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.sidebar {
  width: 228px;
  height: 100%;
  flex: 0 0 228px;
  padding: 23px 13px 16px;
  overflow: hidden;
}
.brand-block {
  gap: 10px;
  padding: 0 9px 22px;
  flex-shrink: 0;
}
.brand-mark {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
}
.brand-name {
  font-size: 14px;
  white-space: nowrap;
}
.brand-caption {
  font-size: 10px;
  white-space: nowrap;
}
.workspace-switcher {
  min-height: 52px;
  padding: 9px 10px;
  flex-shrink: 0;
}
.workspace-copy b {
  font-size: 11px;
}
.primary-nav {
  margin-top: 23px;
}
.nav-label {
  padding: 0 10px 8px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.nav-label-spaced {
  margin-top: 22px;
}
.nav-item {
  gap: 10px;
  margin: 3px 0;
  padding: 10px;
  font-size: 12px;
}
.nav-item em {
  min-width: 22px;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: 10px;
}
.sidebar-bottom {
  flex-shrink: 0;
}
.help-card {
  margin: 12px 3px;
}
.help-card small {
  font-size: 10px;
}
.profile-mini {
  padding-top: 12px;
}
.main-area {
  height: 100%;
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr);
  overflow: hidden;
}
.topbar {
  position: relative;
  height: 60px;
  padding: 0 24px;
  gap: 18px;
  background: var(--surface);
  min-width: 0;
}
.breadcrumbs {
  font-size: 11px;
  min-width: 0;
}
.breadcrumbs strong {
  font-size: 12px;
}
.topbar-actions {
  gap: 8px;
  min-width: 0;
}
.global-search {
  width: 270px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-soft);
}
.global-search input {
  font-size: 11px;
}
.icon-button,
.theme-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.top-avatar {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
}
.page-content {
  width: 100%;
  max-width: 1640px;
  height: 100%;
  min-height: 0;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.page-head {
  align-items: center;
  min-height: 56px;
  margin: 0;
  gap: 14px;
  flex-shrink: 0;
}
.page-head > div:first-child {
  min-width: 0;
}
.eyebrow {
  margin-bottom: 6px;
}
h1 {
  font-size: 24px;
}
.page-head p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
}
.page-actions {
  gap: 8px;
  flex-shrink: 0;
}
.button {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.button:hover {
  transform: none;
}
.button-small {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 11px;
}
.screen-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  flex-shrink: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  align-self: flex-start;
  max-width: 100%;
}
.screen-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 13px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.screen-tabs button[aria-selected="true"],
.screen-tabs button.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.screen-tabs button:hover {
  color: var(--accent);
}
.screen-tabs .count {
  padding: 2px 5px;
  background: var(--surface-soft);
}
.screen-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}
.panel {
  min-height: 0;
  padding: 18px;
}
.panel-head {
  align-items: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.panel-head h3 {
  font-size: 13px;
}
.panel-head small {
  display: block;
  margin-top: 4px;
}
.panel-link {
  font-size: 11px;
  white-space: nowrap;
}
.card-kicker {
  font-size: 10px;
  gap: 8px;
}
.card-kicker a {
  font-size: 11px;
}
.metric-grid,
.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  flex-shrink: 0;
}
.metric-card {
  padding: 14px 16px;
  border-radius: 12px;
}
.metric-top {
  gap: 8px;
}
.metric-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  font-size: 14px;
}
.metric-value {
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.15;
}
.metric-trend {
  margin-top: 5px;
  white-space: nowrap;
}
.overview-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 21px;
  min-height: 100px;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(115deg, #272d5c, #514bc2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.overview-focus h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}
.overview-focus p {
  margin: 6px 0 0;
  color: #d3d4f5;
  font-size: 11px;
  line-height: 1.45;
  max-width: 560px;
}
.overview-focus .eyebrow {
  color: #bdb8ff;
}
.overview-focus .button {
  color: #39328d;
  background: #fff;
  border-color: #fff;
  box-shadow: none;
}
.overview-focus .button-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.overview-focus .hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.overview-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.attention-row,
.focus-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.attention-row:first-child,
.focus-row:first-child {
  border-top: 0;
}
.attention-row .focus-copy,
.focus-copy {
  flex: 1;
  min-width: 0;
}
.attention-row b,
.focus-copy b {
  display: block;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.attention-row small,
.focus-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.focus-dot {
  margin: 0 4px;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
}
.focus-time {
  font-size: 10px;
}
.activity {
  gap: 11px;
  padding: 13px 0;
}
.activity-avatar {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  font-size: 10px;
}
.activity-copy {
  line-height: 1.5;
}
.activity-copy span {
  font-size: 11px;
}
.dashboard-grid,
.inventory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
  flex-shrink: 0;
  margin: 0;
}
.hero-card {
  min-height: 0;
  padding: 18px 21px;
}
.hero-card h2 {
  font-size: 19px;
}
.hero-card p {
  margin: 7px 0 14px;
  font-size: 11px;
  line-height: 1.5;
}
.focus-card {
  padding: 18px;
}
.focus-card h3 {
  font-size: 14px;
  margin: 12px 0;
}
.workload-bars {
  flex: 1;
  min-height: 80px;
  max-height: 210px;
  height: auto;
  gap: 10px;
  padding: 5px 5px 0;
}
.bar-col:after {
  bottom: -20px;
  font-size: 10px;
}
.bar {
  max-width: 34px;
  min-height: 12px;
}
.workload-legend {
  gap: 8px;
  margin-top: 32px;
  font-size: 11px;
}
.table-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.table-toolbar {
  min-width: 0;
  min-height: 60px;
  padding: 12px 16px;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.table-toolbar h3 {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.table-actions {
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}
.input-wrap {
  height: 33px;
  min-width: 0;
}
.input-wrap input {
  width: 170px;
  max-width: 100%;
  min-width: 0;
  font-size: 11px;
}
.select-control {
  height: 33px;
  min-width: 0;
  max-width: 200px;
  font-size: 11px;
}
.table-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
thead {
  height: 36px;
}
th {
  height: 36px;
  padding: 0 14px;
  font-size: 10px;
}
td {
  height: 52px;
  padding: 6px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
th:last-child,
td:last-child {
  width: 58px;
  text-align: right;
}
th:first-child,
td:first-child {
  width: 25%;
}
.person-cell {
  min-width: 0;
}
.person-cell > div {
  min-width: 0;
}
.person-cell b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
.person-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}
.table-avatar {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  font-size: 10px;
}
.status {
  padding: 5px 7px;
  line-height: 1.2;
}
.row-action {
  white-space: nowrap;
}
.empty-state {
  padding: 30px 15px;
  font-size: 12px;
  line-height: 1.6;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  flex-shrink: 0;
}
.pager-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.pager-actions .icon-button {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border: 1px solid var(--line);
  font-size: 17px;
}
.pager-actions .button {
  min-height: 28px;
  padding: 5px 8px;
}
.pager-actions span {
  min-width: 38px;
  text-align: center;
}
.board-toolbar {
  gap: 12px;
  margin: 0;
  flex-shrink: 0;
  min-height: 34px;
}
.view-tabs button {
  white-space: nowrap;
}
.board-status-tabs {
  display: none;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}
.kanban-col-head {
  gap: 8px;
  min-height: 26px;
  margin: 0;
  flex-shrink: 0;
}
.task-stack {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow: hidden;
}
.task-card {
  min-height: 112px;
  height: 112px;
  flex: 0 0 112px;
  padding: 11px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.task-card:hover {
  transform: none;
}
.task-meta {
  gap: 6px;
  margin-bottom: 7px;
}
.priority {
  padding: 3px 5px;
  font-size: 10px;
}
.task-due {
  font-size: 10px;
  white-space: nowrap;
}
.task-card h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card p {
  display: none;
}
.task-footer {
  gap: 8px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 0;
}
.task-tag {
  padding: 3px 5px;
  font-size: 10px;
}
.mini-avatar {
  font-size: 10px;
  font-style: normal;
}
.kanban-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
}
.kanban-footer .pager-actions {
  gap: 4px;
}
.kanban-footer .pager-actions .button {
  padding: 4px 6px;
  min-height: 26px;
}
.add-task {
  min-height: 31px;
  margin: 0;
  padding: 7px;
  font-size: 11px;
  flex-shrink: 0;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.summary-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
  min-height: 0;
}
.summary-card h3 {
  margin: 0 0 9px;
  font-size: 13px;
}
.summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.summary-card .button,
.summary-card .row-action {
  margin-top: auto;
  align-self: flex-start;
}
.summary-number {
  font-size: 32px;
  letter-spacing: -0.04em;
  font-weight: 750;
  margin: 10px 0 7px;
}
.department-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.department-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
  min-height: 0;
}
.department-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.department-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.department-card .button,
.department-card .row-action {
  margin-top: auto;
  align-self: flex-start;
}
.session-card {
  gap: 11px;
  min-height: 76px;
  padding: 12px 0;
}
.session-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.session-copy {
  min-width: 0;
}
.session-copy b {
  line-height: 1.4;
}
.progress-wrap {
  width: 100px;
  flex-shrink: 0;
}
.progress-label {
  margin-bottom: 6px;
  font-size: 10px;
}
.quick-list {
  gap: 9px;
  min-height: 0;
}
.quick-action {
  gap: 11px;
}
.quick-action > span:first-child {
  flex: 0 0 28px;
}
.quick-action b {
  font-size: 12px;
}
.quick-action small {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
}
.analytics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  flex-shrink: 0;
}
.analytics-card {
  padding: 17px;
}
.analytics-number {
  margin: 12px 0 6px;
  font-size: 28px;
}
.sparkline {
  gap: 5px;
  height: 42px;
  margin-top: 11px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.report-grid > .panel {
  display: flex;
  flex-direction: column;
}
.report-item {
  gap: 10px;
  min-height: 42px;
  padding: 10px 0;
}
.report-item > span:first-child {
  min-width: 0;
  line-height: 1.5;
}
.report-item > span:last-child {
  font-weight: 650;
  white-space: nowrap;
}
.settings-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 3px;
  padding: 7px;
  height: auto;
}
.settings-form {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.settings-form h3 {
  margin: 0 0 17px;
  font-size: 14px;
}
.settings-form p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.settings-form > .button,
.settings-form .settings-footer {
  margin-top: auto;
  align-self: flex-start;
}
.form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field {
  min-width: 0;
  margin-bottom: 15px;
}
.field label {
  margin-bottom: 7px;
  font-size: 11px;
}
.field input,
.field select,
.field textarea {
  min-width: 0;
  font-size: 12px;
}
.field input,
.field select {
  min-height: 37px;
}
.field textarea {
  height: 88px;
  min-height: 65px;
  resize: none;
}
.field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.modal {
  display: none;
  flex-direction: column;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}
.modal.visible {
  display: flex;
}
.modal-head {
  align-items: flex-start;
  gap: 18px;
  padding: 20px 22px;
  flex-shrink: 0;
}
.modal-head h2 {
  line-height: 1.4;
}
.modal-head p {
  margin: 5px 0 0;
  line-height: 1.5;
}
.modal-close {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  font-size: 19px;
}
.modal-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
  background: var(--surface-soft);
}
.modal-steps .step-dots {
  display: flex;
  gap: 6px;
}
.modal-steps i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.modal-steps i.active {
  background: var(--accent);
}
.modal-body {
  padding: 22px;
  min-height: 0;
}
.modal-body .field:last-child {
  margin-bottom: 0;
}
.modal-foot {
  align-items: center;
  padding: 15px 22px;
  flex-shrink: 0;
}
.modal-foot .step-counter {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}
.drawer {
  display: none;
  flex-direction: column;
  width: min(470px, 100vw);
  overflow: hidden;
}
.drawer.visible {
  display: flex;
}
.drawer-head {
  gap: 16px;
  padding: 23px;
  flex-shrink: 0;
}
.drawer-head h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
  line-height: 1.35;
}
.drawer-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.drawer-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.drawer-tabs button {
  flex: 1;
  min-height: 33px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  white-space: nowrap;
}
.drawer-tabs button.active,
.drawer-tabs button[aria-selected="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.drawer-body {
  flex: 1;
  padding: 22px;
  min-height: 0;
}
.drawer-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface);
}
.drawer-footer .button {
  flex: 1;
}
.drawer-section {
  padding: 17px 0;
}
.drawer-section:last-child {
  border-bottom: 0;
}
.drawer-label {
  margin-bottom: 11px;
  letter-spacing: 0.08em;
}
.detail-title {
  margin: 0 0 5px;
  font-size: 16px;
}
.detail-subtitle {
  font-size: 12px;
  line-height: 1.5;
}
.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 14px;
}
.detail-item {
  min-width: 0;
}
.detail-item small {
  margin-bottom: 6px;
}
.detail-item b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.detail-list > div,
.detail-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}
.detail-list small {
  color: var(--muted);
  font-size: 11px;
}
.detail-list b {
  font-size: 12px;
  font-weight: 600;
}
.event-line {
  gap: 11px;
  padding-bottom: 20px;
}
.event-copy b {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}
.event-copy small {
  margin-top: 5px;
  line-height: 1.5;
}
.toast-stack {
  right: 20px;
  bottom: 20px;
  gap: 8px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  padding: 12px 15px;
  gap: 10px;
  font-size: 11px;
  line-height: 1.5;
}
.toast i {
  flex: 0 0 7px;
}

.attention-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.signal-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 16px;
}
.signal-icon.blue {
  color: var(--blue);
  background: #edf3ff;
}
.signal-icon.danger {
  color: var(--danger);
  background: var(--danger-soft);
}
.signal-icon.success {
  color: var(--success);
  background: var(--success-soft);
}
.panel-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}
.workload-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.workload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  font-size: 12px;
}
.workload-row:last-child {
  border-bottom: 0;
}
.workload-row > div {
  min-width: 0;
}
.workload-row .progress {
  flex: 1;
}
.workload-row > b {
  font-size: 13px;
}
.workload-row small {
  color: var(--muted);
  font-size: 11px;
}
.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}
.setting-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--accent);
}
.setting-toggle small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.cell-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
@media (max-width: 1200px) {
  .sidebar {
    width: 212px;
    flex-basis: 212px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-content {
    padding: 18px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .global-search {
    width: 230px;
  }
  .global-search kbd {
    display: none;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head p {
    max-width: 360px;
  }
  .page-actions {
    gap: 6px;
  }
  .page-actions .button {
    padding: 8px 10px;
  }
  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-card {
    padding: 12px;
  }
  .metric-trend > span:last-child {
    display: none;
  }
  .overview-focus {
    padding: 16px 18px;
    gap: 14px;
  }
  .overview-focus p {
    max-width: 390px;
  }
  .overview-focus .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  th,
  td {
    padding-left: 12px;
    padding-right: 12px;
  }
  .secondary-col {
    display: none;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 200px;
    flex-basis: 200px;
  }
  .brand-block {
    padding-left: 7px;
    padding-right: 0;
    gap: 8px;
  }
  .brand-name {
    font-size: 13px;
  }
  .brand-caption {
    font-size: 10px;
    letter-spacing: -0.03em;
  }
  .nav-label {
    font-size: 10px;
    letter-spacing: 0.02em;
  }
  .nav-item {
    gap: 8px;
    font-size: 11px;
  }
  .workspace-switcher {
    padding-left: 8px;
    padding-right: 8px;
  }
  .breadcrumbs > span,
  .breadcrumbs > b {
    display: none;
  }
  .global-search {
    width: 210px;
  }
  .page-content {
    padding: 16px 18px;
    gap: 12px;
  }
  .screen-body {
    gap: 12px;
  }
  h1 {
    font-size: 22px;
  }
  .page-head p {
    max-width: 300px;
  }
  .page-actions .button {
    min-height: 33px;
    font-size: 11px;
  }
  .overview-focus p {
    max-width: 350px;
  }
  .overview-focus h2 {
    font-size: 17px;
  }
  .metric-grid,
  .overview-metrics {
    gap: 9px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 13px;
  }
  .metric-value {
    font-size: 23px;
  }
  .table-toolbar {
    padding-left: 13px;
    padding-right: 13px;
    gap: 8px;
  }
  .table-actions {
    gap: 6px;
  }
  .input-wrap input {
    width: 145px;
  }
  .select-control {
    max-width: 150px;
  }
  .kanban {
    gap: 9px;
  }
  .kanban-col {
    padding: 10px;
  }
  .task-card {
    padding: 9px;
  }
  .task-card h4 {
    font-size: 11px;
  }
  .task-meta {
    gap: 4px;
  }
  .task-due,
  .priority {
    font-size: 10px;
  }
  .kanban-footer {
    flex-wrap: wrap;
    gap: 5px;
  }
  .kanban-footer > .pager-actions {
    margin-left: auto;
  }
  .settings-grid {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .settings-form {
    padding: 17px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    flex-basis: auto;
    height: 100dvh;
    padding: 22px 14px 16px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 40px rgba(11, 17, 32, 0.2);
    z-index: 60;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: grid;
  }
  .brand-block {
    padding: 0 8px 22px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-caption {
    letter-spacing: 0;
  }
  .nav-label {
    letter-spacing: 0.08em;
  }
  .nav-item {
    font-size: 12px;
    gap: 10px;
  }
  .menu-toggle {
    display: grid;
  }
  .topbar {
    gap: 10px;
  }
  .page-head p {
    max-width: none;
  }
  .page-head {
    flex-direction: row;
  }
  .page-actions {
    width: auto;
  }
  .page-actions .button {
    flex: 0 0 auto;
  }
  .global-search {
    width: 240px;
    border: 1px solid var(--line);
    padding: 0 10px;
    background: var(--surface-soft);
  }
  .global-search input {
    display: block;
  }
  .table-toolbar h3 {
    font-size: 12px;
  }
  .summary-card {
    padding: 18px;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 15px;
  }
  .global-search {
    width: 185px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .global-search input {
    font-size: 11px;
  }
  .page-content {
    padding: 16px 15px;
  }
  .page-head {
    gap: 10px;
    min-height: 55px;
  }
  h1 {
    font-size: 22px;
  }
  .page-head p {
    max-width: 380px;
    font-size: 11px;
  }
  .page-actions .button:not(.button-primary) {
    display: none;
  }
  .metric-grid,
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-card {
    padding: 11px 13px;
  }
  .metric-top {
    gap: 6px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-value {
    margin-top: 5px;
    font-size: 23px;
  }
  .metric-trend {
    display: none;
  }
  .overview-focus {
    min-height: 100px;
    padding: 15px 17px;
  }
  .overview-focus h2 {
    font-size: 17px;
  }
  .overview-focus p {
    max-width: 330px;
  }
  .overview-focus .hero-actions {
    gap: 7px;
  }
  .board-toolbar {
    gap: 8px;
  }
  .board-toolbar .input-wrap {
    flex: 1;
  }
  .board-toolbar .input-wrap input {
    width: 100%;
  }
  .board-toolbar .view-tabs {
    display: none;
  }
  .board-status-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    flex-shrink: 0;
    border-radius: 9px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
  }
  .board-status-tabs button {
    flex: 1;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    white-space: nowrap;
  }
  .board-status-tabs button.active,
  .board-status-tabs button[aria-selected="true"] {
    color: var(--accent);
    background: var(--accent-soft);
  }
  .kanban {
    grid-template-columns: minmax(0, 1fr);
  }
  .kanban-col {
    display: none;
    padding: 12px;
  }
  .kanban-col.active,
  .kanban-col.is-active,
  .kanban-col[data-active="true"] {
    display: flex;
  }
  .kanban-footer {
    flex-wrap: nowrap;
  }
  .task-card {
    padding: 12px;
  }
  .task-card h4 {
    font-size: 12px;
  }
  .summary-grid {
    gap: 12px;
  }
  .summary-card {
    padding: 16px;
  }
  .summary-number {
    font-size: 29px;
  }
  .department-grid {
    gap: 12px;
  }
  .department-card {
    padding: 16px;
  }
  .report-grid {
    gap: 12px;
  }
  .report-grid .panel {
    padding: 15px;
  }
  .report-item {
    font-size: 11px;
    min-height: 40px;
    padding: 9px 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
  }
  .settings-nav {
    flex-direction: row;
    padding: 4px;
    gap: 3px;
  }
  .settings-nav button {
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
  }
  .settings-form {
    padding: 17px;
  }
  .settings-form h3 {
    margin-bottom: 14px;
  }
  .compact-col {
    display: none;
  }
  th:first-child,
  td:first-child {
    width: 48%;
  }
  th:last-child,
  td:last-child {
    width: 52px;
  }
  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    min-height: 87px;
  }
  .table-actions {
    width: 100%;
  }
  .input-wrap {
    flex: 1;
  }
  .input-wrap input {
    width: 100%;
  }
  .select-control {
    max-width: 47%;
  }
  .analytics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .analytics-card {
    padding: 12px;
  }
  .analytics-card h3 {
    font-size: 11px;
  }
  .analytics-number {
    font-size: 24px;
  }
  .analytics-note {
    line-height: 1.4;
  }
  .session-icon {
    display: none;
  }
  .session-copy b {
    font-size: 11px;
  }
  .progress-wrap {
    width: 75px;
  }
}
@media (max-width: 480px) {
  .main-area {
    grid-template-rows: 56px minmax(0, 1fr);
  }
  .topbar {
    height: 56px;
    padding: 0 11px;
    gap: 7px;
  }
  .breadcrumbs strong {
    font-size: 12px;
  }
  .topbar-actions {
    gap: 2px;
  }
  .global-search {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    justify-content: center;
  }
  .global-search > span {
    font-size: 23px;
  }
  .global-search input,
  .global-search kbd {
    display: none;
  }
  .global-search:focus-within {
    position: absolute;
    left: 12px;
    right: 12px;
    width: auto;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    z-index: 2;
    justify-content: flex-start;
  }
  .global-search:focus-within input {
    display: block;
  }
  .top-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 10px;
  }
  .theme-button,
  .notification-button {
    width: 29px;
    flex-basis: 29px;
  }
  .page-content {
    padding: 14px 12px;
    gap: 11px;
  }
  .screen-body {
    gap: 11px;
  }
  .page-head {
    min-height: 76px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 9px;
  }
  .page-head > div:first-child {
    flex: 1;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .page-head .eyebrow {
    margin-bottom: 5px;
  }
  .page-head p {
    max-width: 100%;
    margin-top: 5px;
    line-height: 1.45;
  }
  .page-actions {
    align-self: flex-start;
    padding-top: 20px;
    flex-wrap: nowrap;
  }
  .page-actions .button {
    min-height: 32px;
    padding: 8px 9px;
    font-size: 11px;
  }
  .screen-tabs {
    min-height: 38px;
    padding: 3px;
    gap: 2px;
    width: 100%;
  }
  .screen-tabs button {
    flex: 1;
    min-height: 30px;
    padding: 6px 5px;
    font-size: 11px;
  }
  .metric-grid,
  .overview-metrics {
    gap: 8px;
  }
  .metric-card {
    padding: 11px 12px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-value {
    font-size: 23px;
  }
  .metric-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    font-size: 12px;
  }
  .overview-focus {
    padding: 14px 16px;
    min-height: 118px;
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }
  .overview-focus h2 {
    font-size: 16px;
  }
  .overview-focus p {
    margin-top: 5px;
    font-size: 11px;
    max-width: none;
  }
  .overview-focus .eyebrow {
    display: none;
  }
  .overview-focus .hero-actions {
    flex-direction: row;
    align-items: center;
    gap: 7px;
  }
  .overview-focus .button {
    min-height: 28px;
    padding: 6px 9px;
  }
  .panel {
    padding: 14px;
  }
  .panel-head {
    margin-bottom: 10px;
    gap: 8px;
  }
  .panel-head h3 {
    font-size: 12px;
  }
  .panel-link {
    font-size: 10px;
  }
  .attention-row,
  .focus-row {
    gap: 8px;
    padding: 12px 0;
  }
  .attention-row b,
  .focus-copy b {
    font-size: 11px;
  }
  .focus-copy small {
    line-height: 1.4;
  }
  .focus-time {
    font-size: 10px;
  }
  .attention-row .button {
    padding: 6px 7px;
    min-height: 29px;
    font-size: 10px;
  }
  .signal-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 14px;
  }
  .activity {
    gap: 8px;
    padding: 11px 0;
  }
  .activity-avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 8px;
  }
  .activity-copy {
    line-height: 1.45;
  }
  .activity-copy span {
    font-size: 10px;
  }
  .activity-time {
    font-size: 10px;
  }
  .table-panel {
    padding: 0;
  }
  .table-toolbar {
    min-height: 88px;
    padding: 11px;
  }
  .table-toolbar h3 {
    font-size: 12px;
  }
  .table-actions {
    gap: 6px;
  }
  .input-wrap {
    height: 32px;
    padding: 0 7px;
  }
  .select-control {
    height: 32px;
    font-size: 10px;
    max-width: 47%;
    padding: 0 5px;
  }
  th,
  td {
    padding-left: 10px;
    padding-right: 10px;
  }
  th {
    font-size: 10px;
  }
  td {
    font-size: 11px;
  }
  .person-cell {
    gap: 7px;
  }
  .table-avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 10px;
  }
  .person-cell b {
    font-size: 11px;
  }
  .person-cell small {
    font-size: 10px;
  }
  .status {
    padding: 4px 5px;
    gap: 4px;
    font-size: 10px;
  }
  .status:before {
    width: 4px;
    height: 4px;
    flex-basis: 4px;
  }
  .pagination {
    min-height: 46px;
    padding: 8px 11px;
    gap: 6px;
    font-size: 10px;
  }
  .pager-actions {
    gap: 5px;
  }
  .pager-actions .button {
    font-size: 11px;
  }
  .summary-grid {
    gap: 10px;
  }
  .summary-card {
    padding: 14px;
  }
  .summary-card h3 {
    font-size: 12px;
    margin-bottom: 5px;
  }
  .summary-card p {
    font-size: 11px;
  }
  .summary-number {
    font-size: 28px;
    margin: 6px 0;
  }
  .summary-card .button {
    min-height: 30px;
    padding: 6px 8px;
  }
  .department-grid {
    gap: 10px;
  }
  .department-card {
    padding: 13px;
    gap: 8px;
  }
  .department-card h3 {
    font-size: 12px;
  }
  .department-card p {
    font-size: 10px;
  }
  .department-card .button {
    padding: 7px;
    font-size: 10px;
  }
  .report-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .report-grid .panel {
    padding: 14px;
  }
  .report-item {
    min-height: 35px;
    padding: 7px 0;
  }
  .analytics-grid {
    gap: 7px;
  }
  .analytics-card {
    padding: 10px;
  }
  .analytics-card h3 {
    min-height: 29px;
    line-height: 1.4;
    font-size: 10px;
  }
  .analytics-number {
    margin: 7px 0 5px;
    font-size: 23px;
  }
  .analytics-note {
    font-size: 10px;
  }
  .sparkline {
    margin-top: 8px;
    height: 30px;
    gap: 3px;
  }
  .settings-nav {
    gap: 0;
  }
  .settings-nav button {
    font-size: 10px;
    padding: 8px 4px;
  }
  .settings-form {
    padding: 15px;
  }
  .settings-form h3 {
    font-size: 13px;
  }
  .form-row {
    gap: 10px;
  }
  .field {
    margin-bottom: 13px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 12px;
    padding: 9px;
  }
  .field label {
    font-size: 11px;
  }
  .modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 13px;
  }
  .modal-head {
    padding: 17px;
    gap: 12px;
  }
  .modal-head h2 {
    font-size: 17px;
  }
  .modal-head p {
    font-size: 11px;
  }
  .modal-body {
    padding: 18px 17px;
  }
  .modal-foot {
    padding: 13px 17px;
  }
  .modal-steps {
    padding: 10px 17px;
  }
  .modal .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal .field textarea {
    height: 80px;
  }
  .drawer-head {
    padding: 21px 18px;
  }
  .drawer-head h2 {
    font-size: 18px;
  }
  .drawer-tabs {
    padding: 10px 12px;
    gap: 2px;
  }
  .drawer-tabs button {
    padding: 7px 5px;
    font-size: 11px;
  }
  .drawer-body {
    padding: 19px 18px;
  }
  .drawer-footer {
    padding: 15px 18px;
  }
  .detail-list > div,
  .detail-list > li {
    padding: 12px 0;
  }
  .detail-grid {
    gap: 17px 11px;
  }
  .quick-action {
    padding: 10px;
    gap: 9px;
  }
  .quick-action b {
    font-size: 11px;
  }
  .toast-stack {
    bottom: 13px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .toast {
    padding: 11px 13px;
    font-size: 11px;
  }
  .workload-row {
    gap: 10px;
    padding: 13px 0;
    font-size: 11px;
  }
  .panel-bottom {
    font-size: 10px;
    padding-top: 10px;
  }
}
@media (max-height: 700px) and (min-width: 701px) {
  .sidebar {
    padding-top: 18px;
    padding-bottom: 13px;
  }
  .brand-block {
    padding-bottom: 17px;
  }
  .primary-nav {
    margin-top: 17px;
  }
  .nav-label-spaced {
    margin-top: 17px;
  }
  .help-card {
    display: none;
  }
  .page-content {
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 12px;
  }
  .screen-body {
    gap: 12px;
  }
  .page-head {
    min-height: 50px;
  }
  .page-head .eyebrow {
    margin-bottom: 4px;
  }
  .page-head p {
    margin-top: 4px;
  }
  .metric-card {
    padding: 11px 14px;
  }
  .metric-value {
    margin-top: 5px;
    font-size: 23px;
  }
  .metric-trend {
    margin-top: 3px;
  }
  .overview-focus {
    min-height: 90px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .attention-row,
  .focus-row {
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .summary-card {
    padding: 17px;
  }
  .summary-number {
    margin-top: 7px;
    font-size: 29px;
  }
}
@media (max-height: 620px) {
  .sidebar {
    padding-top: 14px;
    padding-bottom: 11px;
  }
  .brand-block {
    padding-bottom: 13px;
  }
  .brand-caption {
    display: none;
  }
  .workspace-switcher {
    min-height: 44px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .primary-nav {
    margin-top: 13px;
  }
  .nav-label {
    padding-bottom: 5px;
  }
  .nav-label-spaced {
    margin-top: 10px;
  }
  .nav-item {
    padding-top: 8px;
    padding-bottom: 8px;
    margin: 2px 0;
  }
  .help-card {
    display: none;
  }
  .profile-mini {
    padding-top: 10px;
  }
  .page-content {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .screen-body {
    gap: 10px;
  }
  .page-head {
    min-height: 43px;
  }
  .page-head .eyebrow {
    display: none;
  }
  .page-head p {
    margin-top: 4px;
    font-size: 11px;
  }
  h1 {
    font-size: 22px;
  }
  .screen-tabs {
    min-height: 35px;
    padding: 3px;
  }
  .screen-tabs button {
    min-height: 27px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .metric-card {
    padding: 9px 12px;
  }
  .metric-value {
    margin-top: 4px;
    font-size: 22px;
  }
  .metric-trend {
    display: none;
  }
  .overview-focus {
    min-height: 76px;
    padding: 13px 17px;
  }
  .overview-focus .eyebrow {
    display: none;
  }
  .overview-focus h2 {
    font-size: 16px;
  }
  .overview-focus p {
    margin-top: 4px;
  }
  .panel {
    padding: 14px;
  }
  .panel-head {
    margin-bottom: 9px;
  }
  .table-panel {
    padding: 0;
  }
  .attention-row,
  .focus-row {
    padding: 9px 0;
  }
  .activity {
    padding: 9px 0;
  }
  .table-toolbar {
    min-height: 53px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .pagination {
    min-height: 42px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .summary-card {
    padding: 14px;
  }
  .summary-card h3 {
    margin-bottom: 5px;
  }
  .summary-number {
    font-size: 26px;
    margin: 5px 0;
  }
  .analytics-card {
    padding: 12px;
  }
  .analytics-number {
    font-size: 24px;
    margin: 8px 0 4px;
  }
  .sparkline {
    height: 29px;
    margin-top: 8px;
  }
  .modal-head {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .modal-head p {
    margin-top: 4px;
  }
  .modal-body {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .modal-steps {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .modal-foot {
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .field {
    margin-bottom: 12px;
  }
  .field textarea {
    min-height: 56px;
    height: 65px;
  }
  .drawer-head {
    padding-top: 17px;
    padding-bottom: 17px;
  }
  .drawer-body {
    padding-top: 17px;
  }
  .drawer-section {
    padding-top: 13px;
    padding-bottom: 13px;
  }
  .drawer-footer {
    padding-top: 13px;
    padding-bottom: 13px;
  }
  .detail-list > div,
  .detail-list > li {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Interactive content uses the same surface styles as the surrounding panels. */
button.attention-row {
  width: 100%;
  margin: 0;
  padding: 16px 0;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
}
button.attention-row:last-child {
  border-bottom: 0;
}
button.attention-row:hover {
  background: var(--surface-soft);
}
button.attention-row > div {
  flex: 1;
  min-width: 0;
}
button.attention-row > div b {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}
button.attention-row > div small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
button.attention-row > .status,
button.attention-row > .tag {
  flex-shrink: 0;
}
button.attention-row > span:last-child {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 15px;
}
.signal-icon.purple {
  color: var(--accent);
  background: var(--accent-soft);
}
button.summary-card,
button.department-card {
  color: var(--ink);
  font: inherit;
  text-align: left;
  appearance: none;
}
button.summary-card:hover,
button.department-card:hover {
  border-color: #c5c2f6;
  background: var(--surface-soft);
}
.summary-card > .metric-card {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
}
.summary-card > .metric-card .metric-value {
  margin-top: 15px;
  font-size: 34px;
}
.summary-card > .metric-card .metric-trend {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11px;
  color: var(--accent);
}
.department-card > .panel-link {
  margin-top: auto;
}
.brand-block > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.brand-name,
.brand-caption {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-close,
.menu-toggle {
  display: none;
}
.modal-steps > span {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
}
.modal-steps > span.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 650;
}
.modal-body {
  margin: 0;
}
.detail-description {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.workload-row > b {
  flex: 0 1 175px;
  min-width: 0;
  font-size: 12px;
}
.workload-row > span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 900px) {
  .sidebar-close,
  .menu-toggle {
    display: grid;
  }
  .brand-block > div:nth-child(2) {
    flex: 1;
    min-width: 0;
  }
}
@media (max-width: 480px) {
  button.attention-row {
    padding: 13px 0;
    gap: 9px;
  }
  button.attention-row > div b {
    font-size: 11px;
  }
  button.attention-row > div small {
    font-size: 10px;
  }
  button.attention-row > span:last-child {
    display: none;
  }
  .modal-steps {
    gap: 3px;
  }
  .modal-steps > span {
    padding: 5px;
    font-size: 10px;
  }
  .workload-row > b {
    flex-basis: 130px;
    font-size: 11px;
  }
  .summary-card > .metric-card .metric-value {
    font-size: 29px;
  }
}
@media (max-height: 620px) {
  button.attention-row {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .modal-steps > span {
    padding-top: 3px;
    padding-bottom: 3px;
  }
}

.table-panel {
  gap: 0;
}
.overview-panel {
  gap: 0;
}
.settings-form.screen-body {
  gap: 0;
}
.task-card {
  color: var(--ink);
  font: inherit;
  text-align: left;
  appearance: none;
}
th:first-child,
td:first-child {
  width: 38%;
}
th:last-child,
td:last-child {
  width: 90px;
}
th:last-child:empty {
  width: 94px;
}
@media (max-width: 700px) {
  th:first-child,
  td:first-child {
    width: 48%;
  }
  th:last-child,
  td:last-child {
    width: 83px;
  }
  th:last-child:empty {
    width: 87px;
  }
}
@media (max-width: 480px) {
  .pagination-note {
    display: none;
  }
}

/* Details keep their own content pages, including long descriptions. */
.drawer-body:has(.description-viewport) {
  display: flex;
  flex-direction: column;
}
.description-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-pagination {
  flex-shrink: 0;
  min-height: 46px;
}
.drawer-body .detail-list .quick-action {
  height: 64px;
  min-height: 64px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}

/* One shared header keeps navigation and controls above the workspace. */
.sidebar {
  transition: none;
}
.main-area {
  grid-template-rows: auto minmax(0, 1fr);
}
.topbar {
  height: auto;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 24px;
  background: var(--surface);
}
.topbar-main {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.topbar-actions {
  flex-shrink: 0;
  gap: 8px;
  margin-left: auto;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.header-actions:empty {
  display: none;
}
.header-actions .button {
  min-height: 32px;
  padding: 7px 11px;
  box-shadow: none;
}
.topbar .global-search {
  width: 240px;
  height: 32px;
  flex: 0 0 auto;
}
.topbar .global-search input {
  display: block;
}
.topbar-context {
  min-height: 44px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 7px;
}
.header-tabs {
  min-width: 0;
  flex: 0 1 auto;
}
.header-tabs .screen-tabs {
  width: auto;
  max-width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 3px;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
}
.header-tabs .screen-tabs button {
  min-height: 28px;
  padding: 5px 12px;
  font-size: 11px;
}
.header-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.header-tools:empty {
  display: none;
}
.header-tools .input-wrap {
  flex: 0 1 210px;
  width: 210px;
  min-width: 130px;
  height: 32px;
}
.header-tools .input-wrap input {
  width: 100%;
  min-width: 0;
}
.header-tools .select-control {
  max-width: 180px;
  height: 32px;
}
.header-tools > .tag {
  font-size: 10px;
  white-space: nowrap;
}
.header-tools .button {
  min-height: 32px;
}
.page-content {
  padding-top: 16px;
}
.table-toolbar {
  min-height: 40px;
  padding: 9px 18px;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
}
.table-toolbar h3 {
  min-width: 0;
}
.table-toolbar .table-actions:empty {
  display: none;
}
@media (max-width: 1200px) {
  .topbar {
    padding: 0 20px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .header-tools {
    gap: 6px;
  }
  .header-tools .input-wrap {
    flex-basis: 185px;
    width: 185px;
  }
  .header-tools .select-control {
    max-width: 160px;
  }
}
@media (max-width: 1100px) {
  .topbar .global-search {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    justify-content: center;
    cursor: text;
  }
  .topbar .global-search input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    padding: 0;
  }
  .topbar .global-search kbd {
    display: none;
  }
  .topbar .global-search:focus-within {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 10px;
    z-index: 2;
    width: auto;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    justify-content: flex-start;
  }
  .topbar .global-search:focus-within input {
    position: static;
    width: auto;
    height: auto;
    opacity: 1;
  }
  .header-title {
    font-size: 18px;
  }
  .topbar-context {
    gap: 12px;
  }
  .header-tabs .screen-tabs button {
    padding: 5px 10px;
  }
  .header-tools .input-wrap {
    flex-basis: 160px;
    width: 160px;
  }
  .header-tools .select-control {
    max-width: 150px;
  }
  .header-tools > .tag {
    display: none;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 15px;
  }
  .topbar-main {
    gap: 8px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .header-tools .input-wrap {
    flex-basis: 145px;
    width: 145px;
  }
  .header-tools .select-control {
    max-width: 135px;
  }
  .table-toolbar {
    min-height: 40px;
    padding: 9px 12px;
    gap: 8px;
  }
}
@media (max-width: 600px) {
  .topbar {
    min-height: 94px;
    padding: 0 12px;
  }
  .topbar-main {
    min-height: 52px;
    gap: 6px;
  }
  .header-title {
    font-size: 16px;
  }
  .topbar-actions {
    gap: 3px;
  }
  .header-actions .button {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 10px;
  }
  .topbar .icon-button,
  .topbar .theme-button {
    width: 28px;
    height: 30px;
    flex-basis: 28px;
  }
  .topbar .top-avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 10px;
  }
  .topbar .global-search {
    width: 27px;
    flex-basis: 27px;
  }
  .topbar .global-search:focus-within {
    left: 12px;
    right: 12px;
    width: auto;
    top: 10px;
    flex-basis: auto;
  }
  .topbar-context {
    min-height: 42px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 7px;
  }
  .header-tabs {
    width: 100%;
  }
  .header-tabs .screen-tabs {
    width: 100%;
    min-height: 34px;
    gap: 2px;
    padding: 3px;
  }
  .header-tabs .screen-tabs button {
    flex: 1;
    min-width: 0;
    min-height: 28px;
    padding: 5px 6px;
    font-size: 10px;
  }
  .header-tools {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  .header-tools .input-wrap {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 32px;
  }
  .header-tools .select-control {
    flex: 0 1 auto;
    width: auto;
    max-width: 47%;
    height: 32px;
    font-size: 10px;
  }
  .header-tools .button {
    min-height: 32px;
    font-size: 10px;
  }
  .page-content {
    padding-top: 12px;
  }
  .table-toolbar {
    min-height: 40px;
    padding: 9px 11px;
  }
}
@media (max-width: 380px) {
  .header-title {
    font-size: 15px;
  }
  .header-actions .button-primary {
    width: 30px;
    padding: 6px;
    font-size: 0;
  }
  .header-actions .button-primary::before {
    content: attr(data-icon);
    font-size: 19px;
    line-height: 1;
  }
}
