* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0b0b0b;
  color: #f2f2f2;
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: #fff;
}

.admin-top {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid #252525;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

.admin-top nav {
  display: flex;
  gap: 16px;
  flex: 1;
}

.admin-top nav a,
.button-link {
  color: #ddd;
  text-decoration: none;
}

.admin-top nav a.active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.admin-top button,
button,
.button-link {
  border: 1px solid #3a3a3a;
  background: #f4f4f4;
  color: #050505;
  border-radius: 6px;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 600;
}

.button-link {
  display: inline-block;
}

.admin-main {
  padding: 28px 24px 60px;
  max-width: 1280px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 22px;
  font-size: 28px;
  font-weight: 600;
}

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

.admin-intro {
  color: #aaa;
  max-width: 620px;
}

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

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

.quick-card {
  background: #151515;
  border: 1px solid #262626;
  border-radius: 8px;
  color: #fff;
  display: block;
  padding: 18px;
  text-decoration: none;
}

.quick-card:hover {
  border-color: #555;
}

.quick-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.quick-card span,
.field-help,
.page-card-header p {
  color: #aaa;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metrics div,
.panel,
.photo-row {
  border: 1px solid #262626;
  background: #151515;
  border-radius: 8px;
}

.metrics div {
  padding: 18px;
}

.metrics strong {
  display: block;
  font-size: 30px;
}

.metrics span {
  display: block;
  color: #aaa;
  margin-top: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #151515;
  border: 1px solid #262626;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #262626;
}

th {
  color: #aaa;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 14px;
}

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

.notice {
  background: #102f1c;
  border: 1px solid #2b7545;
  border-radius: 6px;
  color: #fff;
  padding: 12px 14px;
}

.page-editor-list {
  display: grid;
  gap: 18px;
}

.page-card {
  background: #151515;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 18px;
}

.page-card-header {
  margin-bottom: 18px;
}

.page-card-header h2,
.content-preview h3 {
  margin-bottom: 6px;
}

.eyebrow {
  color: #888;
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.page-editor-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.page-form {
  min-width: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

.content-preview {
  background: #050505;
  border: 1px solid #303030;
  border-radius: 8px;
  color: #eee;
  max-height: 440px;
  overflow: auto;
  padding: 16px;
}

.content-preview div {
  color: #d8d8d8;
}

label {
  display: block;
  color: #bbb;
  margin-bottom: 14px;
}

input,
textarea {
  width: 100%;
  display: block;
  margin-top: 6px;
  border: 1px solid #343434;
  background: #050505;
  color: #fff;
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
}

textarea {
  resize: vertical;
}

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

.check input {
  width: auto;
  margin: 0;
}

.inline-upload {
  display: flex;
  gap: 12px;
  align-items: end;
}

.photo-admin-list {
  display: grid;
  gap: 12px;
}

.photo-row {
  display: grid;
  grid-template-columns: 110px minmax(160px, 1.2fr) 90px 80px minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
}

.photo-row img {
  width: 110px;
  height: 72px;
  object-fit: cover;
}

.error {
  background: #3a1010;
  border: 1px solid #6d2828;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-box {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #262626;
  background: #151515;
  border-radius: 8px;
  padding: 24px;
}

.login-box h1 {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .admin-top nav {
    flex-wrap: wrap;
  }

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

  .quick-actions,
  .page-editor-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    display: block;
  }

  .photo-row {
    grid-template-columns: 90px 1fr;
  }

  .photo-row img {
    width: 90px;
    height: 64px;
  }
}
