:root {
  --admin-bg: #f0f0f1;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f6f7f7;
  --admin-border: #c3c4c7;
  --admin-text: #1d2327;
  --admin-muted: #646970;
  --admin-link: #2271b1;
  --admin-link-dark: #135e96;
  --admin-focus: #72aee6;
  --admin-sidebar: #1d2327;
  --admin-sidebar-hover: #2c3338;
  --admin-sidebar-text: #f0f0f1;
  --admin-accent: #b32d2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--admin-link);
}

a:hover {
  color: var(--admin-link-dark);
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #000;
  background: #101517;
  color: #fff;
  padding: 0 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 650;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--admin-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.layout {
  display: grid;
  min-height: calc(100vh - 52px);
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text);
  padding: 12px 0;
}

.sidebar a {
  display: block;
  color: inherit;
  padding: 11px 18px;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a:focus {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.content {
  width: min(1120px, 100%);
  padding: 28px;
}

.page-heading {
  margin-bottom: 24px;
}

.page-heading h1,
.login-card h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--admin-muted);
}

.eyebrow,
.status-kicker {
  margin: 0 0 6px;
  color: var(--admin-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.status-card,
.panel,
.login-card {
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.status-card {
  min-height: 210px;
  padding: 18px;
}

.status-card h2,
.panel h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.status-card p,
.panel p {
  color: var(--admin-muted);
}

.status-card a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 650;
  text-decoration: none;
}

.panel {
  padding: 22px;
}

.task-list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.task-list li + li {
  margin-top: 8px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface-soft);
  color: var(--admin-text);
  cursor: pointer;
  padding: 6px 12px;
  text-decoration: none;
}

.button.primary {
  border-color: var(--admin-link);
  background: var(--admin-link);
  color: #fff;
}

.button.primary:hover {
  background: var(--admin-link-dark);
}

.button.secondary {
  border-color: var(--admin-link);
  background: #f0f6fc;
  color: var(--admin-link-dark);
}

.button.secondary:hover {
  background: #d8ecff;
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
}

.button:focus,
input:focus,
a:focus {
  outline: 2px solid var(--admin-focus);
  outline-offset: 2px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background:
    linear-gradient(rgba(179, 45, 46, 0.22), rgba(179, 45, 46, 0.22)),
    url("https://www.cincyethics.org/wp-content/uploads/2024/08/Andy-with-Students-Raised-Hands-scaled.jpg") center / cover fixed;
}

.login-modal {
  position: relative;
  display: grid;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 64px));
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  overflow: hidden;
  border-radius: 6px;
  background: var(--admin-surface);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.26);
}

.login-close {
  position: absolute;
  top: 28px;
  right: 30px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.login-close:hover,
.login-close:focus {
  background: #fff;
  color: var(--admin-accent);
}

.notice-list {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 4;
  width: min(440px, calc(100% - 44px));
}

.login-panel {
  display: grid;
  align-content: center;
  padding: clamp(38px, 6vw, 86px);
}

.login-panel-main {
  justify-items: center;
  background: #fff;
  text-align: center;
}

.login-panel-magic {
  align-content: center;
  gap: 30px;
  background: #c60020;
  color: #fff;
  text-align: center;
}

.login-panel-magic h2 {
  margin: 0 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
}

.login-panel-magic p {
  max-width: 460px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 650;
}

.login-brand {
  display: grid;
  justify-items: center;
  margin-bottom: 38px;
}

.login-brand .eyebrow {
  margin-bottom: 8px;
}

.login-brand h1 {
  color: var(--admin-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: 0;
}

.login-logo {
  width: min(360px, 72vw);
  margin-top: clamp(42px, 8vw, 92px);
}

.login-form {
  display: grid;
  width: min(440px, 100%);
  gap: 18px;
}

.login-submit {
  justify-self: center;
  min-width: 230px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #c60020;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-submit:hover {
  background: #a9001b;
}

.login-help-link {
  margin-top: 28px;
  color: #4b4b4b;
  font-size: 1rem;
  text-decoration: none;
}

.login-help-link:hover,
.login-help-link:focus {
  color: var(--admin-accent);
  text-decoration: underline;
}

.magic-link-form {
  width: min(440px, 100%);
  justify-self: center;
}

.magic-link-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #c60020;
  font-weight: 900;
}

.magic-link-button:hover {
  background: #f5f5f5;
  color: #9e0019;
}

.magic-resend {
  justify-self: center;
  color: #fff;
}

.magic-resend:hover,
.magic-resend:focus {
  color: #fff;
}

.admin-form {
  display: grid;
  max-width: 460px;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

.admin-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #8c8f94;
  background: #fff;
  padding: 8px 10px;
}

.account-panel + .account-panel {
  margin-top: 18px;
}

.meta-line {
  margin: 6px 0 0;
  color: var(--admin-muted);
}

.login-form + .login-form {
  margin-top: 0;
}

.login-form h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.form-help {
  margin: -4px 0 0;
  color: var(--admin-muted);
  font-size: 0.92rem;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

.login-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #8c8f94;
  background: #fff;
  padding: 8px 10px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--admin-border);
}

.link-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--admin-link);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.link-button:hover {
  color: var(--admin-link-dark);
  text-decoration: underline;
}

.notice {
  border-left: 4px solid var(--admin-accent);
  background: #fcf0f1;
  margin: 0 0 16px;
  padding: 10px 12px;
}

.notice.success {
  border-left-color: #00a32a;
  background: #edfaef;
}

@media (max-width: 840px) {
  .login-screen {
    align-items: start;
  }

  .login-modal {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-close {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
  }

  .login-panel {
    padding: 36px 24px;
  }

  .login-panel-main {
    padding-top: 64px;
  }

  .login-panel-magic {
    min-height: 360px;
  }

  .login-logo {
    margin-top: 42px;
  }

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

  .sidebar {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }

  .sidebar a {
    white-space: nowrap;
  }

  .content {
    padding: 22px;
  }

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

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

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