@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #0d0d0d;
  --bg-alt: #101010;
  --surface: #161616;
  --surface2: #1c1c1c;
  --surface3: #232323;
  --border: #2a2a2a;
  --border-light: #353535;
  --red: #c0392b;
  --red-bright: #e74c3c;
  --red-dim: #7d1f16;
  --text: #e8e8e8;
  --muted: #888;
  --muted2: #5a5a5a;
  --white: #ffffff;
  --green: #27ae60;
  --green-bright: #2ecc71;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; color: inherit; }

/* ===== Layout ===== */
.page { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--white);
  letter-spacing: 0;
}
.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--white);
  line-height: 1;
  text-transform: uppercase;
}
.online-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.3);
  border-radius: 999px;
  margin-left: 6px;
}
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 8px var(--green-bright);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav a {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  transition: color 0.15s;
  position: relative;
  padding: 6px 0;
}
.nav a:hover { color: var(--red-bright); }
.nav a.active { color: var(--red-bright); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--red-bright);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn-discord {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #5865f2;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 700;
  transition: background 0.15s;
}
.btn-discord:hover { background: #4752c4; }
.btn-steam {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-steam:hover { border-color: var(--red); color: var(--white); }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 140px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(192,57,43,0.10), transparent 60%),
    linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-title {
  font-weight: 900;
  font-size: clamp(56px, 10vw, 128px);
  letter-spacing: -2px;
  color: var(--white);
  line-height: 0.95;
  text-transform: uppercase;
}
.hero-title .accent { color: var(--red-bright); }
.hero-sub {
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.2px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.hero-actions {
  margin-top: 38px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 14px 34px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--red-bright); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--red); color: var(--white); background: rgba(192,57,43,0.08); }
.btn-secondary .accent { color: var(--green-bright); font-weight: 700; margin-left: 8px; }

.hero-home {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 24px;
}
.hero-status {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 9px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.hero-status b { color: var(--text); font-weight: 600; }
.hero-status .status-sep { color: var(--muted2); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 8px var(--green-bright);
  animation: pulse 2s infinite;
}

/* ===== Sections ===== */
.section { padding: 50px 0; }
.section-title {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.3px;
  color: var(--white);
  margin-bottom: 24px;
}
.section-title-center {
  text-align: center;
  font-weight: 900;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -1px;
  color: var(--white);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section-title-center .accent { color: var(--red-bright); }
.section-pill {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--red-bright);
  text-transform: uppercase;
  border: 1px solid rgba(231,76,60,0.4);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 18px;
  font-weight: 600;
}
.section-head-center {
  text-align: center;
  margin-bottom: 38px;
}
.section-head-center p {
  color: var(--muted);
  font-size: 14px;
  max-width: 620px;
  margin: 12px auto 0;
}

/* ===== Server card ===== */
.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  max-width: 420px;
}
.server-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.server-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  color: var(--white);
}
.status-online {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--green-bright);
  text-transform: uppercase;
  font-weight: 600;
}
.status-offline {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted2);
  text-transform: uppercase;
  font-weight: 600;
}
.server-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.server-meta b { color: var(--text); font-weight: 500; }
.server-pop {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  letter-spacing: 1px;
}
.server-pop small { font-size: 12px; color: var(--muted); font-family: inherit; letter-spacing: 0; }
.pop-bar {
  flex: 1;
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
}
.pop-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red-bright), var(--red-dim));
  border-radius: 2px;
}

/* ===== Shop ===== */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.cat-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-tab:hover { border-color: var(--red-dim); }
.cat-tab.active {
  background: linear-gradient(180deg, var(--red-bright), var(--red));
  border-color: var(--red);
  color: var(--white);
  font-weight: 600;
}

.cat-group { margin-bottom: 32px; }
.cat-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.product-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.product-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--surface2) center/cover no-repeat;
}
.product-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.product-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.product-price {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--red-bright);
}
.product-buy {
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.4);
  color: var(--red-bright);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.product-buy:hover { background: var(--red); color: var(--white); border-color: var(--red); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.empty-state b { color: var(--text); font-weight: 600; display: block; margin-bottom: 6px; }

/* ===== News ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}
.news-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.news-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2) center/cover no-repeat;
}
.news-body { padding: 16px 18px 18px; }
.news-date { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }
.news-title {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--white);
  line-height: 1.15;
}

/* News modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 2;
}
.modal-close:hover { background: var(--surface2); color: var(--white); }
.modal-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2) center/cover no-repeat;
}
.modal-body { padding: 24px 28px 28px; }
.modal-date { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 8px; text-transform: uppercase; }
.modal-title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 14px;
}
.modal-text { color: var(--text); line-height: 1.6; font-size: 14px; white-space: pre-wrap; }

/* Buy modal */
.buy-modal-content { padding: 28px; }
.buy-modal-content h3 {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 14px;
}
.buy-modal-content p { color: var(--text); margin-bottom: 8px; font-size: 14px; }
.buy-modal-content .price-big {
  font-weight: 800;
  font-size: 32px;
  color: var(--red-bright);
  letter-spacing: 2px;
}
.buy-modal-content .note { color: var(--muted); font-size: 12px; margin-top: 16px; }

/* ===== Rules ===== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}
.rule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
}
.rule-num {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--red-bright);
  margin-bottom: 4px;
}
.rule-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}
.rule-desc { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.rule-list { list-style: none; padding: 0; }
.rule-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.45;
}
.rule-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  background: var(--red-bright);
  border-radius: 50%;
}
.rules-section { margin-bottom: 40px; }
.rules-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.rules-section-icon {
  width: 42px; height: 42px;
  background: rgba(231,76,60,0.15);
  border: 1px solid rgba(231,76,60,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.rules-section-title {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--white);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 70px;
  padding: 28px 0 24px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-links a {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }
.footer-meta { font-size: 11px; color: var(--muted2); letter-spacing: 0.5px; }
.footer-meta a { text-decoration: underline; }

/* ===== Coming soon / placeholders ===== */
.placeholder-wrap {
  text-align: center;
  padding: 80px 24px;
}
.placeholder-icon {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

/* ===== Killfeed (placeholder) ===== */
.kf-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 30px;
}
.kf-toggle button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 9px 24px;
  border-radius: 999px;
  cursor: pointer;
}
.kf-toggle button.active {
  background: linear-gradient(180deg, var(--red-bright), var(--red));
  color: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    gap: 16px;
    z-index: 49;
  }
  .online-chip { display: none; }
}
@media (max-width: 540px) {
  .hero { padding: 60px 0 50px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .news-grid { grid-template-columns: 1fr; }
}

/* ===== Inline Admin UI ===== */
.admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--red);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}
.admin-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.admin-bar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}
.admin-bar-text { flex: 1; letter-spacing: 0.3px; }
.admin-bar-logout {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-weight: 600;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.admin-bar-logout:hover { background: rgba(0,0,0,0.5); }
body:has(#zaruba-admin-bar) { padding-top: 36px; }

.admin-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 55;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 14px 22px 14px 18px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(192,57,43,0.45);
  transition: background 0.15s, transform 0.15s;
}
.admin-fab:hover { background: var(--red-bright); transform: translateY(-1px); }
.admin-fab-plus {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-card-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.product-card:hover .admin-card-controls,
.news-card:hover .admin-card-controls,
.admin-card-controls:focus-within { opacity: 1; }
.admin-icon-btn {
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.admin-icon-btn:hover { background: var(--red); border-color: var(--red); }
.admin-icon-btn.danger:hover { background: #b91d10; border-color: #b91d10; }

.product-card, .news-card { position: relative; }

.admin-form-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  overflow-y: auto;
}
.admin-form-modal.open { display: flex; }
.admin-form-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}
.admin-form-card h3 {
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  margin-bottom: 18px;
  padding-right: 30px;
}
.admin-form-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  width: 30px;
  height: 30px;
}
.admin-form-close:hover { color: var(--white); }
.admin-form-row { margin-bottom: 14px; }
.admin-form-row label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}
.admin-form-row input,
.admin-form-row textarea,
.admin-form-row select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.admin-form-row input:focus,
.admin-form-row textarea:focus,
.admin-form-row select:focus { border-color: var(--red); }
.admin-form-row textarea { min-height: 90px; resize: vertical; }
.admin-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form-row-2 > div { margin-bottom: 0; }
.admin-help { font-size: 11px; color: var(--muted); margin-top: 4px; }
.admin-img-preview {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--surface2) center/cover no-repeat;
  border: 1px dashed var(--border);
  border-radius: 6px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.admin-form-err {
  display: none;
  color: var(--red-bright);
  font-size: 13px;
  margin-top: 6px;
}
.admin-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

/* ===== User menu (Steam auth) ===== */
.user-menu { position: relative; }
.user-trigger {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.user-trigger:hover { border-color: var(--red); background: var(--surface2); }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-block;
  background: var(--surface2);
  object-fit: cover;
}
.user-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--white);
  background: var(--red);
}
.user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-caret { font-size: 10px; color: var(--muted); }
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  display: none;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a, .user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface2); color: var(--white); }
.user-dropdown button { color: var(--red-bright); }

/* ===== Cabinet page ===== */
.cabinet-page { padding: 60px 24px 80px; max-width: 1100px; margin: 0 auto; }
.cabinet-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}
@media (max-width: 820px) { .cabinet-grid { grid-template-columns: 1fr; } }

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--surface2);
  object-fit: cover;
}
.profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 36px;
  color: var(--white);
  background: var(--red);
}
.profile-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 4px;
}
.profile-steam {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  word-break: break-all;
  margin-bottom: 18px;
}
.profile-balance {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.profile-balance .label {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.profile-balance .amount {
  font-weight: 800;
  font-size: 24px;
  color: var(--white);
}
.profile-actions { display: flex; flex-direction: column; gap: 8px; }
.profile-actions .btn-secondary { width: 100%; padding: 11px; font-size: 13px; }
.profile-actions .btn-primary { width: 100%; padding: 11px; font-size: 13px; }
.admin-badge {
  display: inline-block;
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.35);
  color: var(--red-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.cab-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
}
.cab-section h2 {
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 16px;
}
.cab-section .cab-empty { color: var(--muted); font-size: 13px; padding: 14px 0; }

.owner-badge {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: var(--white);
  border-color: transparent;
}

/* ===== Forms ===== */
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.form-input:focus { border-color: var(--red); }
.form-error {
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.35);
  color: var(--red-bright);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 10px;
}

/* ===== Ticket list ===== */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.ticket-card:hover { border-color: var(--red); background: rgba(192,57,43,0.06); }
.ticket-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ticket-subject {
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-card-meta { font-size: 12px; color: var(--muted); }
.ticket-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.badge-open { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.badge-closed { background: rgba(120,120,120,0.15); color: var(--muted); border: 1px solid var(--border); }

/* ===== Chat modal ===== */
.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
}
.chat-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(640px, 95vw);
  height: min(680px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.chat-subject {
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  margin-bottom: 4px;
}
.chat-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat-actions { display: flex; gap: 8px; align-items: center; }
.chat-status-btn { padding: 6px 12px !important; font-size: 11px !important; }
.chat-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 10px;
  border-radius: 6px;
}
.chat-close:hover { background: var(--surface2); color: var(--white); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 80%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  align-self: flex-start;
}
.chat-msg-mine {
  align-self: flex-end;
  background: rgba(192,57,43,0.15);
  border-color: rgba(192,57,43,0.3);
}
.chat-msg-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.chat-msg-author { font-weight: 600; color: var(--text); }
.chat-msg-time { font-size: 10px; }
.chat-msg-body {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--white);
}
.chat-admin-mark {
  background: var(--red);
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 1px 6px;
  border-radius: 999px;
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  align-items: flex-end;
}
.chat-input textarea {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 120px;
}
.chat-input textarea:focus { border-color: var(--red); }
.chat-input .btn-primary { white-space: nowrap; padding: 10px 18px; font-size: 13px; }
