:root {
  color-scheme: dark;
  --ink: #f4fbf6;
  --muted: #adc0b9;
  --line: #294239;
  --surface: #101820;
  --surface-strong: #17242b;
  --band: #070d10;
  --accent: #00a51f;
  --accent-dark: #007f18;
  --accent-bright: #18d43a;
  --accent-soft: rgba(0, 165, 31, 0.16);
  --brand-red: #e71919;
  --good: #5fd08f;
  --warn: #f0a15d;
  --field: #0b1418;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(0, 165, 31, 0.11) 0%, rgba(7, 13, 16, 0) 270px),
    linear-gradient(135deg, #070d10 0%, #0e1a20 46%, #071011 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  width: min(100% - 40px, 460px);
  margin: 0 auto;
}

.login-panel {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

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

.brand-mark {
  display: grid;
  grid-template-columns: auto auto;
  width: max-content;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #050909;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.brand-green,
.brand-black {
  display: block;
  padding: 8px 11px 7px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.brand-green {
  background: linear-gradient(180deg, #04b226 0%, #008f18 100%);
}

.brand-black {
  background: #050505;
}

.brand-line {
  grid-column: 1 / -1;
  display: block;
  background: var(--brand-red);
  color: rgba(0, 0, 0, 0.62);
  font-size: 10px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  padding: 4px 12px 5px;
  text-align: center;
}

.login-brand {
  margin-bottom: 10px;
}

.login-brand .brand-green,
.login-brand .brand-black {
  font-size: 30px;
  padding: 10px 13px 9px;
}

.login-brand .brand-line {
  font-size: 11px;
  padding: 5px 12px 6px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.agent-pill {
  display: grid;
  gap: 4px;
  min-width: 280px;
  border: 1px solid var(--line);
  background: rgba(16, 24, 32, 0.88);
  padding: 10px 12px;
}

.agent-pill span,
.label,
dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.agent-pill strong {
  font-size: 12px;
  word-break: break-all;
}

.agent-pill a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 165, 31, 0.4);
  background: var(--accent-soft);
  margin-top: 18px;
  padding: 11px 13px;
  color: #c6d3df;
  font-size: 13px;
  line-height: 1.35;
}

.notice strong {
  color: var(--accent);
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 0.9fr) minmax(340px, 0.8fr);
  gap: 20px;
  margin-top: 24px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(16, 24, 32, 0.96);
  border: 1px solid var(--line);
  padding: 22px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

form {
  display: grid;
  gap: 18px;
}

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

label {
  display: grid;
  gap: 8px;
  color: #d5e0ea;
  font-size: 13px;
  font-weight: 700;
}

.field-label {
  color: #d5e0ea;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(7, 13, 16, 0.35);
  padding: 10px;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(45, 59, 78, 0.8);
  padding: 7px 0;
  font-weight: 600;
}

.check-row:last-child {
  border-bottom: 0;
}

.check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.check-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.form-status {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(0, 143, 24, 0.22);
}

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

textarea {
  line-height: 1.4;
  min-height: 92px;
  resize: vertical;
}

input[type="file"] {
  padding: 9px 12px;
}

button,
.download,
.secondary-download,
.google-button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 12px 14px;
  text-align: center;
  text-decoration: none;
}

button:hover,
.download:hover,
.secondary-download:hover,
.google-button:hover {
  background: var(--accent-dark);
}

button,
.download {
  box-shadow: 0 10px 22px rgba(0, 165, 31, 0.2);
}

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

.secondary-download {
  border: 1px solid var(--accent);
  background: rgba(0, 165, 31, 0.08);
  color: var(--accent);
  font-size: 13px;
  padding: 10px 12px;
}

.secondary-download:hover {
  color: #ffffff;
}

.secondary-download.disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #18212f;
  border: 1px solid var(--line);
}

.google-button:hover {
  background: #eaf2f7;
}

.google-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #1a73e8;
  font-weight: 800;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.result-panel {
  align-self: start;
}

.empty-state {
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 24px;
  line-height: 1.45;
}

.hidden {
  display: none;
}

.result-card {
  display: grid;
  gap: 18px;
}

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

.score-row > div {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 165, 31, 0.08), rgba(23, 36, 43, 0.92));
  padding: 14px;
}

.score-row strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl > div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

dd {
  margin: 5px 0 0;
  color: #d7e1ec;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding: 22px 0;
  }

  .topbar,
  .workspace,
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand-green,
  .brand-black {
    font-size: 20px;
  }

  .agent-pill {
    min-width: 0;
  }
}
