:root.cipd-admin-page {
  color-scheme: dark;
  background: #050913;
}

body.cipd-admin-route {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: #050913;
}

body.cipd-admin-route > header,
body.cipd-admin-route > footer,
body.cipd-admin-route > nav {
  display: none !important;
}

.cipd-admin,
.cipd-admin *,
.cipd-admin *::before,
.cipd-admin *::after {
  box-sizing: border-box;
}

.cipd-admin {
  --bg: #050913;
  --surface: #0a101c;
  --surface-2: #0d1523;
  --surface-3: #111b2b;
  --surface-hover: #141f30;
  --border: #1d2a3d;
  --border-strong: #2a3b54;
  --text: #f7f9fc;
  --muted: #8e9aae;
  --muted-strong: #b7c0ce;
  --ruby: #f11231;
  --ruby-dark: #c90d28;
  --ruby-soft: rgba(241, 18, 49, 0.11);
  --green: #38d996;
  --green-soft: rgba(56, 217, 150, 0.11);
  --amber: #f4bd58;
  --amber-soft: rgba(244, 189, 88, 0.12);
  --blue: #70a7ff;
  --blue-soft: rgba(112, 167, 255, 0.12);
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.cipd-admin button,
.cipd-admin input,
.cipd-admin select {
  font: inherit;
}

.cipd-admin button,
.cipd-admin a,
.cipd-admin select,
.cipd-admin input {
  -webkit-tap-highlight-color: transparent;
}

.cipd-admin button {
  color: inherit;
}

.cipd-admin h1,
.cipd-admin h2,
.cipd-admin h3,
.cipd-admin p,
.cipd-admin dl,
.cipd-admin dd,
.cipd-admin ul {
  margin: 0;
}

.cipd-admin a {
  color: inherit;
  text-decoration: none;
}

.cipd-admin :focus-visible {
  outline: 3px solid rgba(112, 167, 255, 0.85);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ruby);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-lockup > span:last-child {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-lockup strong {
  color: #fff;
  font-size: 18px;
  font-weight: 790;
  letter-spacing: 0.23em;
}

.brand-lockup small {
  color: #aeb8c7;
  font-size: 9px;
  font-weight: 680;
  letter-spacing: 0.25em;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(241, 18, 49, 0.58);
  border-radius: 10px;
  background: #090e18;
  box-shadow: inset 0 -3px 0 rgba(241, 18, 49, 0.8), 0 12px 30px rgba(0, 0, 0, 0.28);
  object-fit: cover;
}

.brand-lockup-large .brand-logo {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
}

.brand-lockup-large strong {
  font-size: 23px;
}

.brand-lockup-large small {
  font-size: 10px;
}

.section-kicker,
.eyebrow {
  display: block;
  color: var(--ruby);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.16em;
  line-height: 1.25;
}

.auth-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background-color: var(--bg);
}

.auth-card {
  display: grid;
  width: min(100%, 430px);
  justify-items: center;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 16, 28, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  text-align: center;
}

.auth-card h1 {
  margin-top: 22px;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.auth-card p {
  margin-top: 6px;
  color: var(--muted);
}

.loading-orbit {
  position: relative;
  width: 42px;
  height: 42px;
  margin-top: 42px;
  border: 2px solid var(--border);
  border-radius: 50%;
}

.loading-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -5px;
  left: 14px;
  border-radius: 50%;
  background: var(--ruby);
  box-shadow: 0 0 20px rgba(241, 18, 49, 0.65);
  transform-origin: 6px 26px;
  animation: orbit 1.05s linear infinite;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(400px, 0.9fr) minmax(480px, 1.1fr);
  background: var(--bg);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(38px, 6vw, 84px);
  border-right: 1px solid var(--border);
  background-color: #080e19;
}

.auth-brand-panel::before {
  position: absolute;
  width: 360px;
  height: 360px;
  right: -210px;
  bottom: 90px;
  border: 1px solid rgba(241, 18, 49, 0.26);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 58px rgba(241, 18, 49, 0.035), 0 0 0 116px rgba(241, 18, 49, 0.02);
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 610px);
}

.auth-brand-copy h2 {
  max-width: 560px;
  margin-top: 15px;
  font-size: clamp(38px, 4.6vw, 70px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.auth-brand-copy p {
  max-width: 550px;
  margin-top: 24px;
  color: var(--muted-strong);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
}

.demo-assurance {
  position: relative;
  z-index: 1;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid rgba(56, 217, 150, 0.24);
  border-radius: 10px;
  color: var(--green);
  background: rgba(56, 217, 150, 0.06);
}

.demo-assurance span {
  display: grid;
  color: var(--muted);
  font-size: 12px;
}

.demo-assurance strong {
  color: var(--text);
  font-size: 13px;
}

.auth-form-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 6vw, 88px);
}

.auth-form-box {
  width: min(100%, 470px);
}

.auth-form-box h1 {
  margin-top: 11px;
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 730;
  letter-spacing: -0.04em;
}

.auth-intro {
  margin-top: 12px !important;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form-box form {
  display: grid;
  gap: 19px;
  margin-top: 32px;
}

.field-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-group label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.025em;
}

.field-group input,
.dashboard-filters select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  background: #080e18;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.field-group input {
  padding: 0 14px;
}

.field-group input::placeholder {
  color: #69768b;
}

.field-group input:focus,
.dashboard-filters select:focus {
  border-color: rgba(112, 167, 255, 0.82);
  background: #0b1320;
  box-shadow: 0 0 0 3px rgba(112, 167, 255, 0.09);
  outline: none;
}

.field-group input[readonly] {
  color: var(--muted-strong);
  background: #0d1420;
  cursor: not-allowed;
}

.field-group small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.primary-button {
  min-height: 47px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--ruby);
  box-shadow: 0 12px 26px rgba(241, 18, 49, 0.18);
  font-size: 13px;
  font-weight: 720;
}

.primary-button:hover {
  background: #ff2441;
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.62;
  cursor: progress;
  transform: none;
}

.full-button {
  width: 100%;
  margin-top: 3px;
}

.secondary-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--muted-strong);
  background: #0b121e;
  font-size: 12px;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: #3a4c65;
  color: #fff;
  background: #121c2b;
}

.compact-button {
  min-height: 36px;
  white-space: nowrap;
}

.text-button {
  padding: 7px 0;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 680;
}

.text-button:hover {
  color: #fff;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
}

.icon-button:hover {
  border-color: var(--border-strong);
  color: #fff;
  background: var(--surface-hover);
}

.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: orbit 800ms linear infinite;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-alert,
.inline-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(241, 18, 49, 0.28);
  border-radius: 8px;
  color: #ffb7c1;
  background: var(--ruby-soft);
  font-size: 12px;
}

.form-alert {
  margin-top: 22px;
  padding: 12px 13px;
}

.inline-error {
  margin: 12px 0;
  padding: 10px 12px;
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 25px 19px 18px;
  border-right: 1px solid var(--border);
  background: #080d17;
}

.environment-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
  padding: 11px 12px;
  border: 1px solid rgba(56, 217, 150, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(56, 217, 150, 0.045);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.55;
}

.environment-label i,
.demo-pill i,
.connection-badge i,
.system-indicator i {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(56, 217, 150, 0.55);
}

.environment-label strong {
  color: var(--green);
}

.side-nav {
  display: grid;
  gap: 4px;
  margin-top: 25px;
}

.nav-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 620;
  text-align: left;
  cursor: pointer;
}

.nav-button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-button.is-active {
  border-color: rgba(241, 18, 49, 0.2);
  color: #fff;
  background: var(--ruby-soft);
}

.nav-button.is-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -13px;
  width: 3px;
  border-radius: 3px;
  background: var(--ruby);
  content: "";
}

.nav-button.is-active svg {
  color: var(--ruby);
}

.sidebar-foot {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding: 13px;
  border-top: 1px solid var(--border);
  color: var(--green);
}

.sidebar-foot p {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
}

.sidebar-foot strong {
  color: var(--muted-strong);
  font-size: 11px;
}

.dashboard-workspace {
  min-width: 0;
  grid-column: 2;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(24px, 4vw, 54px);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 9, 19, 0.94);
  backdrop-filter: blur(16px);
}

.topbar > div {
  display: flex;
  align-items: center;
}

.topbar-title {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 720;
}

.topbar-context {
  color: var(--muted);
  font-size: 11px;
}

.topbar-separator {
  width: 1px;
  height: 15px;
  margin: 0 12px;
  background: var(--border-strong);
}

.topbar-actions {
  gap: 9px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0 2px 0 4px;
}

.user-chip > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(241, 18, 49, 0.34);
  border-radius: 8px;
  color: #fff;
  background: var(--ruby-soft);
  font-size: 12px;
  font-weight: 760;
}

.user-chip > div {
  display: grid;
  max-width: 190px;
  min-width: 0;
}

.user-chip strong,
.user-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  font-size: 11px;
  font-weight: 680;
}

.user-chip small {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-main {
  width: min(100%, 1580px);
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: 35px clamp(24px, 4vw, 54px) 70px;
}

.page-hero,
.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-hero h1,
.page-title h1 {
  margin-top: 8px;
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 730;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.page-hero p,
.page-title p {
  margin-top: 11px;
  color: var(--muted);
  font-size: 14px;
}

.page-title {
  margin-bottom: 28px;
}

.hero-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.hero-meta small {
  color: var(--muted);
  font-size: 10px;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(56, 217, 150, 0.2);
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.11em;
}

.dashboard-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 25px 0 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #080e18;
}

.filter-label {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 680;
}

.dashboard-filters label {
  display: grid;
  min-width: 150px;
  gap: 5px;
}

.dashboard-filters label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.dashboard-filters select {
  min-height: 39px;
  padding: 0 32px 0 11px;
  color: var(--muted-strong);
  font-size: 11px;
  cursor: pointer;
}

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

.metric-card {
  position: relative;
  display: grid;
  min-height: 132px;
  align-content: space-between;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.metric-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: #26354a;
  content: "";
}

.metric-card.metric-positive::before {
  background: var(--green);
}

.metric-card > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 670;
  letter-spacing: 0.035em;
}

.metric-card strong {
  margin-top: 8px;
  font-size: clamp(28px, 2.7vw, 40px);
  font-weight: 680;
  letter-spacing: -0.045em;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid-main {
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.85fr);
  margin-bottom: 14px;
}

.panel,
.risk-policy-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.panel {
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 15px;
}

.section-heading h2 {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.section-heading p {
  max-width: 640px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.section-heading > small,
.section-heading div > small {
  color: var(--muted);
  font-size: 10px;
}

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

.chart-wrap {
  position: relative;
  min-height: 292px;
}

.line-chart {
  display: block;
  width: 100%;
  height: 270px;
  overflow: visible;
}

.chart-grid {
  stroke: #1d2a3d;
  stroke-width: 1;
  stroke-dasharray: 5 7;
}

.equity-line {
  fill: none;
  stroke: var(--ruby);
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 9px rgba(241, 18, 49, 0.32));
}

.chart-last-dot {
  fill: var(--ruby);
  stroke: #fff;
  stroke-width: 2;
}

.chart-range {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.risk-policy-card {
  padding: 20px;
  border-top-color: rgba(241, 18, 49, 0.46);
  background: #0a101b;
}

.policy-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.policy-grid > div {
  display: grid;
  gap: 5px;
  min-height: 84px;
  align-content: center;
  padding: 13px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.policy-grid > div:nth-child(2n) {
  border-right: 0;
}

.policy-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.policy-grid span {
  color: var(--muted);
  font-size: 9px;
}

.policy-grid strong {
  font-size: 19px;
  font-weight: 690;
}

.policy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-left: 2px solid var(--ruby);
  color: var(--ruby);
  background: var(--ruby-soft);
}

.policy-note p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.policy-note strong {
  color: var(--text);
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  padding: 32px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ruby);
  background: var(--surface-2);
}

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

.empty-state p {
  max-width: 430px;
  margin-top: 5px;
  font-size: 11px;
}

.table-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.cipd-admin table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  text-align: left;
}

.cipd-admin th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
  font-weight: 690;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.cipd-admin td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(29, 42, 61, 0.72);
  color: var(--muted-strong);
  font-size: 11px;
  white-space: nowrap;
}

.cipd-admin tbody tr:last-child td {
  border-bottom: 0;
}

.cipd-admin tbody tr:hover td {
  background: rgba(255, 255, 255, 0.016);
}

.cipd-admin td:first-child {
  min-width: 190px;
  white-space: normal;
}

.cipd-admin td strong,
.cipd-admin td small {
  display: block;
}

.cipd-admin td strong {
  color: var(--text);
  font-size: 11px;
}

.cipd-admin td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.asset-chip,
.timeframe-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--muted-strong);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 680;
}

.timeframe-chip {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(112, 167, 255, 0.18);
}

.run-state,
.status-badge,
.connection-badge,
.system-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.run-state {
  font-size: 9px;
  font-weight: 700;
}

.run-success { color: var(--green); }
.run-running { color: var(--blue); }
.run-failed { color: #ff7083; }
.run-pending { color: var(--amber); }

.status-badge {
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted-strong);
  background: var(--surface-2);
  font-size: 8px;
  font-weight: 780;
  letter-spacing: 0.05em;
}

.status-badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-validated { color: var(--green); border-color: rgba(56, 217, 150, 0.2); background: var(--green-soft); }
.status-demo { color: var(--blue); border-color: rgba(112, 167, 255, 0.2); background: var(--blue-soft); }
.status-paused { color: var(--amber); border-color: rgba(244, 189, 88, 0.2); background: var(--amber-soft); }
.status-rejected { color: #ff7083; border-color: rgba(241, 18, 49, 0.2); background: var(--ruby-soft); }

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

.strategy-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color 160ms ease, transform 160ms ease;
}

.strategy-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.strategy-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.strategy-card-head small {
  color: var(--muted);
  font-size: 9px;
}

.strategy-card h3 {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.chip-row {
  display: flex;
  min-height: 26px;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}

.strategy-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.strategy-stats div {
  display: grid;
  min-height: 65px;
  align-content: center;
  gap: 4px;
  padding: 10px;
  background: #0a111d;
}

.strategy-stats dt {
  color: var(--muted);
  font-size: 8px;
}

.strategy-stats dd {
  color: var(--text);
  font-size: 14px;
  font-weight: 670;
}

.strategy-footnote {
  margin-top: 12px !important;
  color: var(--muted);
  font-size: 8px;
}

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

.asset-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.asset-monogram {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(241, 18, 49, 0.25);
  border-radius: 8px;
  color: #fff;
  background: var(--ruby-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.asset-card h3 {
  font-size: 14px;
}

.asset-card p,
.asset-card small {
  color: var(--muted);
  font-size: 9px;
}

.asset-card small {
  text-align: right;
}

.asset-card small strong {
  color: var(--muted-strong);
  font-weight: 650;
}

.risk-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

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

.risk-metrics > div {
  display: grid;
  gap: 8px;
  min-height: 92px;
  align-content: center;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #090f1a;
}

.risk-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.risk-metrics strong {
  font-size: 21px;
  font-weight: 680;
}

.quality-list {
  display: grid;
  list-style: none;
  gap: 2px;
  padding: 0;
}

.quality-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-strong);
  font-size: 11px;
}

.quality-list li:last-child {
  border-bottom: 0;
}

.quality-list svg {
  color: var(--green);
}

.report-list {
  display: grid;
  gap: 9px;
}

.report-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.report-icon,
.settings-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--ruby);
  background: var(--surface-2);
}

.report-item h3 {
  font-size: 13px;
}

.report-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

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

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

.profile-panel,
.system-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.profile-panel h2,
.system-panel h2 {
  margin-top: 4px;
  font-size: 16px;
}

.profile-panel p,
.system-panel p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.system-indicator {
  color: var(--amber);
  font-size: 9px;
  font-weight: 720;
}

.system-indicator i {
  background: currentColor;
  box-shadow: none;
}

.system-indicator.is-online {
  color: var(--green);
}

.ctrader-settings-panel {
  margin-top: 13px;
}

.connection-badge {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 720;
}

.connection-badge i {
  background: currentColor;
  box-shadow: none;
}

.connection-online {
  color: var(--green);
  border-color: rgba(56, 217, 150, 0.2);
  background: var(--green-soft);
}

.connection-pending {
  color: var(--amber);
  border-color: rgba(244, 189, 88, 0.2);
  background: var(--amber-soft);
}

.connection-offline {
  color: #ff7083;
  border-color: rgba(241, 18, 49, 0.2);
  background: var(--ruby-soft);
}

.credential-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr);
  gap: 26px;
  padding-top: 3px;
}

.credential-context {
  display: grid;
  align-content: start;
  gap: 16px;
}

.credential-context dl {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.credential-context dl > div {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.credential-context dl > div:last-child {
  border-bottom: 0;
}

.credential-context dt {
  color: var(--muted);
  font-size: 10px;
}

.credential-context dd {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.security-explainer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(112, 167, 255, 0.16);
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
}

.security-explainer p {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.65;
}

.security-explainer strong {
  color: #fff;
}

.credential-form {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #080e18;
}

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

.confirmation-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  cursor: pointer;
}

.confirmation-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 1px 0 0;
  accent-color: var(--ruby);
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px;
}

.danger-zone h2 {
  margin-top: 4px;
  font-size: 15px;
}

.danger-zone p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-nav {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 150;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(380px, calc(100vw - 40px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--muted-strong);
  background: #111b2a;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  font-size: 11px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success svg { color: var(--green); }
.toast-error svg { color: #ff7083; }

@media (max-width: 1240px) {
  .strategy-grid,
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .credential-layout {
    grid-template-columns: minmax(250px, 0.75fr) minmax(370px, 1.25fr);
  }
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  }

  .auth-brand-panel {
    padding: 38px;
  }

  .auth-brand-copy h2 {
    font-size: 42px;
  }

  .dashboard-shell {
    display: block;
    padding-bottom: 73px;
  }

  .sidebar {
    display: none;
  }

  .dashboard-workspace {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    z-index: 80;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    height: 72px;
    align-items: stretch;
    gap: 2px;
    overflow-x: auto;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(8, 13, 23, 0.97);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
  }

  .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav .nav-button {
    display: grid;
    min-width: 85px;
    min-height: 58px;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 4px 7px;
    font-size: 8px;
    text-align: center;
  }

  .mobile-nav .nav-button.is-active::before {
    top: auto;
    right: 16px;
    bottom: -6px;
    left: 16px;
    width: auto;
    height: 2px;
  }

  .topbar {
    padding: 0 22px;
  }

  .dashboard-main {
    padding: 30px 22px 36px;
  }

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

  .credential-layout,
  .risk-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 720px) {
  .auth-layout {
    display: block;
  }

  .auth-brand-panel {
    min-height: 300px;
    padding: 26px 22px 30px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .auth-brand-copy {
    margin-top: 54px;
  }

  .auth-brand-copy h2 {
    max-width: 440px;
    font-size: clamp(34px, 10vw, 48px);
  }

  .auth-brand-copy p,
  .demo-assurance {
    display: none;
  }

  .auth-form-panel {
    min-height: auto;
    padding: 38px 22px 60px;
  }

  .topbar-title,
  .topbar-context,
  .topbar-separator,
  .user-chip > div {
    display: none;
  }

  .topbar {
    min-height: 62px;
  }

  .topbar::before {
    color: #fff;
    content: "CIPD";
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
  }

  .user-chip {
    margin: 0;
  }

  .page-hero,
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero h1,
  .page-title h1 {
    font-size: 34px;
  }

  .hero-meta {
    justify-items: start;
  }

  .dashboard-filters {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .filter-label {
    min-height: auto;
  }

  .dashboard-filters label {
    min-width: 0;
  }

  .dashboard-filters select {
    min-height: 43px;
  }

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

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

  .risk-policy-card .section-heading,
  .ctrader-settings-panel .section-heading {
    flex-direction: row;
  }

  .line-chart {
    height: 220px;
  }

  .panel,
  .risk-policy-card {
    padding: 16px;
  }

  .profile-panel,
  .system-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-panel > button,
  .system-panel > .system-indicator {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .credential-layout {
    gap: 15px;
  }

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

  .report-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .report-item > a,
  .report-item > .muted-label {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 36px 22px;
  }

  .dashboard-main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar {
    padding: 0 14px;
  }

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

  .metric-card {
    min-height: 115px;
  }

  .policy-grid,
  .risk-metrics,
  .strategy-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .policy-grid > div,
  .policy-grid > div:nth-child(2n),
  .policy-grid > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .policy-grid > div:last-child {
    border-bottom: 0;
  }

  .policy-grid > div {
    min-height: 68px;
  }

  .risk-policy-card .section-heading,
  .ctrader-settings-panel .section-heading {
    flex-direction: column;
  }

  .asset-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .asset-card > small {
    grid-column: 1 / -1;
    text-align: left;
  }

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

  .form-actions > button {
    width: 100%;
  }

  .credential-form {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cipd-admin *,
  .cipd-admin *::before,
  .cipd-admin *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .mobile-nav,
  .dashboard-filters,
  .toast-region,
  .text-button,
  .icon-button,
  .primary-button,
  .secondary-button {
    display: none !important;
  }

  .dashboard-shell,
  .dashboard-workspace {
    display: block;
  }

  .dashboard-main {
    width: 100%;
    padding: 0;
  }

  .cipd-admin,
  .panel,
  .risk-policy-card,
  .strategy-card,
  .metric-card {
    color: #111;
    background: #fff;
    box-shadow: none;
  }
}
