:root {
  color-scheme: light;
  --ceo-font-family: system-ui, sans-serif;
  font-family: var(--ceo-font-family);
  color: #2d3440;
  background: #f5f8fb;
  font-synthesis: none;
  --ceo-navy: #29384a;
  --ceo-blue: #496682;
  --ceo-ink: #2d3440;
  --ceo-muted: #718497;
  --ceo-page: #f5f8fb;
  --ceo-line: #d5dee7;
  --ceo-track: #e7edf3;
}

* { box-sizing: border-box; }

html,
body,
body *,
body *::before,
body *::after {
  font-family: var(--ceo-font-family) !important;
}

html { min-width: 980px; min-height: 100%; }

body {
  min-width: 980px;
  min-height: 100vh;
  margin: 0;
  background: var(--ceo-page);
}

.admin-login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--ceo-page);
}

.admin-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 58px 64px 48px;
  overflow: hidden;
  color: #fff;
  background: var(--ceo-navy);
}

.admin-brand-panel::before,
.admin-brand-panel::after {
  position: absolute;
  right: -25%;
  bottom: -5%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  box-shadow: 0 0 0 72px rgba(255, 255, 255, 0.018), 0 0 0 144px rgba(255, 255, 255, 0.014);
  content: "";
  pointer-events: none;
}

.admin-brand-panel::after {
  right: -38%;
  bottom: 8%;
  width: 54%;
  box-shadow: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: #7f8e89;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.admin-brand-name {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: inherit;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.admin-brand-message {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: auto 0;
  transform: translateY(-4vh);
}

.admin-brand-message h1 {
  max-width: 460px;
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.015em;
}

.admin-brand-message > p:last-child {
  max-width: 450px;
  margin: 22px 0 0;
  color: #d7e1eb;
  font-size: 16px;
  line-height: 1.85;
}

.admin-brand-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #aebecb;
}

.admin-brand-footer span { font-size: 12px; letter-spacing: 0.08em; }
.admin-brand-footer small { font-size: 12px; }

.admin-login-stage {
  display: grid;
  min-width: 0;
  min-height: 100vh;
  place-items: center;
  padding: 48px;
  background: var(--ceo-page);
}

.admin-form-panel {
  width: min(510px, 100%);
  padding: 40px;
  border: 1px solid var(--ceo-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 0 #dbe3ea, 0 12px 30px rgba(41, 56, 74, 0.08);
}

.admin-form-panel > header > .eyebrow {
  margin-bottom: 12px;
  color: var(--ceo-navy);
  letter-spacing: 0.2em;
}

.admin-form-panel header h2 {
  margin: 0;
  color: var(--ceo-ink);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-form-panel header > p:last-child {
  margin: 15px 0 0;
  color: var(--ceo-muted);
  font-size: 15px;
  line-height: 1.75;
}

.admin-security-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 28px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--ceo-line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ceo-muted);
}

.admin-security-note .login-lock-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--ceo-blue);
}

.admin-security-note .ceo-icon {
  width: 22px;
  height: 22px;
}

.admin-security-note small {
  font-size: 12px;
  line-height: 1.55;
}

#adminLoginForm,
#dataKeyMigrationForm {
  display: grid;
  gap: 14px;
}

.data-key-migration > header {
  margin-bottom: 20px;
}

.data-key-migration > header h3 {
  margin: 0;
  color: var(--ceo-ink);
  font-size: 23px;
  line-height: 1.35;
}

.data-key-migration > header > p:last-child {
  margin: 12px 0 0;
  color: var(--ceo-muted);
  font-size: 14px;
  line-height: 1.7;
}

label {
  display: grid;
  gap: 9px;
  color: var(--ceo-ink);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--ceo-line);
  border-radius: 8px;
  outline: none;
  color: var(--ceo-ink);
  background: #fff;
  font: inherit;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: var(--ceo-blue);
  box-shadow: 0 0 0 3px rgba(73, 102, 130, 0.16);
}

.primary-button {
  height: 50px;
  margin-top: 2px;
  border: 1px solid var(--ceo-navy);
  border-radius: 8px;
  color: #fff;
  background: var(--ceo-navy);
  box-shadow: 0 2px 0 #182433;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:active {
  transform: translateY(2px);
  box-shadow: none;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #b83b3b;
  font-size: 13px;
  line-height: 1.5;
}

.configuration-notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #e6b7b2;
  border-radius: 8px;
  color: #9f3535;
  background: #fff1ef;
  font-size: 14px;
  line-height: 1.55;
}

.data-note {
  margin: 18px 0 12px;
  color: var(--ceo-muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

.supervisor-link {
  display: block;
  width: max-content;
  margin: 0 auto;
  color: var(--ceo-blue);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 3px;
}

@media (max-width: 1050px) {
  .admin-login-shell { grid-template-columns: 330px minmax(0, 1fr); }
  .admin-brand-panel { padding: 44px 38px; }
  .admin-brand-message h1 { font-size: 38px; }
  .admin-login-stage { padding: 32px; }
  .admin-form-panel { width: min(500px, 100%); padding: 30px 32px 32px; }
}

@media (max-height: 760px) {
  .admin-brand-panel { padding-top: 32px; padding-bottom: 28px; }

  .admin-brand-message {
    transform: none;
  }

  .admin-brand-message .eyebrow { margin-bottom: 10px; font-size: 11px; }
  .admin-brand-message h1 { font-size: 34px; line-height: 1.2; }
  .admin-brand-message > p:last-child { margin-top: 16px; font-size: 14px; line-height: 1.65; }
  .admin-brand-footer { gap: 4px; padding-top: 18px; }

  .admin-login-stage { padding: 24px 32px; }

  .admin-form-panel {
    width: min(500px, 100%);
    padding: 24px 28px 26px;
  }

  .admin-form-panel .eyebrow { margin-bottom: 6px; }
  .admin-form-panel header h2 { font-size: 28px; }

  .admin-form-panel header > p:last-child {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
  }

  .admin-security-note {
    gap: 10px;
    margin: 16px 0 14px;
    padding: 10px 12px;
  }

  #adminLoginForm { gap: 9px; }
  label { gap: 6px; }
  input { height: 42px; }
  .primary-button { height: 42px; }
  .form-error { min-height: 18px; line-height: 1.35; }
  .data-note { margin: 10px 0 6px; line-height: 1.45; }
}
button[aria-busy="true"]{cursor:wait!important;pointer-events:none;opacity:.78}
