/* Legacy tokens (theme.css defines --accent, --bg-*, --text, --border, --radius, --shadow) */
:root {
  --ink-950: #101826;
  --ink-800: #1f2a3b;
  --ink-700: #2d3a4f;
  --ink-500: #5c6b82;
  --ink-400: #8391a5;
  --line: #E2E8F0;
  --line-dark: #cbd5e1;
  --paper: #ffffff;
  --cloud: #F8FAFC;
  --cloud-2: #F1F5F9;
  --success: #166534;
  --warn: #854D0E;
  --danger: #991B1B;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06);
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-app);
  line-height: 1.45;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(560px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-soft);
}

.auth-card-wide {
  width: min(760px, 100%);
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink-400);
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  color: var(--ink-950);
}

.muted {
  color: var(--ink-500);
}

.hidden {
  display: none !important;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent-2);
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary.is-saving {
  filter: saturate(0.85);
}

.btn-primary.is-saved {
  background: linear-gradient(180deg, #1f9f67, #178153);
  border-color: #157349;
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  color: var(--ink-700);
  border: 1px solid var(--line-dark);
  background: #fff;
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border: 1px solid #a63131;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover {
  background: #a93232;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.portal-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-sidebar {
  width: 272px;
  background: var(--bg-sidebar, #F8FAFC);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 12px;
  gap: 10px;
  transition: width 0.2s ease;
}

.portal-sidebar.is-collapsed {
  width: 56px;
  padding: 8px;
}

.portal-sidebar.is-collapsed .sidebar-header-text,
.portal-sidebar.is-collapsed .sidebar-client-badge-name,
.portal-sidebar.is-collapsed .nav-section-label,
.portal-sidebar.is-collapsed .nav-domain-title,
.portal-sidebar.is-collapsed .mi-nav-item span,
.portal-sidebar.is-collapsed .nav-count,
.portal-sidebar.is-collapsed .sidebar-product,
.portal-sidebar.is-collapsed .sidebar-logo {
  display: none;
}

.portal-sidebar.is-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.sidebar-header {
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: var(--bg-card, #ffffff);
}

.sidebar-header-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sidebar-header-text {
  flex: 1;
  min-width: 0;
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-collapse-btn:hover {
  background: var(--hover, #E2E8F0);
  color: var(--text);
}

.sidebar-collapse-btn svg {
  transition: transform 0.2s ease;
}

.sidebar-client-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding: 0.375rem 0.5rem;
  border-radius: 8px;
  background: var(--accent-soft, rgba(46, 157, 106, 0.10));
  border: 1px solid transparent;
}

.sidebar-client-badge-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent, #2E9D6A);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-client-badge-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 0 1rem 0.25rem;
}

.sidebar-logo {
  width: 172px;
  max-width: 100%;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: 8px;
}

.sidebar-brand {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.sidebar-product {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(15, 23, 42, 0.65);
  text-transform: uppercase;
}

.sidebar-tenant {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
}

/* Client-workspace sidebar: tighten hero block without logo */
.portal-layout.in-client-context .portal-sidebar {
  width: 284px;
}

.portal-layout.in-client-context .sidebar-header {
  padding: 12px;
}

.portal-layout.in-client-context .sidebar-brand {
  margin-top: 0;
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: -0.2px;
}

.portal-layout.in-client-context .sidebar-product {
  margin-top: 6px;
  font-size: 13px;
}

.portal-layout.in-client-context .sidebar-tenant {
  margin-top: 10px;
  font-size: 12px;
}

.org-scope-form {
  margin-top: 11px;
}

.sidebar-scope-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink-400);
  margin-bottom: 4px;
}

.sidebar-scope-select {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  color: var(--ink-800);
  background: #fff;
}

.auth-logo-row {
  margin-bottom: 10px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.auth-brand-row h1 {
  margin: 0;
}

.auth-logo {
  width: 220px;
  max-width: 100%;
  height: auto;
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}

.auth-logo--product {
  width: 50px;
  max-height: 50px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #ffffff;
}

.nav-section {
  margin-bottom: 14px;
}

.nav-domain-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.55);
  margin-top: 14px;
  margin-bottom: 8px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  color: rgba(15, 23, 42, 0.85);
  text-decoration: none;
  border-left: 3px solid transparent;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.nav-item .nav-icon,
.nav-item svg {
  width: 18px;
  height: 18px;
  color: rgba(15, 23, 42, 0.55);
  fill: currentColor;
  flex-shrink: 0;
}

.nav-count {
  margin-left: auto;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  color: inherit;
  background: var(--bg-card);
}

.nav-item:hover {
  color: rgba(15, 23, 42, 0.9);
  background: rgba(15, 23, 42, 0.06);
}

.nav-item:hover .nav-icon,
.nav-item:hover svg {
  color: rgba(15, 23, 42, 0.75);
}

.nav-item.active,
.nav-item.is-active {
  color: rgba(15, 23, 42, 0.95);
  border-left-color: #1B6D48;
  background: rgba(46, 157, 106, 0.16);
  box-shadow: inset 0 0 0 1px rgba(46, 157, 106, 0.25);
}

.nav-item.active .nav-icon,
.nav-item.active svg,
.nav-item.is-active .nav-icon,
.nav-item.is-active svg {
  color: #1B6D48;
}

.nav-item.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.sidebar-footer {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

.user-name {
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.user-role {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
}

.logout-btn {
  display: block;
  margin-top: 10px;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--bg-card);
}

.logout-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--hover);
}

.portal-main {
  flex: 1;
  min-width: 0;
  padding: 16px 24px 30px;
  background: #F8FAFC;
}

.layout-no-sidebar .portal-main,
.portal-main-no-sidebar {
  padding-left: 24px;
}


.topbar-search-trigger:focus-visible,
.global-search-close:focus-visible,
.global-search-input-wrap input:focus-visible,
.global-search-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.hourglass-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

.hourglass-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.global-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 15, 29, 0.58);
  backdrop-filter: blur(2px);
}

.global-search-modal.open {
  display: flex;
}

.global-search-panel {
  width: min(760px, 100%);
  border: 1px solid #b4c8ea;
  border-radius: 14px;
  box-shadow: 0 28px 48px rgba(8, 15, 29, 0.32);
  background:
    radial-gradient(460px 220px at 90% -10%, rgba(158, 200, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  overflow: hidden;
}

.global-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.global-search-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--ink-950);
}

.global-search-close {
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--ink-700);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.global-search-input-wrap {
  margin: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #bfd0ea;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.global-search-input-wrap input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink-900, #1a2331);
  font: inherit;
  font-size: 16px;
}

.global-search-input-wrap input::placeholder {
  color: var(--ink-400);
}

.global-search-status {
  min-height: 20px;
  margin: 8px 16px 0;
  color: var(--ink-500);
  font-size: 12px;
}

.global-search-results {
  margin: 8px 0 0;
  max-height: min(58vh, 420px);
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.global-search-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-align: left;
  padding: 10px 16px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.global-search-item:last-child {
  border-bottom: 0;
}

.global-search-item:hover,
.global-search-item.active {
  background: #edf3ff;
}

.global-search-type {
  margin-top: 1px;
  border: 1px solid #c8d8ee;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: #355076;
  background: #f5f9ff;
}

.global-search-pill-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.global-search-doc-category {
  border: 1px solid #bfdcc9;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: #1d5f46;
  background: #eef9f2;
}

.global-search-col-type {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
}

.global-search-col-main {
  min-width: 0;
}

.global-search-title {
  margin: 0;
  color: var(--ink-950);
  font-weight: 700;
  font-size: 15px;
}

.global-search-snippet {
  margin: 2px 0 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .global-search-item {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }
}

.topbar-form input {
  width: min(440px, 52vw);
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}

.topbar-form input::placeholder {
  color: #b5c7e6;
}

.topbar-form button {
  margin: 0;
  padding: 8px 12px;
}

.flash {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: #f9fbff;
  font-size: 14px;
}

.flash.success {
  color: #0b5d43;
  border-color: #a6d9c7;
  background: #e9f8f1;
}

.flash.error {
  color: var(--danger);
  border-color: #e8c3c3;
  background: #fdf0f0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.page-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.4px;
  color: var(--ink-950);
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--ink-500);
  max-width: 820px;
}

.status-badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-ok {
  color: var(--ok-text);
  background: var(--ok-bg);
}

.status-warn {
  color: var(--warn-text);
  background: var(--warn-bg);
}

.alert-box {
  margin-top: 14px;
  background: #fdf0f0;
  border: 1px solid #e8c3c3;
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.card-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.metrics-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.roadmap-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(20, 30, 50, 0.02);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--ink-950);
}

.card p {
  margin: 0;
  color: var(--ink-500);
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #7ea8ff 0, #2f65d9 100%);
  opacity: 0.55;
}

.metric-label {
  font-size: 10px;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.metric-value {
  margin-top: 5px;
  color: var(--ink-950);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}

.metric-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-500);
}

.list-block {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-block li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.list-block li:last-child {
  border-bottom: 0;
}

.list-title {
  font-weight: 600;
  color: var(--ink-800);
}

.list-meta {
  font-size: 12px;
  color: var(--ink-500);
}

.activity-feed {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.activity-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f7fbff;
  background: linear-gradient(145deg, #6db9a0 0%, #2f8a70 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

img.activity-avatar {
  object-fit: cover;
  object-position: center;
  display: block;
}

.activity-body {
  min-width: 0;
}

.activity-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink-900);
}

.activity-text strong {
  font-weight: 600;
}

.activity-target {
  font-weight: 600;
  color: var(--ink-700);
  text-transform: lowercase;
}

.activity-title {
  color: #356985;
}

.activity-meta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-500);
}

.activity-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #9aa8c1;
}

.module-card {
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: #b8c7e1;
  box-shadow: var(--shadow-soft);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.quick-actions .btn-secondary {
  margin-top: 0;
}

.dash-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  border: 1px solid #cad7ef;
  border-radius: var(--radius-lg);
  padding: 18px;
  background:
    radial-gradient(320px 180px at 85% 18%, rgba(139, 188, 255, 0.28), transparent 70%),
    linear-gradient(125deg, #17243a 0%, #263d68 58%, #2959a9 100%);
  color: #f1f6ff;
  box-shadow: 0 14px 34px rgba(18, 35, 68, 0.26);
}

.dash-title {
  margin: 0;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.6px;
  color: #fff;
}

.dash-subtitle {
  margin: 8px 0 0;
  color: #d9e7ff;
  max-width: 820px;
}

.dash-hero .eyebrow {
  color: #c1d8ff;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.dash-hero-actions .btn-primary,
.dash-hero-actions .btn-secondary {
  margin-top: 0;
}

.dash-window-switch {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.dash-window-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  color: #d5e6ff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  box-sizing: border-box;
}

.dash-window-chip.active {
  color: #112449;
  background: #dbe9ff;
  border-color: #dbe9ff;
  font-weight: 700;
}

.dash-hero-aside {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(12, 20, 34, 0.34);
  display: grid;
  gap: 10px;
  align-content: start;
}

.dash-context {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 10px;
}

.dash-context:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.dash-context-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #b6c9e8;
}

.dash-context-value {
  font-size: 17px;
  color: #fff;
  font-weight: 700;
}

.dash-favorites {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 10px 10px 12px;
  background: rgba(11, 20, 35, 0.36);
  min-height: 0;
}

.dash-favorites-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dash-favorites-head h2 {
  margin: 0;
  font-size: 14px;
  color: #e8f1ff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.dash-favorites-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 3px;
  scroll-snap-type: x proximity;
}

.dash-favorites-rail::-webkit-scrollbar {
  height: 8px;
}

.dash-favorites-rail::-webkit-scrollbar-thumb {
  background: rgba(186, 210, 255, 0.4);
  border-radius: 999px;
}

.dash-favorite-card {
  min-width: 0;
  max-width: none;
  border: 1px solid #d5deee;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 10px 16px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

.dash-favorite-main {
  text-decoration: none;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  width: max-content;
  justify-content: center;
  margin: 0 auto;
}

.dash-favorite-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.26em;
  background: linear-gradient(180deg, #8eb4ff, #5586e3);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.dash-favorite-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}

.dash-favorite-logo.logo-shape-wide {
  width: 48px;
  height: 28px;
}

.dash-favorite-logo.logo-shape-tall {
  width: 28px;
  height: 40px;
}

.dash-favorite-name {
  color: var(--ink-800);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  padding-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-favorites-empty {
  margin: 0;
  color: #c9d9f4;
  font-size: 13px;
}

/* Dashboard page: operational density */
.dash-page {
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  background: #f6f8fa;
}

/* ========== Dashboard content (Figma-aligned) ========== */
.dash-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem;
}

.dash-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-page-head-left { min-width: 0; }
.dash-page-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}
.dash-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-500);
}
.dash-page-head-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.dash-scope-form { display: inline-block; }
.dash-client-select {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-800);
  min-width: 140px;
}
.dash-pills { display: flex; gap: 0.25rem; }
.dash-pill {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-600);
  background: #fff;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dash-pill:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.15);
  color: var(--ink-800);
}
.dash-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 12-column grid for dashboard content (scoped to .dash-page) */
.dash-page .dash-container .dash-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .dash-page .dash-container .dash-grid { gap: 1.5rem; }
}
.dash-page .dash-grid-kpi {
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .dash-page .dash-grid-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .dash-page .dash-grid-kpi {
    grid-template-columns: 1fr;
  }
}
.dash-page .dash-grid-main {
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .dash-page .dash-grid-main {
    grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
  }
}
.dash-col-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 900px) {
  .dash-col-left { gap: 1.5rem; }
}
.dash-right-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: transparent;
}
@media (min-width: 900px) {
  .dash-right-rail { gap: 1.5rem; }
}

/* Cards */
.dash-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.dash-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-800);
}
.dash-card-actions { display: flex; align-items: center; gap: 0.25rem; }
.dash-card-menu, .dash-card-icon { color: var(--ink-500); font-size: 1rem; }
.dash-card-link { font-size: 13px; color: var(--ink-600); text-decoration: none; }
.dash-card-link:hover { color: var(--ink-800); text-decoration: underline; }
.dash-card-body { padding: 16px; }
.dash-card-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13px;
}
.dash-card-footer a { color: var(--accent); text-decoration: none; }
.dash-card-footer a:hover { text-decoration: underline; }

/* KPI cards */
.dash-kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 0 0.5rem;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.dash-kpi-icon {
  grid-row: 1 / -1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}
.dash-kpi-icon-organizations,
.dash-kpi-icon-clients { background: #e0f2fe; color: #0369a1; }
.dash-kpi-icon-assets { background: #ede9fe; color: #6d28d9; }
.dash-kpi-icon-runbooks { background: #ffedd5; color: #c2410c; }
.dash-kpi-icon-files,
.dash-kpi-icon-documents { background: #ccfbf1; color: #0d9488; }
.dash-kpi-icon-passwords { background: #fee2e2; color: #b91c1c; }
.dash-pill-delta {
  grid-column: 2;
  justify-self: end;
  font-size: 12px;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.dash-pill-delta.trend-up { color: #0f7b57; background: #d1fae5; }
.dash-pill-delta.trend-down { color: #ac3a3a; background: #fee2e2; }
.dash-pill-delta.trend-flat { color: #64748b; background: #f1f5f9; }
.dash-kpi-metric {
  grid-column: 2;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.2;
}
.dash-kpi-label {
  grid-column: 2;
  font-size: 12px;
  color: var(--ink-500);
}

/* List rows (Action Center) */
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.dash-list-row:last-child { border-bottom: none; }
.dash-list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-list-dot.priority-1,
.dash-list-dot.tone-danger { background: #dc2626; }
.dash-list-dot.priority-2,
.dash-list-dot.tone-warn { background: #ea580c; }
.dash-list-dot.priority-3,
.dash-list-dot.tone-neutral { background: #64748b; }
.dash-list-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.dash-list-title { font-size: 13px; font-weight: 500; color: var(--ink-800); }
.dash-list-meta { font-size: 12px; color: var(--ink-500); }
.dash-list-action {
  font-size: 12px;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--ink-700);
  text-decoration: none;
  flex-shrink: 0;
}
.dash-list-action:hover { background: #e2e8f0; color: var(--ink-900); }

/* Table (Recent Documentation Changes) */
.dash-table-wrap { overflow-x: auto; }
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: var(--ink-600);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.dash-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--ink-700);
}
.dash-table-doc-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: var(--ink-400);
  border-radius: 2px;
}
.dash-pill-type {
  font-size: 11px;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}
.dash-table-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.dash-table-empty { color: var(--ink-500); font-size: 13px; }

/* Favorites 2×2 grid */
.dash-favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.dash-favorite-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: var(--ink-800);
  min-height: 80px;
}
.dash-favorite-tile:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.1);
}
.dash-favorite-tile-placeholder {
  visibility: hidden;
  pointer-events: none;
  min-height: 80px;
}
.dash-favorite-tile-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}
.dash-favorite-tile-initials {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--ink-600);
  border-radius: 6px;
}
.dash-favorite-tile-name { font-size: 12px; font-weight: 500; text-align: center; }

/* Documentation Activity strip + chart */
.dash-activity-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
@media (max-width: 400px) {
  .dash-activity-strip { grid-template-columns: repeat(2, 1fr); }
}
.dash-activity-strip-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.dash-activity-strip-value { font-size: 18px; font-weight: 600; color: var(--ink-800); }
.dash-activity-strip-label { font-size: 12px; color: var(--ink-500); }
.dash-activity-strip-change { font-size: 13px; font-weight: 500; color: var(--ink-700); }
.dash-chart-wrap { margin-top: 0.5rem; }
.dash-chart {
  height: 120px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.dash-chart-svg { width: 100%; height: 100%; display: block; }
.dash-chart-grid { stroke: rgba(15, 23, 42, 0.08); stroke-width: 0.5; }
.dash-chart-line { stroke: var(--accent); stroke-width: 2; }
.dash-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 11px;
  color: var(--ink-500);
}
.dash-chart-empty { margin: 0.5rem 0; font-size: 13px; color: var(--ink-500); }

/* System Health */
.dash-health-rows { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.dash-health-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
}
.dash-health-label { font-size: 12px; color: var(--ink-600); }
.dash-health-bar-wrap {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}
.dash-health-bar {
  height: 100%;
  background: #0f7b57;
  border-radius: 4px;
  transition: width 0.2s;
}
.dash-health-bar-alt { background: #0369a1; }
.dash-health-value { font-size: 12px; font-weight: 600; color: var(--ink-700); }
.dash-health-bullets { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--ink-600); }
.dash-health-bullets li { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; }
.dash-health-bullet { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; }
.dash-health-bullet-ok { background: #0f7b57; }

/* ========== Dashboard layout (Figma mockup) ========== */
.dash-page {
  --border-subtle: rgba(15, 23, 42, 0.08);
  --text-muted: var(--ink-500);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dashboard-kpi-grid { grid-template-columns: 1fr; }
}

.dashboard-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.dashboard-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-800);
}
.dashboard-card-actions { color: var(--text-muted); font-size: 14px; }
.dashboard-card-link { font-size: 13px; color: var(--ink-600); text-decoration: none; }
.dashboard-card-link:hover { color: var(--ink-800); text-decoration: underline; }
.dashboard-card-body { padding: 0; }
.dashboard-card-footer {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
}
.dashboard-card-footer a { color: var(--accent); text-decoration: none; }
.dashboard-card-footer a:hover { text-decoration: underline; }

.dashboard-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dashboard-left > * {
  margin-bottom: 20px;
}
.dashboard-left > *:last-child {
  margin-bottom: 0;
}

.dashboard-kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 72px;
  padding: 16px;
}
.dashboard-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f3f6f8;
}
.dashboard-kpi-icon-organizations,
.dashboard-kpi-icon-clients { color: #0369a1; }
.dashboard-kpi-icon-assets { color: #6d28d9; }
.dashboard-kpi-icon-runbooks { color: #c2410c; }
.dashboard-kpi-icon-files,
.dashboard-kpi-icon-documents { color: #0d9488; }
.dashboard-kpi-icon-passwords { color: #b91c1c; }
.dashboard-kpi-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.dashboard-kpi-delta {
  font-size: 12px;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  order: -1;
  margin-left: auto;
}
.dashboard-kpi-delta.trend-up { color: #0f7b57; background: #d1fae5; }
.dashboard-kpi-delta.trend-down { color: #ac3a3a; background: #fee2e2; }
.dashboard-kpi-delta.trend-flat { color: #64748b; background: #f1f5f9; }
.dashboard-kpi-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-800);
  width: 100%;
}
.dashboard-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
}

.dashboard-right-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.dashboard-list { list-style: none; margin: 0; padding: 0; }
.dashboard-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.dashboard-list-row:last-child { border-bottom: none; }
.dashboard-list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dashboard-list-dot.priority-1,
.dashboard-list-dot.tone-danger { background: #dc2626; }
.dashboard-list-dot.priority-2,
.dashboard-list-dot.tone-warn { background: #ea580c; }
.dashboard-list-dot.priority-3,
.dashboard-list-dot.tone-neutral { background: #64748b; }
.dashboard-list-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.dashboard-list-title { font-size: 13px; font-weight: 500; color: var(--ink-800); }
.dashboard-list-meta { font-size: 12px; color: var(--text-muted); }
.dashboard-list-action {
  font-size: 12px;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--ink-700);
  text-decoration: none;
  flex-shrink: 0;
}
.dashboard-list-action:hover { background: #e2e8f0; color: var(--ink-900); }

.dashboard-table-wrap { overflow-x: auto; }
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dashboard-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: var(--ink-600);
  border-bottom: 1px solid var(--border-subtle);
}
.dashboard-table .table-header th {
  background: #f7f8fa;
  font-weight: 500;
}
.dashboard-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink-700);
}
.dashboard-table-doc-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: var(--ink-400);
  border-radius: 2px;
}
.dashboard-pill-type {
  font-size: 11px;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}
.dashboard-table-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.dashboard-table-empty { color: var(--text-muted); font-size: 13px; }

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.favorite-tile {
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  text-decoration: none;
  color: var(--ink-800);
}
.favorite-tile:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.12);
}
.favorite-tile-placeholder {
  visibility: hidden;
  pointer-events: none;
}
.favorite-tile-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}
.favorite-tile-initials {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--ink-600);
  border-radius: 6px;
}
.favorite-tile-name { font-size: 12px; font-weight: 500; text-align: center; }

.activity-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.activity-metrics-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.activity-metrics-value { font-size: 16px; font-weight: 600; color: var(--ink-800); }
.activity-metrics-change { font-size: 12px; font-weight: 500; color: var(--ink-700); }
.activity-chart {
  height: 150px;
  margin-top: 4px;
}
.activity-chart-inner {
  height: 100%;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}
.activity-chart-svg { width: 100%; height: 100%; display: block; }
.activity-chart-grid { stroke: rgba(15, 23, 42, 0.08); stroke-width: 0.5; }
.activity-chart-line { stroke: var(--accent); stroke-width: 2; }
.activity-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 11px;
  color: var(--text-muted);
}
.activity-chart-empty { margin: 0; font-size: 13px; color: var(--text-muted); }

.health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}
.health-row:last-of-type { margin-bottom: 12px; }
.health-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.health-bar-wrap {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}
.health-bar {
  height: 100%;
  background: #0f7b57;
  border-radius: 4px;
  transition: width 0.2s;
}
.health-bar-alt { background: #0369a1; }
.health-value { font-size: 12px; font-weight: 600; color: var(--ink-700); flex-shrink: 0; }
.health-bullets { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--text-muted); }
.health-bullets li { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; }
.health-bullet { width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; }
.health-bullet-ok { background: #0f7b57; }

/* ========== Workspace (IT Glue–inspired) layout ========== */
.workspace-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.workspace-page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.workspace-page-header-left {
  min-width: 0;
}

.workspace-page-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

.workspace-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-500);
}

.workspace-page-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.workspace-client-select {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-800);
  min-width: 140px;
}

.workspace-window-pills {
  display: flex;
  gap: 0.25rem;
}

.workspace-pill {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-600);
  background: #fff;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.workspace-pill:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.15);
  color: var(--ink-800);
}

.workspace-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.workspace-btn-create { font-size: 0.875rem; padding: 0.5rem 1rem; }
.workspace-btn-import { font-size: 0.875rem; padding: 0.5rem 1rem; }

/* Favorites strip */
.workspace-favorites-strip {
  margin-bottom: 1.5rem;
}

.workspace-favorites-strip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.workspace-favorite-tile {
  position: relative;
}

.workspace-favorite-tile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-800);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  border: none;
  min-width: 100px;
  transition: box-shadow 0.15s, transform 0.15s;
}

.workspace-favorite-tile-link:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.workspace-favorite-tile-icon,
.workspace-favorite-tile-initials {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.workspace-favorite-tile-name {
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.workspace-favorite-tile-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.workspace-favorite-tile-status {
  font-size: 0.6875rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.workspace-favorite-tile-actions {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  padding: 0.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 10;
  min-width: 140px;
}

.workspace-favorite-tile:hover .workspace-favorite-tile-actions {
  display: flex;
}

.workspace-favorite-tile-actions a {
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
  color: var(--accent);
  text-decoration: none;
  border-radius: 6px;
}

.workspace-favorite-tile-actions a:hover {
  background: rgba(47, 101, 217, 0.08);
}

.workspace-favorites-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-500);
}

/* 12-column grid: main 8 + rail 4 */
.workspace-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}

.workspace-main {
  min-width: 0;
}

.workspace-insight-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  border: none;
}

.workspace-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.workspace-metric-card {
  padding: 0.75rem 1rem;
  background: rgba(248, 250, 255, 0.8);
  border-radius: 10px;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workspace-metric-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  font-weight: 600;
}

.workspace-metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-900);
}

.workspace-chart-wrap {
  margin-bottom: 1rem;
}

.workspace-insight-card .ops-pulse-chart {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.5);
}

.workspace-chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.workspace-filter {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  color: var(--ink-600);
  background: #fff;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: background 0.15s, border-color 0.15s;
}

.workspace-filter:hover,
.workspace-filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.workspace-empty-chart {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--ink-500);
}

.workspace-empty-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Right rail */
.workspace-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.workspace-rail-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  border: none;
}

.workspace-rail-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-600);
}

.workspace-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workspace-rail-head .workspace-rail-title {
  margin: 0;
}

.workspace-rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workspace-rail-row {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: var(--ink-800);
  font-size: 0.875rem;
  transition: background 0.12s;
  border-radius: 6px;
  margin: 0 -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.workspace-rail-row:hover {
  background: rgba(47, 101, 217, 0.05);
}

.workspace-rail-list li:last-child .workspace-rail-row {
  border-bottom: 0;
}

.workspace-rail-name {
  font-weight: 600;
}

.workspace-rail-meta {
  font-size: 0.75rem;
  color: var(--ink-500);
}

.workspace-rail-muted {
  font-size: 0.8125rem;
  color: var(--ink-500);
  font-style: italic;
}

.workspace-action-hints {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.workspace-hint {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workspace-hint-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.workspace-hint-link:hover {
  text-decoration: underline;
}

.workspace-hint-detail {
  font-size: 0.75rem;
  color: var(--ink-500);
}

.workspace-hint-muted {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-500);
}

/* Activity feed */
.workspace-activity-feed {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  border: none;
}

.workspace-activity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.workspace-activity-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink-900);
}

.workspace-activity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.workspace-feed-filter {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  color: var(--ink-600);
  background: transparent;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.workspace-feed-filter:hover,
.workspace-feed-filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.workspace-feed-search {
  margin-left: auto;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  min-width: 180px;
}

.workspace-feed-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workspace-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.workspace-feed-item:last-child {
  border-bottom: 0;
}

.workspace-feed-body {
  flex: 1;
  min-width: 0;
}

.workspace-feed-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-800);
}

.workspace-feed-target,
.workspace-feed-title {
  color: var(--ink-600);
}

.workspace-feed-meta {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--ink-500);
}

.workspace-feed-view {
  flex-shrink: 0;
  font-size: 0.8125rem;
}

.workspace-feed-item-skeleton .workspace-feed-text {
  color: var(--ink-400);
}

.workspace-skeleton {
  font-style: italic;
}

.workspace-feed-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 0 0;
  list-style: none;
}

.workspace-feed-cta a {
  margin: 0;
}

@media (max-width: 1100px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .workspace-metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .workspace-metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace-page-header-right {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Dashboard page header (full width, product identity) */
.dash-page-header {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
}

.dash-page-header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
}

.dash-page-header-left {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  min-width: 0;
}

/* Docs product icon: rounded square, accent background, white icon (MIL product icon rules) */
.dash-product-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
}

.dash-product-icon-svg {
  width: 24px;
  height: 24px;
  color: inherit;
}

.dash-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dash-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-2);
  max-width: 520px;
  opacity: 0.9;
}

.dash-page-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dash-header-controls-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-header-controls-group .dash-scope-form {
  margin: 0;
  display: flex;
  align-items: center;
}

/* All Clients dropdown: same 30px height and 13px as pills */
.dash-header-controls-group .dash-scope-select {
  min-width: 140px;
  height: 30px;
  padding: 0 12px;
  padding-right: 2rem;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 14px;
}

.dash-header-controls-group .dash-scope-select:hover {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.dash-header-controls-group .dash-scope-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Pill: exact same 30px height and 13px as .mi-header-btn (Voice, Search) */
.dash-page-header .dash-window-chip {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-2);
  border-color: var(--border);
  background: var(--bg-card);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dash-page-header .dash-window-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.dash-page-header .dash-window-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

.dash-window-switch {
  margin: 0;
  display: flex;
  gap: 0.5rem;
}

/* Executive KPI strip (3 cards under header) */
.dash-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.dash-kpi-strip-card {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  padding: 16px 20px;
  min-height: 72px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0.2rem;
}

.dash-kpi-strip-label {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
}

.dash-kpi-strip-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.dash-kpi-strip-meta {
  font-size: 0.6875rem;
  color: var(--text-2);
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dash-launchpad {
  margin-top: 12px;
}

.dash-health-card {
  margin-top: 12px;
}

.dash-focus-card {
  margin-top: 0.5rem;
  padding: 0;
}

.dash-focus-card-tinted {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}

/* Shared card header: one pattern for Action Center, Recent Changes, Documentation Activity */
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 44px;
  min-width: 0;
}

.dash-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.dash-focus-card-body {
  padding: 0 16px 16px;
}

.dash-focus-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Recent Documentation Changes empty state (tighter vertical whitespace) */
.dash-activity-empty-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 0.75rem 0;
}

.dash-activity-empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.dash-activity-empty-title {
  margin: 0 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.dash-activity-empty-sub {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.4;
  max-width: 280px;
}

.dash-activity-empty-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.dash-activity-empty-btn {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.dash-focus-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0.9;
}

.dash-card-header h2,
.dash-card-title {
  font-weight: 800;
  font-size: 1rem;
  margin: 0;
  line-height: 1.25;
}

.dash-favorites-inline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.dash-favorites-inline li {
  flex-shrink: 0;
}

/* Match voice-control pills: h-8 px-3 text-sm rounded-full border bg-white */
.dash-favorites-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease, border-color 0.12s ease;
  max-width: 140px;
  min-width: 0;
  box-sizing: border-box;
}

.dash-favorites-item-star {
  color: #c9a227;
  font-size: 0.625rem;
  flex-shrink: 0;
}

.dash-favorites-inline-item:hover {
  background: var(--cloud);
  border-color: var(--accent);
}

.dash-favorites-inline-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-favorites-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  box-sizing: border-box;
}

.dash-favorites-inline-avatar {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.dash-favorites-inline-initials {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.5625rem;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-favorites-inline-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-favorites-inline-empty {
  font-size: 0.75rem;
  color: var(--text-2);
  font-style: italic;
}

.action-center-chips-row {
  margin-bottom: 0.375rem;
}

.action-center-chips-row .action-center-states {
  margin-bottom: 0;
}

.dash-last-visit-card {
  margin-top: 12px;
}

.dash-brief-card {
  margin-top: 12px;
}

.dash-brief-copy {
  margin: 0;
  color: var(--ink-700);
  font-size: 15px;
  line-height: 1.5;
}

.brief-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-last-visit-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pulse-count {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  color: var(--ink-950);
}

.pulse-label {
  color: var(--ink-500);
}

.dash-focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.dash-focus-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  background: #fff;
}

.focus-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.priority-badge.high {
  color: var(--bad-text);
  background: var(--bad-bg);
}

.priority-badge.medium {
  color: var(--warn-text);
  background: var(--warn-bg);
}

.priority-badge.low {
  color: var(--text-2);
  background: var(--hover);
}

.priority-badge.healthy {
  color: var(--ok-text);
  background: var(--ok-bg);
}

.priority-badge.healthy.muted {
  color: var(--text-3);
  background: var(--bg-sidebar);
}

.action-center-states {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.action-center-states .priority-badge {
  cursor: default;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: opacity 0.12s ease;
}

.action-center-states .priority-badge:hover {
  opacity: 0.9;
}

.action-center-legend {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-2);
  line-height: 1.4;
}

.dash-health-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
}

.dash-health-score {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fff 0, #f8fbff 100%);
  display: grid;
  place-items: center;
}

.dash-health-score .score-value {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink-950);
}

.dash-health-score .score-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-500);
}

.dash-health-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-700);
}

.dash-health-list li {
  margin-top: 6px;
}

.tone-ok {
  color: #0f6f4f;
}

.tone-warn {
  color: #8b620f;
}

.tone-danger {
  color: #ac3a3a;
}

.dash-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dash-launchpad-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  padding: 10px;
  text-decoration: none;
  display: grid;
  gap: 4px;
}

.dash-launchpad-card.favorite {
  border-color: #9db8eb;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.dash-launchpad-title {
  color: var(--ink-950);
  font-weight: 700;
}

.dash-launchpad-desc {
  color: var(--ink-500);
  font-size: 12px;
}

.dash-pref-panel summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.dash-pref-form {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.pref-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-700);
}

.dash-kpi-card {
  border-radius: var(--radius-md);
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.dash-kpi-card .metric-value {
  font-size: 30px;
  margin-top: 2px;
}

.dash-kpi-trend {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.dash-kpi-trend span:last-child {
  font-weight: 500;
  color: var(--ink-500);
}

.dash-kpi-trend.trend-up {
  color: #0f7b57;
}

.dash-kpi-trend.trend-down {
  color: #ac3a3a;
}

.dash-kpi-trend.trend-flat {
  color: #637088;
}

.dash-spotlight {
  margin-top: 12px;
}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Workspace layout: free-flow SaaS style, no heavy borders */
.dash-workspace-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  padding: 20px 24px;
  border: none;
}

/* Status banner: horizontal Action Center, light tint */
.dash-status-banner {
  background: linear-gradient(180deg, #f8faff 0%, #f2f6fc 100%);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
  border: none;
  box-shadow: none;
}

.dash-status-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-status-banner-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-status-banner-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
  margin: 0;
}

.dash-status-banner-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-status-banner-actions {
  min-width: 0;
}

.dash-status-banner-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: #fff;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(47, 101, 217, 0.2);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-status-pill:hover {
  background: rgba(47, 101, 217, 0.06);
  border-color: rgba(47, 101, 217, 0.35);
}

.dash-status-pill-muted {
  color: var(--ink-500);
  background: transparent;
  border-color: transparent;
  cursor: default;
}

/* Activity section: timeline (left) + chart (right), primary visual */
.dash-activity-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

.dash-timeline-feed {
  min-width: 0;
}

.dash-timeline-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.dash-timeline-feed-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0;
}

.dash-activity-chart {
  min-width: 0;
}

.dash-activity-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.dash-activity-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0;
}

/* Favorites + Metrics: secondary sections, spacing */
.dash-favorites-section {
  margin-bottom: 32px;
}

.dash-favorites-section .dash-workspace-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink-800);
}

.dash-metrics-section {
  margin-bottom: 24px;
}

.dash-metrics-section .dash-kpi-strip {
  margin-bottom: 0;
}

.dash-activity-chart .ops-pulse-chart {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.6);
}

.dash-timeline-feed .activity-feed {
  gap: 0;
}

.dash-timeline-feed .activity-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.dash-timeline-feed .activity-item:last-child {
  border-bottom: 0;
}

.spotlight-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spotlight-tools input {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
}

.dash-client-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.dash-client-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
  background: linear-gradient(180deg, #fff 0, #f9fbff 100%);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.dash-client-chip:hover {
  transform: translateY(-2px);
  border-color: #b6caec;
  box-shadow: var(--shadow-soft);
}

.dash-client-chip.is-pinned {
  border-color: #a7c0ef;
  background: linear-gradient(180deg, #ffffff 0, #f0f5ff 100%);
}

.dash-client-main {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

.dash-client-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2f65d9 0%, #183d8d 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.dash-client-meta {
  min-width: 0;
  display: grid;
}

.dash-client-name {
  color: var(--ink-950);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.dash-client-stats {
  font-size: 12px;
  color: var(--ink-500);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.dash-client-actions {
  display: grid;
  gap: 6px;
  align-content: center;
}

.chip-btn {
  border: 0;
  background: transparent;
  color: #cb9631;
  border-radius: 0;
  padding: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.chip-btn:hover {
  color: #b98423;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 1100px) {
  .dash-activity-section {
    grid-template-columns: 1fr;
  }
}

.dash-favorites-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-favorites-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
  min-width: 0;
}

.dash-favorites-list-item:hover {
  background: var(--cloud);
}

.dash-favorites-list-avatar {
  width: 28px;
  height: 28px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  border-radius: 6px;
  background: transparent;
}

.dash-favorites-list-initials {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
}

.dash-favorites-list-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-favorites-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
  min-width: 0;
}

.dash-favorites-item:hover {
  background: var(--cloud);
}

.dash-favorites-avatar {
  width: 28px;
  height: 28px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  border-radius: 6px;
  background: transparent;
}

.dash-favorites-initials {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
}

.dash-favorites-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-favorites-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-2);
}

/* Favorite Clients as tenant tiles (legacy / elsewhere) */
.dash-tenant-tiles {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.dash-tenant-tiles-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.dash-tenant-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
}

.dash-tenant-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-tenant-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);
}

.dash-tenant-tile-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dash-tenant-tile-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: transparent;
}

.dash-tenant-tile-initials {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.dash-tenant-tile-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-tenant-tile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.75rem;
  color: var(--text-2);
}

.dash-tenant-tiles-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-2);
}

.dash-alert-list,
.dash-velocity-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.dash-alert-list li,
.dash-velocity-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.dash-velocity-list.velocity-bars li {
  grid-template-columns: 1fr 1.2fr auto;
  display: grid;
}

.velocity-meter {
  height: 10px;
  border-radius: 999px;
  background: #edf2fb;
  overflow: hidden;
}

.velocity-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ea8ff 0%, #2f65d9 100%);
}

.dash-alert-list li.tone-warn {
  border-color: #ebd29b;
  background: #fff8eb;
}

.dash-alert-list li.tone-danger {
  border-color: #e7b9b9;
  background: #fff1f1;
}

.reveal-item {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.reveal-item.in {
  opacity: 1;
  transform: translateY(0);
}

.command-palette {
  position: fixed;
  inset: 0;
  display: none;
  place-items: start center;
  padding-top: 80px;
  background: rgba(9, 14, 26, 0.48);
  z-index: 1200;
}

.command-palette.open {
  display: grid;
}

.command-panel {
  width: min(680px, calc(100vw - 24px));
  border: 1px solid #cbd7ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(12, 23, 44, 0.32);
  padding: 12px;
}

.command-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-400);
  margin-bottom: 6px;
}

#command-input {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 10px;
  font: inherit;
  font-size: 14px;
}

.command-list {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.command-item {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink-800);
  font-weight: 600;
}

.command-item:last-child {
  border-bottom: 0;
}

.command-item:hover,
.command-item.active {
  background: #edf3ff;
  color: var(--ink-950);
}

.command-item.hidden {
  display: none;
}

.command-hint {
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 12px;
}

.command-hint kbd {
  background: #f3f7ff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
}

.dash-trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
  align-items: end;
  gap: 4px;
  height: 122px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f8fbff 0, #ffffff 100%);
}

.dash-trend-bar-wrap {
  display: flex;
  align-items: end;
  height: 100%;
}

.dash-trend-bar {
  width: 100%;
  min-height: 6px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #6ea2ff 0, #2f65d9 100%);
}

.dash-trend-bar.is-high {
  background: linear-gradient(180deg, #4e8eff 0, #1c5bd8 100%);
}

.dash-trend-bar.is-medium {
  background: linear-gradient(180deg, #79a8ff 0, #2f65d9 100%);
}

.dash-trend-bar.is-low {
  background: linear-gradient(180deg, #9fbfff 0, #5e88dd 100%);
}

.dash-trend-meta {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 0.6875rem;
}

.trend-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 1.35fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.trend-insight-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  padding: 0.5rem 0.625rem;
  display: grid;
  gap: 0.125rem;
}

.trend-insight-label {
  font-size: 0.5625rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.trend-insight-value {
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--text);
  font-weight: 700;
}

.trend-insight-value.trend-up {
  color: #0f7b57;
}

.trend-insight-value.trend-down {
  color: #ac3a3a;
}

.trend-insight-value.trend-flat {
  color: #637088;
}

/* Activity Change card: trend text is supporting, not primary */
.trend-insight-item-activity .trend-insight-value {
  font-size: 0.8125rem;
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.trend-insight-item-activity .trend-insight-arrow {
  font-size: 1em;
  line-height: 1;
  opacity: 0.85;
}

.trend-insight-sub {
  font-size: 0.625rem;
  color: var(--text-2);
}

.trend-insight-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.trend-insight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.trend-insight-sub.inline {
  margin-left: auto;
  white-space: nowrap;
}

.trend-summary {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-500);
}

.ops-pulse-chart {
  position: relative;
  height: 320px;
  margin-top: 0;
  padding: 0 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: visible;
}

.ops-pulse-chart .ops-trend-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ops-grid {
  stroke: var(--border);
  stroke-width: 1;
  opacity: 0.6;
}

.ops-trend-line {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.ops-trend-point {
  cursor: pointer;
}

.ops-point.ops-point-hover {
  fill: var(--accent);
  stroke: var(--bg-card);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ops-trend-point:hover .ops-point.ops-point-hover,
.ops-trend-point:focus-within .ops-point.ops-point-hover {
  opacity: 1;
}

.ops-point-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}

.ops-point-hit:focus-visible {
  outline: none;
  stroke: var(--accent-soft);
  stroke-width: 2;
}

.ops-pulse-tooltip {
  position: absolute;
  z-index: 20;
  min-width: 190px;
  max-width: 240px;
  pointer-events: none;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: rgba(11, 24, 46, 0.95);
  color: #f4f7ff;
  box-shadow: 0 18px 30px rgba(5, 14, 31, 0.24);
  padding: 10px 12px;
  transform: translate(-50%, calc(-100% - 12px));
}

.ops-pulse-tooltip.is-below {
  transform: translate(-50%, 12px);
}

.ops-pulse-tooltip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ops-pulse-tooltip-day {
  font-size: 11px;
  color: #b9c6e6;
}

.ops-pulse-tooltip-total {
  font-size: 13px;
  color: #ffffff;
}

.ops-pulse-tooltip-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.ops-pulse-tooltip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #d8e2f8;
}

.ops-pulse-tooltip-item b {
  color: #ffffff;
  font-weight: 700;
}

.ops-pulse-ymax,
.ops-pulse-ymin {
  position: absolute;
  left: 0.5rem;
  font-size: 0.625rem;
  color: var(--text-3);
  pointer-events: none;
}

.ops-pulse-ymax {
  top: 0.5rem;
}

.ops-pulse-ymin {
  bottom: 0.5rem;
}

.split-card {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.asset-create-card {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.asset-create-head {
  max-width: 720px;
}

.asset-create-head h2 {
  margin-bottom: 4px;
}

.asset-create-form {
  width: min(720px, 100%);
}

.asset-create-form label,
.password-create-form label,
.asset-detail-form label,
.password-detail-form label {
  font-size: 10px;
  letter-spacing: 0.42px;
}

.asset-create-form input,
.asset-create-form select,
.asset-create-form textarea,
.password-create-form input,
.password-create-form select,
.password-create-form textarea,
.asset-detail-form input,
.asset-detail-form select,
.asset-detail-form textarea,
.password-detail-form input,
.password-detail-form select,
.password-detail-form textarea {
  padding: 7px 9px;
  min-height: 34px;
  font-size: 12px;
}

.asset-create-form textarea,
.password-create-form textarea,
.asset-detail-form textarea,
.password-detail-form textarea {
  min-height: 96px;
}

.asset-create-form input[readonly] {
  background: #f5f9ff;
  border-color: #c7d7ee;
  color: #2d4f76;
}

.password-create-card {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.password-create-head {
  max-width: 720px;
}

.password-create-head h2 {
  margin-bottom: 4px;
}

.password-create-form {
  width: min(720px, 100%);
}

.password-create-form input[readonly] {
  background: #f5f9ff;
  border-color: #c7d7ee;
  color: #2d4f76;
}

.password-detail-shell {
  margin-top: 12px;
  display: block;
}

.password-detail-meta h2 {
  margin-bottom: 6px;
}

.password-detail-meta {
  margin-bottom: 10px;
}

.password-detail-form {
  width: min(720px, 100%);
}

.password-detail-form input[readonly] {
  background: #f5f9ff;
  border-color: #c7d7ee;
  color: #2d4f76;
}

.password-detail-inline-btn {
  margin-top: 0 !important;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  justify-self: start;
  width: auto;
}

.asset-detail-shell {
  margin-top: 12px;
  display: block;
}

.asset-detail-meta h2 {
  margin-bottom: 6px;
}

.asset-detail-meta {
  margin-bottom: 10px;
}

.asset-detail-form {
  width: min(720px, 100%);
}

.asset-detail-form input[readonly] {
  background: #f5f9ff;
  border-color: #c7d7ee;
  color: #2d4f76;
}

.asset-detail-inline-btn {
  margin-top: 0 !important;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  justify-self: start;
  width: auto;
}

.asset-manage-icon-btn {
  width: 30px;
  height: 30px;
}

.detail-primary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
}

.runbook-detail-shell {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.runbook-detail-meta h2 {
  margin-bottom: 6px;
}

.runbook-detail-form {
  width: 100%;
}

.runbook-detail-form input[readonly] {
  background: #f5f9ff;
  border-color: #c7d7ee;
  color: #2d4f76;
}

.runbook-detail-inline-btn {
  margin-top: 0 !important;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.file-detail-shell {
  border: 1px solid #cfdaec;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
}

.file-detail-meta h2 {
  margin-bottom: 6px;
}

.file-detail-type-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}

.file-detail-field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #415978;
}

.file-detail-category-form {
  margin: 0.35rem 0 0.5rem;
}

.file-detail-category-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.stack-form .file-detail-category-select {
  width: auto !important;
  min-width: 240px;
  max-width: 100%;
  flex: 0 1 auto;
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1 !important;
}

.file-detail-inline-btn {
  margin-top: 0 !important;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.file-detail-edit-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4b627f;
}

.file-detail-download-btn {
  color: #ffffff;
  background: #2f8a84;
  border-color: #2a7c77;
}

.file-detail-download-btn:hover {
  background: #287b76;
  border-color: #246f6a;
}

.file-detail-actions {
  align-content: start;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.file-detail-actions .btn-primary,
.file-detail-actions .btn-danger {
  margin-top: 0;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  justify-self: start;
  width: auto;
}

.stack-form {
  display: grid;
  gap: 8px;
}

.stack-form label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font: inherit;
  color: var(--ink-900, #1a2331);
  background: #fff;
}

.stack-form textarea {
  resize: vertical;
  min-height: 120px;
}

.stack-form .stack-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-700);
}

.stack-form .stack-check input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
}

.voice-policy-actions {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 4px 0 2px;
}

.voice-policy-actions legend {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 6px;
}

.voice-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.voice-reliability-card {
  margin-top: 12px;
}

.voice-reliability-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  align-items: end;
}

.voice-reliability-head h2 {
  margin-bottom: 4px;
}

.voice-slo-badge {
  margin-left: 8px;
  vertical-align: middle;
}

.status-bad {
  color: #8c1e24;
  background: #f8dfe1;
}

.voice-reliability-window-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.voice-reliability-window {
  min-width: 144px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  background: #fff;
  color: var(--ink-900, #1a2331);
}

.voice-reliability-warnings {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.voice-warning {
  border: 1px solid #e9d39e;
  border-radius: var(--radius-sm);
  background: #fff9ec;
  color: #8a6113;
  padding: 9px 10px;
  font-size: 13px;
}

.voice-reliability-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.voice-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
}

.voice-kpi .metric-value {
  font-size: 25px;
}

.voice-reliability-breakdown {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.voice-reliability-breakdown h3,
.voice-reliability-series h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--ink-900, #1a2331);
}

.voice-verification-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 360px;
}

.voice-verification-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.voice-verification-list span {
  font-size: 11px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.voice-verification-list b {
  font-size: 18px;
  color: var(--ink-900, #1a2331);
}

.voice-reliability-series {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.voice-sparkline-wrap {
  margin-top: 8px;
}

.voice-sparkline {
  width: 100%;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fbfdff, #f4f8ff);
}

.voice-sparkline polyline {
  fill: none;
  stroke: #2f65d9;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-sparkline-caption {
  margin-top: 6px;
}

.voice-series-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.voice-series-table th,
.voice-series-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 7px 8px;
  font-size: 12px;
}

.voice-series-table th {
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.inline-form {
  margin: 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.search-grid {
  grid-template-columns: 2fr 1fr auto;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-grid .btn-secondary {
  margin-top: 0;
}

.code-block {
  margin: 6px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  font-size: 12px;
  overflow-x: auto;
}

.readonly-secret {
  width: 100%;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-family: Consolas, Monaco, monospace;
  background: #f8fafc;
  color: var(--ink-800);
}

.table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--ink-500);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #f7faff;
}

.pill {
  display: inline-block;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--ink-500);
  background: #fff;
}

.doc-kind-pill {
  margin-right: 0.26rem;
  border-color: #c8d8ee;
  color: #355076;
  background: #f5f9ff;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.doc-category-pill {
  border-color: #d7e4da;
  color: #27543f;
  background: #f4fbf6;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.doc-category-pill.doc-category-financial { border-color: #c6dbfb; color: #204f8e; background: #eef5ff; }
.doc-category-pill.doc-category-hr { border-color: #e5d2ff; color: #6a36ad; background: #f8f2ff; }
.doc-category-pill.doc-category-legal { border-color: #f0d7c8; color: #8c4f2d; background: #fff4ec; }
.doc-category-pill.doc-category-security { border-color: #f0c9d0; color: #8a3043; background: #fff1f4; }
.doc-category-pill.doc-category-operations { border-color: #c8e7de; color: #1d5f46; background: #eef9f2; }
.doc-category-pill.doc-category-it { border-color: #cde2f0; color: #245773; background: #f0f8fc; }
.doc-category-pill.doc-category-general { border-color: #d4dde8; color: #4a6078; background: #f7faff; }

.preview-cell {
  max-width: 420px;
  color: var(--ink-500);
  white-space: pre-wrap;
}

.pdf-viewer-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: #fff;
}

.office-preview-card {
  border: 1px solid #cfdaec;
}

.office-preview-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 8px;
}

.office-preview-header h2 {
  margin-bottom: 4px;
}

.office-preview-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.office-preview-actions .btn-secondary {
  margin-top: 0;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.office-preview-btn {
  margin-top: 0;
}

.office-preview-actions .btn-link {
  white-space: nowrap;
  margin-top: 0;
  font-size: 12px;
  font-weight: 600;
}

.office-preview-refresh {
  margin-top: 0;
  font-size: 12px;
  font-weight: 600;
}

.office-preview-actions .office-preview-refresh {
  text-decoration: none;
}

.office-preview-actions .is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.module-toolbar,
.org-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.docs-explorer-card {
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
}

.docs-explorer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff, #f4f8ff);
}

.docs-pathbar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.docs-up-btn {
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-700);
  text-decoration: none;
  background: #fff;
  white-space: nowrap;
}

.docs-up-btn:hover {
  border-color: #95add8;
  color: var(--ink-900);
}

.docs-up-btn.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.docs-pathbar {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  min-height: 34px;
  width: 100%;
}

.docs-breadcrumbs .crumb {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.docs-breadcrumbs .crumb.current {
  color: var(--ink-900);
}

.docs-breadcrumbs .sep {
  color: var(--ink-400);
  font-size: 12px;
}

.docs-head-meta {
  display: inline-flex;
  gap: 6px;
}

.docs-explorer-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 460px;
}

.docs-pane {
  padding: 14px;
}

.docs-pane-side {
  border-right: 1px solid var(--line);
  background: #f8fbff;
}

.docs-pane-side h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.docs-upload-form {
  margin-top: 10px;
}

.docs-upload-note {
  margin-top: 10px;
  font-size: 12px;
}

.docs-folder-link {
  color: var(--ink-900);
  text-decoration: none;
  font-weight: 600;
}

.docs-folder-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.docs-folder-glyph {
  color: var(--ink-500);
  font-size: 11px;
  margin-right: 3px;
}

.docs-nav-row {
  cursor: pointer;
}

.docs-nav-row:hover td {
  background: #f3f8ff;
}

.module-toolbar .left,
.org-toolbar .left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.module-toolbar input,
.module-toolbar select,
.org-toolbar input,
.org-toolbar select {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.module-toolbar input,
.org-toolbar input {
  min-width: 280px;
  max-width: 520px;
  width: 100%;
}

.settings-help-hint {
  margin: 8px 0 14px;
  padding-left: 2px;
}

.settings-card-title {
  margin: 0;
}

.settings-subtitle {
  margin: 8px 0 12px;
}

.settings-form-gap {
  margin-bottom: 10px;
}

.settings-section-title {
  margin: 16px 0 8px;
}

.settings-inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(140px, 190px) auto;
  gap: 8px 10px;
  align-items: end;
  margin-top: 10px;
}

.settings-inline-form label {
  grid-row: 1;
}

.settings-inline-form select {
  grid-row: 2;
}

.settings-inline-action {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  width: auto;
}

.settings-action-row {
  margin-top: 8px;
}

.settings-action-row form {
  display: inline-flex;
}

@media (max-width: 900px) {
  .settings-inline-form {
    grid-template-columns: 1fr;
  }

  .settings-inline-form label,
  .settings-inline-form select {
    grid-row: auto;
  }
}

.org-table td {
  font-size: 13px;
}

.org-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.org-col-actions {
  text-align: right;
}

.org-action-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd9e8;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #314b68;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.org-action-btn:hover {
  border-color: rgba(13, 148, 136, 0.45);
  color: var(--accent-2);
  background: linear-gradient(180deg, #ffffff 0%, #f1fbfa 100%);
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.12);
  transform: translateY(-1px);
}

.org-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.org-action-btn:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.4);
  outline-offset: 1px;
}

.org-action-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.org-action-btn.is-delete:hover {
  border-color: rgba(225, 29, 72, 0.5);
  color: #9f1239;
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
  box-shadow: 0 6px 14px rgba(225, 29, 72, 0.13);
}

.org-action-btn.is-delete:focus-visible {
  outline-color: rgba(225, 29, 72, 0.38);
}

.org-table tr[data-detail-url] {
  cursor: pointer;
}

.org-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.org-table-wrap {
  overflow-x: hidden;
}

.org-table th {
  position: relative;
  vertical-align: middle;
}

.org-table td {
  vertical-align: middle;
}

.clients-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border: 1px solid #cad7ef;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  background:
    radial-gradient(460px 220px at 88% 10%, rgba(153, 195, 255, 0.24), transparent 72%),
    linear-gradient(125deg, #13253f 0%, #1e3f72 56%, #2f65d9 100%);
  color: #eff5ff;
  box-shadow: 0 12px 30px rgba(17, 33, 60, 0.24);
}

.clients-lanes-grid {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.clients-lane-card {
  padding: 12px;
}

.clients-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.clients-lane-head h2 {
  margin: 0;
  font-size: 16px;
}

.clients-lane-card .clients-chip-grid {
  margin-top: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.clients-lane-card .client-mini {
  min-height: 52px;
  padding: 8px 10px;
  gap: 10px;
}

.clients-lane-card .client-mini-icon {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.clients-lane-card .client-mini-logo {
  width: 28px;
  height: 28px;
}

.clients-lane-card .client-mini-logo.logo-shape-wide {
  width: 34px;
  height: 20px;
}

.clients-lane-card .client-mini-logo.logo-shape-tall {
  width: 20px;
  height: 28px;
}

.clients-lane-card .client-mini-name {
  font-size: 15px;
  line-height: 1.15;
}

.clients-title {
  margin: 0;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.6px;
  color: #fff;
}

.clients-subtitle {
  margin: 8px 0 0;
  max-width: 720px;
  color: #d9e8ff;
}

.clients-hero .eyebrow {
  color: #c6dcff;
}

.clients-hero .muted {
  color: #cedef8;
}

.clients-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px auto;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
  max-width: 640px;
}

.clients-create-form input,
.clients-create-form select {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font: inherit;
  color: #f2f6ff;
  background: rgba(9, 16, 30, 0.36);
}

.clients-create-form input::placeholder {
  color: #c9d9f2;
}

.clients-create-form select option {
  color: #1f2a3b;
}

.clients-create-form .btn-primary {
  margin-top: 0;
  white-space: nowrap;
}

.clients-create-row {
  margin-top: 14px;
}

.clients-favorites-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-700);
  white-space: nowrap;
}

.clients-favorites-toggle input {
  margin: 0;
}

.disabled-inline {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.clients-hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.clients-kpi {
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-md);
  background: rgba(11, 20, 35, 0.38);
  padding: 10px 12px;
  overflow: hidden;
}

.clients-kpi span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #c8dcff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clients-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 32px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.clients-rail-card {
  margin-bottom: 12px;
}

.clients-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.clients-chip-grid {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clients-favorites-grid {
  margin-top: 0.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
}

.clients-favorite-card {
  text-decoration: none;
  color: inherit;
}

.clients-favorite-card .hub-org-link {
  pointer-events: none;
  width: 26px;
  flex-basis: 26px;
}

.clients-favorite-card .hub-org-logo,
.clients-favorite-card .hub-org-initials {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.clients-favorite-card .hub-org-title-link {
  color: var(--text);
}

.client-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  border: 1px solid #d5deee;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 10px 16px;
  min-height: 72px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
}

.client-mini:hover {
  border-color: #9db6e5;
  background: #fff;
}

.client-mini.is-favorite {
  border-color: #d5deee;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.client-mini-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 0.26em;
  background: linear-gradient(180deg, #8eb4ff, #5586e3);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

.client-mini-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}

.client-mini-logo.logo-shape-wide {
  width: 48px;
  height: 28px;
}

.client-mini-logo.logo-shape-tall {
  width: 28px;
  height: 40px;
}

.client-mini.is-favorite .client-mini-icon {
  background: linear-gradient(180deg, #8eb4ff, #5586e3);
  color: #fff;
}

.client-mini.is-favorite .client-mini-logo {
  background: transparent;
  color: inherit;
}

.client-mini-name {
  font-weight: 700;
  color: var(--ink-800);
  font-size: 19px;
  line-height: 1.3;
  padding-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-active {
  color: #0d6a49;
  border-color: #9fd7bf;
  background: linear-gradient(180deg, #eefcf5, #dff5ea);
}

.status-maintenance,
.status-draft {
  color: #8b620f;
  border-color: #ecd59f;
  background: #fff7e8;
}

.status-retired,
.status-archived {
  color: #6c7a90;
  border-color: #d6deeb;
  background: #f5f8fd;
}

.org-name {
  font-weight: 600;
  color: var(--ink-800);
}

.client-name-link {
  color: var(--ink-800);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.client-name-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.client-name-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.client-name-logo.logo-shape-wide {
  width: 24px;
  height: 14px;
}

.client-name-logo.logo-shape-tall {
  width: 14px;
  height: 20px;
}

.favorite-form {
  margin: 0;
  line-height: 1;
}

.favorite-org-btn {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8ea0bf;
  line-height: 1;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-weight: 700;
  transition: color 0.16s ease;
}

.favorite-org-btn:hover {
  color: #6e82a1;
}

.workspace-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-head .mi-page-title {
  margin: 0;
  font-size: clamp(1.4rem, 1.7vw, 1.8rem);
}

.workspace-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.workspace-logo.logo-shape-wide {
  width: 74px;
  height: 42px;
}

.workspace-logo.logo-shape-tall {
  width: 42px;
  height: 56px;
}

.workspace-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.client-logo-preview {
  margin: 6px 0 8px;
}

.client-logo-preview img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.client-logo-preview img.logo-shape-wide {
  width: 108px;
  height: 64px;
}

.client-logo-preview img.logo-shape-tall {
  width: 64px;
  height: 86px;
}

.favorite-org-btn.active {
  color: #2f65d9;
}

.favorite-org-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(47, 101, 217, 0.18);
}

.favorite-org-btn:active {
  color: #1f53c2;
}

.favorite-display-star {
  color: #2f65d9;
  font-size: 19px;
  line-height: 1;
  font-weight: 700;
  width: 1em;
  text-align: center;
}

.dash-favorite-star-form {
  margin: 0;
  line-height: 1;
}

.favorite-toggle-star {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8ea0bf;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s ease;
}

.favorite-toggle-star.active {
  color: #2f65d9;
}

.favorite-toggle-star:hover {
  color: #6e82a1;
}

.favorite-toggle-star:focus-visible {
  outline: none;
  border-color: #8fb2e6;
  box-shadow: 0 0 0 2px rgba(47, 101, 217, 0.18);
}

.favorite-toggle-star:active {
  color: #1f53c2;
}

.org-col-star {
  width: 44px;
  text-align: center;
}

.sort-btn {
  border: 0;
  background: transparent;
  color: var(--ink-700);
  font: inherit;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sort-indicator {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transform: translateY(-1px);
}

.sort-indicator .up,
.sort-indicator .down {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.sort-indicator .up {
  border-bottom: 6px solid #c3c9d4;
}

.sort-indicator .down {
  border-top: 6px solid #c3c9d4;
}

.sort-btn.asc .sort-indicator .up {
  border-bottom-color: #506784;
}

.sort-btn.desc .sort-indicator .down {
  border-top-color: #506784;
}

.sort-btn.active {
  color: var(--ink-900);
}

.col-resize-handle {
  position: absolute;
  right: -5px;
  top: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}

.col-resize-handle::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 999px;
  background: #d7dce6;
  transition: background 120ms ease;
}

.org-table th:hover .col-resize-handle::before,
.col-resize-handle:focus-visible::before {
  background: #8aa0c5;
}

body.is-col-resizing,
body.is-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.form-section-title {
  margin: 16px 0 8px;
  font-size: 18px;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.form-actions .btn-secondary,
.form-actions .btn-primary {
  margin-top: 0;
}

.org-toolbar-tight {
  align-items: center;
}

/* Header user identity block and dropdown */
.mi-header-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mi-header-tenant-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  line-height: 1.15;
}

.mi-header-user-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mi-header-user-trigger:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.22);
}

.mi-header-user-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.mi-header-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.mi-header-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ccfbf1;
  line-height: 1;
}

.mi-header-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  padding: 0.5rem 0;
  z-index: 100;
}

.mi-header-user-menu-head {
  padding: 0.625rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.mi-header-user-menu-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.mi-header-user-menu-email {
  font-size: 0.75rem;
  color: var(--text-2);
}

.mi-header-user-menu-tenant {
  font-size: 0.6875rem;
  color: var(--text-3);
}

.mi-header-user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.mi-header-user-menu-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s ease;
}

.mi-header-user-menu-item:hover {
  background: var(--hover);
}

/* Settings page (Account / Tenant tabs) */
.mi-settings-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.mi-settings-tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.mi-settings-tab:hover {
  color: var(--text);
  background: var(--hover);
}

.mi-settings-tab.is-active {
  color: var(--accent-2);
  background: var(--accent-soft);
}

.mi-settings-panel-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.mi-settings-panel-desc {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.mi-settings-account-card,
.mi-settings-tenant-card {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.mi-settings-account-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
}

.mi-settings-account-label {
  color: var(--text-2);
}

.mi-settings-account-value {
  color: var(--text);
}

.mi-settings-account-avatar-row .mi-settings-account-value {
  display: flex;
  align-items: center;
}

.mi-settings-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.mi-settings-avatar-initials {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}

.mi-settings-avatar-upload-row .mi-settings-account-value {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.mi-settings-avatar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.mi-settings-avatar-form input[type="file"] {
  font-size: 0.8125rem;
}

.mi-settings-avatar-btn {
  font-size: 0.8125rem;
}

.mi-settings-avatar-hint {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-3);
}

@media (max-width: 1320px) {
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dash-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-launchpad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-health-grid {
    grid-template-columns: 1fr;
  }

  .dash-client-chip {
    grid-template-columns: 1fr;
  }

  .dash-client-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-card {
    grid-template-columns: 1fr;
  }

  .file-detail-actions {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
  }

  .password-detail-shell {
    grid-template-columns: 1fr;
  }

  .asset-detail-shell {
    grid-template-columns: 1fr;
  }

  .runbook-detail-shell {
    grid-template-columns: 1fr;
  }

  .office-preview-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .office-preview-actions {
    justify-content: flex-start;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .dash-hero {
    grid-template-columns: 1fr;
  }

  .dash-page-header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-page-header-right {
    flex-wrap: wrap;
  }

  .dash-kpi-strip {
    grid-template-columns: 1fr;
  }

  .dash-tenant-tiles-grid {
    grid-template-columns: 1fr;
  }

  .dash-activity-section {
    grid-template-columns: 1fr;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .trend-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-window-switch {
    flex-wrap: wrap;
  }

  .dash-launchpad-grid {
    grid-template-columns: 1fr;
  }

  .clients-hero {
    grid-template-columns: 1fr;
  }

  .clients-lanes-grid {
    grid-template-columns: 1fr;
  }

  .clients-hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-create-form {
    grid-template-columns: 1fr;
  }

  .form-grid-two {
    grid-template-columns: 1fr;
  }

  .docs-explorer-grid {
    grid-template-columns: 1fr;
  }

  .voice-reliability-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .voice-reliability-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voice-reliability-breakdown {
    grid-template-columns: 1fr;
  }

  .voice-verification-list {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-pane-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .portal-sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .portal-layout {
    flex-direction: column;
  }

  .portal-main {
    margin-left: 0;
    padding: 12px;
  }

  .mi-header-inner {
    flex-wrap: wrap;
  }

  .mi-header-nav {
    width: 100%;
    order: 3;
    margin-top: 4px;
    overflow-x: auto;
  }

  .mi-header-right {
    flex-wrap: wrap;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .metrics-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .dash-title {
    font-size: 23px;
  }

  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }

  .clients-hero-kpis {
    grid-template-columns: 1fr;
  }

  .dash-client-rail {
    grid-template-columns: 1fr;
  }

  .trend-insight-grid {
    grid-template-columns: 1fr;
  }
}

/* Redesign Phase: Executive Warmth and Stronger Hierarchy */
/* Light shell: header/sidebar use theme.css; accent and neutrals from theme */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

/* Voice controls: single control cluster, aligned with Search / Logout */
.voice-assistant-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.voice-assistant-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.1;
  white-space: nowrap;
}

.voice-assistant-mute.muted {
  background: var(--hover);
  border-color: var(--border);
}

.voice-assistant-toggle.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.voice-assistant-toggle.listening {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.5);
  color: #fff;
}

.voice-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.voice-assistant-toggle.is-active .voice-dot {
  background: #22c55e;
}

.voice-assistant-toggle.listening .voice-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.global-search-panel {
  border-color: #b8cae6;
  box-shadow: 0 30px 62px rgba(9, 18, 36, 0.34);
  background:
    radial-gradient(500px 220px at 92% -14%, rgba(118, 170, 255, 0.2), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.dash-hero {
  border: 1px solid #cfd9e8;
  border-radius: 16px;
  padding: 20px 20px 14px;
  background:
    radial-gradient(360px 180px at 90% 8%, rgba(169, 200, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 14px 30px rgba(14, 28, 54, 0.08);
  color: var(--ink-900);
}

.dash-title {
  font-size: 42px;
  letter-spacing: -1px;
  line-height: 0.96;
  color: var(--ink-950);
}

.dash-subtitle {
  font-size: 17px;
  max-width: 920px;
  color: var(--ink-700);
}

.dash-hero .eyebrow {
  color: var(--ink-500);
}

.dash-hero-actions .btn-secondary {
  border-color: #c5d2e7;
  background: #fff;
  color: var(--ink-800);
}

.dash-window-chip {
  color: #4f6487;
  border-color: #ccd8ea;
  background: #ffffff;
}

.dash-window-chip.active {
  color: #0f2f67;
  background: #dfeaff;
  border-color: #d3e2ff;
}

.dash-hero-aside {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #d0dced;
  border-radius: 12px;
}

.dash-context {
  border-top-color: #d8e2f1;
}

.dash-context-label {
  color: var(--ink-500);
}

.dash-context-value {
  font-size: 18px;
  color: var(--ink-900);
}

.dash-scope-form {
  margin-top: 6px;
}

.dash-scope-select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #c5d2e7;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink-900);
  background: #fff;
}

.dash-scope-select:focus {
  outline: none;
  border-color: #89b0ff;
  box-shadow: 0 0 0 2px rgba(137, 176, 255, 0.2);
}

.dash-favorites {
  border-radius: 12px;
  border: 1px solid #d0dced;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.dash-favorites-head h2 {
  color: var(--ink-900);
}

.dash-favorites-head .btn-link {
  color: #1f57c8;
}

.dash-favorites-empty {
  color: var(--ink-500);
}

.dash-favorites-rail::-webkit-scrollbar-thumb {
  background: rgba(119, 142, 179, 0.34);
}

.dash-favorite-card {
  min-height: 92px;
  border-radius: 11px;
  padding: 14px 18px;
  box-shadow: 0 4px 12px rgba(18, 38, 66, 0.06);
}

.dash-favorite-card:hover {
  border-color: #bfd1ea;
  box-shadow: 0 8px 16px rgba(18, 38, 66, 0.08);
}

.dash-favorite-name {
  font-size: clamp(20px, 1.8vw, 30px);
  color: var(--ink-900);
}

.dash-kpi-card {
  border: 1px solid #cad9ef;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.98));
  box-shadow: 0 9px 18px rgba(26, 47, 79, 0.06);
}

.dash-kpi-trend {
  font-weight: 700;
}

.dash-focus-card {
  border-radius: 12px;
}

.dash-focus-list li {
  border-radius: 10px;
  margin-top: 0;
  padding: 6px 8px;
  background: linear-gradient(180deg, #f9fcff 0%, #f3f7fe 100%);
  border: 1px solid #d7e0ef;
}

.activity-feed {
  gap: 2px;
}

.activity-item {
  padding: 11px 2px;
}

.activity-avatar {
  box-shadow: 0 6px 12px rgba(31, 82, 62, 0.18);
}

.clients-hero {
  border-radius: 16px;
  border-color: #bfd2ef;
  background:
    radial-gradient(320px 180px at 86% 14%, rgba(141, 186, 255, 0.28), transparent 72%),
    linear-gradient(124deg, #12233f 0%, #1d355e 52%, #2956a4 100%);
  box-shadow: 0 18px 34px rgba(12, 25, 49, 0.28);
}

.clients-title {
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -1.05px;
}

.clients-subtitle {
  font-size: 17px;
  color: #d8e7ff;
}

.clients-kpi {
  border-color: rgba(190, 214, 250, 0.42);
  background: rgba(12, 24, 43, 0.4);
}

.clients-kpi strong {
  font-size: 34px;
}

.clients-lane-card {
  border-radius: 12px;
}

.clients-chip-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-mini {
  border-radius: 10px;
  min-height: 52px;
}

.org-toolbar {
  background: linear-gradient(180deg, #f9fbff 0%, #f4f8ff 100%);
  border: 1px solid #d3ddef;
  border-radius: 10px;
  padding: 10px;
}

.org-table-wrap {
  overflow-x: auto;
}

.org-table {
  table-layout: fixed;
  width: 100%;
}

.org-table th {
  background: #eef3fb;
  color: #294364;
  position: sticky;
  top: 0;
  z-index: 2;
}

.org-table td {
  vertical-align: middle;
}

.org-table tbody tr:hover {
  background: #f5f9ff;
}

/* Clients page visual parity with dashboard hub style */
.clients-hero {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: clamp(0.72rem, 1.2vw, 1rem);
  margin-bottom: 0.65rem;
  background: linear-gradient(180deg, #fcfefe 0%, #f8fafc 100%);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.clients-title {
  margin: 0.16rem 0 0;
  color: var(--text);
  font-size: clamp(1.22rem, 2vw, 1.8rem);
  letter-spacing: -0.02em;
}

.clients-subtitle {
  margin: 0.28rem 0 0;
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  line-height: 1.4;
  color: var(--text-2);
  max-width: 76ch;
}

.clients-hero .muted,
.clients-hero .eyebrow {
  color: var(--text-3);
}

.clients-hero-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.clients-kpi {
  min-height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 0.52rem 0.6rem;
}

.clients-kpi span {
  color: var(--text-3);
  letter-spacing: 0.05em;
}

.clients-kpi strong {
  margin-top: 0.16rem;
  font-size: clamp(1.1rem, 1.8vw, 1.42rem);
  color: var(--text);
}

.clients-lanes-grid {
  margin: 0 0 0.62rem;
  gap: 0.62rem;
}

.clients-lanes-grid > .clients-lane-card:only-child {
  grid-column: 1 / -1;
}

.clients-lane-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: clamp(0.68rem, 1vw, 0.9rem);
}

.clients-lane-head h2 {
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  letter-spacing: -0.01em;
  color: var(--text);
}

.client-mini {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.client-mini:hover {
  border-color: rgba(13, 148, 136, 0.34);
  background: #f8fafc;
}

.client-mini-name {
  color: var(--text);
}

.org-toolbar {
  background: linear-gradient(180deg, #fcfefe 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem 0.56rem;
}

.org-table th {
  background: #f8fafc;
  color: var(--text-2);
}

.org-table tbody tr:hover {
  background: rgba(13, 148, 136, 0.05);
}

@media (max-width: 980px) {
  .clients-hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-lanes-grid {
    grid-template-columns: 1fr;
  }

  .clients-favorites-grid {
    grid-template-columns: 1fr;
  }
}

.workspace-inline-meta {
  margin-top: 10px;
}

.workspace-grid {
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.workspace-main {
  display: grid;
  gap: 12px;
}

.workspace-subtitle-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0;
}

.workspace-summary-card {
  margin-top: 0;
}

.workspace-activity-card {
  margin-top: 0;
}

.workspace-notes-card {
  margin-top: 0;
  width: 100%;
}

.workspace-notes-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-top: 10px;
  width: 100%;
}

.workspace-notes-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cad8ee;
  border-radius: 10px;
  background: #f8fbff;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-notes-select,
.workspace-notes-btn {
  border: 1px solid #bfd2f1;
  border-radius: 8px;
  background: #ffffff;
  color: #21416e;
  font-size: 12px;
  line-height: 1.2;
  min-height: 34px;
  box-sizing: border-box;
}

.workspace-notes-select {
  min-width: 132px;
  padding: 6px 11px;
}

.workspace-notes-select[data-notes-cmd="fontSizePx"] {
  min-width: 74px;
}

.workspace-notes-btn {
  cursor: pointer;
  padding: 6px 12px;
  white-space: nowrap;
}

.workspace-notes-btn:hover {
  background: #eef4ff;
}

.workspace-notes-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3f5574;
  border: 1px solid #bfd2f1;
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
}

.workspace-notes-color-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 2px;
}

.workspace-notes-color-label {
  font-size: 11px;
  color: #4a6286;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.workspace-notes-swatches {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.workspace-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid #b8cae6;
  background: var(--swatch);
  cursor: pointer;
}

.workspace-color-swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.15);
}

.workspace-notes-color-custom {
  min-height: 30px;
  padding: 3px 7px;
  gap: 5px;
  white-space: nowrap;
}

.workspace-notes-color-custom span {
  font-size: 11px;
  color: #4a6286;
}

.workspace-notes-color input[type="color"] {
  width: 28px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.workspace-notes-editor {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 250px;
  min-height: 250px;
  max-height: 250px;
  overflow: auto;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #b9cce9;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.45;
  color: #1f2a3b;
  outline: none;
}

.workspace-notes-editor[contenteditable="true"]:focus {
  border-color: #2f6fda;
  box-shadow: 0 0 0 2px rgba(47, 111, 218, 0.12);
}

.workspace-notes-editor:empty::before {
  content: attr(data-placeholder);
  color: #7b8ea9;
}

.workspace-notes-form .btn-primary {
  justify-self: start;
  margin-top: 8px;
}

.workspace-notes-hint {
  margin-top: -4px;
}

.workspace-summary-footer {
  margin-top: 14px;
  border-top: 1px solid #d6e0ef;
  padding-top: 12px;
}

.workspace-summary-footer h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #24385b;
}

.workspace-summary-list {
  margin: 10px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.workspace-summary-list li {
  display: grid;
  gap: 2px;
  border: 1px solid #d6e0ef;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
}

.workspace-summary-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-summary-tag {
  display: inline-block;
  width: fit-content;
  border: 1px solid #bfd2f1;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2c4f80;
  background: #edf4ff;
}

.workspace-summary-match {
  font-size: 11px;
  color: #556b8f;
}

.workspace-summary-file {
  color: #184d9a;
  font-weight: 700;
  text-decoration: none;
  width: fit-content;
}

.workspace-summary-file:hover {
  text-decoration: underline;
}

.workspace-summary-snippet {
  font-size: 13px;
  line-height: 1.4;
  color: #334b6f;
}

.workspace-summary-meta {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #3f5a80;
}

.workspace-module-link {
  text-decoration: none;
  color: inherit;
  border: 1px solid #e2e8f0;
}

.workspace-module-link:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.workspace-module-title {
  margin: 0;
  font-size: 0.9rem;
  color: #1f3252;
  line-height: 1.25;
}

.workspace-module-meta {
  font-size: 0.74rem;
  color: #5b6f90;
}

.workspace-must-read {
  margin: 8px 0 10px;
  border: 1px solid #d6e0ef;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  font-size: 13px;
  color: #2e4a73;
}

.workspace-coverage-score {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f766e;
}

.workspace-coverage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.workspace-coverage-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border: 1px solid #dce5f3;
  border-radius: 8px;
  padding: 5px 8px;
  background: #f9fbff;
}

.workspace-coverage-list li.is-done {
  border-color: #bde5d8;
  background: #f0fdf4;
  color: #0f5f4e;
}

.workspace-coverage-list li.is-missing {
  border-color: #f2d7dc;
  background: #fff7f8;
  color: #7a2e39;
}

.workspace-rail-row.attention-danger {
  border-left: 3px solid #be123c;
}

.workspace-rail-row.attention-warn {
  border-left: 3px solid #b45309;
}

.workspace-escalation-note {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid #d6e0ef;
  border-radius: 8px;
  font-size: 12px;
  color: #445d82;
  background: #f8fbff;
}

.workspace-compact-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.workspace-compact-stats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.workspace-compact-stats li strong {
  color: #1f3252;
}

.workspace-activity-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.workspace-activity-toggle {
  margin-top: 0;
  min-height: 30px;
}

#workspace-activity-panel {
  margin-top: 6px;
}

.workspace-activity-card .dash-section-head {
  row-gap: 8px;
}

.workspace-activity-card .dash-section-head .btn-link {
  white-space: nowrap;
}

.workspace-rail-card {
  padding: 0.85rem 1rem;
}

.workspace-rail-card-emphasis {
  border: 1px solid #cfe0f6;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.workspace-rail-card-coverage {
  background: linear-gradient(180deg, #f9fffd 0%, #f2fbf8 100%);
}

.workspace-rail-card-critical {
  background: linear-gradient(180deg, #fffafa 0%, #fff4f6 100%);
  border-color: #f2d0d8;
}

.workspace-rail-card-secondary {
  background: #fbfdff;
  border: 1px solid #e6edf7;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.workspace-rail-card-emphasis .workspace-rail-title {
  color: #253d61;
}

.workspace-rail-card-critical .workspace-rail-title {
  color: #7f1d3f;
}

.workspace-rail-card-secondary .workspace-rail-title {
  color: #4e6485;
}

.workspace-more-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #36537c;
}

.workspace-more-details-body {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.workspace-more-details-body h4 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4e6485;
}

@media (max-width: 1100px) {
  .workspace-module-grid {
    grid-template-columns: 1fr;
  }
}

.activity-item.is-hidden {
  display: none;
}

.docs-explorer-shell {
  border-radius: 14px;
}

.docs-explorer-head-refined {
  padding-bottom: 10px;
  border-bottom: 1px solid #d4deee;
}

.docs-pathbar-wrap-refined {
  width: 100%;
}

.docs-pathbar {
  border: 1px solid #c9d7eb;
  background: #f8fbff;
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.docs-pathbar .crumb {
  text-decoration: none;
  color: #27456a;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 6px;
}

.docs-pathbar .crumb:hover {
  background: #eaf2ff;
}

.docs-pathbar .crumb.current {
  color: #111b2f;
  background: #dbe8ff;
}

.docs-toolbar {
  margin-top: 12px;
  display: block;
}

.docs-toolbar-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.docs-toolbar-inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.docs-toolbar-inline-actions .btn-primary,
.docs-toolbar-inline-actions .btn-secondary,
.docs-toolbar-inline-actions #docs-clear-selection,
.docs-toolbar-inline-actions .docs-upload-limit-chip {
  margin-top: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.docs-upload-limit-chip {
  border: 1px solid #c9d8ec;
  border-radius: 8px;
  background: #f3f8ff;
  color: #3c587f;
  letter-spacing: 0;
  padding: 9px 14px;
  white-space: nowrap;
}

.docs-toolbar-filters input,
.docs-toolbar-filters select,
.docs-toolbar-form input,
.docs-toolbar-form select {
  border: 1px solid #c4d2e8;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink-900);
  background: #fff;
}

.docs-action-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 22, 40, 0.48);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 16px;
}

.docs-action-modal.open {
  display: flex;
}

.docs-action-modal-panel {
  width: min(520px, 94vw);
  border-radius: 14px;
  border: 1px solid #c7d5e9;
  background: #fff;
  box-shadow: 0 22px 46px rgba(10, 24, 46, 0.28);
}

.docs-action-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #d6e1f0;
}

.docs-action-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--ink-950);
}

.docs-action-modal-close {
  border: 1px solid #c7d5e9;
  background: #fff;
  color: var(--ink-700);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  line-height: 1;
  font-size: 20px;
  cursor: pointer;
}

.docs-action-modal-form {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.docs-action-modal-form label {
  font-size: 12px;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  font-weight: 700;
  color: #415978;
}

.docs-action-modal-form input,
.docs-action-modal-form select {
  border: 1px solid #c4d2e8;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink-900);
  background: #fff;
}

.docs-action-modal-form input[type="file"] {
  padding: 7px 9px;
}

.docs-action-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.docs-action-modal-actions .btn-secondary,
.docs-action-modal-actions .btn-danger {
  margin-top: 0;
  min-height: 40px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.docs-upload-note {
  margin: 8px 0 0;
}

.docs-pane-full {
  margin-top: 12px;
}

.docs-table-wrap {
  border: 1px solid #cfdaec;
  border-radius: 10px;
  overflow: auto;
}

.docs-table thead th {
  background: #edf3fc;
  color: #2c4668;
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.docs-table tbody tr:hover {
  background: #f6f9ff;
}

.docs-table td {
  font-size: 13px;
  line-height: 1.32;
  vertical-align: middle;
}

.docs-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.docs-col-select {
  width: 34px;
  text-align: center;
}

.docs-col-select input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #0f766e;
}

.docs-nav-row.is-selected td {
  background: #eef6ff !important;
}

.docs-selection-summary {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3f5a80;
}

.docs-selection-summary .btn-link {
  margin: 0;
}

#docs-clear-selection {
  border: 1px solid #c4d5ea;
  border-radius: 8px;
  background: #f3f8ff;
  color: #1f6f8f;
  text-decoration: none;
  padding: 9px 14px;
}

#docs-clear-selection:hover {
  background: #e9f2ff;
  border-color: #a9bfdc;
  color: #185874;
  text-decoration: none;
}

.docs-focus-mode .docs-col-optional {
  display: none;
}

.docs-bulk-actions {
  margin-top: 6px;
  border: 1px solid #cfdaec;
  border-radius: 10px;
  background: #f8fbff;
  padding: 9px 10px;
  display: grid;
  gap: 8px;
}

.docs-bulk-intro {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
  border-bottom: 1px solid #dde7f5;
  padding-bottom: 7px;
}

.docs-bulk-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.docs-bulk-intro .docs-selection-summary {
  margin-left: 0;
}

.docs-toolbar-inline-actions .docs-selection-summary {
  margin-left: 6px;
}

.docs-bulk-type-filter {
  border: 1px solid #c4d2e8;
  border-radius: 8px;
  min-height: 34px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12px;
  background: #fff;
  color: var(--ink-900);
  min-width: 180px;
}

.docs-bulk-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.docs-bulk-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.docs-bulk-actions strong {
  font-size: 12px;
  color: #334e73;
  font-weight: 500;
}

.docs-bulk-intro span {
  font-size: 12px;
  color: #5b6f90;
}

.docs-bulk-help {
  margin: 4px 2px 0;
  font-size: 12px;
  color: #5b6f90;
}

.docs-bulk-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.docs-bulk-label {
  font-size: 12px;
  color: #445f86;
  font-weight: 500;
}

.docs-bulk-form select {
  border: 1px solid #c4d2e8;
  border-radius: 8px;
  min-height: 34px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12px;
}

.docs-bulk-actions .btn-secondary,
.docs-bulk-actions .btn-danger {
  margin-top: 0;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.docs-bulk-soft-btn {
  font-weight: 500;
}

#docs-export-selected,
#docs-delete-selected {
  font-weight: 700;
}

.docs-upload-note {
  margin: 10px 0 0;
}

.docs-toolbar-inline-actions {
  margin-top: 4px;
}

.docs-table td {
  font-size: 13.5px;
  line-height: 1.45;
  padding-top: 10px;
  padding-bottom: 10px;
}

.docs-folder-row td {
  background: #f3f8ff;
}

.docs-folder-row:hover td {
  background: #eaf3ff;
}

.docs-folder-row td:first-child {
  border-left: 3px solid #8bb2e6;
}

.docs-folder-name-cell .docs-folder-link {
  font-weight: 700;
  color: #1d4f95;
}

.docs-folder-name-cell .docs-folder-link:hover {
  color: #173f78;
  text-decoration: none;
}

.docs-folder-name-cell .docs-folder-glyph {
  width: 20px;
  height: 16px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d7e4f7;
  padding: 2px 3px;
}

.docs-folder-type-pill {
  border-color: #bfd3f0;
  color: #2a5a92;
  background: #ecf4ff;
  font-size: 10px;
  letter-spacing: 0.45px;
}

.docs-sort-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.docs-sort-btn.is-active {
  color: #1f4f8e;
}

.docs-folder-link {
  color: #1e4fc4;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.docs-folder-glyph {
  width: 18px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d4a32f;
  flex-shrink: 0;
}

.docs-folder-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.docs-folder-glyph svg path:first-child {
  fill: #e3b857;
}

.docs-folder-glyph svg path:last-child {
  fill: #d4a32f;
}

@media (max-width: 1280px) {
  .dash-title,
  .clients-title {
    font-size: 34px;
  }

  .workspace-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 900px) {
  .docs-toolbar-filters {
    grid-template-columns: 1fr;
  }

  .docs-toolbar-inline-actions {
    flex-wrap: wrap;
  }

  .docs-upload-limit-chip {
    margin-left: 0;
  }

  .docs-bulk-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-bulk-intro .docs-selection-summary {
    width: 100%;
    justify-content: flex-start;
  }
}

/* -----------------------------
   Command Center dashboard
------------------------------ */

.cmd-page {
  padding: clamp(0.85rem, 1.2vw, 1.2rem) clamp(1rem, 1.8vw, 2rem) clamp(1rem, 1.5vw, 1.5rem);
}

.cmd-container {
  max-width: min(96vw, 1720px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 0.9vw, 0.95rem);
}

.cmd-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(240px, 300px);
  gap: clamp(0.8rem, 1vw, 1.1rem);
  align-items: center;
  padding: clamp(0.75rem, 1vw, 1rem) clamp(0.9rem, 1.2vw, 1.2rem);
}

.cmd-health-ring {
  --score-angle: calc(var(--score) * 3.6deg);
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--score-angle), #e2e8f0 var(--score-angle));
  display: grid;
  place-items: center;
}

.cmd-health-ring-inner {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cmd-health-score {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.cmd-health-caption {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.cmd-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cmd-title {
  margin: 0;
  font-size: clamp(1.15rem, 1.1vw, 1.45rem);
  font-weight: 750;
  color: var(--text);
}

.cmd-since-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-app);
  color: var(--text-2);
  padding: 0.26rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 650;
}

.cmd-summary {
  margin: 0.35rem 0 0.55rem;
  color: var(--text-2);
  font-size: 0.88rem;
}

.cmd-coverage-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
}

.cmd-coverage-label,
.cmd-coverage-value {
  font-size: 0.78rem;
  color: var(--text-2);
  font-weight: 600;
}

.cmd-coverage-track {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.cmd-coverage-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mod-documents), var(--mod-clients));
  border-radius: 999px;
}

.cmd-hero-right {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
}

.cmd-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cmd-client-select {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
}

.cmd-window-pills {
  display: flex;
  gap: 0.45rem;
}

.cmd-window-pill {
  text-decoration: none;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.66rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.cmd-window-pill.is-active {
  color: var(--accent-2);
  background: var(--accent-soft);
  border-color: rgba(13, 148, 136, 0.35);
}

.cmd-actions {
  display: flex;
  gap: 0.5rem;
}

.cmd-processing-strip {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.cmd-processing-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.16rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-2);
  background: var(--bg-app);
}

.cmd-processing-chip.is-pending {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08);
}

.cmd-processing-chip.is-failed {
  color: var(--bad-text);
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.09);
}

.cmd-processing-chip.is-completed {
  color: var(--ok-text);
  border-color: rgba(22, 101, 52, 0.3);
  background: rgba(22, 101, 52, 0.09);
}

.cmd-processing-link {
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-2);
}

.cmd-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(155px, 1fr));
  gap: 0.62rem;
}

.cmd-kpi-card {
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--kpi-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.56rem 0.68rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cmd-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  border-color: rgba(13, 148, 136, 0.35);
}

.cmd-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.cmd-kpi-label {
  font-size: 0.76rem;
  color: var(--text-2);
  font-weight: 700;
}

.cmd-kpi-value {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 800;
}

.cmd-kpi-delta {
  font-size: 0.68rem;
  border-radius: 999px;
  padding: 0.14rem 0.4rem;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-app);
  font-weight: 700;
}

.cmd-kpi-delta.trend-up {
  color: var(--ok-text);
}

.cmd-kpi-delta.trend-down {
  color: var(--bad-text);
}

.cmd-bento {
  display: grid;
  grid-template-columns: minmax(640px, 1.35fr) minmax(420px, 1fr);
  grid-template-areas:
    "focus activity"
    "recent activity"
    "recent velocity"
    "quick spotlight"
    "quick rec";
  gap: clamp(0.6rem, 0.9vw, 0.85rem);
  align-items: start;
}

.cmd-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.7rem 0.82rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cmd-card:hover {
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.cmd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cmd-card-head h2 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text);
}

.cmd-card-link {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-2);
}

.cmd-focus {
  grid-area: focus;
}

.cmd-focus-grid {
  display: grid;
  gap: 0.45rem;
}

.cmd-focus-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--priority-medium);
  border-radius: 10px;
  background: #fff;
  padding: 0.68rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cmd-focus-card:hover {
  transform: translateY(-1px);
}

.cmd-focus-card.priority-critical {
  border-left-color: var(--priority-critical);
}

.cmd-focus-card.priority-high {
  border-left-color: var(--priority-high);
}

.cmd-focus-title {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  color: var(--text);
}

.cmd-focus-detail {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-2);
}

.cmd-focus-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.cmd-focus-cta,
.cmd-focus-dismiss {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}

.cmd-focus-cta:hover,
.cmd-focus-dismiss:hover {
  background: var(--hover);
}

.cmd-recent {
  grid-area: recent;
}

.cmd-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
}

.cmd-table {
  width: 100%;
  border-collapse: collapse;
}

.cmd-table th,
.cmd-table td {
  padding: 0.41rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.79rem;
  color: var(--text-2);
}

.cmd-table th {
  background: #f8fafc;
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cmd-type-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  background: var(--bg-app);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-2);
}

.cmd-empty-state {
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-app);
  padding: 1rem;
}

.cmd-empty-state h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}

.cmd-empty-state p {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--text-2);
}

.cmd-activity {
  grid-area: activity;
}

.cmd-subtle-stat {
  font-size: 0.74rem;
  color: var(--text-3);
  font-weight: 600;
}

.cmd-activity-chart {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfdff;
  padding: 0.45rem 0.45rem 0.35rem;
  position: relative;
}

.cmd-activity-svg {
  width: 100%;
  height: clamp(190px, 22vh, 260px);
  display: block;
}

.cmd-axis-line {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.cmd-seg-clients {
  fill: var(--mod-clients);
}

.cmd-seg-assets {
  fill: var(--mod-assets);
}

.cmd-seg-runbooks {
  fill: var(--mod-runbooks);
}

.cmd-seg-documents {
  fill: var(--mod-documents);
}

.cmd-seg-passwords {
  fill: var(--mod-passwords);
}

.cmd-bar-label {
  fill: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
}

.cmd-point-hit {
  fill: transparent;
  cursor: pointer;
}

.cmd-point-hit:focus-visible {
  outline: none;
  stroke: rgba(13, 148, 136, 0.85);
  stroke-width: 2;
}

.cmd-activity-tooltip {
  position: absolute;
  min-width: 210px;
  max-width: 240px;
  transform: translate(-50%, -100%);
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
  padding: 0.55rem 0.65rem;
  z-index: 6;
  pointer-events: none;
}

.cmd-activity-tooltip.is-below {
  transform: translate(-50%, 0%);
}

.cmd-activity-tooltip-day {
  font-size: 0.73rem;
  color: #cbd5e1;
  margin-bottom: 0.15rem;
}

.cmd-activity-tooltip-total {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.3rem;
}

.cmd-activity-tooltip-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.18rem;
}

.cmd-activity-tooltip-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.72rem;
}

.cmd-activity-tooltip-list li b {
  color: #f8fafc;
}

.cmd-activity-labels {
  margin-top: 0.24rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
  gap: 0.22rem;
}

.cmd-quick-actions {
  grid-area: quick;
}

.cmd-quick-actions-grid {
  display: grid;
  gap: 0.4rem;
}

.cmd-quick-action {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem 0.58rem;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.cmd-quick-action:hover {
  border-color: rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.cmd-quick-action strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
}

.cmd-quick-action span {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.72rem;
  color: var(--text-2);
}

.cmd-activity-labels span {
  font-size: 0.64rem;
  color: var(--text-3);
  text-align: center;
}

.cmd-legend {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cmd-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-2);
}

.cmd-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.cmd-dot-clients { background: var(--mod-clients); }
.cmd-dot-assets { background: var(--mod-assets); }
.cmd-dot-runbooks { background: var(--mod-runbooks); }
.cmd-dot-documents { background: var(--mod-documents); }
.cmd-dot-passwords { background: var(--mod-passwords); }

.cmd-velocity {
  grid-area: velocity;
}

.cmd-velocity-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.cmd-velocity-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.77rem;
  color: var(--text-2);
  margin-bottom: 0.18rem;
}

.cmd-velocity-track {
  border-radius: 999px;
  background: #e2e8f0;
  height: 8px;
  overflow: hidden;
}

.cmd-velocity-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mod-clients), var(--mod-assets));
}

.cmd-spotlight {
  grid-area: spotlight;
}

.cmd-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.cmd-spotlight-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem;
  text-decoration: none;
  background: #fff;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.cmd-spotlight-card:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 148, 136, 0.45);
}

.cmd-spotlight-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.cmd-spotlight-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.cmd-spotlight-initials {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.cmd-spotlight-title {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.cmd-spotlight-tag {
  margin-top: 0.15rem;
  display: inline-flex;
  font-size: 0.64rem;
  color: var(--accent-2);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
}

.cmd-spotlight-stats {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cmd-spotlight-stats span {
  font-size: 0.67rem;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.08rem 0.35rem;
}

.cmd-recommendations {
  grid-area: rec;
}

.cmd-recommendation-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-2);
  font-size: 0.83rem;
  display: grid;
  gap: 0.35rem;
}

.cmd-empty-inline {
  font-size: 0.8rem;
  color: var(--text-3);
  padding: 0.4rem 0;
}

@media (max-width: 1280px) {
  .cmd-hero {
    grid-template-columns: 1fr;
  }

  .cmd-hero-left {
    display: none;
  }

  .cmd-kpi-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .cmd-bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "focus"
      "activity"
      "recent"
      "velocity"
      "spotlight"
      "quick"
      "rec";
  }
}

@media (max-width: 1080px) {
  .cmd-focus,
  .cmd-recent,
  .cmd-activity,
  .cmd-velocity,
  .cmd-spotlight,
  .cmd-quick-actions,
  .cmd-recommendations {
    grid-column: auto;
    grid-row: auto;
  }

  .cmd-spotlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .cmd-page {
    padding: 0.9rem;
  }

  .cmd-kpi-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .cmd-kpi-card {
    min-width: 160px;
  }

  .cmd-actions {
    flex-wrap: wrap;
  }
}

@media (min-width: 1800px) {
  .cmd-container {
    max-width: min(96vw, 2140px);
  }

  .cmd-bento {
    grid-template-columns: minmax(720px, 1.15fr) minmax(520px, 1fr) minmax(380px, 0.9fr);
    grid-template-areas:
      "focus activity velocity"
      "recent activity spotlight"
      "recent quick rec";
  }

  .cmd-kpi-strip {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
  }

  .cmd-table th,
  .cmd-table td {
    padding: 0.5rem 0.62rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 2500px) {
  .cmd-container {
    max-width: min(95vw, 2840px);
  }

  .cmd-page {
    padding-inline: clamp(1.2rem, 2.4vw, 3rem);
  }

  .cmd-title {
    font-size: 1.6rem;
  }

  .cmd-kpi-value {
    font-size: 1.7rem;
  }

  .cmd-card-head h2 {
    font-size: 1.06rem;
  }

  .cmd-activity-svg {
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmd-card,
  .cmd-kpi-card,
  .cmd-focus-card,
  .cmd-spotlight-card {
    transition: none !important;
  }
}

/* ---- Dashboard redesign: client-centric documentation hub ---- */

.hub-page {
  padding: clamp(0.9rem, 1.4vw, 1.5rem) clamp(1rem, 1.8vw, 2.2rem) clamp(1.1rem, 1.6vw, 1.8rem);
}

.hub-container {
  max-width: min(96vw, 1780px);
  margin: 0 auto;
  display: grid;
  gap: clamp(0.65rem, 1vw, 1rem);
}

.hub-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: clamp(0.72rem, 1.2vw, 1rem);
}

.hub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.72rem;
}

.hub-card-head h2 {
  margin: 0;
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  letter-spacing: -0.01em;
}

.hub-card-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}

.hub-card-link:hover {
  text-decoration: underline;
}

.hub-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(0.65rem, 1.3vw, 1.25rem);
}

.hub-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}

.hub-title {
  margin: 0.16rem 0 0;
  font-size: clamp(1.22rem, 2vw, 1.8rem);
  letter-spacing: -0.02em;
}

.hub-summary {
  margin: 0.28rem 0 0;
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  color: var(--text-2);
  max-width: 76ch;
}

.hub-head-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.52rem;
}

.hub-scope-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hub-field-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.hub-client-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text);
  height: 31px;
  padding: 0 0.58rem;
  background: #fff;
  min-width: 170px;
}

.hub-window-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.hub-window-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 0.62rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
}

.hub-window-pill:hover {
  background: var(--hover);
  color: var(--text);
}

.hub-window-pill.is-active {
  background: var(--accent-soft);
  color: var(--accent-2);
  border-color: rgba(13, 148, 136, 0.28);
}

.hub-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hub-kpi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.hub-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  padding: 0.36rem 0.56rem;
  font-size: 0.74rem;
}

.hub-kpi-chip:hover {
  border-color: var(--accent, rgba(13, 148, 136, 0.35));
  transform: translateY(-1px);
}

.hub-kpi-label {
  color: var(--text-2);
}

.hub-kpi-value {
  font-weight: 700;
}

.hub-kpi-delta {
  font-weight: 700;
  font-size: 0.68rem;
}

.hub-kpi-delta.trend-up {
  color: var(--ok-text);
}

.hub-kpi-delta.trend-down {
  color: var(--bad-text);
}

.hub-kpi-delta.trend-flat {
  color: var(--text-3);
}

.hub-since-chip {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--text-2);
}

/* Hero KPI cards */
.hub-hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-card, 1rem);
  margin-bottom: var(--space-section, 1.5rem);
}

.hub-hero-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hub-hero-kpi-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--text-3);
}

.hub-hero-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft, rgba(46, 157, 106, 0.10));
  color: var(--accent, #2E9D6A);
  flex-shrink: 0;
}

.hub-hero-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.hub-hero-kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hub-hero-kpi-label {
  font-size: var(--text-label, 0.875rem);
  font-weight: 600;
  color: var(--text-2);
}

.hub-hero-kpi-meta {
  font-size: var(--text-caption, 0.75rem);
  color: var(--text-3);
}

/* Two-column content grid: chart spans full width on top */
.hub-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  grid-template-areas:
    "chart    chart"
    "activity sidebar";
  gap: var(--space-card, 1rem);
  margin-bottom: var(--space-section, 1.5rem);
}

.hub-content-grid > .hub-pie-card    { grid-area: chart; }
.hub-content-grid > .hub-activity    { grid-area: activity; }
.hub-content-grid > .hub-sidebar-stack {
  grid-area: sidebar;
  display: grid;
  gap: var(--space-card, 1rem);
  align-content: start;
}

/* Health donut — larger variant */
.hub-health-visual {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.hub-health-donut-lg {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.hub-health-donut-svg-lg {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}

.hub-health-donut-svg-lg .hub-health-donut-track {
  fill: none;
  stroke: var(--completion-off, #dbe3ee);
}

.hub-health-donut-fill-lg {
  fill: none;
  stroke: var(--completion-on, #0d9488);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.hub-health-donut-lg.tone-ok .hub-health-donut-fill-lg { stroke: var(--ok-text); }
.hub-health-donut-lg.tone-warn .hub-health-donut-fill-lg { stroke: var(--warn-text); }
.hub-health-donut-lg.tone-bad .hub-health-donut-fill-lg { stroke: var(--bad-text); }

.hub-health-donut-score-lg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.hub-health-detail {
  flex: 1;
  min-width: 0;
}

/* Empty state with illustration */
.hub-empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.hub-empty-icon {
  margin-bottom: 0.75rem;
}

.hub-empty-state h3 {
  font-size: var(--text-body, 1rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.375rem;
}

.hub-empty-state p {
  font-size: var(--text-label, 0.875rem);
  color: var(--text-2);
  margin: 0 0 1rem;
}

.hub-empty-clear {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hub-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(194px, 1fr));
  gap: 0.46rem;
}

.hub-org-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  padding: 0.52rem;
  background: #fff;
  position: relative;
  display: grid;
  gap: 0.44rem;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.hub-org-card:hover,
.hub-org-card.is-hovered {
  border-color: var(--accent, rgba(13, 148, 136, 0.34));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 6px 16px rgba(15, 23, 42, 0.06));
}

.hub-org-head {
  display: flex;
  align-items: start;
  gap: 0.48rem;
}

.hub-org-link {
  width: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.hub-org-logo,
.hub-org-initials {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.hub-org-logo {
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #d8e3f3;
  padding: 2px;
}

.hub-org-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.76rem;
}

.hub-org-grid .hub-org-link {
  width: 26px;
  flex-basis: 26px;
}

.hub-org-grid .hub-org-logo,
.hub-org-grid .hub-org-initials {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.hub-org-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.hub-org-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 4.75rem;
}

.hub-org-title-row {
  display: flex;
  align-items: center;
  gap: 0.34rem;
}

.hub-org-title-link {
  min-width: 0;
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-org-title-link:hover {
  color: var(--accent-2);
}

.hub-org-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: var(--text-3);
}

.hub-org-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  width: 100%;
}

.hub-org-stats > span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.36rem;
  font-size: 0.66rem;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  color: var(--text-2);
  white-space: nowrap;
  flex: 0 0 auto;
}

.hub-org-add {
  align-content: center;
  justify-items: center;
  border-style: dashed;
  border-color: rgba(13, 148, 136, 0.38);
  min-height: 126px;
  padding: 0.65rem;
}

.hub-org-add-plus {
  font-size: 1.28rem;
  color: var(--accent-2);
  line-height: 1;
}

.hub-org-add-label {
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 700;
}

.hub-org-unpin-form {
  position: absolute;
  top: 0.44rem;
  right: 0.52rem;
  margin: 0;
  flex-shrink: 0;
}

.hub-org-unpin-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: var(--text-2);
  border-radius: 999px;
  font-size: 0.58rem;
  line-height: 1;
  font-weight: 700;
  padding: 0.08rem 0.32rem;
  cursor: pointer;
  white-space: nowrap;
}

.hub-org-unpin-btn:hover {
  border-color: rgba(13, 148, 136, 0.45);
  color: var(--accent-2);
}

.hub-org-add-form {
  width: 100%;
  margin-top: 0.34rem;
  display: grid;
  gap: 0.32rem;
}

.hub-org-add-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.72rem;
  height: 30px;
  padding: 0 0.42rem;
}

.hub-org-add-btn {
  width: 100%;
  border: 1px solid rgba(13, 148, 136, 0.5);
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-2);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  height: 30px;
  cursor: pointer;
}

.hub-org-add-btn:hover {
  background: rgba(13, 148, 136, 0.2);
}

/* ── Pie-chart card ── */
.hub-pie-stat {
  font-size: 0.72rem;
  color: var(--text-3);
}

.hub-pie-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 0.5rem;
}

.hub-pie-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.hub-pie-ring {
  width: clamp(80px, 8vw, 110px);
  height: clamp(80px, 8vw, 110px);
}

.hub-pie-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text, #334155);
}

.hub-pie-sub {
  font-size: 0.6875rem;
  color: var(--text-3, #64748b);
}

.hub-pie-divider {
  width: 1px;
  height: 90px;
  background: var(--border, #e2e8f0);
  flex-shrink: 0;
}

.hub-pie-group-ref .hub-pie-label {
  color: var(--text-3, #94a3b8);
}

.hub-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  gap: var(--space-card, 0.64rem);
  align-items: start;
}

.hub-side-column {
  display: grid;
  gap: var(--space-card, 0.64rem);
}

.hub-timeline {
  position: relative;
  display: grid;
  gap: 0.42rem;
  padding-left: 0.08rem;
  padding-bottom: 0.24rem;
}

.hub-timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0.1));
}

.hub-timeline::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 0;
  bottom: -1px;
  height: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 92%);
  pointer-events: none;
}

.hub-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.5rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.36rem 0.44rem 0.36rem 0;
  background: transparent;
  border: none;
  transition: background 0.14s ease;
}

.hub-timeline-item:hover {
  background: rgba(13, 148, 136, 0.05);
}

.hub-timeline-avatar {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: var(--ink-800);
  font-size: 0.64rem;
  font-weight: 700;
  box-shadow: 0 0 0 3px #fff;
}

img.hub-timeline-avatar {
  object-fit: cover;
  object-position: center;
  display: block;
}

.audit-actor {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 0;
}

.audit-actor-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56rem;
  font-weight: 700;
  color: #f7fbff;
  background: linear-gradient(145deg, #6db9a0 0%, #2f8a70 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  flex-shrink: 0;
}

img.audit-actor-avatar {
  object-fit: cover;
  object-position: center;
  display: block;
}

.audit-actor-text {
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

.audit-filter-grid {
  grid-template-columns: 140px 150px 170px 160px 160px minmax(220px, 1fr);
  gap: 10px 12px;
  align-items: end;
}

.audit-filter-grid-admin {
  grid-template-columns: 130px 140px 160px 180px 150px 150px minmax(220px, 1fr);
}

.audit-page-subtitle {
  max-width: 56rem;
}

.audit-scope-note {
  margin-top: 0.22rem;
  font-size: 0.84rem;
}

.audit-filter-grid > div {
  min-width: 0;
}

.audit-filter-grid label {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.audit-filter-grid input,
.audit-filter-grid select {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ink-900, #1a2331);
  background: #fff;
}

.audit-filter-grid input[type="date"] {
  text-align: left;
  font-family: inherit;
}

.audit-filter-grid input::placeholder {
  color: var(--ink-500);
}

.audit-filter-grid .filter-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
  justify-content: flex-start;
}

.audit-filter-grid .filter-actions .btn-primary,
.audit-filter-grid .filter-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  margin-top: 0;
}

.audit-filter-search {
  max-width: 360px;
  justify-self: start;
}

.audit-level-legend {
  margin: 6px 0 10px;
  display: flex;
  align-items: center;
  gap: 0.34rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-2);
}

.audit-level-legend-title {
  font-weight: 700;
  color: var(--text);
}

.audit-level-legend .audit-level-pill {
  min-width: 0;
}

.audit-level-legend-text {
  margin-right: 0.35rem;
}

.audit-table {
  table-layout: fixed;
  min-width: 1220px;
}

.audit-col-date { width: 168px; }
.audit-col-level { width: 86px; }
.audit-col-actor { width: 200px; }
.audit-col-action { width: 210px; }
.audit-col-resource { width: 380px; }
.audit-col-change { width: 180px; }
.audit-col-ip { width: 130px; }
.audit-col-location { width: 180px; }

.audit-table td {
  vertical-align: top;
  font-size: 0.76rem;
  line-height: 1.22;
  border-bottom: 1px solid #e8eef6;
  background: #fff;
  padding: 8px 10px;
}

.audit-table th {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #627288;
  background: #f6f9fd;
  border-bottom: 1px solid #dce6f3;
  white-space: nowrap;
  padding: 8px 10px;
}

.audit-cell-level {
  text-align: center;
}

.audit-th-level {
  text-align: center;
}

.audit-table tbody tr:hover td {
  background: #f9fbff;
}

.audit-date-cell {
  white-space: nowrap;
  color: #3f556f;
  font-size: 0.72rem;
}

.audit-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0.04rem 0.32rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.audit-level-pill.level-high {
  color: #8e1f2b;
  background: #fdecef;
  border-color: #f5c5cc;
}

.audit-level-pill.level-medium {
  color: #725100;
  background: #fff7df;
  border-color: #eed793;
}

.audit-level-pill.level-notice {
  color: #144a6f;
  background: #e9f5ff;
  border-color: #b9daf5;
}

.audit-level-pill.level-low {
  color: #2e5a2f;
  background: #ebf8eb;
  border-color: #c8e9c8;
}

.audit-event {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.audit-table .pill {
  white-space: nowrap;
  font-size: 0.6rem;
  padding: 0.02rem 0.34rem;
}

.audit-target-type {
  color: #5f728a;
  font-size: 0.6rem;
  white-space: nowrap;
}

.audit-target-title {
  margin-top: 0;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.74rem;
}

.audit-summary-text {
  font-size: 0.74rem;
  color: var(--text);
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-cell-ip,
.audit-cell-location {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1180px) {
  .audit-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-filter-grid .filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .audit-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hub-timeline-line {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text);
}

.hub-timeline-target {
  font-weight: 600;
}

.hub-timeline-meta {
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.48rem;
  font-size: 0.68rem;
  color: var(--text-3);
}

.hub-timeline-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-width: 0;
  flex-wrap: wrap;
}

.hub-type-pill {
  display: inline-flex;
  padding: 0.08rem 0.34rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.63rem;
  color: var(--text-2);
  text-transform: lowercase;
}

.hub-type-pill.doc-kind-pill,
.hub-type-pill.doc-category-pill {
  text-transform: uppercase;
}

.hub-attention-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.hub-attention-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.46rem;
}

.hub-attention-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hub-attention-copy strong {
  display: block;
  font-size: 0.76rem;
}

.hub-attention-copy p {
  margin: 0.14rem 0 0;
  font-size: 0.72rem;
  color: var(--text-2);
}

.hub-inline-link {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-2);
  text-decoration: none;
}

.hub-inline-link:hover {
  text-decoration: underline;
}

.hub-health-donut {
  width: 34px;
  height: 34px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-health-donut-svg {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
}

.hub-health-donut-track {
  fill: none;
  stroke: #dbe3ee;
  stroke-width: 3;
}

.hub-health-donut-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.hub-health-donut.tone-ok .hub-health-donut-fill {
  stroke: var(--ok-text, #0f766e);
}

.hub-health-donut.tone-warn .hub-health-donut-fill {
  stroke: var(--warn-text, #b45309);
}

.hub-health-donut.tone-danger .hub-health-donut-fill {
  stroke: var(--bad-text, #dc2626);
}

.hub-health-donut-score {
  position: absolute;
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--text);
}

.hub-coverage-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.5rem;
}

.hub-coverage-label,
.hub-coverage-value {
  font-size: 0.72rem;
  color: var(--text-2);
}

.hub-coverage-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.hub-coverage-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #059669);
}

.hub-recommendations {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.26rem;
  font-size: 0.72rem;
  color: var(--text-2);
}

.hub-empty-state h3 {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
}

.hub-empty-state p {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  color: var(--text-2);
}

.hub-empty-inline {
  font-size: 0.76rem;
  color: var(--text-3);
}

@media (max-width: 1220px) {
  .hub-page-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hub-head-controls {
    justify-content: flex-start;
  }

  .hub-lower {
    grid-template-columns: 1fr;
  }

  .hub-content-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chart"
      "activity"
      "sidebar";
  }

  .hub-hero-kpis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .hub-page {
    padding-inline: 0.86rem;
  }

  .hub-kpi-row {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 0.1rem;
  }

  .hub-since-chip {
    margin-left: 0;
  }

  .hub-org-grid {
    grid-template-columns: 1fr;
  }

  .hub-pie-row {
    gap: 1.25rem;
  }

  .hub-pie-ring {
    width: 72px;
    height: 72px;
  }

  .hub-pie-divider {
    height: 60px;
  }
}

@media (min-width: 1440px) {
  .hub-container {
    max-width: min(95vw, 1980px);
  }

  .hub-org-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1800px) {
  .hub-container {
    max-width: min(95vw, 2320px);
  }

  .hub-page {
    padding-inline: clamp(1.1rem, 2.4vw, 2.9rem);
  }

  .hub-org-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (min-width: 2500px) {
  .hub-container {
    max-width: min(94vw, 2920px);
  }

  .hub-title {
    font-size: 2rem;
  }

  .hub-card-head h2 {
    font-size: 1.08rem;
  }

  .hub-timeline-line {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-org-card,
  .hub-kpi-chip,
  .hub-timeline-item {
    transition: none !important;
    transform: none !important;
  }
}
