.dashboard-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(4, 8, 10, 0.96), rgba(4, 8, 10, 0.98)),
    url("assets/kraitos_launch_short_poster.jpg") center/cover fixed;
  color: var(--text-main);
}

.dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 8, 10, 0.9), rgba(4, 8, 10, 0.58), rgba(4, 8, 10, 0.92)),
    radial-gradient(circle at 70% 16%, rgba(73, 246, 220, 0.09), transparent 34%);
  z-index: 0;
}

.dashboard-header,
.account-shell {
  position: relative;
  z-index: 1;
}

[hidden] {
  display: none !important;
}

.account-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 132px 0 56px;
}

.signin-shell {
  min-height: calc(100svh - 188px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  align-items: center;
  gap: clamp(32px, 7vw, 96px);
}

.signin-copy h1,
.agent-console h1 {
  margin: 10px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.signin-copy p,
.surface-heading p,
.download-row p,
.action-tile p,
.muted,
.legal-note {
  color: var(--text-muted);
}

.signin-copy > p {
  max-width: 620px;
  font-size: 1.06rem;
  line-height: 1.7;
}

.signin-state-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.signin-state-list div {
  padding: 18px;
  background: rgba(4, 8, 10, 0.72);
}

.signin-state-list span,
.download-row span,
.action-tile span,
.checksum-block span,
.status-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signin-state-list strong,
.download-row strong,
.action-tile strong,
.status-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: 0;
}

.signin-state-list p,
.download-row p,
.action-tile p {
  margin: 7px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.signin-panel,
.diagnostic-surface,
.download-surface,
.management-surface {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 12, 15, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.signin-panel {
  padding: 30px;
  border-radius: 8px;
}

.auth-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--dark-bg);
  font-family: var(--font-display);
  font-weight: 900;
}

.signin-panel h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.signin-panel .muted {
  margin: 0 0 22px;
  line-height: 1.55;
}

.oauth-btn,
.auth-inline button,
.quiet-btn,
.download-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.oauth-btn {
  width: 100%;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #f8fafc;
  color: #0b1215;
}

.oauth-btn span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #0b57d0;
  font-weight: 900;
}

.oauth-btn:hover,
.auth-inline button:hover,
.download-action:not(.disabled):hover,
.quiet-btn:hover {
  transform: translateY(-1px);
}

.auth-divider {
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-form {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.auth-form label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-inline input {
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text-main);
  font: inherit;
}

.auth-inline input:focus {
  outline: none;
  border-color: var(--cyan);
}

.auth-inline button {
  border: 0;
  padding: 0 18px;
  background: var(--cyan);
  color: var(--dark-bg);
}

.auth-inline button:disabled,
.quiet-btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.auth-message {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--cyan);
  line-height: 1.45;
}

.auth-message.error {
  color: #fb7185;
}

.legal-note {
  margin: 18px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.legal-note a {
  color: var(--cyan);
}

.agent-console {
  display: grid;
  gap: 22px;
}

.console-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.console-topline h1 {
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  margin-bottom: 0;
}

.account-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-pill {
  max-width: min(48vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 10px 13px;
  border: 1px solid rgba(73, 246, 220, 0.22);
  border-radius: 999px;
  background: rgba(73, 246, 220, 0.08);
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 800;
}

.quiet-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 0 16px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.status-strip div {
  min-height: 86px;
  padding: 18px;
  background: rgba(4, 8, 10, 0.78);
}

.status-strip strong {
  overflow-wrap: anywhere;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 22px;
}

.diagnostic-surface,
.download-surface,
.management-surface {
  border-radius: 8px;
  padding: 24px;
}

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

.surface-heading h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.surface-heading p {
  margin: 0;
  max-width: 680px;
  line-height: 1.55;
}

.state-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-badge.ready {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.state-badge.waiting {
  border: 1px solid rgba(255, 184, 77, 0.3);
  background: rgba(255, 184, 77, 0.12);
  color: var(--amber);
}

.state-badge.locked {
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.12);
  color: #fb7185;
}

.diagnostic-list {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.diagnostic-row {
  min-height: 84px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 17px;
  background: rgba(0, 0, 0, 0.18);
}

.diagnostic-row strong {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.diagnostic-row p {
  margin: 5px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.signal.on {
  background: #34d399;
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.5);
}

.signal.waiting {
  background: var(--amber);
  box-shadow: 0 0 18px rgba(255, 184, 77, 0.34);
}

.signal.locked {
  background: #fb7185;
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.34);
}

.download-surface {
  align-self: start;
}

.download-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.download-action {
  min-width: 118px;
  padding: 0 15px;
  background: var(--cyan);
  color: var(--dark-bg);
}

.download-action.disabled {
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.checksum-block {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.checksum-block code {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: 0.75rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.action-tile {
  min-height: 138px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-main);
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.action-tile:hover {
  background: rgba(73, 246, 220, 0.08);
}

@media (max-width: 920px) {
  .signin-shell,
  .console-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

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

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

  .account-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .account-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 112px;
  }

  .signin-copy h1,
  .agent-console h1 {
    font-size: 2.6rem;
  }

  .signin-state-list,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .auth-inline,
  .download-row {
    grid-template-columns: 1fr;
  }

  .download-action {
    width: 100%;
  }

  .signin-panel,
  .diagnostic-surface,
  .download-surface,
  .management-surface {
    padding: 20px;
  }
}
