.testing-layout { display: flex; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.testing-layout .topbar, .testing-layout .footer { flex-shrink: 0; }
.testing-layout .footer { margin-top: auto; }

.testing-page {
  --portal-ink: #10244b;
  --portal-blue: #2454cf;
  --portal-shadow: 0 8px 24px rgb(18 39 79 / 7%);
  max-width: 960px;
  padding-block: clamp(20px, 4vw, 40px) 32px;
}

.portal-banner {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding: clamp(20px, 4vw, 34px);
  border-radius: 16px;
  background: radial-gradient(ellipse at top right, #2c50a0, transparent 75%), var(--portal-ink);
  box-shadow: var(--portal-shadow);
  color: #fff;
}
.portal-copy { flex: 1 1 270px; min-width: 0; }
.portal-banner h1 { font-size: clamp(28px, 4vw, 38px); }
.portal-description { max-width: 47ch; margin: 8px 0 0; color: #e1e9ff; font-size: 15px; }
.testing-page .button { min-height: 42px; font-family: inherit; font-size: 14px; }
.testing-page button { cursor: pointer; }
.testing-page button:disabled { opacity: .58; cursor: default; }
.portal-button { border-color: #fff; background: #fff; color: var(--portal-ink); }
.portal-button:hover { border-color: #e1e9ff; background: #e1e9ff; }

.admin-entry { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 14px; }
.admin-heading { align-content: center; }
.admin-entry:has(.login-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.admin-entry:has(.login-panel[hidden]) .admin-heading { align-content: normal; }

.panel {
  min-width: 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--portal-shadow);
}
.panel h2 { margin: 0; color: var(--portal-ink); font-size: 18px; line-height: 1.25; letter-spacing: -.025em; }
.tester-list, .dashboard { margin-top: 14px; }
.dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.panel form, .login-panel fieldset { display: grid; gap: 12px; }
.panel form { margin-top: 14px; }
.login-panel fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.panel label { display: grid; gap: 5px; color: var(--portal-ink); font-size: 14px; font-weight: 650; }
.panel input:not([type="checkbox"]), .panel select, .panel textarea {
  min-height: 44px;
  width: 100%;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid #bac8dd;
  border-radius: 8px;
  background: #fcfdff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.panel input:focus-visible, .panel select:focus-visible, .panel textarea:focus-visible { outline: 3px solid #93b4ff; outline-offset: 2px; }
.track-note, .track-empty { margin: 8px 0 0; color: var(--secondary); font-size: 14px; }
.panel .checkbox { display: flex; min-height: 34px; align-items: center; gap: 8px; }
.checkbox input { margin: 0; accent-color: var(--accent); }
.actions, .login-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.login-actions { justify-content: space-between; }
.login-actions [type="submit"] { flex: 1 1 120px; }
.testing-page .reset-button { border-color: transparent; background: transparent; color: var(--portal-blue); }
.testing-page .reset-button:hover { text-decoration: underline; }
.verification { margin-top: 10px; }

#status {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 9px;
  background: #eaf0fb;
  color: #344a70;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.save-status { margin: 0; color: #344a70; font-size: 14px; overflow-wrap: anywhere; }
.save-status:not(:empty) { margin-top: 10px; padding: 9px 12px; border-radius: 9px; background: #eaf0fb; }
#status:empty, .apps:empty { display: none; }
.apps { margin: 8px 0 0; padding: 0; list-style: none; }
.apps li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  min-height: 48px;
  padding-block: 7px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.apps li:last-child { border-bottom: 0; }
.apps li > a { margin-top: 0; font-size: 14px; }
.admin .apps li > span { grid-column: 1; grid-row: 2; color: var(--secondary); font-size: 14px; }
.admin .apps li > .actions { grid-column: 2; grid-row: 1 / span 2; }
[hidden] { display: none !important; }

@media (max-width: 620px) {
  .admin-entry, .dashboard { grid-template-columns: minmax(0, 1fr); }
  .portal-copy { flex-basis: 100%; }
}

.logo-preview { display: flex; align-items: center; gap: 12px; }
.logo-preview img { border-radius: 12px; object-fit: cover; }
.admin .project-delete { color: #982b23; }
.admin .project-delete:hover { border-color: #982b23; background: #fff1ef; }
.admin .project-delete:disabled { opacity: .55; cursor: wait; }
