/* =========================================================================
   NOVACRAFT — design system
   ========================================================================= */

:root {
  --bg: #06080f;
  --bg-soft: #0b1020;
  --bg-card: rgba(17, 23, 40, 0.72);
  --bg-card-solid: #111728;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;
  --text-dim: #9aa6c4;
  --text-mute: #6b7899;
  --orange: #ff8a1f;
  --gold: #ffc247;
  --blue: #2f6bff;
  --blue-deep: #14224a;
  --green: #35d07f;
  --red: #ff4d5e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(255, 138, 31, 0.16), transparent 60%),
    radial-gradient(800px 600px at 88% 0%, rgba(47, 107, 255, 0.18), transparent 62%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 194, 71, 0.08), transparent 60%),
    linear-gradient(180deg, #070a13 0%, #06080f 45%, #05070d 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; color: var(--text-dim); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.section { padding: 76px 0; position: relative; }
.section--tight { padding: 44px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: linear-gradient(90deg, var(--orange), var(--gold)); border-radius: 2px; }

.section-head { max-width: 720px; margin-bottom: 38px; }
.section-head p { font-size: 1.02rem; }

.gradient-text {
  background: linear-gradient(100deg, #fff 10%, var(--gold) 55%, var(--orange) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------- buttons */
.btn {
  --btn-bg: linear-gradient(135deg, var(--orange), #ff6a00);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn-bg); color: #140a00; font-weight: 700; font-size: 0.94rem;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 0.2s;
  box-shadow: 0 12px 30px -12px rgba(255, 138, 31, 0.85);
  white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -14px rgba(255, 138, 31, 0.95); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost {
  background: rgba(255, 255, 255, 0.04); color: var(--text);
  border-color: var(--line-strong); box-shadow: none;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.09); box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.9); }
.btn--discord { background: linear-gradient(135deg, #5865f2, #404eed); color: #fff; box-shadow: 0 12px 30px -14px rgba(88, 101, 242, 0.9); }
.btn--blue { background: linear-gradient(135deg, #3d7bff, #1d4ed8); color: #fff; box-shadow: 0 12px 30px -14px rgba(47, 107, 255, 0.9); }
.btn--danger { background: linear-gradient(135deg, #ff5566, #d31f34); color: #fff; box-shadow: none; }
.btn--sm { padding: 8px 15px; font-size: 0.82rem; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(6, 8, 15, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: 0.04em; }
.brand img { height: 38px; width: auto; }
.brand__word { font-size: 1.16rem; letter-spacing: 0.14em; }
.brand__word span { color: var(--orange); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 9px 14px; border-radius: 10px; font-size: 0.9rem; font-weight: 600;
  color: var(--text-dim); transition: color 0.18s, background 0.18s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 138, 31, 0.12); }
.header-cta { display: flex; align-items: center; gap: 10px; margin-left: 8px; }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ----------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
  opacity: 0.42; filter: saturate(1.05);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 55%, transparent 100%);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px; align-items: center;
}
.hero__logo { height: 92px; width: auto; margin-bottom: 22px; filter: drop-shadow(0 12px 30px rgba(255, 138, 31, 0.35)); }
.hero h1 { margin-bottom: 14px; }
.hero__sub { font-size: clamp(1rem, 1.6vw, 1.22rem); color: var(--text-dim); max-width: 46ch; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.85rem; color: var(--text-mute); }
.hero__meta strong { color: var(--text); }

.ip-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 0.86rem;
}
.ip-pill code { color: var(--gold); }
.ip-pill button {
  border: 0; border-radius: 999px; padding: 6px 13px; cursor: pointer;
  background: rgba(255, 138, 31, 0.16); color: var(--gold); font-weight: 700; font-size: 0.76rem;
  transition: background 0.18s, color 0.18s;
}
.ip-pill button:hover { background: var(--orange); color: #140a00; }

/* --------------------------------------------------------- status card */
.status-card {
  background: linear-gradient(160deg, rgba(23, 31, 54, 0.92), rgba(11, 16, 32, 0.92));
  border: 1px solid var(--line-strong); border-radius: 22px; padding: 26px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.status-card::after {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255, 138, 31, 0.22), transparent 70%);
  pointer-events: none;
}
.status-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.status-card__title { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-mute); font-weight: 700; }

.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid transparent;
}
.badge--online { background: rgba(53, 208, 127, 0.14); color: #5ff0a4; border-color: rgba(53, 208, 127, 0.35); }
.badge--offline { background: rgba(255, 77, 94, 0.13); color: #ff8b96; border-color: rgba(255, 77, 94, 0.32); }
.badge--unknown { background: rgba(255, 194, 71, 0.12); color: var(--gold); border-color: rgba(255, 194, 71, 0.3); }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--online .badge__dot { animation: pulse 1.9s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(53, 208, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0); }
}

.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.status-cell {
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.status-cell__label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); font-weight: 700; margin-bottom: 4px; }
.status-cell__value { font-size: 1.32rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.status-cell__value small { font-size: 0.78rem; color: var(--text-mute); font-weight: 600; }
.status-foot { margin-top: 16px; font-size: 0.74rem; color: var(--text-mute); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.status-card.is-loading .status-cell__value { color: var(--text-mute); }

.progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 14px; }
.progress__bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--gold)); transition: width 0.6s ease; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  backdrop-filter: blur(8px);
}
.card:hover { transform: translateY(-3px); border-color: rgba(255, 138, 31, 0.32); box-shadow: 0 22px 50px -30px rgba(0, 0, 0, 0.95); }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* -------------------------------------------------------- announcements */
.ann-card {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.ann-card:hover { transform: translateY(-4px); border-color: rgba(255, 138, 31, 0.34); box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.95); }
.ann-card__media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #16203a, #0b1020); position: relative; overflow: hidden; }
.ann-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ann-card:hover .ann-card__media img { transform: scale(1.05); }
.ann-card__media--empty { display: grid; place-items: center; color: var(--text-mute); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.ann-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ann-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-card h3 { font-size: 1.08rem; margin: 0; }
.ann-card h3 a:hover { color: var(--gold); }
.ann-card p { margin: 0; font-size: 0.9rem; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ann-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.76rem; color: var(--text-mute); padding-top: 6px; }

.tag {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(47, 107, 255, 0.16); color: #8fb2ff; border: 1px solid rgba(47, 107, 255, 0.3);
}
.tag--IMPORTANT { background: rgba(255, 77, 94, 0.14); color: #ff8b96; border-color: rgba(255, 77, 94, 0.32); }
.tag--UPDATES { background: rgba(47, 107, 255, 0.16); color: #8fb2ff; border-color: rgba(47, 107, 255, 0.32); }
.tag--EVENTS { background: rgba(255, 138, 31, 0.16); color: #ffb066; border-color: rgba(255, 138, 31, 0.34); }
.tag--COMMUNITY { background: rgba(53, 208, 127, 0.14); color: #6ff0ac; border-color: rgba(53, 208, 127, 0.3); }
.tag--MAINTENANCE { background: rgba(255, 194, 71, 0.14); color: var(--gold); border-color: rgba(255, 194, 71, 0.3); }
.tag--pin { background: rgba(255, 255, 255, 0.08); color: var(--text); border-color: var(--line-strong); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 0.82rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text-dim);
  transition: all 0.18s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: rgba(255, 138, 31, 0.16); border-color: rgba(255, 138, 31, 0.45); color: var(--gold); }

/* --------------------------------------------------------------- staff */
.staff-card { text-align: center; padding: 26px 20px; }
.staff-card__avatar {
  width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 20px; overflow: hidden;
  border: 2px solid rgba(255, 138, 31, 0.35); background: linear-gradient(160deg, #1a2440, #0d1324);
  display: grid; place-items: center; font-weight: 900; font-size: 1.6rem; color: var(--gold);
  image-rendering: pixelated;
}
.staff-card__avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.staff-card__name { font-size: 1.02rem; font-weight: 800; margin-bottom: 2px; }
.staff-card__mc { font-family: var(--mono); font-size: 0.78rem; color: var(--text-mute); margin-bottom: 10px; }
.staff-card__rank {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.68rem;
  font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px;
  background: rgba(255, 194, 71, 0.12); color: var(--gold); border: 1px solid rgba(255, 194, 71, 0.28);
}
.staff-card p { font-size: 0.85rem; margin-bottom: 12px; }
.staff-card__discord { font-size: 0.78rem; color: #8fb2ff; font-family: var(--mono); }

.rank-group { margin-bottom: 42px; }
.rank-group__title {
  display: flex; align-items: center; gap: 12px; font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-mute); font-weight: 800; margin-bottom: 18px;
}
.rank-group__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------- gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: #0b1020; aspect-ratio: 4 / 3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease, filter 0.3s; }
.gallery-item:hover img { transform: scale(1.06); filter: brightness(0.75); }
.gallery-item__cap {
  position: absolute; inset: auto 0 0 0; padding: 14px; font-size: 0.82rem; font-weight: 600;
  background: linear-gradient(0deg, rgba(3, 5, 10, 0.92), transparent);
  transform: translateY(6px); opacity: 0; transition: all 0.25s ease;
}
.gallery-item:hover .gallery-item__cap { transform: translateY(0); opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
  background: rgba(3, 5, 10, 0.94); padding: 24px;
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 82vh; border-radius: 14px; box-shadow: var(--shadow); }
.lightbox__close {
  position: absolute; top: 20px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong); cursor: pointer; font-size: 1.2rem;
}
.lightbox__cap { margin-top: 14px; color: var(--text-dim); font-size: 0.9rem; text-align: center; }

/* --------------------------------------------------------------- rules */
.rules-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 34px; align-items: start; }
.rules-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; }
.rules-nav a {
  padding: 10px 14px; border-radius: 10px; font-size: 0.88rem; font-weight: 600; color: var(--text-dim);
  border-left: 2px solid transparent; transition: all 0.18s;
}
.rules-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); border-left-color: var(--orange); }
.rule-block { margin-bottom: 40px; scroll-margin-top: 100px; }
.rule-item {
  display: flex; gap: 16px; padding: 18px 20px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.rule-item:hover { border-color: rgba(255, 138, 31, 0.3); background: rgba(255, 138, 31, 0.04); }
.rule-item__num {
  flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 138, 31, 0.14); color: var(--gold); font-weight: 800; font-size: 0.82rem;
}
.rule-item h4 { margin: 0 0 4px; font-size: 0.98rem; }
.rule-item p { margin: 0; font-size: 0.9rem; }

/* -------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 54px 0 26px; margin-top: 40px; background: rgba(4, 6, 12, 0.6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
.footer-grid h4 { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-grid a { font-size: 0.88rem; color: var(--text-dim); transition: color 0.18s; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { font-size: 0.85rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-mute);
}

/* --------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong); color: var(--text); font-size: 0.92rem;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(255, 138, 31, 0.6); background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.14);
}
.textarea { min-height: 150px; resize: vertical; font-family: var(--font); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field__error { color: #ff8b96; font-size: 0.78rem; margin-top: 5px; display: none; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: rgba(255, 77, 94, 0.6); }
.field.has-error .field__error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; color: var(--text-dim); cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--orange); }

/* --------------------------------------------------------------- alerts */
.alert {
  display: none; padding: 12px 16px; border-radius: 11px; font-size: 0.86rem; margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert.is-visible { display: block; }
.alert--error { background: rgba(255, 77, 94, 0.12); border-color: rgba(255, 77, 94, 0.35); color: #ff9ba4; }
.alert--success { background: rgba(53, 208, 127, 0.12); border-color: rgba(53, 208, 127, 0.35); color: #6ff0ac; }
.alert--info { background: rgba(47, 107, 255, 0.12); border-color: rgba(47, 107, 255, 0.35); color: #9dbcff; }

/* -------------------------------------------------------------- states */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 10px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skeleton--card { height: 300px; border-radius: var(--radius); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-mute); }
.empty-state h3 { color: var(--text-dim); }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--gold); animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 13px 18px; border-radius: 12px; font-size: 0.87rem; font-weight: 600;
  background: #141c31; border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  animation: toastIn 0.28s ease; max-width: 340px;
}
.toast--success { border-color: rgba(53, 208, 127, 0.45); color: #6ff0ac; }
.toast--error { border-color: rgba(255, 77, 94, 0.45); color: #ff9ba4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- page hero */
.page-hero { padding: 64px 0 34px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 10px; }
.page-hero p { max-width: 62ch; }

/* ---------------------------------------------------------------- admin */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.admin-side {
  border-right: 1px solid var(--line); padding: 22px 16px; background: rgba(8, 11, 20, 0.9);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 0 8px; font-weight: 900; letter-spacing: 0.1em; }
.admin-side__brand img { height: 30px; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px;
  border-radius: 10px; background: transparent; border: 0; cursor: pointer; color: var(--text-dim);
  font-size: 0.88rem; font-weight: 600; transition: all 0.16s;
}
.admin-nav button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.admin-nav button.is-active { background: rgba(255, 138, 31, 0.14); color: var(--gold); }
.admin-main { padding: 30px 34px 80px; min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; margin: 0; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 0.84rem; color: var(--text-dim); }
.admin-user strong { color: var(--text); }
.admin-panel { display: none; }
.admin-panel.is-active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat {
  padding: 18px; border-radius: var(--radius-sm); background: var(--bg-card);
  border: 1px solid var(--line);
}
.stat__label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); font-weight: 700; }
.stat__value { font-size: 1.7rem; font-weight: 800; margin-top: 4px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 620px; }
table.data th {
  text-align: left; padding: 12px 14px; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-mute); border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(255,255,255,0.02);
}
table.data td { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255, 255, 255, 0.02); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; }
.pill--on { background: rgba(53, 208, 127, 0.14); color: #6ff0ac; }
.pill--off { background: rgba(255, 255, 255, 0.07); color: var(--text-mute); }

.modal {
  position: fixed; inset: 0; z-index: 250; display: none; place-items: center; padding: 20px;
  background: rgba(3, 5, 10, 0.82); backdrop-filter: blur(4px);
}
.modal.is-open { display: grid; }
.modal__box {
  width: min(680px, 100%); max-height: 88vh; overflow-y: auto; background: #0e1424;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal__head h2 { font-size: 1.2rem; margin: 0; }
.modal__close { background: transparent; border: 0; color: var(--text-mute); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: 20px; padding: 34px; box-shadow: var(--shadow); }
.login-card__logo { height: 54px; margin: 0 auto 20px; }
.login-card h1 { font-size: 1.35rem; text-align: center; margin-bottom: 6px; }
.login-card > p { text-align: center; font-size: 0.86rem; margin-bottom: 24px; }

/* ------------------------------------------------------------ utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999; padding: 12px 18px;
  background: var(--orange); color: #140a00; font-weight: 700; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 22px 18px 70px; }
}

@media (max-width: 760px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.is-open .nav {
    display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 2px; padding: 14px 18px 20px; background: rgba(8, 11, 20, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .site-header.is-open .header-cta {
    display: flex; position: absolute; top: calc(72px + 250px); left: 0; right: 0;
    padding: 0 18px 18px; background: rgba(8, 11, 20, 0.98); flex-direction: column; align-items: stretch;
  }
  .section { padding: 54px 0; }
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding: 52px 0 40px; }
  .hero__logo { height: 66px; }
  .field-row { grid-template-columns: 1fr; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .admin-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
