:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --ink: #111827;
  --muted: #64748b;
  --border: #d9e0ea;
  --maroon: #8b1e24;
  --maroon-dark: #661419;
  --gold: #d9a441;
  --teal: #0f766e;
  --danger: #b42318;
  --sidebar: #101828;
  --sidebar-soft: #1f2937;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--maroon);
}

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

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px;
  background: var(--sidebar);
  color: #f8fafc;
  border-right: 1px solid #243044;
}

.admin-sidebar h2 {
  margin: 0 0 16px;
  padding: 0 8px 14px;
  color: #ffffff;
  border-bottom: 1px solid #334155;
  font-size: 1.1rem;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 2px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #dbe3ee;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--sidebar-soft);
  border-color: #3b475a;
  color: #ffffff;
}

.admin-sidebar a.active {
  border-left-color: var(--gold);
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 1.75rem;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.18rem;
}

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.stat-box,
.panel-box,
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.stat-box {
  padding: 16px;
  border-top: 3px solid var(--gold);
}

.stat-box h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.stat-box strong {
  display: block;
  color: var(--maroon);
  font-size: 2rem;
  line-height: 1;
}

.panel-box {
  margin-bottom: 16px;
  padding: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

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

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

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

.form-stack {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #263244;
  font-size: 0.94rem;
  font-weight: 650;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

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

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(217, 164, 65, 0.35);
  border-color: var(--gold);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: fit-content;
  max-width: 100%;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--maroon);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--maroon-dark);
}

button.danger {
  background: var(--danger);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.verify-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7ebf0;
  text-align: left;
  vertical-align: top;
  font-size: 0.93rem;
}

th {
  background: var(--surface-soft);
  color: #334155;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.notice {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 650;
}

.notice.success {
  background: #e7f7ef;
  border-color: #b7e4ca;
  color: #17633a;
}

.notice.error {
  background: #fff0f0;
  border-color: #f4b8b8;
  color: #9f1d1d;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.review-head h2 {
  margin-bottom: 4px;
}

.submission-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-approved,
.status-verified {
  background: #dcfce7;
  color: #166534;
}

.status-pending {
  background: #fff7d6;
  color: #7a4b00;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.admin-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background: #f8fafc;
}

.auth-card {
  display: grid;
  width: min(420px, 94vw);
  gap: 12px;
  padding: 22px;
  border-top: 4px solid var(--maroon);
}

.auth-card-wide {
  width: min(760px, 94vw);
}

.auth-card h1 {
  margin-bottom: 0;
}

.auth-card h2 {
  margin: 6px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 1rem;
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-main {
    padding: 18px;
  }

  .two-col,
  .inline-grid,
  .inline-grid.two-fields,
  .inline-grid.triple-grid {
    grid-template-columns: 1fr;
  }

  .review-head {
    display: grid;
  }
}
