:root {
  color-scheme: light;
  --bg: #edf1f5;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #17212b;
  --muted: #6b7785;
  --muted-strong: #435060;
  --line: #dfe6ed;
  --line-strong: #c9d3df;
  --brand: #1f5fbf;
  --brand-strong: #164a96;
  --brand-soft: #e8f1ff;
  --brand-line: #cfe0ff;
  --accent: #2d8a68;
  --warning: #a85b00;
  --danger: #b42318;
  --topbar-bg: #ffffff;
  --control-bg: #ffffff;
  --panel-hover: #fbfdff;
  --nav-hover: #f6f9fb;
  --nav-active: #dbeafe;
  --menu-active: #eaf2ff;
  --table-head: #fbfcfe;
  --code-bg: #eef2f6;
  --code-text: #344256;
  --badge-bg: #eef2f6;
  --success-bg: #edfaf4;
  --success-line: #bfe6d5;
  --success-text: #1f6f51;
  --danger-bg: #fff1ef;
  --danger-line: #ffd0ca;
  --warning-bg: #fff7e8;
  --warning-line: #f8d79b;
  --radius: 8px;
  --card-radius: 16px;
  --shadow: 0 16px 40px rgb(24 39 58 / 10%);
  --card-shadow: 0 10px 26px rgb(22 34 50 / 7%), 0 2px 8px rgb(22 34 50 / 4%);
  --card-shadow-hover: 0 16px 34px rgb(22 34 50 / 10%), 0 4px 12px rgb(22 34 50 / 5%);
  --topbar-height: 58px;
  --topbar-control-height: 34px;
  --topbar-control-inner-height: 28px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1723;
  --panel: #151f2d;
  --panel-soft: #101826;
  --text: #e6edf5;
  --muted: #91a1b4;
  --muted-strong: #c1ccda;
  --line: #293548;
  --line-strong: #3a485d;
  --brand: #6aa6ff;
  --brand-strong: #9cc5ff;
  --brand-soft: #173353;
  --brand-line: #28527f;
  --accent: #5ad09a;
  --warning: #f1b45f;
  --danger: #ff8078;
  --topbar-bg: #121b28;
  --control-bg: #101826;
  --panel-hover: #1b2736;
  --nav-hover: #1a2635;
  --nav-active: #173353;
  --menu-active: #193657;
  --table-head: #121b28;
  --code-bg: #1e2a3a;
  --code-text: #cad7e6;
  --badge-bg: #1e2a3a;
  --success-bg: #123325;
  --success-line: #27664c;
  --success-text: #7ee2ad;
  --danger-bg: #3a1f22;
  --danger-line: #713238;
  --warning-bg: #342612;
  --warning-line: #715423;
  --shadow: 0 18px 48px rgb(0 0 0 / 36%);
  --card-shadow: 0 14px 34px rgb(0 0 0 / 24%), 0 2px 8px rgb(0 0 0 / 18%);
  --card-shadow-hover: 0 18px 42px rgb(0 0 0 / 32%), 0 4px 12px rgb(0 0 0 / 22%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body.modal-open .main {
  overflow: hidden;
}

body[data-page-transition] .main,
body[data-page-transition] .auth-shell {
  animation: page-enter 170ms ease both;
}

body.page-leaving .main,
body.page-leaving .auth-shell {
  animation: page-leave 150ms ease forwards;
}

@keyframes page-enter {
  from {
    opacity: 0.01;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-leave {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0.01;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page-transition] .main,
  body[data-page-transition] .auth-shell {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

button,
a,
input {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 3px var(--brand-line), 0 0 0 1px var(--brand);
}

.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;
}

.app-shell {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  flex: 0 0 var(--topbar-height);
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 32px;
  row-gap: 8px;
  padding: 0 18px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}

.brand,
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  object-fit: contain;
  box-shadow: 0 6px 14px rgb(31 95 191 / 18%);
}

.brand-name {
  display: block;
}

.brand-name {
  font-weight: 800;
  line-height: 18px;
}

.topnav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
}

.topnav-group {
  position: relative;
  flex: 0 0 auto;
}

.topnav-item {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.topnav-item:hover {
  background: var(--nav-hover);
  color: var(--text);
}

.topnav-item.active {
  border-color: transparent;
  background: var(--nav-active);
  color: var(--brand-strong);
}

.topnav-trigger {
  font: inherit;
}

.topnav-menu {
  position: absolute;
  left: 0;
  top: 44px;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 150ms ease, transform 150ms ease;
}

.topnav-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.topnav-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.topnav-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.topnav-menu a:hover,
.topnav-menu a.active {
  background: var(--menu-active);
  color: var(--brand-strong);
}

.topbar-meta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.env-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.project-switcher {
  position: relative;
  height: var(--topbar-control-height);
  display: inline-flex;
  align-items: center;
  width: 260px;
  padding: 0;
}

.project-switcher-trigger {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--muted-strong);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease;
}

.project-switcher-trigger:hover,
.project-switcher[data-dropdown-open="true"] .project-switcher-trigger {
  border-color: var(--brand-line);
  background: var(--panel-hover);
}

.project-switcher-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.project-switcher-kicker {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-switcher-current {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.project-switcher-panel {
  position: absolute;
  right: 0;
  top: 42px;
  width: 320px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease;
}

.project-switcher-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.project-switcher-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.project-switcher-search {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
}

.project-switcher-search input {
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.project-switcher-search input:focus-visible {
  box-shadow: none;
}

.project-switcher-options {
  max-height: 260px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding: 8px 0;
}

.project-switcher-option {
  width: 100%;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  text-align: left;
}

.project-switcher-option:hover,
.project-switcher-option.active {
  background: var(--menu-active);
  color: var(--brand-strong);
}

.project-switcher-option-key {
  font-size: 12px;
  font-weight: 800;
}

.project-switcher-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.project-switcher-empty {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.project-switcher-all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.topbar-search {
  width: 280px;
  height: var(--topbar-control-height);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--muted-strong);
  transition: width 160ms ease, border-color 160ms ease;
}

.topbar-search svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.82;
}

.topbar-search input {
  min-width: 0;
  width: 100%;
  height: var(--topbar-control-inner-height);
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: var(--topbar-control-inner-height);
}

.topbar-search input:focus-visible {
  box-shadow: none;
}

.topbar-search input::placeholder {
  color: var(--muted);
}

.topbar-search button {
  flex: 0 0 auto;
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.topbar-search:hover,
.topbar-search:focus-within {
  width: 340px;
  border-color: var(--brand-line);
}

.topbar-search:focus-within button,
.topbar-search button:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.topbar-search.active {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.account-trigger {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.account-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  user-select: none;
}

.account-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.account-menu {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 172px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease;
}

.account-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.account-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.account-menu-head {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.account-menu-head strong {
  color: var(--text);
  font-size: 14px;
}

.account-menu-head span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu a,
.account-menu-action {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  text-align: left;
}

.menu-form {
  margin: 0;
}

.menu-form button {
  width: 100%;
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.account-menu a:hover,
.account-menu-action:hover,
.menu-form button:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.theme-toggle-switch {
  width: 32px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-soft);
}

.theme-toggle-switch span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transform: translateX(0);
  transition: transform 160ms ease, background 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-switch {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-switch span {
  background: var(--brand);
  transform: translateX(14px);
}

.app-body {
  min-height: 0;
  height: calc(100vh - var(--topbar-height));
}

.main {
  min-width: 0;
  height: 100%;
  overflow: auto;
  padding: 18px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.page-stack {
  display: grid;
  gap: 16px;
}

.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

.page-hero h1 {
  margin: 2px 0 6px;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 22px;
}

.detail-hero {
  align-items: flex-start;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 13px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.workspace-main,
.workspace-side {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.workspace-main > *,
.workspace-side > * {
  min-width: 0;
}

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

.compact-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 0;
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

.metric-label,
.metric-hint {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 28px;
  line-height: 32px;
  letter-spacing: -0.04em;
}

.metric-info strong {
  color: var(--brand);
}

.metric-warning strong {
  color: var(--warning);
}

.metric-danger strong {
  color: var(--danger);
}

.metric-ok strong {
  color: var(--accent);
}

.panel {
  border: 0;
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.detail-main,
.detail-side {
  min-width: 0;
  display: grid;
  gap: 16px;
}

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

.panel-head.compact {
  align-items: center;
}

.panel-head h1,
.panel-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control-bg);
  color: var(--muted-strong);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.btn:disabled,
.btn[disabled],
.btn.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
  color: #fff;
}

.btn-secondary {
  background: var(--control-bg);
}

.btn-danger {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-danger:hover {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.danger-panel {
  background: var(--danger-bg);
  color: var(--danger);
}

.danger-panel .panel-head p {
  color: var(--danger);
}

.btn-sm {
  min-height: 28px;
  padding: 0 9px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compact-table th,
.compact-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.compact-table th {
  color: var(--muted);
  background: var(--table-head);
  font-size: 12px;
  font-weight: 700;
}

.compact-table td a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.compact-table tbody tr:hover {
  background: var(--panel-hover);
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.project-card {
  min-height: 190px;
  display: grid;
  align-content: space-between;
  gap: 13px;
  padding: 16px;
  border-radius: var(--card-radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 8px 22px rgb(22 34 50 / 6%), 0 1px 5px rgb(22 34 50 / 4%);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.project-card:hover {
  background: var(--panel-hover);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.project-card-topline,
.project-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-card-title {
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-meta,
.project-card-foot {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.project-card-stats {
  justify-content: flex-start;
  gap: 26px;
  padding-top: 2px;
}

.project-card-stats span {
  display: grid;
  gap: 2px;
}

.project-card-stats strong {
  color: var(--brand);
  font-size: 22px;
  line-height: 26px;
}

.project-card-stats em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.project-tabs-card {
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

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

.project-tabs-head h2 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 24px;
}

.project-tab-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.project-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.project-tab span {
  min-width: 20px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 20px;
}

.project-tab:hover {
  background: var(--panel);
  color: var(--text);
}

.project-tab.active {
  background: var(--panel);
  color: var(--brand);
  box-shadow: 0 8px 20px rgb(22 34 50 / 8%), 0 1px 5px rgb(22 34 50 / 5%);
}

.project-tab.active span {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.project-tab-panels {
  padding: 16px;
}

.project-tab-panel {
  animation: project-tab-in 140ms ease both;
}

.project-work-columns,
.project-detail-overview {
  display: grid;
  gap: 14px;
}

.project-work-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.project-detail-overview {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: stretch;
}

.project-tab-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.project-tab-section-head {
  min-height: 62px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--table-head);
}

.project-tab-section-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

.project-tab-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.project-detail-dl {
  padding: 16px;
}

.project-description-section {
  padding-bottom: 16px;
}

.project-description-section > p {
  margin: 0;
  padding: 16px 16px 0;
  color: var(--muted-strong);
  line-height: 24px;
}

@keyframes project-tab-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.work-count-cell,
.progress-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.work-count-cell strong {
  color: var(--brand);
  font-size: 15px;
}

.work-count-cell span {
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  width: 92px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--badge-bg);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.status-ok {
  border-color: var(--success-line);
  background: var(--success-bg);
  color: var(--success-text);
}

.status-info {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.status-danger {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.status-warning {
  border-color: var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
}

.segmented button,
.segmented a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  text-decoration: none;
}

.segmented button:hover,
.segmented button.active,
.segmented a:hover,
.segmented a.active {
  background: var(--panel);
  color: var(--brand);
  box-shadow: 0 1px 5px rgb(20 35 55 / 8%);
}

.work-items {
  min-height: 184px;
}

.loading-row {
  padding: 24px 16px;
  color: var(--muted);
}

.work-item-list {
  display: grid;
}

.work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.work-item:last-child {
  border-bottom: 0;
}

.work-item:hover {
  background: var(--panel-hover);
}

.list-page-items .work-item {
  padding: 17px 20px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px 4px;
  border-top: 1px solid var(--line);
}

.pager-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.pager-meta strong {
  color: var(--text);
  font-size: 14px;
}

.pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.work-kind,
.priority {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.work-kind + code {
  margin-left: 6px;
}

.work-item h3 {
  margin: 7px 0 3px;
  font-size: 14px;
  line-height: 20px;
}

.work-item h3 a {
  color: inherit;
  text-decoration: none;
}

.work-item h3 a:hover {
  color: var(--brand);
}

.work-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.work-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  gap: 5px;
  padding: 26px 16px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--muted-strong);
  font-size: 14px;
}

.empty-state span {
  font-size: 13px;
}

.member-list {
  display: grid;
}

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

.member-row:last-child {
  border-bottom: 0;
}

.member-row div {
  display: grid;
  gap: 3px;
}

.member-row strong {
  font-size: 14px;
}

.member-row span {
  color: var(--muted);
  font-size: 12px;
}

.member-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.member-add-form {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.attachment-list {
  display: grid;
}

.attachment-list.wide-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.attachment-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.attachment-row:last-child {
  border-bottom: 0;
}

.attachment-row div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.attachment-row .attachment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: max-content;
}

.attachment-action-hint {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}

.attachment-resume-form {
  align-items: center;
  gap: 6px;
}

.attachment-file-button {
  cursor: pointer;
}

.attachment-inline-status {
  max-width: 180px;
  margin-left: 2px;
  font-size: 12px;
  line-height: 18px;
}

.attachment-row strong {
  font-size: 14px;
}

.attachment-row span,
.attachment-row code {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.work-item-detail-panel {
  overflow: hidden;
}

.detail-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 24px;
}

.detail-dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-dl.inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-dl div {
  display: grid;
  gap: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.detail-dl.inline div {
  padding: 0;
  border-bottom: 0;
}

.detail-dl div:last-child {
  border-bottom: 0;
}

.detail-dl dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-dl dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list li {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-head);
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-head > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comment-list strong {
  font-size: 14px;
}

.comment-list span {
  color: var(--muted);
  font-size: 12px;
}

.comment-list p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 22px;
}

.comment-attachments {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.comment-attachment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.comment-attachment > div:first-child {
  display: grid;
  gap: 3px;
}

.inspector-panel {
  padding-bottom: 6px;
}

.risk-list,
.activity-list,
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.risk-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.risk-list-item > a {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.risk-list-item > a:hover strong {
  color: var(--brand);
}

.risk-list-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.risk-list strong,
.activity-list strong {
  font-size: 14px;
  line-height: 20px;
}

.risk-list span,
.activity-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.activity-list {
  padding: 6px 0;
}

.activity-list li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 8px 16px 8px 34px;
}

.activity-dot {
  position: absolute;
  left: 17px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

.drawer.open {
  display: block;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 28%);
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--panel);
  box-shadow: -16px 0 40px rgb(24 39 58 / 16%);
  animation: drawer-in 160ms ease-out;
}

@keyframes drawer-in {
  from {
    transform: translateX(22px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  font-size: 16px;
}

.drawer-body {
  padding: 16px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 22px;
}

.drawer-risk-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.drawer-risk-list .risk-list-item {
  padding: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal[hidden] {
  display: none;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 36%);
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 56px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgb(24 39 58 / 20%);
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms ease, opacity 180ms ease;
}

.modal-panel.modal-wide {
  width: min(760px, 100%);
}

.modal-panel.modal-confirm {
  width: min(440px, 100%);
  grid-template-rows: auto auto;
}

.modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
}

.modal-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.modal-body {
  min-height: 0;
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 16px 18px 18px;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.upload-picker {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.upload-picker span {
  color: var(--text);
  font-weight: 800;
}

.upload-picker em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 18px;
}

.upload-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.upload-status[data-tone="ready"],
.upload-status[data-tone="success"] {
  color: var(--success-text);
}

.upload-status[data-tone="error"] {
  color: var(--danger);
}

.modal-body .field-grid,
.modal-body .comment-form,
.modal-body .member-add-form {
  padding: 0;
  border-top: 0;
}

.modal-body .form-actions {
  padding: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.modal-confirm .modal-actions {
  padding: 14px 18px 16px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control-bg);
  cursor: pointer;
}

.auth-body {
  --auth-page: #d8e0ea;
  --auth-page-deep: #cdd7e3;
  --auth-ink: #111b2c;
  --auth-ink-2: #17263c;
  --auth-ink-3: #20324b;
  --auth-ink-line: #30445f;
  --auth-ink-soft: #9fb0c6;
  --auth-ink-text: #f7fbff;
  --auth-blue: #2d6ccb;
  --auth-blue-soft: #dceaff;
  --auth-green: #3eb489;
  --auth-green-soft: #dff7ec;
  --auth-yellow: #f0b34d;
  overflow: auto;
  min-height: 100vh;
  position: relative;
  background: var(--auth-page);
}

.auth-body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: min(47vw, 720px);
  border-right: 1px solid #21324a;
  background: var(--auth-ink);
  z-index: 0;
  pointer-events: none;
}

.auth-body::after {
  content: "";
  position: fixed;
  left: 36px;
  top: 36px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--auth-blue);
  box-shadow:
    32px 0 0 var(--auth-green),
    64px 0 0 rgb(255 255 255 / 34%),
    0 32px 0 rgb(255 255 255 / 18%),
    32px 32px 0 rgb(255 255 255 / 10%),
    64px 32px 0 var(--auth-yellow);
  z-index: 0;
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

.auth-panel {
  position: relative;
  width: min(1120px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(420px, 0.92fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgb(20 32 48 / 16%);
  border-radius: 34px;
  background: #f6f9fd;
  box-shadow: 0 30px 80px rgb(25 38 58 / 22%), 0 4px 18px rgb(25 38 58 / 10%);
}

.auth-panel-wide {
  width: min(1160px, calc(100vw - 48px));
  grid-template-columns: minmax(500px, 1fr) minmax(480px, 1fr);
}

.auth-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
  padding: 42px 46px;
  border-right: 1px solid rgb(20 32 48 / 10%);
  background: var(--auth-ink);
  color: var(--auth-ink-text);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 28px;
  pointer-events: none;
}

.auth-hero::after {
  content: "";
  position: absolute;
  right: 46px;
  bottom: 42px;
  width: 120px;
  height: 120px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 34px;
  box-shadow:
    -34px -24px 0 rgb(255 255 255 / 4%),
    -68px 30px 0 rgb(45 108 203 / 18%);
  pointer-events: none;
}

.form-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 16px;
  text-transform: uppercase;
}

.auth-visual {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.auth-hero .auth-brand {
  position: relative;
  z-index: 1;
}

.auth-hero .auth-brand strong {
  color: #fff;
}

.auth-hero .auth-brand span {
  color: var(--auth-ink-soft);
}

.auth-hero .brand-mark {
  box-shadow: 0 14px 28px rgb(0 0 0 / 24%);
}

.visual-shell {
  position: relative;
  width: min(466px, 100%);
  overflow: hidden;
  border: 1px solid var(--auth-ink-line);
  border-radius: 34px;
  background: #0d1727;
  box-shadow: 0 28px 70px rgb(0 0 0 / 34%), 0 0 0 8px rgb(255 255 255 / 3%);
}

.visual-shell::before,
.setup-console::before {
  position: absolute;
  inset: 16px;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 26px;
  content: "";
  pointer-events: none;
}

.visual-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--auth-ink-line);
  background: var(--auth-ink-2);
  z-index: 1;
}

.visual-window-bar {
  display: flex;
  gap: 6px;
}

.visual-window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 24%);
}

.visual-window-bar span:first-child {
  background: var(--auth-blue);
}

.visual-window-bar span:nth-child(2) {
  background: var(--auth-green);
}

.visual-window-bar span:nth-child(3) {
  background: var(--auth-yellow);
}

.visual-search-pill {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
}

.visual-search-pill i {
  width: 8px;
  height: 8px;
  border: 2px solid rgb(255 255 255 / 46%);
  border-radius: 999px;
}

.visual-search-pill span {
  width: 70%;
  height: 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 20%);
}

.visual-user-chip {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--auth-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.visual-command-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
}

.visual-command-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 999px;
  background: rgb(255 255 255 / 5%);
  color: var(--auth-ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.visual-command-row span.active {
  border-color: rgb(45 108 203 / 70%);
  background: rgb(45 108 203 / 20%);
  color: #f6fbff;
}

.visual-workspace-grid {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  z-index: 1;
}

.visual-side-rail {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: center;
  padding: 12px 0;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 22px;
  background: rgb(255 255 255 / 5%);
}

.visual-side-rail span {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 10%);
}

.visual-side-rail span.active {
  background: var(--auth-blue);
  border-color: var(--auth-blue);
  box-shadow: 0 10px 20px rgb(45 108 203 / 32%);
}

.visual-workspace-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.visual-project-card {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 22px;
  background: var(--auth-ink-2);
}

.visual-project-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgb(45 108 203 / 20%);
  color: #dfeaff;
  font-size: 14px;
  font-weight: 900;
}

.visual-project-card strong,
.visual-project-card span {
  display: block;
}

.visual-project-card strong {
  color: #fff;
  font-size: 14px;
  line-height: 20px;
}

.visual-project-card span {
  color: var(--auth-ink-soft);
  font-size: 12px;
  line-height: 18px;
}

.visual-project-card em {
  min-width: 48px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(62 180 137 / 44%);
  border-radius: 999px;
  background: rgb(62 180 137 / 16%);
  color: #9df0c8;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

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

.visual-metrics span {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 18px;
  background: rgb(255 255 255 / 5%);
}

.visual-metrics b,
.visual-metrics i {
  display: block;
  border-radius: 999px;
}

.visual-metrics b {
  width: 34px;
  height: 10px;
  background: #f7fbff;
}

.visual-metrics i {
  width: 78%;
  height: 7px;
  background: rgb(255 255 255 / 18%);
}

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

.visual-column {
  min-height: 154px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 20px;
  background: rgb(255 255 255 / 5%);
}

.visual-column strong {
  color: #e9f1ff;
  font-size: 12px;
}

.visual-line,
.visual-ticket {
  display: block;
  min-height: 9px;
  border-radius: 999px;
}

.visual-line {
  background: rgb(255 255 255 / 14%);
}

.visual-line-lg {
  width: 100%;
}

.visual-line-md {
  width: 78%;
}

.visual-line-sm {
  width: 58%;
}

.visual-ticket {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 16px;
  background: rgb(255 255 255 / 6%);
}

.visual-ticket i,
.visual-ticket b,
.visual-ticket em {
  display: block;
  border-radius: 999px;
  background: rgb(255 255 255 / 20%);
}

.visual-ticket i {
  width: 22px;
  height: 7px;
}

.visual-ticket b {
  width: 86%;
  height: 8px;
}

.visual-ticket em {
  width: 48%;
  height: 7px;
}

.visual-ticket-accent {
  border-color: rgb(45 108 203 / 60%);
  background: rgb(45 108 203 / 20%);
}

.visual-ticket-dark {
  border-color: var(--auth-blue);
  background: var(--auth-blue);
  box-shadow: 0 16px 28px rgb(45 108 203 / 30%);
}

.visual-ticket-dark i,
.visual-ticket-dark b,
.visual-ticket-dark em {
  background: rgb(255 255 255 / 70%);
}

.visual-ticket-soft {
  border-color: rgb(62 180 137 / 58%);
  background: rgb(62 180 137 / 17%);
}

.visual-timeline {
  display: grid;
  grid-template-columns: 1fr 0.75fr 1.15fr 0.55fr;
  gap: 7px;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 18px;
  background: rgb(255 255 255 / 5%);
}

.visual-timeline span {
  height: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 13%);
}

.visual-timeline span:nth-child(2),
.visual-timeline span:nth-child(4) {
  background: var(--auth-blue);
}

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

.visual-insight-grid span {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 17px;
  background: rgb(255 255 255 / 5%);
}

.visual-insight-grid b,
.visual-insight-grid i {
  display: block;
  border-radius: 999px;
}

.visual-insight-grid b {
  width: 38%;
  height: 8px;
  background: var(--auth-green);
}

.visual-insight-grid i {
  width: 78%;
  height: 7px;
  background: rgb(255 255 255 / 18%);
}

.auth-visual-setup {
  display: flex;
  align-items: center;
  justify-content: center;
}

.setup-console {
  position: relative;
  width: min(440px, 100%);
  overflow: hidden;
  border: 1px solid var(--auth-ink-line);
  border-radius: 34px;
  background: #0d1727;
  box-shadow: 0 28px 70px rgb(0 0 0 / 34%), 0 0 0 8px rgb(255 255 255 / 3%);
}

.setup-console-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--auth-ink-line);
  background: var(--auth-ink-2);
}

.setup-console-head div {
  display: flex;
  gap: 7px;
}

.setup-console-head span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 24%);
}

.setup-console-head span:first-child {
  background: var(--auth-blue);
}

.setup-console-head span:nth-child(2) {
  background: var(--auth-green);
}

.setup-console-head span:nth-child(3) {
  background: var(--auth-yellow);
}

.setup-console-head em {
  color: var(--auth-ink-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.setup-dashboard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(136px, 0.72fr);
  gap: 12px;
  padding: 16px;
  z-index: 2;
}

.setup-dashboard::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: 24px;
  pointer-events: none;
}

.setup-owner-card,
.setup-resource-list,
.setup-check-panel,
.setup-permission-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 22px;
  background: rgb(255 255 255 / 5%);
}

.setup-owner-card {
  min-height: 124px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 16px;
  background: var(--auth-ink-2);
  box-shadow: 0 22px 46px rgb(0 0 0 / 28%), 0 0 0 7px rgb(45 108 203 / 8%);
  grid-column: 1 / -1;
}

.setup-owner-card i {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--auth-blue);
  box-shadow: 0 14px 28px rgb(45 108 203 / 35%);
}

.setup-owner-card strong,
.setup-owner-card span {
  display: block;
}

.setup-owner-card strong {
  color: #fff;
  font-size: 18px;
  line-height: 24px;
}

.setup-owner-card span {
  color: var(--auth-ink-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
}

.setup-owner-card em {
  justify-self: start;
  grid-column: 2;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgb(62 180 137 / 46%);
  border-radius: 999px;
  background: rgb(62 180 137 / 14%);
  color: #9df0c8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.setup-resource-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  grid-row: span 2;
}

.setup-resource-list span {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 16px;
  background: rgb(255 255 255 / 5%);
}

.setup-resource-list i {
  width: 18px;
  height: 18px;
  border: 1px solid rgb(45 108 203 / 54%);
  border-radius: 7px;
  background: rgb(45 108 203 / 24%);
  grid-row: span 2;
}

.setup-resource-list .ready i {
  border-color: rgb(62 180 137 / 54%);
  background: rgb(62 180 137 / 22%);
}

.setup-resource-list strong,
.setup-resource-list em {
  display: block;
}

.setup-resource-list strong {
  color: #fff;
  font-size: 12px;
  line-height: 16px;
}

.setup-resource-list em {
  color: var(--auth-ink-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 15px;
}

.setup-check-panel,
.setup-permission-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.setup-check-panel strong,
.setup-permission-panel strong {
  color: #fff;
  font-size: 12px;
  line-height: 16px;
}

.setup-check-panel span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 18px;
}

.setup-check-panel i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--auth-green);
}

.setup-check-panel b {
  height: 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
}

.setup-permission-panel div {
  display: grid;
  grid-template-columns: 0.8fr 1fr 0.62fr;
  gap: 7px;
  align-items: end;
  min-height: 76px;
}

.setup-permission-panel span {
  display: block;
  border-radius: 12px;
  background: var(--auth-blue);
}

.setup-permission-panel span:first-child {
  height: 42px;
  background: rgb(45 108 203 / 55%);
}

.setup-permission-panel span:nth-child(2) {
  height: 62px;
}

.setup-permission-panel span:nth-child(3) {
  height: 32px;
  background: rgb(62 180 137 / 55%);
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  font-size: 16px;
  line-height: 21px;
}

.auth-brand span {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.auth-form {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 52px 48px;
  background: #f3f7fc;
}

.auth-form label {
  gap: 7px;
}

.auth-form input {
  min-height: 50px;
  padding: 0 15px;
  border-color: #c7d3e1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgb(16 28 45 / 4%);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.auth-form input:hover {
  border-color: #aebed0;
  background: #ffffff;
}

.auth-form input:focus {
  border-color: var(--brand);
  background: #ffffff;
}

.auth-form input:focus-visible {
  outline: 2px solid var(--brand-line);
  outline-offset: 2px;
  box-shadow: none;
}

.auth-form .btn-primary {
  min-height: 52px;
  margin-top: 6px;
  border-radius: 15px;
  font-weight: 800;
  box-shadow: 0 15px 30px rgb(31 95 191 / 22%);
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

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

.auth-form .btn-primary:active {
  transform: translateY(0);
}

.auth-form-footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.auth-message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 20px;
}

.auth-message-error {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.form-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 38px;
  letter-spacing: -0.03em;
}

.form-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--text);
}

textarea {
  min-height: 96px;
  padding-top: 9px;
  padding-bottom: 9px;
  line-height: 20px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 16px;
}

.inline-form {
  margin: 0;
  display: inline-flex;
}

.comment-form {
  display: grid;
  gap: 12px;
  padding: 16px 16px 0;
}

.muted-line {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

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

.field-grid.one-column {
  grid-template-columns: 1fr;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--line);
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.wide-field {
  grid-column: 1 / -1;
}

.auth-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid rgb(20 32 48 / 10%);
  background: #eef4fb;
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

.inline-result {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.system-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.system-form {
  padding-bottom: 16px;
}

.system-form .field-grid {
  padding: 16px;
}

.system-card {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 0;
  border-radius: var(--card-radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.system-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.system-card strong {
  font-size: 16px;
}

.system-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.storage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.storage-form {
  overflow: hidden;
}

.storage-form .field-grid {
  padding: 16px;
}

.search-panel {
  padding: 16px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.search-result-list {
  display: grid;
}

.search-result {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover {
  background: var(--panel-hover);
}

.search-result h3 {
  margin: 7px 0 4px;
  font-size: 15px;
  line-height: 21px;
}

.search-result h3 a {
  color: var(--text);
  text-decoration: none;
}

.search-result h3 a:hover {
  color: var(--brand);
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.search-result-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.storage-message {
  margin: 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
}

.storage-message-success {
  border: 1px solid var(--success-line);
  background: var(--success-bg);
  color: var(--success-text);
}

.storage-message-error {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.storage-message-warning {
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning);
}

.storage-message-info {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.storage-versions-panel {
  margin-top: 16px;
}

.storage-bucket-panel {
  margin-top: 16px;
  overflow: hidden;
}

.storage-bucket-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.storage-bucket-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.storage-bucket-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.storage-bucket-summary strong {
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
}

.storage-bucket-summary span:not(.status),
.storage-bucket-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.storage-bucket-message {
  margin: 0;
}

.storage-bucket-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.storage-check-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.storage-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.storage-check-row:first-child {
  border-top: 0;
}

.storage-check-row:hover {
  background: var(--panel-hover);
}

.storage-check-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.storage-check-row strong {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.storage-check-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.storage-version-list {
  display: grid;
}

.storage-version-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  border-top: 1px solid var(--line);
}

.storage-version-row:first-child {
  border-top: 0;
}

.storage-version-row:hover {
  background: var(--panel-hover);
}

.storage-version-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.storage-version-title,
.storage-version-meta,
.storage-version-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.storage-version-title strong {
  color: var(--text);
  font-size: 15px;
  line-height: 21px;
}

.storage-version-meta span,
.storage-version-foot span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.storage-version-meta span:first-child {
  color: var(--text);
  font-weight: 700;
}

.storage-version-actions {
  display: flex;
  justify-content: flex-end;
}

.storage-side {
  padding: 16px;
}

.storage-side h2 {
  margin: 18px 0 12px;
  font-size: 16px;
}

.storage-side h2:first-child {
  margin-top: 0;
}

.config-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  background: var(--line);
}

.config-summary-item {
  display: grid;
  gap: 4px;
  min-height: 78px;
  align-content: center;
  padding: 14px 16px;
  background: var(--panel);
}

.config-summary-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.config-summary-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.storage-meta {
  border-bottom: 1px solid var(--line);
}

.check-list {
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 20px;
}

.check-list li {
  position: relative;
  padding-left: 18px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.role-workbench {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.role-workbench-sidebar {
  overflow: hidden;
}

.role-list {
  display: grid;
}

.role-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.role-list-row.active {
  background: var(--brand-soft);
}

.role-list-row:hover {
  background: var(--panel-hover);
}

.role-list-row.active:hover {
  background: var(--brand-soft);
}

.role-list-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
}

.role-list-item span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.role-list-item strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-list-item em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-list-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.role-status-button,
.text-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.role-status-button {
  height: 100%;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.role-status-button:hover,
.text-button:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.role-permission-panel {
  overflow: hidden;
}

.role-permission-head {
  align-items: center;
}

.role-summary-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--table-head);
  color: var(--muted);
  font-size: 12px;
}

.role-summary-strip span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.role-summary-strip strong {
  color: var(--text);
}

.permission-tree {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.permission-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.permission-group-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--table-head);
}

.permission-pages {
  display: grid;
}

.permission-page {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.permission-page:last-child {
  border-bottom: 0;
}

.permission-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-left: 28px;
}

.permission-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  font-weight: 400;
}

.permission-check input {
  width: 16px;
  min-height: 16px;
  margin-top: 3px;
}

.permission-check span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.permission-check strong {
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.permission-check em {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 17px;
}

.permission-check-group strong {
  font-size: 15px;
}

.permission-check-action {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-head);
}

@media (max-width: 1280px) {
  .workspace-grid,
  .detail-grid,
  .system-split,
  .storage-layout,
  .role-workbench {
    grid-template-columns: 1fr;
  }

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

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

  .project-work-columns {
    grid-template-columns: 1fr;
  }

  .project-detail-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .project-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .auth-body::before {
    display: none;
  }

  .auth-body::after {
    display: none;
  }

  .auth-shell {
    min-height: 100dvh;
    padding: 18px;
  }

  .auth-panel,
  .auth-panel-wide {
    width: 100%;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .auth-hero {
    min-height: auto;
    gap: 26px;
    padding: 28px;
    border-right: 0;
    border-bottom: 1px solid var(--auth-ink-line);
  }

  .auth-form {
    padding: 28px;
  }

  .visual-shell,
  .setup-console {
    width: 100%;
  }

  .visual-toolbar {
    padding: 10px;
  }

  .visual-command-row {
    gap: 6px;
    padding: 10px 10px 0;
  }

  .visual-command-row span {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }

  .visual-search-pill,
  .visual-user-chip {
    height: 26px;
  }

  .visual-user-chip {
    width: 26px;
    font-size: 12px;
  }

  .visual-workspace-grid {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .visual-side-rail {
    gap: 8px;
    padding: 10px 0;
    border-radius: 18px;
  }

  .visual-side-rail span {
    width: 18px;
    height: 18px;
    border-radius: 7px;
  }

  .visual-workspace-main {
    gap: 9px;
  }

  .visual-project-card {
    min-height: 58px;
    gap: 8px;
    padding: 9px;
    border-radius: 18px;
  }

  .visual-project-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .visual-project-card em {
    min-width: 42px;
    height: 26px;
  }

  .visual-metrics {
    gap: 6px;
  }

  .visual-metrics span {
    min-height: 42px;
    gap: 6px;
    padding: 7px;
    border-radius: 14px;
  }

  .visual-board {
    gap: 6px;
  }

  .visual-column {
    min-height: 132px;
    gap: 7px;
    padding: 8px;
    border-radius: 16px;
  }

  .visual-ticket {
    min-height: 48px;
    gap: 6px;
    padding: 8px;
    border-radius: 14px;
  }

  .visual-timeline {
    min-height: 30px;
  }

  .visual-insight-grid {
    display: none;
  }

  .setup-console-head {
    padding: 12px 14px;
  }

  .setup-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .setup-owner-card,
  .setup-resource-list {
    grid-column: 1 / -1;
  }

  .setup-owner-card {
    min-height: 94px;
    padding: 12px;
  }

  .setup-owner-card i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .setup-owner-card strong {
    font-size: 16px;
  }

  .setup-resource-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .setup-resource-list span {
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 4px;
    min-height: 76px;
    padding: 9px;
  }

  .setup-resource-list i {
    grid-row: auto;
  }

  .setup-check-panel,
  .setup-permission-panel {
    padding: 10px;
  }

  .auth-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell {
    height: auto;
  }

  .topbar {
    height: auto;
    grid-template-columns: 1fr auto;
    padding: 12px;
  }

  .brand {
    grid-column: 1;
  }

  .topnav {
    grid-column: 1 / -1;
    grid-row: 4;
    padding-top: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .topnav-menu {
    position: fixed;
    top: 100px;
    left: 12px;
  }

  .topbar-meta {
    display: contents;
  }

  .project-tabs-head {
    display: grid;
  }

  .project-tab-list {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .topbar-search {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    margin-top: 6px;
  }

  .topbar-search:hover,
  .topbar-search:focus-within {
    width: 100%;
  }

  .account-dropdown {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .project-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 6px;
  }

  .project-switcher-panel {
    left: 0;
    right: 0;
    width: auto;
    transform-origin: top center;
  }

  .app-body {
    height: auto;
  }

  .main {
    overflow: visible;
    padding: 12px;
  }

  .metric-grid,
  .detail-metrics,
  .project-card-grid,
  .workspace-side,
  .system-grid,
  .search-form,
  .filter-bar,
  .field-grid,
  .config-summary-grid,
  .storage-version-row,
  .permission-actions {
    grid-template-columns: 1fr;
  }

  .storage-version-actions {
    justify-content: flex-start;
  }

  .detail-dl.inline {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel,
  .modal-panel.modal-wide {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-panel,
  .drawer-panel,
  .project-tab-panel {
    transition: none;
    animation: none;
    transform: none;
  }
}
