:root {
  --bg: #080909;
  --panel: #121313;
  --panel-2: #191715;
  --text: #f6f0e8;
  --muted: #c8beb2;
  --line: rgba(246, 240, 232, 0.16);
  --red: #b3211c;
  --amber: #d99a43;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.admin-top {
  align-items: center;
  background: rgba(8, 9, 9, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-brand {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-brand img {
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-nav a,
.muted-link,
.table-action {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.table-action {
  color: var(--amber);
  display: inline-flex;
  margin-top: 12px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 14px;
}

.admin-main {
  padding: clamp(24px, 4vw, 52px);
}

.admin-hero,
.page-title,
.admin-page-title,
.auth-card,
.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 38px);
}

.admin-hero h1,
.admin-page-title h1 {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.auth-card h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  margin: 0 0 22px;
  max-width: 420px;
  text-transform: uppercase;
}

.admin-card h2 {
  margin-top: 0;
  text-transform: uppercase;
}

.eyebrow,
.board-role {
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-muted,
.admin-hero p,
.admin-page-title p,
.admin-card p {
  color: var(--muted);
  line-height: 1.6;
}

.metric-grid,
.admin-grid,
.admin-form-grid,
.board-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.metric-grid article,
.admin-grid a,
.board-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 22px;
  text-decoration: none;
}

.admin-grid a:hover,
.table-action:hover {
  color: var(--text);
}

.metric-grid strong {
  display: block;
  font-size: clamp(30px, 4vw, 46px);
}

.metric-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.auth-card {
  margin: 8vh auto;
  max-width: 560px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  text-transform: uppercase;
}

input,
textarea,
select {
  background: #0d0e0e;
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 96px;
}

.span-2 {
  grid-column: span 2;
}

.admin-button,
button {
  background: var(--red);
  border: 0;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  text-decoration: none;
  text-transform: uppercase;
}

.flash {
  background: rgba(217, 154, 67, 0.16);
  border: 1px solid rgba(217, 154, 67, 0.5);
  margin-bottom: 16px;
  padding: 14px;
}

.flash-error {
  background: rgba(179, 33, 28, 0.18);
  border-color: rgba(179, 33, 28, 0.6);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

th {
  color: var(--amber);
  text-transform: uppercase;
}

.inline-form {
  align-items: end;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.compact-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.admin-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-layout,
.settings-grid,
.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.dashboard-wide {
  grid-column: 1 / -1;
}

.service-row {
  align-items: center;
  display: flex;
  gap: 12px;
}

.service-row img,
.service-logo {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  height: 64px;
  object-fit: cover;
  width: 64px;
}

.check-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-row {
  align-items: center;
  background: #0d0e0e;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 10px;
}

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

.permission-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 18px;
}

.member-card-print {
  background:
    linear-gradient(135deg, rgba(179, 33, 28, 0.26), rgba(8, 9, 9, 0.08)),
    #101111;
  border: 1px solid rgba(246, 240, 232, 0.26);
  color: var(--text);
  min-height: 340px;
  padding: 18px;
}

.mc-card-top {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  text-transform: uppercase;
}

.mc-card-top img {
  height: 58px;
  object-fit: cover;
  width: 58px;
}

.mc-card-top strong,
.mc-card-body h2 {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.mc-card-top span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.mc-card-body {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 260px;
  padding: 16px 0;
}

.mc-card-left {
  display: grid;
  gap: 14px;
  grid-template-columns: 112px 1fr;
}

.mc-card-photo {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  object-fit: cover;
  width: 112px;
}

.mc-card-body h2,
.mc-card-body p {
  margin: 0 0 8px;
}

.mc-card-body dl {
  display: grid;
  gap: 4px 10px;
  grid-template-columns: 74px 1fr;
  margin: 0;
}

.mc-card-body dt {
  color: var(--amber);
  font-weight: 800;
  text-transform: uppercase;
}

.mc-card-body dd {
  margin: 0;
}

.mc-card-art {
  border: 1px solid var(--line);
  min-height: 190px;
  overflow: hidden;
  position: relative;
}

.mc-card-art img {
  filter: saturate(0.9) contrast(1.08);
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  width: 100%;
}

.mc-card-art::after {
  background: linear-gradient(90deg, rgba(16, 17, 17, 0.34), rgba(16, 17, 17, 0.84));
  content: "";
  inset: 0;
  position: absolute;
}

.mc-card-art span {
  bottom: 12px;
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
  position: absolute;
  right: 14px;
  z-index: 1;
}

.member-card-print footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding-top: 10px;
  text-transform: uppercase;
}

.member-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  height: 48px;
  object-fit: cover;
  width: 48px;
}

@media (max-width: 860px) {
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .admin-grid,
  .admin-form-grid,
  .board-grid,
  .inline-form,
  .admin-list,
  .dashboard-layout,
  .settings-grid,
  .card-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .mc-card-body,
  .mc-card-left {
    grid-template-columns: 1fr;
  }

  .mc-card-art {
    min-height: 150px;
  }
}

@media print {
  .admin-top,
  .no-print {
    display: none;
  }

  body {
    background: white;
  }

  .admin-main {
    padding: 0;
  }

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

  .member-card-print {
    break-inside: avoid;
    color: #f6f0e8;
    margin: 0 0 12px;
  }
}
