:root {
  color-scheme: dark;
  --bg: #040706;
  --panel: #0a100e;
  --panel-2: #0e1512;
  --line: rgba(226, 205, 169, .12);
  --text: #eee9df;
  --muted: #9aa49e;
  --gold: #d39a3f;
  --green: #68b795;
  --red: #df6c5e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(3, 6, 5, .9), rgba(3, 6, 5, .98)),
    url("/assets/site-wallpaper.jpg") center top/cover fixed;
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
}
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.admin-shell { width: min(1500px, 100%); min-height: 100vh; margin: auto; padding: 22px; }
.admin-shell::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 360px;
  background:
    linear-gradient(180deg, rgba(4, 8, 7, .2), var(--bg)),
    radial-gradient(ellipse at 22% 0, rgba(89, 123, 94, .16), transparent 48%),
    radial-gradient(ellipse at 82% 10%, rgba(181, 99, 37, .1), transparent 42%);
  pointer-events: none;
}
.admin-login {
  width: min(470px, calc(100% - 32px));
  margin: 0;
  padding: 38px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 12, .96);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.admin-login-shell {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(2,7,6,.68), rgba(2,7,6,.93)),
    url("/assets/site-wallpaper.jpg") center/cover fixed;
}
.admin-login-logout {
  width: 100%;
  margin-top: 9px;
}
.admin-login-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(211, 110, 43, .24));
}
.admin-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #171007;
  border-radius: 5px;
  background: var(--gold);
  font-weight: 900;
}
.admin-eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-login h1 { margin: 13px 0 10px; font: 700 34px/1 Georgia, serif; }
.admin-login > p:not(.admin-eyebrow) { margin: 0 auto 25px; color: var(--muted); line-height: 1.6; }
.admin-primary, .admin-back {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 800;
}
.admin-primary { color: #120d07; background: var(--gold); }
.admin-back { margin-top: 9px; color: var(--muted); border: 1px solid var(--line); }
.admin-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 12, 10, .97), rgba(12, 20, 16, .92)),
    url("/assets/site-wallpaper.jpg") center 18%/cover;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.admin-brand, .admin-user { display: flex; align-items: center; gap: 11px; }
.admin-brand > img { width: 44px; height: 44px; object-fit: contain; }
.admin-brand strong {
  color: #f1e7d7;
  font: 700 21px/1 Georgia, serif;
  text-transform: uppercase;
}
.admin-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.admin-user button, .admin-tabs button, .admin-action {
  min-height: 36px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #0c1311;
  cursor: pointer;
}
.admin-user button { padding: 0 12px; }
#refreshButton { width: 36px; padding: 0; font-size: 20px; }
.admin-user button:hover, .admin-tabs button:hover, .admin-action:hover {
  color: var(--text);
  border-color: rgba(211,154,63,.45);
}

.admin-site-shell {
  min-height: 100vh;
  margin-top: 0;
  overflow: visible;
}

.admin-site-header {
  top: 0;
}

.admin-site-header .admin-nav {
  justify-content: center;
}

.admin-site-header .admin-nav > span {
  position: relative;
  color: #f2d9ad;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-site-header .admin-nav > span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -12px;
  left: 0;
  height: 1px;
  background: #d39a3f;
  box-shadow: 0 0 9px rgba(211,154,63,.5);
}

.admin-site-header .admin-user {
  justify-content: flex-end;
}

.admin-hero {
  position: relative;
  min-height: 390px;
  margin: -22px -22px 0;
  padding: 72px clamp(24px, 5vw, 68px) 56px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 38px;
  border-bottom: 1px solid rgba(211,154,63,.2);
  background:
    linear-gradient(90deg, rgba(2,7,6,.97) 0%, rgba(2,7,6,.78) 48%, rgba(2,7,6,.42) 100%),
    linear-gradient(0deg, #030808 0%, transparent 46%),
    url("/assets/site-wallpaper.jpg") center 30%/cover;
}

.admin-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(211,154,63,.55), transparent);
}

.admin-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.admin-hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: .88;
  text-transform: uppercase;
}

.admin-hero h1 span,
.admin-hero h1 strong {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.admin-hero h1 span {
  color: #f5f0e7;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  letter-spacing: 0;
}

.admin-hero h1 strong {
  margin-top: 8px;
  padding-right: .08em;
  font-size: clamp(4.3rem, 8vw, 7.1rem);
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff3d2 0%, #e2ba78 48%, #a84d1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 32px rgba(202,74,22,.22));
}

.admin-hero__copy > p:last-child {
  max-width: 590px;
  margin: 23px 0 0;
  color: #b0b9b3;
  font-size: .9rem;
  line-height: 1.7;
}

.admin-hero__state {
  position: relative;
  z-index: 1;
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border-left: 1px solid rgba(211,154,63,.4);
  background: rgba(3,9,7,.68);
  backdrop-filter: blur(8px);
}

.admin-hero__state > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5fd39d;
  box-shadow: 0 0 14px rgba(95,211,157,.65);
}

.admin-hero__state span,
.admin-hero__state strong {
  display: block;
}

.admin-hero__state span {
  color: #7e8a84;
  font-size: .62rem;
  text-transform: uppercase;
}

.admin-hero__state strong {
  margin-top: 3px;
  color: #d8dfda;
  font-size: .78rem;
}
.admin-status { min-height: 28px; padding: 8px 2px 0; color: var(--muted); font-size: 12px; }
.admin-status.is-error { color: var(--red); }
.admin-metrics {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 8px;
}
.admin-metric {
  min-height: 78px;
  padding: 14px;
  border-left: 2px solid var(--gold);
  background: linear-gradient(145deg, rgba(14, 23, 19, .96), rgba(7, 12, 10, .96));
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
}
.admin-metric span { display: block; color: var(--muted); font-size: 11px; }
.admin-metric strong { display: block; margin-top: 7px; font-size: 24px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.admin-tabs button { flex: 0 0 auto; padding: 0 16px; }
.admin-tabs button.active { color: #160f06; border-color: var(--gold); background: var(--gold); }
.admin-pagination {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #080e0c;
}
.admin-pagination:empty { display: none; }
.admin-pagination button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  color: #aab4ae;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #0c1411;
  cursor: pointer;
}
.admin-pagination button:hover,
.admin-pagination button.active {
  color: #171007;
  border-color: var(--gold);
  background: var(--gold);
}
.admin-pagination button:disabled {
  opacity: .32;
  cursor: not-allowed;
}
.admin-pagination > span {
  margin-left: 8px;
  color: #7f8a84;
  font-size: 11px;
}
.admin-workspace {
  border: 1px solid var(--line);
  background: rgba(7, 12, 10, .96);
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.admin-workspace > header {
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.admin-workspace h2 { margin: 0; font: 700 24px/1 Georgia, serif; }
.admin-search input {
  width: min(320px, 38vw);
  min-height: 39px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: #0b1210;
}
.admin-search input:focus { border-color: rgba(211,154,63,.55); }
.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 13px;
}
.admin-table th { color: #7f8a84; background: #080e0c; font-size: 10px; text-transform: uppercase; }
.admin-table td { color: #b8c1bc; }
.admin-table td:first-child { color: var(--text); font-weight: 700; }
.admin-table tr:hover td { background: rgba(255,255,255,.018); }
.admin-pill {
  display: inline-flex;
  padding: 4px 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-pill.is-active, .admin-pill.is-approved { color: var(--green); border-color: rgba(104,183,149,.32); }
.admin-pill.is-deleted, .admin-pill.is-rejected, .admin-pill.is-blocked { color: var(--red); border-color: rgba(223,108,94,.32); }
.admin-actions { display: flex; justify-content: flex-end; gap: 5px; }
.admin-action { min-height: 31px; padding: 0 9px; font-size: 11px; }
.admin-action.is-danger { color: var(--red); }
.admin-action.is-positive { color: var(--green); }
.admin-action.is-view { color: #e3bd77; }
.admin-empty { padding: 42px !important; text-align: center !important; color: var(--muted) !important; }
.admin-dialog {
  width: min(440px, calc(100% - 30px));
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b1210;
}
.admin-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.admin-dialog form { padding: 25px; }
.admin-dialog h2 { margin: 8px 0; font-size: 21px; }
.admin-dialog p:not(.admin-eyebrow) { color: var(--muted); line-height: 1.5; }
.admin-dialog form > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.admin-secondary, .admin-danger { min-height: 38px; padding: 0 14px; border-radius: 5px; cursor: pointer; }
.admin-secondary { color: var(--muted); border: 1px solid var(--line); background: transparent; }
.admin-danger { color: #fff; border: 1px solid #9c493f; background: #79352e; }
.admin-detail-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: min(880px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(211,154,63,.3);
  border-radius: 8px;
  background: #07100d;
  box-shadow: 0 35px 100px rgba(0,0,0,.72);
}
.admin-detail-dialog::backdrop {
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(5px);
}
.admin-detail {
  max-height: min(880px, calc(100vh - 28px));
  overflow-y: auto;
}
.admin-detail > header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,16,13,.96);
  backdrop-filter: blur(12px);
}
.admin-detail h2 {
  margin: 0;
  color: #f1e9dc;
  font: 700 clamp(20px, 3vw, 29px)/1.08 Georgia, serif;
}
.admin-detail > header button {
  width: 38px;
  height: 38px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #0b1411;
  font-size: 25px;
  cursor: pointer;
}
.admin-detail-media {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020403;
}
.admin-detail-media img,
.admin-detail-media video {
  width: 100%;
  max-height: 420px;
  display: block;
  object-fit: contain;
}
.admin-detail-media .admin-detail-avatar {
  width: 124px;
  height: 124px;
  margin: 28px auto;
  border: 1px solid rgba(211,154,63,.28);
  border-radius: 50%;
  object-fit: cover;
}
.admin-detail-body {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-detail-field {
  min-height: 65px;
  padding: 12px;
  border-left: 1px solid rgba(211,154,63,.3);
  background: rgba(255,255,255,.025);
}
.admin-detail-field span {
  display: block;
  margin-bottom: 6px;
  color: #7f8b84;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-detail-field strong {
  display: block;
  color: #cbd2cd;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.admin-detail-copy {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  padding: 17px;
  color: #bac4be;
  border: 1px solid var(--line);
  background: rgba(2,6,5,.46);
  line-height: 1.65;
  white-space: pre-wrap;
}
.admin-detail-copy--news {
  max-height: 340px;
  overflow-y: auto;
}
.admin-detail > footer {
  min-height: 67px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #080e0c;
}
.admin-detail > footer:empty { display: none; }
.admin-detail > footer a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #171007;
  border-radius: 5px;
  background: var(--gold);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 1050px) {
  .admin-metrics { grid-template-columns: repeat(4, 1fr); }
  .admin-site-header {
    grid-template-columns: minmax(190px, 1fr) auto;
  }
  .admin-site-header .admin-nav {
    display: none;
  }
}
@media (max-width: 650px) {
  .admin-shell { padding: 10px; }
  .admin-header, .admin-workspace > header { align-items: flex-start; flex-direction: column; }
  .admin-site-header {
    min-height: 66px;
    padding: 0 10px;
    grid-template-columns: auto 1fr;
    gap: 8px;
  }
  .admin-site-header .brand {
    width: 43px;
  }
  .admin-site-header .brand img {
    width: 43px;
    height: 43px;
  }
  .admin-site-header .brand span,
  .admin-site-header .admin-user > span {
    display: none;
  }
  .admin-site-header .admin-user {
    width: auto;
    justify-self: end;
    gap: 5px;
  }
  .admin-site-header .admin-user button {
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }
  .admin-hero {
    min-height: 350px;
    margin: -10px -10px 0;
    padding: 58px 20px 42px;
  }
  .admin-hero h1 span {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }
  .admin-hero h1 strong {
    font-size: clamp(3.5rem, 17vw, 4.7rem);
  }
  .admin-hero__state {
    display: none;
  }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-search, .admin-search input { width: 100%; }
  .admin-detail-body { grid-template-columns: 1fr; }
}
