:root {
  --bg: #eef2f8;
  --bg-2: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.82);
  --inset: #e9edf4;
  --line: rgba(132, 146, 169, 0.18);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.1);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.1);
  --text: #1a1f2e;
  --muted: #7e8798;
  --disabled: #b0b8c8;
  --shadow-light: rgba(255, 255, 255, 0.88);
  --shadow-dark: rgba(24, 32, 52, 0.1);
  --shadow-blue: rgba(37, 99, 235, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, #eaf1ff 0%, #f5f2fb 48%, #eef3f7 100%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 64%);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

button:active {
  transform: scale(0.98);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.appShell {
  min-height: 100vh;
}

.loginPage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
}

.loginShell {
  width: min(1460px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 430px);
  gap: 28px;
  align-items: stretch;
}

.loginHeroPanel,
.loginPanel,
.panel,
.heroCard,
.metricCard,
.brainCard,
.eventRail,
.sideNav {
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    -8px -8px 18px var(--shadow-light),
    8px 8px 18px var(--shadow-dark);
  backdrop-filter: blur(18px);
}

.loginHeroPanel {
  min-height: 620px;
  padding: 54px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  overflow: hidden;
  position: relative;
}

.loginHeroPanel::after {
  content: "";
  position: absolute;
  inset: auto 34px 34px auto;
  width: 46%;
  height: 42%;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.06)),
    rgba(255, 255, 255, 0.42);
  filter: blur(1px);
  z-index: 0;
}

.loginHeroPanel > * {
  position: relative;
  z-index: 1;
}

.loginBrandRow {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brandMark,
.navLogo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 30px var(--shadow-blue);
}

.loginBrandRow span,
.loginPanelHead span,
.topTitle span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.loginHeroCopy {
  max-width: 780px;
}

.loginHeroCopy h1 {
  margin: 0 0 16px;
  font-size: 58px;
  line-height: 1.02;
  font-weight: 900;
}

.loginHeroCopy p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 700;
}

.loginMonitorPreview {
  width: min(680px, 100%);
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 48px rgba(37, 99, 235, 0.12);
}

.previewHeader,
.loginStatusRow {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.previewHeader strong,
.loginStatusRow strong {
  font-size: 13px;
  font-weight: 900;
}

.previewHeader em,
.loginStatusRow em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.liveDot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.12);
}

.previewBody {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.loginHeroOrb {
  width: 118px;
  height: 118px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, #fff, #bfd9ff 38%, #2563eb 78%);
  box-shadow:
    inset -10px -12px 20px rgba(29, 78, 216, 0.25),
    0 18px 36px rgba(37, 99, 235, 0.34);
  animation: heroBreath 4.8s ease-in-out infinite;
}

.orbEye {
  position: absolute;
  top: 42px;
  width: 12px;
  height: 15px;
  border-radius: 50%;
  background: #133b7a;
  animation: heroBlink 5.2s infinite;
}

.orbEye.left {
  left: 38px;
}

.orbEye.right {
  right: 38px;
}

.orbMouth {
  position: absolute;
  left: 43px;
  top: 70px;
  width: 32px;
  height: 12px;
  border-bottom: 4px solid #133b7a;
  border-radius: 0 0 24px 24px;
}

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

.previewStack div,
.loginProofGrid div {
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--inset);
  box-shadow:
    inset 3px 3px 8px rgba(0, 0, 0, 0.08),
    inset -3px -3px 8px rgba(255, 255, 255, 0.88);
}

.previewStack span,
.loginProofGrid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.previewStack strong,
.loginProofGrid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.previewBrainStrip,
.sourcePills,
.pipelineNodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.previewBrainStrip {
  margin-top: 16px;
}

.previewBrainStrip span,
.sourcePills span,
.pipelineNodes span,
.statusPill,
.countBadge,
.toneBadge,
.taskMeta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.loginProofGrid strong {
  margin: 0 0 6px;
  font-size: 15px;
}

.loginProofGrid span {
  line-height: 1.45;
}

.loginPanel {
  align-self: center;
  padding: 34px;
  border-radius: 30px;
  display: grid;
  gap: 18px;
}

.loginPanelHead h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.18;
}

.loginStatusRow {
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.07);
}

.loginPanel label,
.accountForm label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.loginPanel input,
.accountForm input,
.accountForm select {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: var(--inset);
  box-shadow:
    inset 3px 3px 7px rgba(0, 0, 0, 0.1),
    inset -3px -3px 7px rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 800;
}

.accountForm select {
  appearance: none;
}

.loginPanel button,
.accountForm button,
.accountActions button,
.runtimeForm button,
.compactButton {
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 26px var(--shadow-blue);
}

.loginPanel button {
  width: 100%;
  margin-top: 4px;
  font-size: 16px;
}

.loginPanel button:disabled,
.accountForm button:disabled,
.accountActions button:disabled,
.runtimeForm button:disabled,
.compactButton:disabled {
  cursor: wait;
  opacity: 0.68;
  box-shadow: none;
}

.formError {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) minmax(300px, 350px);
  gap: 18px;
  padding: 18px;
}

.sideNav {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  padding: 14px 12px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.navBrand {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.navBrand span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.navLogo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.navStack {
  width: 100%;
  display: grid;
  gap: 9px;
}

.sideNav button {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    -3px -3px 7px var(--shadow-light),
    3px 3px 7px rgba(24, 32, 52, 0.08);
}

.sideNav button span,
.sideNav button small {
  display: block;
}

.sideNav button span {
  font-size: 21px;
  line-height: 1;
}

.sideNav button small {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 900;
}

.sideNav button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px var(--shadow-blue);
}

.navOps {
  margin-top: auto;
  width: 100%;
  display: grid;
  gap: 9px;
}

.navStatusPill {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 16px;
  background: var(--inset);
  box-shadow:
    inset 3px 3px 7px rgba(0, 0, 0, 0.08),
    inset -3px -3px 7px rgba(255, 255, 255, 0.86);
}

.navStatusPill i {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.12);
}

.navStatusPill.isWarn i {
  background: var(--warning);
  box-shadow: 0 0 0 6px var(--warning-soft);
}

.navStatusPill.isError i {
  background: var(--danger);
  box-shadow: 0 0 0 6px var(--danger-soft);
}

.navStatusPill.isWarn em {
  color: var(--warning);
}

.navStatusPill.isError em {
  color: var(--danger);
}

.navStatusPill em {
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.navAction {
  min-height: 48px;
}

.navAction.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px var(--shadow-blue);
}

.mainPanel {
  min-width: 0;
}

.topBar {
  display: block;
  margin-bottom: 18px;
}

.topTitle h1 {
  margin: 5px 0 0;
  font-size: 30px;
  line-height: 1.15;
}

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

.actionPanel {
  margin-bottom: 18px;
}

.actionHero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 30px rgba(37, 99, 235, 0.08);
}

.actionHero.review {
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.6);
}

.actionHero.danger {
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.6);
}

.actionHero.skill {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.13), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.6);
}

.actionHero h2 {
  margin: 5px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.actionHero span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.actionHero button {
  min-width: 128px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px var(--shadow-blue);
  font-weight: 900;
}

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

.actionChecklist article {
  min-width: 0;
  padding: 13px;
  border-radius: 16px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.06),
    inset -2px -2px 5px rgba(255, 255, 255, 0.86);
}

.actionChecklist strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.actionChecklist span,
.actionChecklist p {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.actionChecklist article.hot strong,
.actionChecklist article.active strong {
  color: var(--primary);
}

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

.readinessPanel {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 30px rgba(37, 99, 235, 0.07);
}

.readinessHead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.readinessHead h3 {
  margin: 5px 0 6px;
  font-size: 20px;
  line-height: 1.2;
}

.readinessHead span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.readinessHead strong {
  min-width: 74px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--primary);
  font-size: 20px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.07),
    inset -2px -2px 5px rgba(255, 255, 255, 0.86);
}

.readyTruth {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.readyTruth span,
.readyTruth strong {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}

.readyTruth span {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.readyTruth strong {
  color: var(--success);
  background: var(--success-soft);
}

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

.readinessList article {
  min-width: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  padding: 11px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow:
    -2px -2px 5px rgba(255, 255, 255, 0.72),
    2px 2px 6px rgba(24, 32, 52, 0.06);
}

.readinessList i {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-soft);
}

.readinessList article.ok i {
  background: var(--success);
  box-shadow: 0 0 0 5px var(--success-soft);
}

.readinessList article.partial i {
  background: var(--warning);
  box-shadow: 0 0 0 5px var(--warning-soft);
}

.readinessList strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.readinessList span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.readinessList button {
  height: 28px;
  margin-top: 9px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.09);
  font-size: 11px;
  font-weight: 900;
}

.readinessMore {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.readinessMore summary {
  cursor: pointer;
}

.readinessMore div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.readinessMore span {
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.metricCard {
  min-width: 0;
  min-height: 118px;
  padding: 16px;
  border-radius: 20px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  position: relative;
}

.metricCard::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.16;
}

.metricCard span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.metricCard strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.metricCard em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.commandLayout {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(430px, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.heroCard {
  min-width: 0;
  min-height: 260px;
  padding: 24px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
}

.heroStage {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 52%, rgba(96, 165, 250, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.72));
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(37, 99, 235, 0.12);
}

.heroStage::before,
.heroStage::after {
  content: "";
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 36px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  transform: rotate(18deg);
}

.heroStage::after {
  width: 104px;
  height: 104px;
  border-color: rgba(5, 150, 105, 0.14);
  transform: rotate(-18deg);
}

.heroOrb {
  width: 136px;
  height: 136px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.96), rgba(147, 197, 253, 0.74) 38%, rgba(37, 99, 235, 0.9));
  box-shadow:
    inset -12px -14px 22px rgba(29, 78, 216, 0.18),
    0 18px 40px rgba(37, 99, 235, 0.32);
  animation: heroBreath 4.8s ease-in-out infinite, heroHover 7.2s ease-in-out infinite;
}

.heroOrb::before,
.heroOrb::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid rgba(19, 59, 122, 0.42);
  border-bottom: 0;
  opacity: 0.82;
}

.heroOrb::before {
  left: -17px;
  transform: rotate(-36deg);
}

.heroOrb::after {
  right: -17px;
  transform: rotate(36deg);
}

.heroHalo {
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: rgba(37, 99, 235, 0.62);
  animation: heroSpin 8s linear infinite;
}

.heroFace {
  position: relative;
  width: 78px;
  height: 54px;
  z-index: 2;
}

.eye {
  position: absolute;
  top: 10px;
  width: 13px;
  height: 16px;
  border-radius: 50%;
  background: #133b7a;
  animation: heroBlink 5.2s infinite;
}

.eye::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.eye.left {
  left: 14px;
}

.eye.right {
  right: 14px;
}

.mouth {
  position: absolute;
  left: 23px;
  top: 35px;
  width: 32px;
  height: 12px;
  border-bottom: 4px solid #133b7a;
  border-radius: 0 0 24px 24px;
}

.heroOrb.review .mouth,
.heroOrb.warning .mouth {
  border-bottom: 0;
  border-top: 4px solid #133b7a;
  top: 40px;
  border-radius: 24px 24px 0 0;
}

.heroOrb.error {
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.94), rgba(254, 202, 202, 0.75) 38%, rgba(220, 38, 38, 0.72));
  animation-duration: 2.8s, 5.8s;
}

.heroOrb.success {
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.96), rgba(167, 243, 208, 0.74) 38%, rgba(5, 150, 105, 0.86));
}

.heroOrb.evolving {
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.98), rgba(191, 219, 254, 0.82) 34%, rgba(37, 99, 235, 0.88) 68%, rgba(124, 58, 237, 0.82));
}

.heroOrb.evolving .mouth {
  left: 26px;
  width: 26px;
  border-bottom-width: 3px;
}

.heroOrb.evolving .heroHalo {
  border-top-color: rgba(124, 58, 237, 0.62);
  animation-duration: 5.4s;
}

.heroSpark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.5);
}

.sparkA {
  right: 5px;
  top: 18px;
  animation: sparkFloat 3.6s ease-in-out infinite;
}

.sparkB {
  left: 2px;
  bottom: 30px;
  animation: sparkFloat 4.2s ease-in-out infinite reverse;
}

.sparkC {
  right: 26px;
  bottom: 0;
  animation: sparkFloat 4.8s ease-in-out infinite;
}

.heroCopy h2 {
  margin: 8px 0;
  font-size: 30px;
  line-height: 1.16;
}

.heroCopy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.sourcePills {
  margin-top: 16px;
}

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

.brainCard {
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
}

.brainTop,
.panelHead,
.taskTop,
.pipelineTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.brainCard h3,
.panel h2,
.eventRail h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.brainCard p,
.taskCard p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.loadTrack,
.taskTrack {
  height: 9px;
  margin-top: 15px;
  border-radius: 999px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.08),
    inset -2px -2px 5px rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.loadTrack span,
.taskTrack span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.brainFooter,
.taskFooter {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workspaceGrid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel,
.eventRail {
  padding: 20px;
  border-radius: 24px;
}

.compact {
  margin-bottom: 12px;
}

.pipelineList,
.taskGrid,
.eventList,
.conversationList {
  display: grid;
  gap: 12px;
}

.pipelineCard,
.taskCard,
.eventItem,
.conversationItem,
.emptyState {
  min-width: 0;
  padding: 14px;
  border-radius: 17px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.06),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86);
}

.pipelineCard strong,
.taskCard strong,
.eventItem strong,
.conversationItem strong,
.emptyState strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.conversationPanel {
  margin-bottom: 18px;
}

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

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

.conversationHeader {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.conversationHeader p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

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

.conversationMeta span,
.emptyState span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 900;
  box-shadow:
    inset 1px 1px 3px rgba(24, 32, 52, 0.06),
    inset -1px -1px 3px rgba(255, 255, 255, 0.82);
}

.emptyState {
  color: var(--muted);
}

.emptyState span {
  margin-top: 8px;
}

.pipelineNodes {
  margin-top: 12px;
}

.pipelineMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.taskActions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.iconFeedback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  box-shadow:
    -2px -2px 5px var(--shadow-light),
    2px 2px 5px rgba(24, 32, 52, 0.08);
  font-size: 14px;
  font-weight: 900;
}

.iconFeedback.pass {
  color: var(--success);
}

.iconFeedback.reject {
  color: var(--danger);
}

.taskMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sourceBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 1px 1px 3px rgba(24, 32, 52, 0.06),
    inset -1px -1px 3px rgba(255, 255, 255, 0.82);
}

.source-runtime {
  color: #075985;
  background: rgba(186, 230, 253, 0.72);
}

.source-control {
  color: #5b21b6;
  background: rgba(221, 214, 254, 0.72);
}

.source-seed {
  color: #64748b;
  background: rgba(226, 232, 240, 0.78);
}

.eventRail {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.eventList {
  overflow: auto;
  padding-right: 3px;
}

.eventItem {
  position: relative;
  padding-left: 34px;
  background: rgba(233, 237, 244, 0.74);
}

.eventItem::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.eventItem.warning::before {
  background: var(--warning);
  box-shadow: 0 0 0 5px var(--warning-soft);
}

.eventItem.error::before {
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-soft);
}

.eventItem.success::before {
  background: var(--success);
  box-shadow: 0 0 0 5px var(--success-soft);
}

.eventItem span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.accountAdminPanel {
  margin-bottom: 18px;
}

.runtimeAdminPanel {
  margin-bottom: 18px;
}

.resourceAdminPanel {
  margin-bottom: 18px;
}

.skillPanel {
  margin-bottom: 18px;
}

.skillProposalList {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.skillProposalCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  align-items: start;
  gap: 18px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.06),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86);
}

.skillProposalCard strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.skillProposalCard span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.skillProposalMeta {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
}

.skillProposalMeta span:not(.toneBadge) {
  margin: 0;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 1px 1px 3px rgba(24, 32, 52, 0.06),
    inset -1px -1px 3px rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.skillProposalActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.skillProposalActions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  box-shadow:
    -2px -2px 5px var(--shadow-light),
    2px 2px 5px rgba(24, 32, 52, 0.08);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.skillProposalActions button[data-skill-action="reject"],
.skillProposalActions button[data-skill-action="rollback"] {
  color: var(--danger);
}

.skillProposalActions span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.compactButton {
  height: 34px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--primary);
  box-shadow:
    -2px -2px 5px var(--shadow-light),
    2px 2px 5px rgba(24, 32, 52, 0.08);
  font-size: 12px;
}

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

.runtimeForm {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border-radius: 20px;
  background: rgba(233, 237, 244, 0.72);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.06),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86);
}

.runtimeForm h3 {
  margin: 0;
  font-size: 15px;
}

.runtimeForm label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.runtimeForm input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 13px;
  padding: 0 12px;
  color: var(--text);
  background: var(--inset);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.08),
    inset -2px -2px 5px rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

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

.runtimeForm button {
  height: 40px;
  margin-top: 2px;
  font-size: 13px;
}

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

.runtimeOverview article {
  min-width: 0;
  padding: 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    -3px -3px 7px var(--shadow-light),
    3px 3px 7px rgba(24, 32, 52, 0.08);
}

.runtimeOverview strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.runtimeOverview span,
.runtimeOverview p {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.resourceLayout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-top: 16px;
}

.resourceForms {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.ipProfileCard {
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.06),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86);
}

.ipProfileHead {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.ipProfileHead strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.ipProfileCard p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.ipTagRow,
.ipProductRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ipTagRow span,
.ipProductRow span {
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(219, 234, 254, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.ipProductRow span {
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
}

.ipAssetList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ipAssetList div {
  min-width: 0;
  padding: 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    -2px -2px 5px var(--shadow-light),
    2px 2px 5px rgba(24, 32, 52, 0.06);
}

.ipAssetList span,
.ipAssetList em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.ipAssetList strong {
  display: block;
  min-width: 0;
  margin: 5px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.accountLayout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.accountForm {
  display: grid;
  gap: 13px;
  align-content: start;
  padding: 16px;
  border-radius: 20px;
  background: rgba(233, 237, 244, 0.72);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.06),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86);
}

.accountForm input,
.accountForm select {
  height: 44px;
  border-radius: 14px;
  font-size: 14px;
}

.accountForm button {
  height: 42px;
}

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

.roleCard {
  min-width: 0;
  padding: 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    -3px -3px 7px var(--shadow-light),
    3px 3px 7px rgba(24, 32, 52, 0.08);
}

.roleCard strong,
.accountItem strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.roleCard span,
.accountItem span,
.accountItem p {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.roleCard p,
.accountItem p {
  margin-bottom: 0;
}

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

.accountItem {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 17px;
  background: var(--inset);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.06),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86);
}

.accountActions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
}

.accountActions button {
  height: 30px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow:
    -2px -2px 5px var(--shadow-light),
    2px 2px 5px rgba(24, 32, 52, 0.08);
  font-size: 12px;
}

.tone-green {
  color: var(--success);
  background: var(--success-soft);
}

.tone-yellow {
  color: var(--warning);
  background: var(--warning-soft);
}

.tone-red {
  color: var(--danger);
  background: var(--danger-soft);
}

.tone-purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.metricCard.tone-green::after {
  background: var(--success);
}

.metricCard.tone-yellow::after {
  background: var(--warning);
}

.metricCard.tone-purple::after {
  background: var(--purple);
}

.metricCard.tone-red::after {
  background: var(--danger);
}

@keyframes heroBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.025); }
}

@keyframes heroHover {
  0%, 100% { filter: saturate(1); }
  45% { filter: saturate(1.14); }
  70% { filter: saturate(0.96); }
}

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

@keyframes heroBlink {
  0%, 94%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.14); }
}

@keyframes sparkFloat {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-9px); opacity: 1; }
}

@media (max-width: 1320px) {
  .metricGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .commandLayout,
  .accountLayout,
  .runtimeLayout,
  .runtimeOverview,
  .resourceLayout,
  .conversationList,
  .workspaceGrid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1120px) {
  .loginShell {
    grid-template-columns: 1fr;
  }

  .loginHeroPanel {
    min-height: auto;
  }

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

  .eventRail {
    position: static;
    height: auto;
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .loginPage,
  .dashboard {
    display: block;
    padding: 14px;
  }

  .loginShell {
    display: grid;
    gap: 14px;
  }

  .loginHeroPanel,
  .loginPanel,
  .sideNav,
  .mainPanel,
  .eventRail {
    margin-bottom: 14px;
  }

  .loginHeroPanel,
  .loginPanel {
    padding: 24px;
    border-radius: 24px;
  }

  .loginHeroCopy h1 {
    font-size: 40px;
  }

  .loginHeroCopy p {
    font-size: 15px;
  }

  .previewBody,
  .loginProofGrid,
  .metricGrid,
  .actionHero,
  .actionChecklist,
  .readinessList,
  .brainGrid,
  .conversationList,
  .roleMatrix,
  .ipAssetList,
  .inlineFields,
  .taskGrid {
    grid-template-columns: 1fr;
  }

  .sideNav {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
  }

  .navBrand {
    width: auto;
  }

  .navBrand span {
    display: none;
  }

  .navStack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sideNav button {
    min-height: 50px;
  }

  .navOps {
    margin-top: 0;
    width: auto;
    justify-self: end;
    grid-template-columns: minmax(82px, auto) 50px 50px;
    align-items: center;
  }

  .navStatusPill {
    min-height: 42px;
  }

  .navAction {
    min-height: 42px;
  }

  .heroCard {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .actionHero {
    justify-items: stretch;
  }

  .actionHero button {
    width: 100%;
  }

  .heroVisualWrap {
    display: grid;
    place-items: center;
  }

  .accountItem {
    display: grid;
  }

  .accountActions {
    justify-content: space-between;
  }
}

/* Login v3: compact portal-grade entry. Keeps dashboard dense while avoiding oversized hero blocks. */
.loginPage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.loginShell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(360px, 440px);
  gap: 18px;
  align-items: stretch;
}

.loginHeroPanel,
.loginPanel {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    -6px -6px 14px rgba(255, 255, 255, 0.86),
    8px 10px 24px rgba(31, 45, 78, 0.1);
  backdrop-filter: blur(16px);
}

.loginHeroPanel {
  min-height: 0;
  padding: 30px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 22px;
  overflow: hidden;
}

.loginHeroPanel::after {
  inset: auto 22px 22px auto;
  width: 220px;
  height: 160px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.46));
}

.loginBrandRow {
  gap: 12px;
}

.brandMark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.loginHeroCopy h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.08;
}

.loginHeroCopy p {
  max-width: 540px;
  font-size: 15px;
  line-height: 1.55;
}

.loginMonitorPreview {
  width: 100%;
  align-self: stretch;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(232, 238, 249, 0.86));
}

.previewBody {
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
}

.loginHeroOrb {
  width: 94px;
  height: 94px;
}

.orbEye {
  top: 34px;
}

.orbEye.left {
  left: 30px;
}

.orbEye.right {
  right: 30px;
}

.orbMouth {
  left: 33px;
  top: 58px;
  width: 28px;
}

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

.previewStack div,
.loginProofGrid div {
  padding: 13px;
  border-radius: 15px;
}

.previewStack strong {
  font-size: 16px;
}

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

.loginProofGrid strong {
  font-size: 13px;
}

.loginProofGrid span {
  font-size: 11px;
}

.loginPanel {
  align-self: stretch;
  padding: 30px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.loginPanelHead h2 {
  font-size: 26px;
}

.loginPanel input {
  height: 48px;
  border-radius: 14px;
}

.loginPanel button {
  height: 46px;
}

@media (max-width: 1120px) {
  .loginShell {
    max-width: 560px;
    grid-template-columns: 1fr;
  }

  .loginHeroPanel {
    padding: 24px;
  }

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

@media (max-width: 560px) {
  .loginPage {
    padding: 12px;
  }

  .loginHeroCopy h1 {
    font-size: 32px;
  }

  .previewBody,
  .previewStack {
    grid-template-columns: 1fr;
  }

  .loginHeroOrb {
    display: none;
  }

  .loginPanel {
    padding: 22px;
  }
}

/* Hermes Monitor v4: OpenClaw-style thread board, compact navigation, real loop diagnostics. */
:root {
  --nav-size: 58px;
  --board-blue: #2563eb;
  --board-cyan: #0891b2;
  --board-ink: #172033;
  --board-soft: #eaf1fb;
  --board-warm: #d97706;
}

.dashboard {
  grid-template-columns: 86px minmax(0, 1fr) minmax(280px, 330px);
  gap: 14px;
  padding: 14px;
}

.sideNav {
  top: 14px;
  height: calc(100vh - 28px);
  padding: 14px 10px;
  border-radius: 24px;
  gap: 14px;
}

.navLogo,
.sideNav button {
  width: var(--nav-size);
  height: var(--nav-size);
  min-height: var(--nav-size);
  border-radius: 18px;
}

.navBrand span {
  max-width: var(--nav-size);
  font-size: 10px;
}

.navStack,
.navOps {
  justify-items: center;
}

.sideNav button {
  padding: 0;
}

.sideNav button span {
  font-size: 20px;
}

.sideNav button small {
  font-size: 10px;
}

.navStatusPill {
  width: var(--nav-size);
  min-height: 42px;
  padding: 0;
  border-radius: 16px;
}

.navStatusPill em {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.navAction {
  width: var(--nav-size);
  min-height: var(--nav-size);
}

.topBar {
  margin-bottom: 14px;
}

.topTitle h1 {
  font-size: 28px;
}

.commandLayout {
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.heroCard {
  min-height: 276px;
  padding: 18px;
  grid-template-columns: minmax(440px, 0.92fr) minmax(280px, 0.58fr);
  gap: 18px;
  align-items: stretch;
}

.heroVisualWrap {
  min-width: 0;
}

.heroThreadBoard {
  position: relative;
  min-height: 100%;
  padding: 16px;
  border-radius: 22px;
  overflow: hidden;
  color: var(--board-ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(231, 238, 249, 0.9)),
    var(--board-soft);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 44px rgba(37, 99, 235, 0.12);
}

.heroThreadBoard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 72%);
}

.heroThreadBoard > * {
  position: relative;
  z-index: 1;
}

.boardHeader {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.boardHeader strong {
  min-width: 0;
  color: var(--board-ink);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boardHeader em {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.boardMain {
  position: relative;
  min-height: 108px;
  margin-top: 14px;
  padding: 16px 82px 16px 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.78), rgba(255, 255, 255, 0.86)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 26px rgba(37, 99, 235, 0.08);
}

.boardMain span,
.boardThreadGrid span,
.boardLoopStrip span {
  text-transform: uppercase;
  letter-spacing: 0;
}

.boardMain span {
  display: block;
  color: var(--board-blue);
  font-size: 11px;
  font-weight: 950;
}

.boardMain strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 950;
}

.boardMain p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.boardMain b {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--board-blue);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 2px 2px 5px rgba(24, 32, 52, 0.08),
    inset -2px -2px 5px rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 950;
}

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

.boardThreadGrid div {
  min-width: 0;
  min-height: 58px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    -2px -2px 5px rgba(255, 255, 255, 0.72),
    2px 2px 7px rgba(24, 32, 52, 0.06);
}

.boardThreadGrid div.primary,
.boardThreadGrid div.ok {
  border: 1px solid rgba(5, 150, 105, 0.18);
  background: rgba(236, 253, 245, 0.72);
}

.boardThreadGrid div.partial {
  border: 1px solid rgba(217, 119, 6, 0.18);
  background: rgba(255, 247, 237, 0.72);
}

.boardThreadGrid div.gap {
  border: 1px solid rgba(220, 38, 38, 0.14);
  background: rgba(254, 242, 242, 0.68);
}

.boardThreadGrid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.boardThreadGrid strong {
  display: block;
  margin-top: 6px;
  color: var(--board-ink);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 950;
}

.boardLoopStrip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.boardLoopStrip span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--board-blue);
  background: rgba(37, 99, 235, 0.09);
  font-size: 10px;
  font-weight: 950;
}

.boardLoopStrip span.ok {
  color: var(--success);
  background: var(--success-soft);
}

.boardLoopStrip span.partial {
  color: var(--warning);
  background: var(--warning-soft);
}

.boardLoopStrip span.gap {
  color: var(--danger);
  background: var(--danger-soft);
}

.heroThreadBoard.error .boardMain {
  border-color: rgba(220, 38, 38, 0.22);
}

.heroThreadBoard.review .boardMain,
.heroThreadBoard.evolving .boardMain {
  border-color: rgba(217, 119, 6, 0.18);
}

.heroCopy h2 {
  font-size: 26px;
}

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

.commandLayout > .brainGrid:has(.emptyState) {
  display: none;
}

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

.sourcePills span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--board-blue);
  background: rgba(37, 99, 235, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.loopGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.loopGrid article {
  min-width: 0;
  min-height: 132px;
  padding: 13px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    -2px -2px 5px rgba(255, 255, 255, 0.72),
    2px 2px 7px rgba(24, 32, 52, 0.06);
}

.loopGrid article.ok {
  background: rgba(236, 253, 245, 0.72);
}

.loopGrid article.partial {
  background: rgba(255, 247, 237, 0.74);
}

.loopGrid article.gap {
  background: rgba(254, 242, 242, 0.72);
}

.loopGrid div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.loopGrid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.loopGrid strong {
  display: block;
  margin-top: 6px;
  color: var(--board-ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}

.loopGrid em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--board-blue);
  background: rgba(37, 99, 235, 0.09);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.loopGrid article.ok em {
  color: var(--success);
  background: var(--success-soft);
}

.loopGrid article.partial em {
  color: var(--warning);
  background: var(--warning-soft);
}

.loopGrid article.gap em {
  color: var(--danger);
  background: var(--danger-soft);
}

.loopGrid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 800;
}

.repairHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.repairHead strong {
  color: var(--board-ink);
  font-size: 14px;
  font-weight: 950;
}

.repairHead span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

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

.railStatus {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.railStatus i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.railStatus em {
  font-style: normal;
}

.railStatus.isWarn {
  color: var(--warning);
  background: var(--warning-soft);
}

.railStatus.isError {
  color: var(--danger);
  background: var(--danger-soft);
}

.eventItem.isFresh {
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.05),
    inset -2px -2px 6px rgba(255, 255, 255, 0.86),
    0 0 0 1px rgba(37, 99, 235, 0.18);
}

.eventItem em {
  display: block;
  margin-top: 6px;
  color: var(--board-cyan);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.loginShell {
  width: min(1160px, 100%);
  grid-template-columns: minmax(460px, 0.98fr) minmax(360px, 420px);
}

.loginHeroPanel {
  gap: 18px;
}

.loginThreadBoard {
  min-height: 300px;
}

.loginProofGrid div {
  background: rgba(255, 255, 255, 0.68);
}

@media (max-width: 1380px) {
  .dashboard {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .eventRail {
    position: static;
    height: auto;
    grid-column: 2;
  }

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

@media (max-width: 1080px) {
  .commandLayout,
  .heroCard {
    grid-template-columns: 1fr;
  }

  .loginShell {
    max-width: 620px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard {
    display: block;
  }

  .sideNav {
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    justify-items: start;
  }

  .navStack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, var(--nav-size));
    justify-content: center;
  }

  .navOps {
    grid-template-columns: repeat(3, var(--nav-size));
  }

  .navStatusPill em {
    display: none;
  }

  .heroCard,
  .loopGrid,
  .readinessList,
  .boardThreadGrid,
  .metricGrid,
  .actionChecklist {
    grid-template-columns: 1fr;
  }

  .boardMain {
    padding-right: 16px;
  }

  .boardMain b {
    position: static;
    margin-top: 12px;
  }

  .repairHead {
    display: grid;
  }

  .repairHead span {
    text-align: left;
  }
}
