:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --surface-green: rgba(11, 122, 91, .1);
  --text: #15211c;
  --muted: #48564f;
  --border: #e3eae6;
  --border-strong: #ccd8d1;
  --brand: #0b7a5b;
  --brand-dark: #075e47;
  --brand-light: #c8eee3;
  --sidebar-dark-bg: #0c1f1a;
  --sidebar-dark-border: #17372e;
  --sidebar-dark-text: #cfe5dd;
  --sidebar-dark-muted: #9fbdb3;
  --teal: #168b83;
  --blue: #3f76d3;
  --amber: #b87512;
  --amber-bg: #fff4df;
  --red: #bf3b3b;
  --red-bg: #fff0ef;
  --shadow: 0 4px 16px rgba(21, 33, 28, .09);
  --radius: 8px;
  --sidebar: 232px;
  --topbar: 64px;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 152, 164, .32) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  min-height: 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(140, 152, 164, .28);
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(140, 152, 164, .42); background-clip: padding-box; }
html { min-width: 320px; height: 100%; background: var(--bg); }
body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(19, 122, 75, .24);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 82% 12%, rgba(67, 194, 125, .18), transparent 32%),
    radial-gradient(circle at 10% 90%, rgba(22, 139, 131, .12), transparent 34%),
    linear-gradient(145deg, #eef7f1, #f8fbf9 48%, #edf5f1);
}
.auth-card {
  width: min(480px, 100%);
  border: 1px solid rgba(199, 213, 206, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  padding: 30px;
  box-shadow: 0 28px 80px rgba(18, 68, 44, .14);
}
.auth-brand {
  margin-bottom: 28px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #10271d;
}
.auth-brand-logo {
  display: block;
  width: min(300px, 100%);
  height: auto;
  margin: 0 auto;
}
.auth-copy h1 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.auth-copy p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-form { display: grid; gap: 15px; margin-top: 24px; }
.auth-form .btn { min-height: 43px; margin-top: 3px; }
.auth-message { margin: 16px 0 0; padding: 11px 13px; border-radius: 10px; background: var(--red-bg); color: var(--red); font-size: 12px; line-height: 1.55; }
.auth-message.info { background: var(--surface-green); color: var(--brand-dark); }
.auth-loading { min-height: 220px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.auth-loading p { margin: 0; font-size: 12px; }
.auth-security-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-security-note span { color: var(--brand); font-weight: 800; }

.app-shell { height: 100vh; overflow: hidden; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: var(--sidebar-dark-bg);
  color: var(--sidebar-dark-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-dark-border);
  padding: 12px 0 14px;
  overflow: hidden;
  transition: width .2s ease, transform .2s ease;
  z-index: 50;
}
.sidebar-top {
  display: flex;
  height: 58px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin: 0 14px 12px;
}
.sidebar-brand { display: flex; height: 46px; min-width: 0; flex: 1 1 auto; align-items: center; color: inherit; }
.sidebar-logo { display: block; width: 204px; max-width: 204px; height: 38px; object-fit: contain; opacity: .94; }
.sidebar-collapsed-logo { display: none; width: 42px; height: 42px; object-fit: contain; }
.sidebar-caption { display: none; }
.nav { padding: 0 10px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { width: 0; height: 0; }
.nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--sidebar-dark-text);
  min-height: 40px;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
}
.nav-button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-button.active { background: var(--brand); color: #fff; box-shadow: none; font-weight: 600; }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; text-align: center; font-size: 16px; }
.nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { flex: 1; font-size: 13px; font-weight: 500; }
.nav-button.active .nav-label { font-weight: 600; }
.nav-priority { font-size: 10px; color: var(--sidebar-dark-muted); }
.nav-group { width: 100%; }
.nav-group-trigger { position: relative; }
.nav-group.is-current > .nav-group-trigger { color: #fff; }
.nav-arrow {
  width: 16px;
  flex: 0 0 16px;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  transform: rotate(0deg);
  transition: transform .18s ease;
}
.nav-group.open > .nav-group-trigger .nav-arrow { transform: rotate(90deg); }
.nav-submenu { display: none; padding: 0 0 2px 32px; }
.nav-group.open > .nav-submenu { display: block; }
.nav-subitem {
  width: 100%;
  min-height: 36px;
  margin: 2px 0;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-dark-muted);
  text-align: left;
}
.nav-subitem:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-subitem.active { color: #fff; background: var(--brand); font-weight: 600; }
.nav-sub-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main { height: 100vh; margin-left: var(--sidebar); padding-top: var(--topbar); overflow: hidden; transition: margin-left .2s ease; }
.topbar {
  height: var(--topbar);
  position: fixed;
  left: var(--sidebar);
  right: 0;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(21, 33, 28, .04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  transition: left .2s ease;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-left { min-width: 0; flex: 1 1 auto; }
.topbar-brand { display: flex; align-items: center; align-self: stretch; padding-right: 20px; border-right: 1px solid var(--border); }
.shell-light-brand { display: none; padding-right: 0; border-right: 0; }
.topbar-logo { display: block; width: 204px; height: 38px; object-fit: contain; }
.topbar-path { display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.topbar-path span,
.topbar-path strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-path i { color: #a8b3ad; font-style: normal; font-size: 18px; }
.topbar-path strong { color: var(--text); font-size: 13px; }
.topbar-refresh { color: var(--muted); font-size: 17px; }
.topbar .menu-toggle {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border-radius: 8px;
  color: var(--muted);
}
.topbar .menu-toggle:hover,
.topbar .menu-toggle:focus-visible { color: var(--brand); background: rgba(11, 122, 91, .1); }
.menu-toggle-icon { width: 18px; height: 18px; fill: currentColor; }
.context-chip {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  min-height: 34px;
  border-radius: 9px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 12px;
}
.context-chip b { color: var(--brand-dark); }
.user-badge { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.account-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.account-button:hover,
.account-button:focus-visible { border-color: var(--border); background: var(--surface-soft); }
.account-copy { display: grid; min-width: 110px; gap: 2px; text-align: left; }
.account-copy strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.account-copy small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; margin-top: 2px; }
.account-menu-backdrop { position: fixed; inset: var(--topbar) 0 0; z-index: 88; background: transparent; }
.account-menu { position: fixed; z-index: 100; top: calc(var(--topbar) + 8px); right: 20px; width: min(240px, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.account-menu-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--text); text-align: left; }
.account-menu-item:hover { background: var(--surface-soft); }
.account-menu-copy { min-width: 0; flex: 1 1 auto; display: grid; gap: 3px; }
.account-menu-item strong { font-size: 12px; }
.account-menu-item small { color: #96a19b; font-size: 10px; }
.account-menu-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--brand-light); color: var(--brand-dark); font-size: 17px; font-weight: 800; }
.account-menu-item.danger strong { color: #d33f32; }
.account-menu-item.danger .account-menu-icon { background: #fff0ee; color: #d33f32; }
.account-menu-divider { height: 1px; margin: 4px 8px; background: var(--border); }
.account-menu-organization { padding: 11px 16px 9px; color: #9ba49f; font-size: 12px; }
.account-menu-chevron { flex: 0 0 auto; color: #8e9892; font-size: 20px; line-height: 1; transition: transform .18s ease; }
.account-theme-entry { position: relative; }
.account-theme-entry:hover .account-menu-chevron,
.account-theme-entry.is-open .account-menu-chevron,
.account-theme-entry:focus-within .account-menu-chevron { color: var(--brand); }
.account-theme-card {
  position: absolute;
  right: calc(100% + 10px);
  top: 0;
  width: 316px;
  z-index: 4;
  display: none;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.account-theme-entry:hover .account-theme-card,
.account-theme-entry.is-open .account-theme-card,
.account-theme-entry:focus-within .account-theme-card { display: grid; }
.account-theme-card[hidden] { display: none !important; }
.account-theme-choice {
  width: 100%;
  min-height: 48px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.account-theme-choice:hover,
.account-theme-choice.is-selected { background: #f4f6f5; }
.theme-preview {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 5px #d8f4ec;
}
.theme-preview.dark { border-color: #17372e; background: #0c1f1a; box-shadow: inset 0 0 0 5px #17372e; }
.theme-preview.brand { border-color: #087052; background: var(--brand); box-shadow: inset 0 0 0 5px #168f6d; }
.theme-preview.top { border-color: var(--border); background: #fff; box-shadow: none; }
.theme-preview.top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 6px 6px 2px 2px;
  background: var(--brand);
}
.theme-choice-copy { min-width: 0; display: grid; gap: 2px; }
.theme-choice-copy strong { font-size: 13px; font-weight: 600; }
.theme-choice-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-choice-check {
  color: var(--brand);
  font-size: 17px;
  font-weight: 500;
  text-align: center;
}
.account-summary { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.account-summary .user-badge { width: 44px; height: 44px; font-size: 16px; }
.account-summary strong, .account-summary span { display: block; }
.account-summary span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.account-actions { display: grid; gap: 8px; margin-top: 14px; }
.account-actions .btn { justify-content: flex-start; }
.account-actions .btn.danger { margin-top: 5px; }
.user-list { display: grid; gap: 9px; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.user-row-main { min-width: 0; }
.user-row-main strong, .user-row-main span { display: block; }
.user-row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-row-main span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.user-row-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.user-admin-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.user-admin-head p { margin: 0; color: var(--muted); font-size: 11px; }

.workspace { width: 100%; height: 100%; margin: 0; padding: 20px; overflow-y: auto; }

.app-shell.sidebar-collapsed .sidebar { width: 72px; }
.app-shell.sidebar-collapsed .sidebar-top { height: 56px; justify-content: center; margin: 0 8px 12px; }
.app-shell.sidebar-collapsed .sidebar-brand { display: none; }
.app-shell.sidebar-collapsed .sidebar-collapsed-logo { display: block; }
.app-shell.sidebar-collapsed .nav { padding: 0 8px; }
.app-shell.sidebar-collapsed .nav-button { justify-content: center; padding-inline: 0; }
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-priority,
.app-shell.sidebar-collapsed .nav-arrow,
.app-shell.sidebar-collapsed .nav-submenu { display: none; }
.app-shell.sidebar-collapsed .nav-group.is-current > .nav-group-trigger { background: var(--brand); color: #fff; }
.app-shell.sidebar-collapsed .topbar { left: 72px; }
.app-shell.sidebar-collapsed .main { margin-left: 72px; }

.app-shell[data-shell-theme="light-sidebar"] .shell-light-brand { display: flex; }
.app-shell[data-shell-theme="light-sidebar"] .sidebar {
  inset: var(--topbar) auto 0 0;
  padding: 14px 0;
  background: var(--surface);
  color: var(--muted);
  border-right-color: var(--border);
}
.app-shell[data-shell-theme="light-sidebar"] .sidebar-top { display: none; }
.app-shell[data-shell-theme="light-sidebar"] .nav-button { color: var(--muted); }
.app-shell[data-shell-theme="light-sidebar"] .nav-button:hover,
.app-shell[data-shell-theme="light-sidebar"] .nav-subitem:hover {
  color: var(--brand);
  background: var(--surface-soft);
}
.app-shell[data-shell-theme="light-sidebar"] .nav-group.is-current > .nav-group-trigger { color: var(--brand); }
.app-shell[data-shell-theme="light-sidebar"] .nav-subitem { color: var(--muted); }
.app-shell[data-shell-theme="light-sidebar"] .nav-button.active,
.app-shell[data-shell-theme="light-sidebar"] .nav-subitem.active {
  color: var(--brand-dark);
  background: var(--brand-light);
}
.app-shell[data-shell-theme="light-sidebar"] .topbar,
.app-shell[data-shell-theme="light-sidebar"].sidebar-collapsed .topbar { left: 0; }
.app-shell[data-shell-theme="light-sidebar"] .main { margin-left: var(--sidebar); }
.app-shell[data-shell-theme="light-sidebar"].sidebar-collapsed .main { margin-left: 72px; }
.app-shell[data-shell-theme="light-sidebar"].sidebar-collapsed .nav-group.is-current > .nav-group-trigger {
  color: var(--brand-dark);
  background: var(--brand-light);
}

.app-shell[data-shell-theme="brand-sidebar"] .sidebar {
  background: var(--brand);
  color: #fff;
  border-right-color: var(--brand-dark);
}
.app-shell[data-shell-theme="brand-sidebar"] .nav-button,
.app-shell[data-shell-theme="brand-sidebar"] .nav-subitem { color: rgba(255, 255, 255, .86); }
.app-shell[data-shell-theme="brand-sidebar"] .nav-button:hover,
.app-shell[data-shell-theme="brand-sidebar"] .nav-subitem:hover {
  color: #fff;
  background: rgba(255, 255, 255, .13);
}
.app-shell[data-shell-theme="brand-sidebar"] .nav-group.is-current > .nav-group-trigger { color: #fff; }
.app-shell[data-shell-theme="brand-sidebar"] .nav-button.active,
.app-shell[data-shell-theme="brand-sidebar"] .nav-subitem.active {
  color: var(--brand-dark);
  background: #fff;
}
.app-shell[data-shell-theme="brand-sidebar"].sidebar-collapsed .nav-group.is-current > .nav-group-trigger {
  color: var(--brand-dark);
  background: #fff;
}

.app-shell[data-shell-theme="top-navigation"] .shell-light-brand { display: flex; }
.app-shell[data-shell-theme="top-navigation"] .topbar { left: 0; }
.app-shell[data-shell-theme="top-navigation"] .topbar .menu-toggle { display: none; }
.app-shell[data-shell-theme="top-navigation"] .main {
  margin-left: 0;
  padding-top: calc(var(--topbar) + 52px);
}
.app-shell[data-shell-theme="top-navigation"] .sidebar {
  inset: var(--topbar) 0 auto;
  width: 100% !important;
  height: 52px;
  padding: 0 20px;
  overflow: visible;
  color: var(--muted);
  background: var(--surface);
  border-right: 0;
  border-bottom: 1px solid var(--border);
}
.app-shell[data-shell-theme="top-navigation"] .sidebar-top { display: none; }
.app-shell[data-shell-theme="top-navigation"] .nav {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
}
.app-shell[data-shell-theme="top-navigation"] .nav-button {
  width: auto;
  min-height: 40px;
  margin: 6px 0;
  color: var(--muted);
  white-space: nowrap;
}
.app-shell[data-shell-theme="top-navigation"] .nav-button:hover,
.app-shell[data-shell-theme="top-navigation"] .nav-subitem:hover {
  color: var(--brand);
  background: var(--surface-soft);
}
.app-shell[data-shell-theme="top-navigation"] .nav-button.active,
.app-shell[data-shell-theme="top-navigation"] .nav-group.is-current > .nav-group-trigger {
  color: var(--brand-dark);
  background: var(--brand-light);
}
.app-shell[data-shell-theme="top-navigation"] .nav-group {
  position: relative;
  width: auto;
  flex: 0 0 auto;
}
.app-shell[data-shell-theme="top-navigation"] .nav-submenu {
  position: absolute;
  top: 48px;
  left: 0;
  width: 184px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.app-shell[data-shell-theme="top-navigation"] .nav-group.open > .nav-submenu { display: none; }
.app-shell[data-shell-theme="top-navigation"] .nav-group:hover > .nav-submenu,
.app-shell[data-shell-theme="top-navigation"] .nav-group:focus-within > .nav-submenu { display: block; }
.app-shell[data-shell-theme="top-navigation"] .nav-subitem {
  color: var(--muted);
  padding: 8px 10px;
}
.app-shell[data-shell-theme="top-navigation"] .nav-subitem.active {
  color: var(--brand-dark);
  background: var(--brand-light);
}
.breadcrumbs { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs b { color: var(--text); }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 18px; }
.eyebrow { margin: 0 0 5px; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.2; }
.page-heading p { margin: 8px 0 0; color: var(--muted); max-width: 820px; font-size: 13px; line-height: 1.7; }
.heading-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.snapshot-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 13px;
  border: 1px solid #efd29c;
  border-radius: 10px;
  background: var(--amber-bg);
  color: #6f4a0b;
  font-size: 11px;
  line-height: 1.5;
}
.snapshot-notice strong { flex: 0 0 auto; }

.subnav-wrap { margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.subnav { display: flex; gap: 4px; min-width: max-content; }
.subnav button { border: 0; background: transparent; padding: 10px 14px 12px; color: var(--muted); font-size: 13px; position: relative; }
.subnav button:hover { color: var(--brand); }
.subnav button.active { color: var(--brand-dark); font-weight: 700; }
.subnav button.active::after { content: ""; position: absolute; height: 3px; left: 12px; right: 12px; bottom: 0; border-radius: 3px 3px 0 0; background: var(--brand); }

.btn { min-height: 36px; border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; color: var(--text); padding: 7px 13px; font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.danger { color: var(--red); border-color: #efc7c4; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.btn:disabled { cursor: not-allowed; opacity: .48; }

.badge, .status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #edf2ef;
  color: #4e6158;
  font-size: 11px;
  white-space: nowrap;
}
.badge.current, .status.good, .status.done, .status.ontrack, .status.pass { background: var(--brand-light); color: var(--brand-dark); }
.badge.plan, .status.watch, .status.pending { background: var(--amber-bg); color: #87570b; }
.status.risk, .status.fail { background: var(--red-bg); color: var(--red); }
.status.info { background: #eaf1ff; color: #315fae; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px; box-shadow: none; min-width: 0; }
.metric-label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.metric-value { margin-top: 9px; display: flex; align-items: baseline; gap: 6px; }
.metric-value strong { font-size: 26px; letter-spacing: -.03em; }
.metric-value span { color: var(--muted); font-size: 11px; }
.metric-foot { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.metric-card.warning { border-color: #efd29c; background: #fffaf0; }
.metric-card.positive { border-color: #bae1c9; background: #fbfefc; }

.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.aside { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; box-shadow: none; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; }
.panel-head p, .panel-head span { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.panel-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.workflow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.workflow-step { position: relative; padding: 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-soft); min-height: 98px; }
.workflow-step::after { content: "›"; position: absolute; right: -9px; top: 34px; color: #9dafa4; font-size: 21px; z-index: 2; }
.workflow-step:last-child::after { display: none; }
.workflow-step b { display: block; font-size: 12px; }
.workflow-step small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.workflow-step .step-no { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); font-size: 10px; margin-bottom: 9px; }

.dashboard-layout {
  display: grid;
  gap: 26px;
}
.dashboard-layout > .metric-grid,
.dashboard-layout > .grid,
.dashboard-layout > .panel {
  margin-bottom: 0;
}
.dashboard-layout > .metric-grid {
  grid-template-columns: repeat(4, minmax(190px, 300px));
  justify-content: center;
  gap: 32px;
}
.dashboard-layout > .metric-grid .metric-card {
  min-height: 132px;
  padding: 18px 20px;
}
.dashboard-layout > .grid {
  gap: 24px;
}
.dashboard-layout .panel {
  padding: 23px 24px;
}
.dashboard-layout .panel-head {
  margin-bottom: 20px;
}
.dashboard-layout .workflow {
  grid-template-columns: repeat(5, minmax(150px, 240px));
  justify-content: center;
  gap: 32px;
}
.dashboard-layout .workflow-step {
  min-height: 94px;
  padding: 12px 14px;
}
.dashboard-layout .workflow-step::after {
  right: -21px;
}

.bar-chart { display: flex; align-items: end; gap: 10px; min-height: 230px; padding: 24px 8px 4px; border-bottom: 1px solid var(--border); }
.bar-item { flex: 1; min-width: 42px; display: flex; flex-direction: column; justify-content: end; align-items: stretch; height: 190px; }
.bar { height: var(--value); min-height: 4px; background: linear-gradient(180deg, #3bb775, var(--brand)); border-radius: 7px 7px 2px 2px; position: relative; }
.bar.alt { background: linear-gradient(180deg, #5ba4e7, #3f76d3); }
.bar.warn { background: linear-gradient(180deg, #efbd58, #b87512); }
.bar span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; color: var(--muted); }
.bar-label { text-align: center; margin-top: 8px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hbar-list { display: grid; gap: 11px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 135px) minmax(100px, 1fr) auto; gap: 10px; align-items: center; font-size: 11px; }
.hbar-track { height: 9px; background: #e8efeb; border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; width: var(--value); background: var(--brand); border-radius: inherit; }
.hbar-fill.blue { background: var(--blue); }
.hbar-fill.amber { background: var(--amber); }
.hbar-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row em { font-style: normal; color: var(--muted); white-space: nowrap; }

.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 210px; }
.donut { --p: 65; width: 150px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), #e6ede9 0); position: relative; flex: 0 0 auto; }
.donut::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: #fff; }
.donut-label { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; }
.donut-label strong { font-size: 27px; }
.donut-label span { color: var(--muted); font-size: 10px; }
.legend { display: grid; gap: 10px; font-size: 11px; }
.legend-row { display: flex; justify-content: space-between; gap: 20px; }
.legend-row span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 7px; }

.filter-card { margin-bottom: 14px; }
.filter-card .panel-head { margin-bottom: 12px; }
.filters { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.filter-fields { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.filter-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.filter { display: grid; gap: 5px; min-width: 0; }
.filter label { color: var(--muted); font-size: 10px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--text); padding: 8px 10px; min-height: 36px; font-size: 12px; }
.textarea { min-height: 86px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); }

.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
th { text-align: left; color: #53635b; background: #f4f8f6; padding: 10px 12px; font-size: 10px; font-weight: 700; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; font-size: 11px; border-bottom: 1px solid #edf1ef; vertical-align: middle; }
th:last-child, td:last-child { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -1px 0 var(--border); }
th:last-child { z-index: 3; background: #f4f8f6; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.cell-title { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.cell-title:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { width: 100px; height: 7px; background: #e7edea; border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.progress i { display: block; height: 100%; width: var(--value); background: var(--brand); border-radius: inherit; }
.row-actions { display: flex; gap: 5px; align-items: center; white-space: nowrap; }
.action-more { position: relative; flex: 0 0 auto; }
.action-more-trigger > span { font-size: 17px; line-height: 1; }
.action-more-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 35;
  min-width: 118px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 52, 38, .14);
}
.action-more-menu[hidden] { display: none; }
.action-more-menu .action-more-item { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent; }
.action-more-menu .action-more-item:hover { background: var(--surface-soft); }

.task-list, .list { display: grid; gap: 9px; }
.task, .list-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 13px; background: var(--surface-soft); }
.task-top, .list-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.task strong, .list-item strong { font-size: 12px; }
.task p, .list-item p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 10px; }

.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 110px 18px 1fr; gap: 10px; min-height: 62px; }
.timeline-dot { position: relative; }
.timeline-dot::before { content: ""; position: absolute; left: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline-dot::after { content: ""; position: absolute; left: 8px; top: 17px; bottom: -5px; width: 2px; background: var(--border); }
.timeline-item:last-child .timeline-dot::after { display: none; }
.timeline-date { color: var(--muted); font-size: 10px; padding-top: 3px; }
.timeline-content b { font-size: 11px; }
.timeline-content p { color: var(--muted); font-size: 10px; margin: 4px 0 0; }

.detail-hero { padding: 20px; border-radius: var(--radius); background: linear-gradient(120deg, #123c29, #176541); color: white; margin-bottom: 16px; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.detail-hero h2 { margin: 5px 0 6px; font-size: 24px; }
.detail-hero p { margin: 0; color: #c6dfd1; font-size: 11px; }
.detail-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.detail-stats span { color: #b8d5c5; font-size: 10px; }
.detail-stats strong { display: block; margin-top: 5px; color: white; font-size: 16px; }

.stage-track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 10px 0 4px; }
.stage { min-width: 0; }
.stage-line { height: 5px; background: #dfe7e2; border-radius: 99px; }
.stage.done .stage-line { background: var(--brand); }
.stage.current .stage-line { background: var(--amber); }
.stage span { display: block; font-size: 9px; color: var(--muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty, .error-state, .plan-state { padding: 38px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-soft); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-light); color: var(--brand-dark); font-size: 22px; }
.empty h3, .error-state h3, .plan-state h3 { margin: 0; font-size: 15px; }
.empty p, .error-state p, .plan-state p { margin: 8px auto 15px; color: var(--muted); font-size: 11px; line-height: 1.6; max-width: 520px; }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; background: rgba(8,22,14,.44); z-index: 90; }
.modal { position: fixed; z-index: 100; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: 0 18px 54px rgba(21,33,28,.18); }
.modal > form { min-height: 0; display: flex; flex: 1; flex-direction: column; overflow: hidden; }
.modal-head, .modal-foot { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head { border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { min-height: 0; padding: 20px; overflow: hidden; }
.modal-body > .table-wrap, .modal-body .user-list, .modal-body .task-list { max-height: min(52vh, 460px); overflow: auto; }
.modal-foot { border-top: 1px solid var(--border); justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #46574f; font-size: 11px; font-weight: 650; }
.required::after { content: " *"; color: var(--red); }
.field-help { color: var(--muted); font-size: 9px; }

.user-identity { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.user-identity > div { min-width: 0; }
.user-identity strong, .user-identity small { display: block; }
.user-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { margin-top: 3px; color: var(--brand-dark); font-size: 9px; }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--brand-light); color: var(--brand-dark); font-weight: 800; }
.user-policy-grid .panel { height: 100%; }
td code { padding: 3px 6px; border-radius: 5px; background: #f1f5f3; color: #365347; font-size: 10px; }
.trial-controls { margin-bottom: 16px; padding: 18px; border: 1px solid #bcdac9; border-radius: var(--radius); background: linear-gradient(135deg, #f4fbf7, #fff); box-shadow: 0 3px 14px rgba(30,62,45,.04); }
.trial-controls h2 { margin: 0; font-size: 16px; }
.trial-controls p { margin: 6px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.trial-control-grid { display: grid; grid-template-columns: minmax(220px,1.4fr) repeat(2,minmax(150px,1fr)) auto; gap: 10px; align-items: end; }
.trial-control-grid .filter { min-width: 0; }
.filter > span { color: var(--muted); font-size: 10px; }
.trial-buttons { display: flex; gap: 7px; flex-wrap: wrap; }
.trial-notice { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 11px; line-height: 1.55; }
.trial-notice strong { color: var(--text); flex: 0 0 auto; }
.trial-notice.positive { border-color: #bae1c9; background: #f5fbf7; }
.trial-notice.warning { border-color: #efd29c; background: var(--amber-bg); }
.trial-checkbox { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.trial-checkbox:disabled { cursor: not-allowed; }
.comparison { min-height: 105px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; text-align: center; }
.comparison > div:nth-child(2) { color: var(--brand); font-size: 25px; }
.comparison span { display: block; color: var(--muted); font-size: 10px; }
.comparison strong { display: block; margin-top: 8px; font-size: 20px; }
.proposal-source { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #bcdac9; border-radius: 11px; background: #f4fbf7; }
.proposal-source span { display: block; color: var(--muted); font-size: 10px; }
.proposal-source strong { display: block; margin-top: 4px; font-size: 12px; }
.proposal-source p { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 150; background: #173b2a; color: white; border-radius: 10px; padding: 12px 15px; box-shadow: var(--shadow); font-size: 12px; max-width: 380px; }
.loading { min-height: 440px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid #dbe6e0; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.aside { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workflow-step::after { display: none; }
  .dashboard-layout > .metric-grid {
    grid-template-columns: repeat(2, minmax(220px, 340px));
    gap: 28px;
  }
  .dashboard-layout .workflow {
    grid-template-columns: repeat(3, minmax(170px, 260px));
    gap: 28px;
  }
}

@media (max-width: 820px) {
  .trial-control-grid { grid-template-columns: 1fr; }
  .trial-buttons .btn { flex: 1; }
  .trial-notice { align-items: flex-start; flex-direction: column; }
  .context-chip.optional { display: none; }
  .workspace { padding: 18px 16px 38px; }
  .filters { grid-template-columns: 1fr; }
  .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { justify-content: flex-end; }
  .page-heading { display: block; }
  .heading-actions { justify-content: flex-start; margin-top: 13px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr; }
  .dashboard-layout > .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .dashboard-layout .workflow {
    grid-template-columns: minmax(0, 420px);
    gap: 16px;
  }
  .dashboard-layout { gap: 20px; }
  .dashboard-layout > .grid { gap: 20px; }
  .dashboard-layout .panel { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal .form-field.full { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .sidebar,
  .app-shell.sidebar-collapsed .sidebar { width: 72px; padding: 12px 0; transform: none; }
  .sidebar-top,
  .app-shell.sidebar-collapsed .sidebar-top { height: 56px; justify-content: center; margin: 0 8px 12px; }
  .sidebar-brand,
  .app-shell.sidebar-collapsed .sidebar-brand { display: none; }
  .sidebar-collapsed-logo,
  .app-shell.sidebar-collapsed .sidebar-collapsed-logo { display: block; }
  .nav,
  .app-shell.sidebar-collapsed .nav { padding: 0 8px; }
  .nav-button,
  .app-shell.sidebar-collapsed .nav-button { justify-content: center; padding-inline: 0; }
  .nav-label,
  .nav-priority,
  .nav-arrow,
  .nav-submenu,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .nav-priority,
  .app-shell.sidebar-collapsed .nav-arrow,
  .app-shell.sidebar-collapsed .nav-submenu { display: none; }
  .sidebar:not(.open) .nav-submenu { display: none; }
  .nav-group.is-current > .nav-group-trigger,
  .app-shell.sidebar-collapsed .nav-group.is-current > .nav-group-trigger { background: var(--brand); color: #fff; }
  .sidebar.open { width: var(--sidebar); box-shadow: 10px 0 30px rgba(7, 22, 17, .22); }
  .sidebar.open .sidebar-top { height: 58px; justify-content: flex-start; margin: 0 14px 12px; }
  .sidebar.open .sidebar-brand { display: flex; }
  .sidebar.open .sidebar-collapsed-logo { display: none; }
  .sidebar.open .nav { padding: 0 10px; }
  .sidebar.open .nav-button { justify-content: flex-start; padding-inline: 12px; }
  .sidebar.open .nav-label { display: block; }
  .sidebar.open .nav-arrow { display: block; }
  .sidebar.open .nav-group.is-current > .nav-group-trigger { background: transparent; color: #fff; }
  .sidebar.open .nav-group.open > .nav-submenu { display: block; }
  .topbar,
  .app-shell.sidebar-collapsed .topbar { left: 72px; padding: 0 12px; }
  .app-shell.mobile-sidebar-open .topbar { left: var(--sidebar); }
  .main,
  .app-shell.sidebar-collapsed .main { margin-left: 72px; }
  .app-shell[data-shell-theme="light-sidebar"] .topbar,
  .app-shell[data-shell-theme="light-sidebar"].sidebar-collapsed .topbar,
  .app-shell[data-shell-theme="light-sidebar"].mobile-sidebar-open .topbar { left: 0; }
  .app-shell[data-shell-theme="light-sidebar"] .main,
  .app-shell[data-shell-theme="light-sidebar"].sidebar-collapsed .main { margin-left: 72px; }
  .app-shell[data-shell-theme="light-sidebar"] .sidebar.open .sidebar-top { display: none; }
  .app-shell[data-shell-theme="light-sidebar"] .nav-group.is-current > .nav-group-trigger,
  .app-shell[data-shell-theme="light-sidebar"].sidebar-collapsed .nav-group.is-current > .nav-group-trigger {
    color: var(--brand-dark);
    background: var(--brand-light);
  }
  .app-shell[data-shell-theme="light-sidebar"] .sidebar.open .nav-group.is-current > .nav-group-trigger {
    color: var(--brand);
    background: transparent;
  }
  .app-shell[data-shell-theme="brand-sidebar"] .nav-group.is-current > .nav-group-trigger,
  .app-shell[data-shell-theme="brand-sidebar"].sidebar-collapsed .nav-group.is-current > .nav-group-trigger {
    color: var(--brand-dark);
    background: #fff;
  }
  .app-shell[data-shell-theme="brand-sidebar"] .sidebar.open .nav-group.is-current > .nav-group-trigger {
    color: #fff;
    background: transparent;
  }
  .app-shell[data-shell-theme="top-navigation"] .sidebar,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .sidebar {
    inset: var(--topbar) 0 auto;
    width: 100% !important;
    height: 52px;
    padding: 0 12px;
    overflow: visible;
  }
  .app-shell[data-shell-theme="top-navigation"] .nav,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .nav {
    padding: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .app-shell[data-shell-theme="top-navigation"] .nav-button,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .nav-button {
    width: auto;
    justify-content: flex-start;
    padding-inline: 10px;
  }
  .app-shell[data-shell-theme="top-navigation"] .nav-label,
  .app-shell[data-shell-theme="top-navigation"] .nav-arrow,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .nav-label,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .nav-arrow { display: block; }
  .app-shell[data-shell-theme="top-navigation"] .topbar,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .topbar { left: 0; }
  .app-shell[data-shell-theme="top-navigation"] .main,
  .app-shell[data-shell-theme="top-navigation"].sidebar-collapsed .main {
    margin-left: 0;
    padding-top: calc(var(--topbar) + 52px);
  }
  .shell-light-brand .topbar-logo { width: 118px; max-width: 118px; }
  .workspace { padding: 14px; }
  .account-copy { display: none; }
}

@media (max-width: 680px) {
  .account-theme-card {
    position: fixed;
    top: calc(var(--topbar) + 176px);
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - var(--topbar) - 84px);
    overflow-y: auto;
  }
}

@media (max-width: 520px) {
  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  .modal-head, .modal-foot { padding: 10px 12px; }
  .modal-head h2 { font-size: 15px; }
  .modal-body { padding: 12px; }
  .modal .form-grid { gap: 8px 10px; }
  .modal .form-field { gap: 3px; }
  .modal .form-field label { font-size: 10px; line-height: 1.25; }
  .modal .field-help { font-size: 8px; line-height: 1.35; }
  .modal .input, .modal .select, .modal .textarea {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .modal-body .task-list, .modal-body .user-list {
    max-height: min(20vh, 150px);
    gap: 5px;
    padding-right: 4px;
  }
  .modal .task { padding: 7px 8px; }
  .modal .task p { margin-top: 2px; font-size: 9px; line-height: 1.35; }
  .modal-foot .btn { min-height: 32px; padding: 6px 11px; }
  .metric-grid { grid-template-columns: 1fr; }
  .dashboard-layout > .metric-grid { grid-template-columns: 1fr; }
  .topbar-right .context-chip { display: none; }
  .topbar-refresh { display: none; }
  .topbar-path { gap: 0; padding-left: 0; }
  .topbar-path > span,
  .topbar-path > i { display: none; }
  .filter-fields { grid-template-columns: 1fr; }
  .detail-hero { display: block; }
  .detail-stats { margin-top: 16px; }
  .donut-wrap { flex-direction: column; }
  .snapshot-notice { align-items: flex-start; flex-direction: column; gap: 3px; }
  .auth-shell { padding: 16px; }
  .auth-card { padding: 24px 20px; border-radius: 18px; }
  .user-row { align-items: flex-start; }
  .user-row-side { align-items: flex-end; flex-direction: column; }
}
