:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --panel: #ffffff;
  --text: #181818;
  --muted: #5f6762;
  --line: rgba(24, 24, 24, 0.12);
  --accent: #1f6f8b;
  --accent-dark: #18566d;
  --warm: #8b3f2c;
  --success: #23624e;
  --danger: #8b2e22;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button {
  align-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.button.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button.primary:hover,
button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary,
button.secondary {
  background: white;
  color: var(--text);
}

.button.secondary:hover,
button.secondary:hover {
  border-color: rgba(31, 111, 139, 0.45);
  color: var(--accent);
}

input,
textarea {
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.16);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

label span {
  display: block;
  margin-bottom: 8px;
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  min-height: 80px;
  padding: 0 24px;
}

.landing {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 32px 24px 112px;
  text-align: center;
}

.landing-inner {
  max-width: 780px;
}

.eyebrow {
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.landing h1 {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 1.02;
  margin: 0 auto;
  max-width: 820px;
}

.landing p.copy {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 24px auto 0;
  max-width: 600px;
}

.landing .button {
  margin-top: 38px;
}

.auth-screen {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(24, 24, 24, 0.06);
  padding: 28px;
}

.auth-panel {
  max-width: 440px;
  width: 100%;
}

.panel h1,
.panel h2,
.page-title h1 {
  margin: 0;
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.notice {
  border: 1px solid rgba(31, 111, 139, 0.2);
  color: var(--muted);
  line-height: 1.55;
  margin-top: 18px;
  padding: 12px;
}

.notice.error {
  background: #fff3ef;
  border-color: rgba(185, 74, 58, 0.3);
  color: var(--danger);
}

.notice.success {
  background: #eefaf4;
  border-color: rgba(47, 128, 102, 0.25);
  color: var(--success);
}

.admin-header {
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid var(--line);
}

.admin-header-inner,
.admin-nav,
.page {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: 24px;
  padding-right: 24px;
}

.admin-header-inner {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding-bottom: 16px;
  padding-top: 18px;
}

.admin-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.admin-nav a {
  background: white;
  border: 1px solid var(--line);
  color: #3f4642;
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 14px;
}

.admin-nav a:hover {
  border-color: rgba(31, 111, 139, 0.45);
  color: var(--accent);
}

.page {
  padding-bottom: 48px;
  padding-top: 30px;
}

.page-title {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.grid.two {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

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

.card {
  background: white;
  border: 1px solid var(--line);
  padding: 22px;
}

.card:hover.card-link {
  border-color: rgba(31, 111, 139, 0.45);
}

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

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.count {
  font-size: 2.4rem;
  font-weight: 800;
  margin-top: 12px;
}

.checkbox-list {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 14px;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 400;
}

.checkbox-row input {
  accent-color: var(--accent);
  width: auto;
}

.table-wrap {
  background: white;
  border: 1px solid var(--line);
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 560px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid rgba(24, 24, 24, 0.08);
  padding: 12px 14px;
  text-align: left;
}

th {
  background: #edf2f1;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.app-tile {
  background: white;
  border: 1px solid var(--line);
  display: flex;
  min-height: 160px;
  padding: 22px;
}

.app-tile:hover {
  border-color: rgba(31, 111, 139, 0.45);
  box-shadow: 0 14px 28px rgba(24, 24, 24, 0.08);
  transform: translateY(-2px);
}

.tile-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 820px) {
  .admin-header-inner,
  .page-title {
    display: block;
  }

  .grid.two,
  .grid.three,
  .app-tiles {
    grid-template-columns: 1fr;
  }

  .admin-header-inner form,
  .page-title .button {
    margin-top: 16px;
  }
}
