:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #0f6b5f;
  --accent-2: #235789;
  --bad: #b42318;
  --warn: #b54708;
  --good: #027a48;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  background: #111827;
  color: white;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-size: 18px;
}

.brand span,
.userbar {
  color: #cbd5e1;
  font-size: 13px;
}

.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: stretch;
  gap: 32px;
  padding: 42px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.38) 0%, rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.72) 100%),
    url("/assets/tia-eddie-banner.jpg") center / cover no-repeat,
    #020617;
}

.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.05) 45%, rgba(2, 6, 23, 0.72));
}

.login-hero,
.login-panel {
  position: relative;
  z-index: 1;
}

.login-hero {
  min-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 760px;
  padding: 10px 0;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: white;
  background: #4c1d95;
  box-shadow: 0 18px 42px rgba(76, 29, 149, 0.42);
  font-size: 19px;
  font-weight: 900;
  text-transform: lowercase;
}

.login-copy {
  max-width: 640px;
  margin-top: auto;
  padding-bottom: 52px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.94;
  letter-spacing: 0;
}

.login-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.55;
}

.login-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 680px;
}

.login-signals span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 6px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
}

.login-panel {
  align-self: center;
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid rgba(203, 213, 225, 0.2);
  border-radius: 8px;
  color: #e5eefb;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(18px);
}

.login-panel h2 {
  margin: 0;
  color: white;
  font-size: 30px;
  line-height: 1.1;
}

.login-panel p:not(.eyebrow) {
  margin: 10px 0 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.login-btn {
  width: 100%;
  min-height: 48px;
  background: #ff5a1f;
  box-shadow: 0 16px 34px rgba(255, 90, 31, 0.28);
  font-weight: 800;
}

.login-btn:hover {
  background: #f04d16;
}

.login-footnote {
  padding-top: 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.18);
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.dev-login-page {
  grid-template-columns: minmax(320px, 480px);
  justify-content: center;
}

.dev-login-panel {
  width: min(480px, calc(100vw - 32px));
}

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

.field {
  display: grid;
  gap: 6px;
  margin: 18px 0;
}

.field label {
  font-weight: 650;
}

.field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.login-panel .field {
  margin: 0;
}

.login-panel .field label {
  color: #dbeafe;
}

.login-panel .field input {
  border-color: rgba(203, 213, 225, 0.28);
  color: white;
  background: rgba(15, 23, 42, 0.8);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.scan-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.scan-picker select {
  min-width: 156px;
  padding: 9px 32px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
}

.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  color: white;
  background: var(--accent);
  cursor: pointer;
}

.btn.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric {
  display: grid;
  gap: 6px;
}

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

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

.section {
  margin-top: 18px;
}

.banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.banner.warn {
  border-color: #fedf89;
  background: #fffaeb;
  color: var(--warn);
}

.banner.bad {
  border-color: #fecdca;
  background: #fef3f2;
  color: var(--bad);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  border-bottom: 1px solid var(--line);
}

.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 750;
}

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

.attention summary,
.report-details summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 750;
}

.attention summary span {
  display: grid;
  gap: 2px;
}

.attention summary small {
  color: var(--muted);
  font-weight: 500;
}

.attention-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.attention-list li {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-left: 4px solid var(--warn);
  background: #fffaeb;
}

.attention-list li.error,
.attention-list li.critical {
  border-left-color: var(--bad);
  background: #fef3f2;
}

.attention-list span,
.attention-list em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.report-details {
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

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

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.completed {
  background: #dcfae6;
  color: var(--good);
}

.status.partial {
  background: #fef0c7;
  color: var(--warn);
}

.status.failed {
  background: #fee4e2;
  color: var(--bad);
}

.status.warning,
.status.critical,
.status.expired {
  background: #fef0c7;
  color: var(--warn);
}

.status.critical,
.status.expired {
  background: #fee4e2;
  color: var(--bad);
}

.status.ok {
  background: #dcfae6;
  color: var(--good);
}

.status.unknown,
.status.none {
  background: #eef2f6;
  color: var(--muted);
}

.report {
  max-height: 720px;
  overflow: auto;
  background: white;
}

.report h2 {
  margin-top: 20px;
}

.report h3 {
  margin-top: 18px;
  color: var(--accent-2);
}

.report p,
.report li {
  line-height: 1.45;
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 100vh;
    padding: 28px;
    background-position: center right;
  }

  .login-hero {
    min-height: auto;
    gap: 72px;
  }

  .login-copy {
    padding-bottom: 0;
  }

  .login-panel {
    width: min(460px, 100%);
    align-self: start;
  }

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

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

@media (max-width: 620px) {
  .login-page {
    padding: 20px;
    background-position: 58% center;
  }

  .login-brand {
    font-size: 11px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .login-copy h1 {
    font-size: 42px;
    line-height: 1;
  }

  .login-copy p:not(.eyebrow) {
    font-size: 15px;
  }

  .login-panel {
    padding: 22px;
  }

  .login-signals {
    display: none;
  }

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

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