:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #111620;
  --surface-2: #18202b;
  --surface-3: #0d1118;
  --line: #293342;
  --line-soft: rgba(154, 166, 184, 0.16);
  --text: #f4f7fb;
  --muted: #98a5b8;
  --accent: #7ca7ff;
  --accent-2: #9cc2ff;
  --warning: #e6b75d;
  --danger: #ef6f7d;
  --shadow: rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0d1118 0%, var(--bg) 46%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #101620 0%, var(--bg) 100%);
}

.auth-panel {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 32, 0.92);
  box-shadow: 0 18px 48px var(--shadow);
}

.auth-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #26364f;
  color: #d9e6ff;
  font-weight: 900;
}

.brand-image-mark {
  display: block;
  object-fit: contain;
  padding: 3px;
}

.brand-logo,
.auth-logo {
  display: block;
  width: auto;
  object-fit: contain;
}

.brand-logo {
  max-width: 174px;
  max-height: 42px;
}

.auth-logo {
  max-width: 184px;
  max-height: 48px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(124, 167, 255, 0.5);
  border-radius: 8px;
  background: #6f96e8;
  color: #07101f;
  font-weight: 800;
  line-height: 1;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.muted,
.empty {
  color: var(--muted);
}

.alert {
  margin: 22px 0;
  padding: 12px 14px;
  border: 1px solid rgba(124, 167, 255, 0.34);
  border-radius: 8px;
  background: rgba(124, 167, 255, 0.1);
  color: #dce8ff;
  overflow-wrap: anywhere;
}

.danger-alert {
  border-color: rgba(255, 95, 116, 0.35);
  background: rgba(255, 95, 116, 0.11);
  color: #ffd5dc;
}

.subtle-alert {
  margin-top: -8px;
  margin-bottom: 18px;
  border-color: rgba(245, 184, 75, 0.28);
  background: rgba(245, 184, 75, 0.08);
  color: #fdecc8;
}

.danger-alert pre {
  max-height: 220px;
  margin: 10px 0 0;
  overflow: auto;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.form {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

label {
  color: var(--muted);
  font-size: 14px;
}

.form-help {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #0c1118;
  color: var(--text);
}

select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #0b1018;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: #728096;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 167, 255, 0.14);
}

select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 167, 255, 0.14);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(124, 167, 255, 0.5);
  border-radius: 8px;
  background: #6f96e8;
  color: #07101f;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

button:hover {
  background: #82a7f2;
  border-color: rgba(156, 194, 255, 0.72);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.app-shell button {
  width: fit-content;
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
}

.app-shell .form-grid button {
  justify-self: start;
}

.app-shell .panel > form > button,
.app-shell form.panel > button {
  max-width: 280px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-weight: 800;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: #3a4658;
}

.muted-link {
  display: inline-flex;
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.muted-link:hover {
  color: var(--text);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(9, 14, 22, 0.96);
  padding: 22px;
  backdrop-filter: blur(18px);
}

.workspace-label,
.tenant-switcher summary {
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: #dce8ff;
  background: rgba(124, 167, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tenant-switcher {
  position: relative;
}

.tenant-switcher summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
}

.tenant-switcher summary::-webkit-details-marker {
  display: none;
}

.tenant-icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 6px;
  background: rgba(124, 167, 255, 0.12);
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
}

.tenant-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 44px));
  max-height: 430px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #111720;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.tenant-menu input {
  min-height: 38px;
}

.tenant-list {
  display: grid;
  gap: 4px;
  max-height: 330px;
  overflow-y: auto;
}

.tenant-list form {
  margin: 0;
}

.tenant-list button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.tenant-list button.active,
.tenant-list button:hover {
  background: rgba(124, 167, 255, 0.16);
  color: var(--text);
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 34px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-icon {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #3a4658;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  transform: none;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
  background: var(--accent);
}

.admin-nav-group {
  display: grid;
  gap: 5px;
}

.admin-nav-summary {
  cursor: pointer;
  list-style: none;
}

.admin-nav-summary::-webkit-details-marker {
  display: none;
}

.admin-nav-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, color 160ms ease;
}

.admin-nav-group[open] .admin-nav-chevron {
  transform: rotate(180deg);
}

.admin-nav-summary:hover .admin-nav-chevron,
.admin-nav-summary.active .admin-nav-chevron {
  color: var(--text);
}

.admin-nav-links {
  display: grid;
  gap: 3px;
  padding-left: 18px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-left: 1px solid rgba(124, 167, 255, 0.22);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.admin-nav-link.active,
.admin-nav-link:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar > div:first-child {
  min-width: 220px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

.command-search {
  display: grid;
  grid-template-columns: 28px minmax(220px, 460px) auto;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.command-search span {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.command-search input {
  min-height: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.command-search button {
  min-height: 34px;
  margin-right: 6px;
  padding: 0 12px;
  border-color: var(--line);
  background: #18202b;
  color: var(--text);
  font-size: 12px;
}

.quick-actions {
  display: flex;
  gap: 8px;
}

.quick-actions a,
.command-chips a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.quick-actions a:hover,
.command-chips a:hover {
  border-color: #3a4658;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.tour-launcher {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.help-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.help-button:hover {
  border-color: rgba(124, 167, 255, 0.45);
  background: rgba(124, 167, 255, 0.1);
  color: var(--text);
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  pointer-events: none;
}

.tour-overlay.is-open {
  display: block;
}

.tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.5);
  pointer-events: auto;
}

.tour-popover {
  position: fixed;
  z-index: 98;
  width: min(360px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid rgba(124, 167, 255, 0.34);
  border-radius: 8px;
  background: #111720;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
  pointer-events: auto;
}

.tour-popover::before {
  position: absolute;
  top: -8px;
  left: 24px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(124, 167, 255, 0.34);
  border-left: 1px solid rgba(124, 167, 255, 0.34);
  background: #111720;
  content: "";
  transform: rotate(45deg);
}

.tour-step-count {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(124, 167, 255, 0.28);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tour-popover h2 {
  margin: 12px 0 8px;
  font-size: 20px;
}

.tour-popover p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.tour-actions button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.tour-highlight {
  position: relative;
  z-index: 97;
  border-radius: 8px;
  outline: 2px solid rgba(124, 167, 255, 0.85);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(124, 167, 255, 0.12), 0 18px 50px rgba(0, 0, 0, 0.42);
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 70;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 36px));
}

.toast {
  position: relative;
  margin: 0;
  padding-right: 44px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  animation: toast-in 180ms ease-out;
}

.toast-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-close,
.drawer-close {
  display: grid;
  width: 28px;
  min-height: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.toast-close {
  position: absolute;
  top: 9px;
  right: 9px;
}

.toast-close:hover,
.drawer-close:hover {
  border-color: rgba(124, 167, 255, 0.34);
  color: var(--text);
}

.confirm-modal,
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(2, 6, 12, 0.68);
  backdrop-filter: blur(10px);
}

.confirm-modal.is-open,
.drawer-open .drawer-overlay {
  display: grid;
}

.confirm-modal {
  place-items: center;
  padding: 22px;
}

.confirm-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 430px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.48);
}

.confirm-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: rgba(245, 184, 75, 0.12);
  color: var(--warning);
  font-weight: 900;
}

.confirm-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 10px;
}

.drawer-trigger {
  display: none;
  width: fit-content;
  margin-bottom: 14px;
}

.drawer-close {
  display: none;
  margin-left: auto;
}

.has-js .drawer-trigger,
.has-js .drawer-form .drawer-close {
  display: grid;
}

.has-js .drawer-form {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 65;
  width: min(440px, 100vw);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.has-js .drawer-form.is-open {
  transform: translateX(0);
}

.empty,
.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.intelligence-metrics {
  grid-template-columns: repeat(8, minmax(130px, 1fr));
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
  box-shadow: 0 10px 28px var(--shadow);
}

.metric {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 18px;
}

.metric span,
.panel-heading span,
.list-row span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 30px;
}

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

.onboarding-panel {
  margin-bottom: 18px;
}

.onboarding-progress {
  height: 8px;
  overflow: hidden;
  margin: 14px 0 16px;
  border-radius: 999px;
  background: #0c1119;
  border: 1px solid var(--line);
}

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

.onboarding-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-item {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f151e;
}

.onboarding-item strong {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.onboarding-item span {
  color: var(--text);
  font-weight: 800;
}

.onboarding-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.onboarding-item.done {
  opacity: 0.72;
}

.onboarding-item.done strong {
  color: var(--success);
}

.dashboard-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chart-panel {
  min-height: 292px;
}

.bar-chart {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.compact-chart {
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 1fr) minmax(72px, auto);
  gap: 12px;
  align-items: center;
}

.chart-row-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chart-row-label strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-row-label span,
.chart-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.chart-row em {
  justify-self: end;
  white-space: nowrap;
}

.chart-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  appearance: none;
}

.chart-progress::-webkit-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.06);
}

.chart-progress::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.chart-progress::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.marketing-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.marketing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 34px;
}

.marketing-nav nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.marketing-nav nav a {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
}

.marketing-nav nav a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.marketing-nav-cta {
  border: 1px solid rgba(124, 167, 255, 0.44);
  background: rgba(124, 167, 255, 0.12);
  color: var(--text);
}

.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 118px);
  padding-bottom: 0;
}

.marketing-hero h1,
.marketing-section h1 {
  max-width: 880px;
  font-size: clamp(40px, 5.8vw, 68px);
  line-height: 1.08;
}

.marketing-hero p,
.marketing-section p,
.marketing-grid p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.marketing-hero > div:first-child {
  min-width: 0;
}

.marketing-hero > div:first-child > p:not(.eyebrow) {
  max-width: 820px;
  font-size: 16px;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.marketing-proof {
  display: grid;
  gap: 10px;
}

.marketing-proof span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.marketing-proof strong {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}

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

.marketing-grid .panel,
.marketing-section {
  padding: 22px;
}

.marketing-section {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
}

.marketing-pricing {
  margin-top: 18px;
}

.billing-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.billing-summary p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.billing-facts {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.billing-facts span {
  color: var(--muted);
  font-size: 13px;
}

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

.billing-plan {
  display: grid;
  gap: 16px;
  align-content: start;
}

.billing-plan.active {
  border-color: rgba(124, 167, 255, 0.58);
}

.billing-plan p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.billing-price {
  display: grid;
  gap: 4px;
}

.billing-price strong {
  font-size: 28px;
}

.billing-price span {
  color: var(--muted);
  font-size: 13px;
}

.billing-plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.content-grid > .panel:only-child {
  grid-column: 1 / -1;
}

.attention-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.attention-panel {
  min-height: 260px;
}

.priority-panel {
  border-color: rgba(239, 111, 125, 0.34);
  background: #141820;
}

.attention-row {
  border-color: rgba(255, 95, 116, 0.22);
}

.recent-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}

.recent-card {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 140ms ease, transform 140ms ease;
}

.recent-card:hover {
  border-color: rgba(124, 167, 255, 0.34);
  transform: translateY(-1px);
}

.recent-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.recent-card strong {
  line-height: 1.25;
}

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

.command-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
}

.command-panel h2 {
  margin-bottom: 6px;
}

.command-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.search-section {
  display: grid;
  gap: 10px;
  min-height: auto;
}

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

.search-result {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.search-result:hover {
  border-color: rgba(124, 167, 255, 0.34);
  background: rgba(124, 167, 255, 0.055);
  transform: translateY(-1px);
}

.search-result span {
  color: var(--muted);
  font-size: 13px;
}

.pipeline-board {
  display: grid;
  grid-auto-columns: minmax(290px, 1fr);
  grid-auto-flow: column;
  gap: 14px;
  min-height: calc(100vh - 150px);
  overflow-x: auto;
  padding-bottom: 12px;
}

.pipeline-column {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr);
  min-width: 290px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 14, 22, 0.68);
}

.pipeline-column-header {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.pipeline-column-header h2 {
  margin-bottom: 5px;
  font-size: 16px;
}

.pipeline-column-header span,
.stage-values span {
  color: var(--muted);
  font-size: 12px;
}

.stage-values {
  display: grid;
  gap: 4px;
}

.stage-values strong {
  color: var(--accent);
}

.pipeline-dropzone {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 100%;
  padding: 12px;
  transition: background 140ms ease, outline-color 140ms ease;
}

.pipeline-dropzone.drag-over {
  outline: 1px solid rgba(124, 167, 255, 0.5);
  outline-offset: -6px;
  background: rgba(124, 167, 255, 0.05);
}

.pipeline-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(168, 181, 200, 0.28);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.deal-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #141b26;
  box-shadow: none;
  cursor: grab;
  transition: border-color 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.deal-card:hover {
  border-color: rgba(124, 167, 255, 0.34);
  transform: translateY(-1px);
}

.deal-card.dragging {
  opacity: 0.56;
}

.deal-card a {
  display: grid;
  gap: 5px;
}

.deal-card strong {
  line-height: 1.25;
}

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

.deal-card-meta,
.deal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.deal-card-meta em {
  color: var(--text);
  font-style: normal;
  font-weight: 900;
}

.warning-pill,
.accent-pill,
.muted-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.warning-pill {
  border: 1px solid rgba(230, 183, 93, 0.34);
  background: rgba(230, 183, 93, 0.08);
  color: #e9ca8d;
}

.accent-pill {
  border: 1px solid rgba(124, 167, 255, 0.32);
  background: rgba(124, 167, 255, 0.09);
  color: #c4d8ff;
}

.muted-pill {
  border: 1px solid rgba(168, 181, 200, 0.2);
  background: rgba(168, 181, 200, 0.06);
  color: var(--muted);
}

.panel {
  min-height: 280px;
  padding: 18px;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.module-grid > .table-panel:only-child,
.module-grid > .task-panel:only-child,
.module-grid > .activity-panel:only-child {
  grid-column: 1 / -1;
}

.record-layout > .panel:only-child {
  grid-column: 1 / -1;
}

.task-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.task-sidebar {
  display: grid;
  gap: 18px;
}

.task-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.activity-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.activity-summary a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.activity-summary a:hover,
.activity-summary a.active {
  border-color: rgba(124, 167, 255, 0.34);
  background: rgba(124, 167, 255, 0.065);
  color: var(--text);
  transform: translateY(-1px);
}

.activity-summary strong {
  color: var(--accent);
  font-size: 20px;
}

.activity-panel {
  min-height: 620px;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.activity-card.call {
  border-color: rgba(106, 168, 255, 0.3);
}

.activity-card.email {
  border-color: rgba(124, 167, 255, 0.3);
}

.activity-card.meeting {
  border-color: rgba(168, 85, 247, 0.34);
}

.activity-card-header,
.activity-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-card p {
  margin: 0;
  color: #d8e2f0;
  line-height: 1.5;
}

.activity-card em,
.activity-card-footer span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.activity-card-footer a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

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

code {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-tabs a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.task-tabs a:hover,
.task-tabs a.active {
  border-color: rgba(124, 167, 255, 0.34);
  background: rgba(124, 167, 255, 0.065);
  color: var(--text);
  transform: translateY(-1px);
}

.task-tabs strong {
  color: var(--accent);
  font-size: 18px;
}

.task-panel {
  min-height: 620px;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.task-card.overdue {
  border-color: rgba(255, 95, 116, 0.26);
  background: rgba(255, 95, 116, 0.055);
}

.task-main,
.task-meta,
.task-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.task-main strong {
  display: block;
  margin-bottom: 5px;
}

.task-main span,
.task-meta span,
.task-meta a {
  color: var(--muted);
  font-size: 13px;
}

.task-meta a {
  color: var(--accent);
  font-weight: 800;
}

.task-badges,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-edit {
  width: 100%;
}

.task-edit summary {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1018;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.task-edit form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(168, 181, 200, 0.26);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.form-grid {
  display: grid;
  gap: 12px;
  min-height: auto;
}

.form-grid h2 {
  margin-bottom: 4px;
}

.table-panel {
  min-height: auto;
}

.spaced-panel {
  margin-top: 18px;
}

.data-table {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

td strong,
td span {
  display: block;
}

td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

td form {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

td .inline-form {
  display: inline-flex;
}

td:last-child {
  text-align: right;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #111720;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.mini-button:hover,
.mini-link:hover {
  border-color: #3a4658;
  background: #17202c;
}

.danger-button {
  border-color: rgba(239, 111, 125, 0.55);
  color: #fecdd3;
}

.danger-button:hover {
  border-color: rgba(239, 111, 125, 0.8);
  background: rgba(239, 111, 125, 0.12);
}

.record-link strong {
  color: var(--text);
}

.record-link:hover strong {
  color: var(--accent);
}

.vip-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  color: #f7c948;
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(247, 201, 72, 0.28);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(124, 167, 255, 0.28);
  border-radius: 999px;
  background: rgba(124, 167, 255, 0.08);
  color: #c4d8ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.docs-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.docs-hero h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
}

.docs-hero p:not(.eyebrow) {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.docs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.docs-index {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 6px;
}

.docs-index strong {
  margin-bottom: 8px;
}

.docs-index a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.docs-index a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.docs-content {
  display: grid;
  gap: 18px;
}

.docs-section {
  scroll-margin-top: 24px;
}

.docs-section h2 {
  margin-bottom: 10px;
}

.docs-section p {
  max-width: 880px;
  color: var(--muted);
  line-height: 1.65;
}

.docs-section ul {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #dbe8ff;
}

.docs-section li {
  line-height: 1.55;
}

.muted-badge {
  border-color: rgba(168, 181, 200, 0.22);
  background: rgba(168, 181, 200, 0.07);
  color: var(--muted);
}

.record-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.record-hero div {
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
}

.record-hero span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.record-hero strong {
  font-size: 18px;
}

.record-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.record-notes {
  min-height: 420px;
}

.note-form {
  display: grid;
  gap: 10px;
}

.timeline-compose {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  margin-bottom: 18px;
}

.activity-form {
  display: grid;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.mfa-secret-panel,
.mfa-uri-panel {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(124, 167, 255, 0.08);
}

.mfa-secret-panel span,
.mfa-uri-panel summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mfa-secret-panel code,
.mfa-uri-panel code {
  overflow-wrap: anywhere;
  color: #eef5ff;
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.timeline-item.pinned {
  border-color: rgba(245, 184, 75, 0.32);
  background: rgba(245, 184, 75, 0.07);
}

.timeline-item.call {
  border-color: rgba(106, 168, 255, 0.3);
}

.timeline-item.email {
  border-color: rgba(124, 167, 255, 0.3);
}

.timeline-item.meeting {
  border-color: rgba(168, 85, 247, 0.32);
}

.timeline-item.status_change,
.timeline-item.task_completed {
  border-color: rgba(245, 184, 75, 0.28);
  background: rgba(245, 184, 75, 0.045);
}

.timeline-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

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

.timeline-item p {
  margin: 0;
  color: #d8e2f0;
  line-height: 1.5;
}

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

.inline-form input {
  min-width: 170px;
  min-height: 34px;
}

.compact-form {
  flex-wrap: nowrap;
}

.compact-form select {
  min-width: 125px;
  min-height: 34px;
  padding: 0 10px;
}

.compact-form input {
  min-width: 150px;
}

.user-admin-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.users-management {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.users-management > * {
  min-width: 0;
}

.metric-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 0;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.user-cell {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

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

.user-cell em {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(124, 167, 255, 0.32);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.platform-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(124, 167, 255, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 167, 255, 0.14), rgba(17, 23, 32, 0.94) 42%, rgba(156, 194, 255, 0.08));
  box-shadow: 0 18px 54px var(--shadow);
}

.platform-hero h2 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.1;
}

.platform-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.platform-hero-stat {
  display: grid;
  place-content: center;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.45);
  text-align: center;
}

.platform-hero-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.platform-hero-stat strong {
  font-size: 38px;
}

.platform-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.platform-tenant-panel {
  position: sticky;
  top: 22px;
}

.tenant-card-list,
.platform-main {
  display: grid;
  gap: 12px;
}

.tenant-card {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.tenant-card:hover,
.tenant-card.active {
  border-color: rgba(124, 167, 255, 0.42);
  background: rgba(124, 167, 255, 0.1);
}

.tenant-card span,
.tenant-card em {
  color: var(--muted);
  font-size: 12px;
}

.tenant-card em {
  font-style: normal;
}

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

.platform-detail {
  display: grid;
  gap: 16px;
}

.action-stack {
  display: flex;
  gap: 8px;
}

.panel-heading,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  margin-bottom: 16px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.list-row div {
  display: grid;
  gap: 4px;
}

.list-row em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.custom-report-panel {
  margin-bottom: 18px;
}

.report-builder-form {
  align-items: flex-end;
  gap: 12px;
  margin: 16px 0;
}

.report-builder-form label {
  display: grid;
  gap: 6px;
}

.report-builder-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.custom-report-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.custom-report-summary strong {
  font-size: 16px;
}

.custom-report-summary span {
  color: var(--muted);
  line-height: 1.5;
}

.report-list,
.mini-list {
  display: grid;
  gap: 10px;
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.report-row div {
  display: grid;
  gap: 4px;
}

.report-row div:last-child {
  text-align: right;
}

.report-row span,
.mini-list-row span {
  color: var(--muted);
  font-size: 13px;
}

.report-row em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

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

.report-columns h3 {
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--muted);
}

.mini-list-row {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
}

.mini-list-row:hover {
  border-color: rgba(124, 167, 255, 0.32);
  background: rgba(124, 167, 255, 0.055);
}

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

.export-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.export-card:hover {
  border-color: #3a4658;
  background: #151d28;
  transform: translateY(-1px);
}

.export-card strong {
  font-size: 18px;
}

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

.import-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.import-actions form {
  margin: 0;
}

.data-table code {
  display: block;
  max-width: 620px;
  overflow: hidden;
  color: #d8e2f0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .metrics-grid,
  .onboarding-list,
  .content-grid,
  .attention-grid,
  .dashboard-charts,
  .docs-layout,
  .billing-plans,
  .billing-summary,
  .archive-grid,
  .export-grid,
  .form-columns,
  .marketing-grid,
  .marketing-hero,
  .module-grid,
  .platform-hero,
  .platform-layout,
  .report-columns,
  .report-metrics,
  .task-tabs,
  .activity-summary,
  .timeline-compose,
  .user-admin-strip,
  .record-layout,
  .record-hero {
    grid-template-columns: 1fr;
  }

  .activity-form {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .docs-index {
    position: static;
  }

  .docs-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .main,
  .sidebar,
  .auth-panel {
    padding: 18px;
  }

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

  .topbar-actions,
  .quick-actions,
  .docs-hero-actions,
  .command-panel,
  .marketing-nav,
  .marketing-nav nav {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .command-search {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    width: 100%;
  }

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

  .help-button {
    align-self: flex-start;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .intelligence-metrics,
  .recent-strip {
    grid-template-columns: 1fr;
  }

  .pipeline-board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .task-main,
  .task-meta,
  .report-row,
  .task-actions,
  .compact-form {
    align-items: stretch;
    flex-direction: column;
  }

  .report-row div:last-child {
    text-align: left;
  }

  .chart-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-row em {
    justify-self: start;
  }

  .compact-form input,
  .compact-form select {
    min-width: 100%;
  }

  .import-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .import-actions button,
  .import-actions .ghost-button {
    width: 100%;
  }
}
