* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0d0d0d;
  color: #ffffff;
  overflow: auto;
  font-size: 14px;
  line-height: 1.4;
  scrollbar-color: rgba(120, 120, 120, 0.7) rgba(20, 20, 20, 0.9);
  scrollbar-width: thin;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6vw 12px;
  border-bottom: 1px solid rgba(60, 60, 60, 0.6);
  background: rgba(15, 15, 15, 0.8);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.brand-text span {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

.user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(80, 80, 80, 0.6);
  background: rgba(35, 35, 35, 0.8);
  font-size: 12px;
  color: #d1d5db;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(80, 80, 80, 0.6);
  object-fit: cover;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  margin-right: 6px;
  font-size: 11px;
}

.shell {
  padding: 18px 6vw 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - 72px);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 0 2px;
}

.tab {
  flex: 1;
  background: rgba(35, 35, 35, 0.8);
  border: 1px solid rgba(60, 60, 60, 0.4);
  border-radius: 6px;
  color: #9ca3af;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab.active {
  background: rgba(45, 45, 45, 0.9);
  color: #ffffff;
  border-color: rgba(80, 80, 80, 0.6);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #f97316;
  color: #0d0d0d;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.tab:hover:not(.active) {
  background: rgba(40, 40, 40, 0.9);
  color: #cccccc;
}

.view {
  display: none;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  flex: 1;
}

.view.active {
  display: flex;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 12px 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input,
select {
  width: 100%;
  height: 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(200, 200, 200, 0.9) 50%),
    linear-gradient(135deg, rgba(200, 200, 200, 0.9) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
  background-position:
    calc(100% - 16px) 14px,
    calc(100% - 11px) 14px,
    calc(100% - 32px) 6px;
  background-size: 5px 5px, 5px 5px, 1px 22px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

select option {
  background: #121212;
  color: #e5e7eb;
}

input::placeholder {
  color: #6b7280;
}

input:focus,
select:focus {
  outline: none;
  border-color: #888888;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(120, 120, 120, 0.3);
}

.btn {
  height: 34px;
  background: rgba(45, 45, 45, 0.9);
  border: 1px solid rgba(60, 60, 60, 0.6);
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(80, 80, 80, 0.6);
  color: #d1d5db;
  padding: 6px 12px;
  border-radius: 6px;
}

.btn.ghost:hover {
  background: rgba(45, 45, 45, 0.6);
  border-color: rgba(100, 100, 100, 0.8);
  color: #ffffff;
}

.btn:hover {
  background: rgba(55, 55, 55, 0.9);
  border-color: rgba(80, 80, 80, 0.8);
}

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(60, 60, 60, 0.6);
  border-radius: 8px;
  overflow: hidden;
  min-height: 0;
}

.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(60, 60, 60, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 15, 15, 0.8);
}

.panel-head h2 {
  font-size: 14px;
  font-weight: 600;
}

.status {
  font-size: 11px;
  color: #9ca3af;
}

.table {
  flex: 1;
  overflow: auto;
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

#logsRows,
#globalRows,
#playersRows,
#charactersRows,
#itemsRows,
#auditRows,
#threatRows,
#anticheatRows {
  display: grid;
  gap: 8px;
  align-content: start;
}

.row {
  display: grid;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(40, 40, 40, 0.6);
  border: 1px solid rgba(60, 60, 60, 0.4);
  transition: all 0.2s ease;
  font-size: 12px;
}

.row:not(.header):hover {
  background: rgba(50, 50, 50, 0.8);
  border-color: rgba(80, 80, 80, 0.6);
}

.row.header {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
}

.logs-table .row,
.global-table .row,
.audit-table .row {
  grid-template-columns: 150px 80px 1fr 1.6fr 1.1fr 70px 90px;
}


.threats-table .row {
  grid-template-columns: 150px 80px 1fr 1.6fr 1.1fr 70px 110px 90px;
}

.rob-table .row {
  grid-template-columns: 150px 1.2fr 1.2fr 1fr 90px;
}

.anticheat-table .row {
  grid-template-columns: 90px 1fr 1.4fr 1.2fr 160px 160px 170px 110px 70px;
}

.players-table .row {
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1.2fr 1fr 60px 40px;
}

.characters-table .row {
  grid-template-columns: 1.4fr 1fr 1.5fr 1fr 60px;
}

.items-table .row {
  grid-template-columns: 1.2fr 1.2fr 120px 1fr 60px 40px 40px;
}

.news-table .row {
  grid-template-columns: 1.5fr 110px 170px 1fr 60px 60px;
}

.admins-table .row {
  grid-template-columns: 1.4fr 110px 130px 110px 140px 1fr 90px;
}

.checkbox-field {
  justify-content: flex-end;
}

.checkbox-field input[type='checkbox'] {
  width: 18px;
  height: 18px;
  padding: 0;
  align-self: flex-start;
  margin-top: 8px;
}

.link-btn {
  background: transparent;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
}

.link-btn:hover {
  text-decoration: underline;
}

.threat-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.45);
}

.threat-flag.resolved {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.status-chip.resolved {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

.action-btn.small {
  padding: 4px 8px;
  font-size: 10px;
}

.anticheat-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.anticheat-unban {
  color: #fb7185;
}

.anticheat-compare-grid {
  display: grid;
  gap: 8px;
}

.anticheat-match {
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 8px;
  padding: 8px;
  background: rgba(34, 197, 94, 0.12);
}

.anticheat-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anticheat-match-chip {
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
  background: rgba(34, 197, 94, 0.14);
}

.anticheat-note {
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.45;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(860px, 96vw);
  background: rgba(20, 20, 20, 0.98);
  border-left: 1px solid rgba(60, 60, 60, 0.6);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.8);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
  pointer-events: all;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(480px, 92vw);
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(60, 60, 60, 0.6);
  border-radius: 8px;
  padding: 24px;
  display: grid;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-hint {
  font-size: 12px;
  color: #9ca3af;
}

.home {
  min-height: 100vh;
  --portal-accent: #1d7ed6;
  --portal-accent-soft: rgba(29, 126, 214, 0.22);
  --portal-bg: #0a0f14;
  background:
    radial-gradient(circle at 10% 0%, rgba(29, 126, 214, 0.14), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(29, 126, 214, 0.08), transparent 35%),
    var(--portal-bg);
}

.home .top {
  padding: 20px 12px 12px;
  background: rgba(8, 12, 18, 0.85);
  border-bottom-color: rgba(29, 126, 214, 0.25);
}

.admin .top {
  padding: 20px 12px 12px;
}

.top-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.top-quick-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-quick-link {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  border: 1px solid rgba(29, 126, 214, 0.38);
  background: rgba(16, 24, 34, 0.92);
  color: #dbeafe;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.top-quick-link:hover {
  background: rgba(24, 34, 46, 0.96);
  border-color: rgba(29, 126, 214, 0.7);
  transform: translateY(-1px);
}

.top-quick-icon-img {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
  object-position: center;
  margin: auto;
  flex-shrink: 0;
  line-height: 1;
}

.top-profile-frame {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(29, 126, 214, 0.45);
  background: rgba(18, 25, 35, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.top-profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: rgba(16, 24, 34, 0.92);
  border: 1px solid rgba(29, 126, 214, 0.4);
  border-radius: 10px;
  cursor: pointer;
  padding: 0 10px;
}

.menu-toggle:hover {
  background: rgba(24, 34, 46, 0.95);
}

.menu-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #dbeafe;
}

.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 45;
}

.side-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100vh;
  background: rgba(10, 16, 24, 0.98);
  border-left: 1px solid rgba(29, 126, 214, 0.35);
  transform: translateX(102%);
  transition: transform 0.18s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 16px;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(29, 126, 214, 0.35);
  border-radius: 12px;
  background: rgba(19, 28, 39, 0.9);
  padding: 12px;
}

.side-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(29, 126, 214, 0.45);
}

.side-profile-text {
  display: grid;
  gap: 4px;
}

.side-profile-text strong {
  font-size: 14px;
  font-weight: 600;
}

.side-profile-text span {
  font-size: 12px;
  color: #9ca3af;
}

.side-menu-nav {
  display: grid;
  gap: 8px;
}

.side-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(29, 126, 214, 0.3);
  border-radius: 8px;
  background: rgba(17, 25, 35, 0.9);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 500;
  padding: 0 12px;
  text-decoration: none;
}

.side-link:hover {
  background: rgba(24, 36, 50, 0.95);
}

.side-menu-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.home-shell {
  min-height: calc(100vh - 80px);
  padding: 30px min(4vw, 36px) 48px;
}

.portal-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.portal-hero {
  padding: 4px 2px 8px;
  display: grid;
  gap: 2px;
}

.portal-hero h2 {
  font-size: clamp(40px, 8vw, 78px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: #f3f8ff;
}

.portal-hero h3 {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 500;
  color: #a8c5e0;
}

.hero-meta-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-player-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #9fb3c8;
}

.home-player-inline span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-player-inline strong {
  font-size: 18px;
  font-weight: 700;
  color: #e7f0fb;
}

.home-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(29, 126, 214, 0.28);
  border-radius: 999px;
  background: rgba(8, 14, 22, 0.75);
  width: fit-content;
}

.home-tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #9eb5cc;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-tab-btn:hover {
  color: #e7f0fb;
  background: rgba(29, 126, 214, 0.16);
}

.home-tab-btn.active {
  color: #eaf6ff;
  border-color: rgba(29, 126, 214, 0.46);
  background: rgba(29, 126, 214, 0.22);
}

.home-tab-view {
  display: none;
}

.home-tab-view.active {
  display: grid;
  gap: 12px;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
}

.portal-media,
.portal-side {
  display: grid;
  gap: 12px;
}

.media-main,
.media-thumb,
.journey-card,
.home-news,
.home-store {
  border: 1px solid rgba(29, 126, 214, 0.24);
  border-radius: 12px;
  background: rgba(10, 16, 24, 0.9);
}

.media-main {
  min-height: 260px;
  padding: 14px;
}

.media-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.media-thumb {
  min-height: 110px;
  padding: 10px;
}

.media-placeholder {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.media-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(29, 126, 214, 0.14), transparent 45%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 6px,
      transparent 6px,
      transparent 12px
    );
}

.media-placeholder span {
  position: relative;
  z-index: 1;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
}

.journey-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.journey-card h3,
.home-news-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
}

.journey-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.journey-list li {
  border-left: 2px solid rgba(29, 126, 214, 0.65);
  padding-left: 10px;
  display: grid;
  gap: 2px;
}

.journey-list li span {
  font-size: 13px;
  font-weight: 600;
  color: #cfe4ff;
}

.journey-list li small {
  font-size: 12px;
  color: #94a3b8;
}

.home-card {
  width: min(700px, 95vw);
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(60, 60, 60, 0.6);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  padding: 24px;
  display: grid;
  gap: 12px;
}

.home-card h2 {
  font-size: 24px;
  font-weight: 700;
}

.home-card p {
  color: #d1d5db;
  font-size: 14px;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-news {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.home-store {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.home-store-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.home-store-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.home-store-status {
  font-size: 12px;
  color: #90a9c2;
}

.home-store-controls {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}

@media (max-width: 760px) {
  .home-store-controls {
    grid-template-columns: 1fr;
  }
}

.home-store-controls input,
.home-store-controls select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(29, 126, 214, 0.28);
  background: rgba(7, 13, 21, 0.86);
  color: #e8f3ff;
  padding: 0 12px;
}

.home-store-controls input:focus,
.home-store-controls select:focus {
  border-color: rgba(29, 126, 214, 0.7);
  box-shadow: 0 0 0 2px rgba(29, 126, 214, 0.2);
}

.home-store-list {
  display: grid;
  gap: 14px;
}

.home-store-section {
  display: grid;
  gap: 10px;
}

.home-store-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-store-section-head h4 {
  font-size: 14px;
  font-weight: 700;
  color: #dbeafe;
}

.home-store-section-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(29, 126, 214, 0.45);
  background: rgba(29, 126, 214, 0.16);
  color: #b9d8f6;
  font-size: 11px;
  font-weight: 700;
}

.home-store-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .home-store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home-store-card {
  border: 1px solid rgba(29, 126, 214, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 20, 30, 0.96), rgba(8, 14, 22, 0.94));
  display: grid;
  grid-template-rows: 118px 1fr;
}

.home-store-card-media {
  position: relative;
  background: rgba(9, 16, 25, 0.9);
  overflow: hidden;
  border-bottom: 1px solid rgba(29, 126, 214, 0.26);
}

.home-store-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-store-card-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #a8c5e0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-store-card-media.no-image .home-store-card-fallback {
  display: flex;
}

.home-store-card-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.home-store-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.home-store-card-top h4 {
  font-size: 13px;
  line-height: 1.3;
  color: #e6f0fb;
}

.home-store-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(29, 126, 214, 0.45);
  background: rgba(29, 126, 214, 0.16);
  color: #b9d8f6;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.home-store-card-body p {
  margin: 0;
  color: #c8d7e8;
  line-height: 1.4;
  font-size: 12px;
  white-space: pre-wrap;
}

.home-store-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.home-store-price {
  font-size: 14px;
  font-weight: 700;
  color: #dbeafe;
}

.home-store-price-wrap {
  display: grid;
  gap: 2px;
}

.home-store-price-note {
  font-size: 10px;
  color: #93abc4;
  line-height: 1.2;
}

.home-store-card-foot .btn {
  text-decoration: none;
  min-width: 88px;
  height: 30px;
  font-size: 11px;
}

.home-store-list .news-card.muted {
  grid-column: 1 / -1;
}

.home-news-head h3 {
  font-size: 15px;
  font-weight: 600;
}

.home-news-list {
  display: grid;
  gap: 10px;
}

.home .home-news-list .news-card {
  border: 1px solid rgba(29, 126, 214, 0.3);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 20, 30, 0.95), rgba(10, 16, 24, 0.92));
  padding: 12px;
  display: grid;
  gap: 7px;
}

.home .home-news-list .news-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: #e6f0fb;
}

.home .home-news-list .news-card p {
  margin: 0;
  color: #c8d7e8;
  white-space: pre-wrap;
  line-height: 1.45;
}

.home .home-news-list .news-meta {
  font-size: 11px;
  color: #8fa7c0;
}

.news-card {
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 8px;
  background: rgba(24, 24, 24, 0.92);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.news-card h4 {
  font-size: 14px;
  font-weight: 600;
}

.news-card p {
  margin: 0;
  color: #d1d5db;
  white-space: pre-wrap;
}

.news-meta {
  font-size: 11px;
  color: #9ca3af;
}

.news-editor-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.news-field-wide {
  grid-column: 1 / -1;
}

.news-inline-field {
  max-width: 130px;
}

.news-inline-field input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.news-textarea {
  min-height: 140px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 10px;
  resize: vertical;
}

.news-textarea:focus {
  outline: none;
  border-color: #888888;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(120, 120, 120, 0.3);
}

.muted {
  color: #9ca3af;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(29, 126, 214, 0.3);
  background: rgba(16, 24, 35, 0.92);
}

.stat-label {
  color: #9ca3af;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  color: #dbeafe;
  font-size: 18px;
  font-weight: 700;
}

.portal-primary {
  background: rgba(29, 126, 214, 0.2);
  border-color: rgba(29, 126, 214, 0.55);
  color: #dbeafe;
}

.portal-primary:hover {
  background: rgba(29, 126, 214, 0.28);
  border-color: rgba(29, 126, 214, 0.75);
}

.home-note {
  font-size: 12px;
  color: #9ca3af;
}

.home-warning {
  font-size: 12px;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
}

@media (max-width: 980px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .media-main {
    min-height: 220px;
  }

  .hero-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta-right {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .home-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .home-tab-btn {
    flex: 1;
    text-align: center;
  }

  .home-store-controls {
    grid-template-columns: 1fr;
  }

  .media-thumbs {
    grid-template-columns: 1fr;
  }

  .media-thumb {
    min-height: 90px;
  }
}

.drawer.open {
  transform: translateX(0);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(60, 60, 60, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 15, 15, 0.8);
}

.drawer-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.drawer-close {
  width: 28px;
  height: 28px;
  background: rgba(50, 50, 50, 0.65);
  border: 1px solid rgba(90, 90, 90, 0.7);
  border-radius: 6px;
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 12px;
}

.drawer-close:hover {
  background: rgba(70, 70, 70, 0.8);
  border-color: rgba(120, 120, 120, 0.9);
}

.drawer-body {
  padding: 18px;
  overflow: auto;
  display: grid;
  gap: 14px;
}

.drawer-body .table {
  overflow-x: auto;
  flex: 0 0 auto;
}

.drawer-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.drawer-card {
  background: rgba(14, 19, 30, 0.95);
  border: 1px solid rgba(91, 147, 255, 0.15);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.drawer-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #e8edf8;
  letter-spacing: -0.01em;
}

.drawer-card-sub {
  font-size: 11px;
  color: #6a7a9a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.drawer-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 3px 8px;
  background: rgba(91, 147, 255, 0.1);
  border: 1px solid rgba(91, 147, 255, 0.22);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #a8c4ff;
  letter-spacing: 0.02em;
}

.detail-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.action-btn {
  padding: 6px 12px;
  background: rgba(91, 147, 255, 0.12);
  border: 1px solid rgba(91, 147, 255, 0.28);
  border-radius: 6px;
  color: #c0d4ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  letter-spacing: 0.01em;
}

.action-btn:hover {
  background: rgba(91, 147, 255, 0.22);
  border-color: rgba(91, 147, 255, 0.5);
  box-shadow: 0 0 10px rgba(91, 147, 255, 0.15);
  color: #ddeaff;
}

.mini-table {
  padding: 8px 0 0;
  background: transparent;
  border: none;
}

.mini-table .row {
  font-size: 12px;
  min-width: 640px;
}

.inventory-group {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.inventory-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b93ff;
  padding: 4px 10px;
  background: rgba(91, 147, 255, 0.1);
  border: 1px solid rgba(91, 147, 255, 0.2);
  border-radius: 6px;
  width: fit-content;
}

.inventory-title::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #5b93ff;
  border-radius: 50%;
  flex-shrink: 0;
}

.inventory-table .row {
  grid-template-columns: 60px 1.4fr 80px 2fr;
}

.character-combat-table .row {
  grid-template-columns: 160px 90px 80px 1fr 1fr 1fr 100px;
}

.character-combat-table {
  max-height: 560px;
  overflow-y: auto;
}

.vehicle-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.vehicle-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(91, 147, 255, 0.14);
  background: rgba(12, 18, 32, 0.7);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vehicle-card:hover {
  border-color: rgba(91, 147, 255, 0.28);
  background: rgba(15, 22, 40, 0.85);
}

.vehicle-info {
  display: grid;
  gap: 3px;
  align-content: start;
}

.vehicle-name {
  font-weight: 700;
  font-size: 13px;
  color: #dde8ff;
  letter-spacing: 0.01em;
}

.vehicle-meta {
  font-size: 11px;
  color: #6a7a9a;
}

.vehicle-actions {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-content: start;
}

.vehicle-inventory {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid rgba(91, 147, 255, 0.1);
  margin-top: 4px;
}

.vehicle-inventory.hidden {
  display: none;
}

.logs-table .row > div:nth-child(4),
.audit-table .row > div:nth-child(4),
.mini-table .row > div:nth-child(4) {
  white-space: nowrap;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #8aaeff;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(91, 147, 255, 0.12);
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #5b93ff, #3b6de0);
  border-radius: 3px;
  flex-shrink: 0;
}

.kv {
  display: grid;
  gap: 0;
  border: 1px solid rgba(91, 147, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.kv-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  font-size: 12px;
  align-items: start;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(91, 147, 255, 0.07);
  transition: background 0.12s ease;
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-row:hover {
  background: rgba(91, 147, 255, 0.05);
}

.kv-row span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5c6a88;
  padding-top: 1px;
}

pre.json {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(8, 12, 24, 0.85);
  border: 1px solid rgba(91, 147, 255, 0.16);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11px;
  color: #a8c4ff;
  line-height: 1.55;
}

.spoiler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(180, 200, 255, 0.55);
  border: 1px dashed rgba(91, 147, 255, 0.3);
  cursor: pointer;
  user-select: none;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.spoiler:hover {
  background: rgba(91, 147, 255, 0.1);
  border-color: rgba(91, 147, 255, 0.5);
  color: rgba(200, 220, 255, 0.8);
}

.spoiler.revealed {
  background: rgba(91, 147, 255, 0.12);
  color: #c8daff;
  border-style: solid;
  border-color: rgba(91, 147, 255, 0.3);
  cursor: default;
}

.character-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.character-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(91, 147, 255, 0.14);
  background: rgba(12, 18, 32, 0.75);
  color: #e8edf8;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.character-btn:hover {
  border-color: rgba(91, 147, 255, 0.35);
  background: rgba(18, 26, 46, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.character-btn.active {
  background: rgba(91, 147, 255, 0.15);
  border-color: rgba(91, 147, 255, 0.5);
  box-shadow: inset 2px 0 0 #5b93ff;
}

.character-name {
  font-weight: 700;
  font-size: 13px;
  color: #dde8ff;
}

.character-sub {
  font-size: 11px;
  color: #5c6a88;
}

.character-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.character-summary {
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(15, 24, 44, 0.9), rgba(10, 14, 28, 0.9));
  border: 1px solid rgba(91, 147, 255, 0.2);
  display: grid;
  gap: 4px;
}

.character-summary .character-name {
  font-size: 17px;
  font-weight: 700;
  color: #e8edf8;
}

.character-meta {
  font-size: 11px;
  color: #5c6a88;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 900px) {
  .drawer {
    width: 100vw;
  }

  .drawer-body {
    padding: 14px;
  }

  .kv-row {
    grid-template-columns: 110px 1fr;
    gap: 8px;
  }

  .character-list {
    grid-template-columns: 1fr;
  }
}

body::-webkit-scrollbar,
.table::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

body::-webkit-scrollbar-track,
.table::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb,
.table::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(91, 147, 255, 0.28);
  border-radius: 99px;
}

body::-webkit-scrollbar-thumb:hover,
.table::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 147, 255, 0.48);
}

.login-wrapper {
  justify-content: center;
}

.login-panel {
  width: min(460px, 92vw);
  height: auto;
}

.login-body {
  padding: 20px;
  display: grid;
  gap: 12px;
  color: #d1d5db;
}

.login-hint {
  font-size: 12px;
  color: #9ca3af;
}

@media (max-width: 1024px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }

  .row.header {
    display: none;
  }
}

.team-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(29, 126, 214, 0.12), transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(29, 126, 214, 0.06), transparent 34%),
    #080d13;
}

.team-page .top {
  padding: 20px 12px 12px;
  background: rgba(8, 12, 18, 0.88);
  border-bottom-color: rgba(29, 126, 214, 0.22);
}

.team-shell {
  min-height: calc(100vh - 80px);
  padding: 34px min(4vw, 36px) 52px;
}

.team-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.team-hero {
  text-align: center;
  display: grid;
  gap: 10px;
}

.team-hero h2 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  color: #f5f9ff;
}

.team-hero h2 span {
  color: #55a8f2;
}

.team-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: #9eb5cc;
  font-size: 16px;
}

.team-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-card {
  border: 1px solid rgba(29, 126, 214, 0.22);
  border-radius: 14px;
  background: rgba(8, 14, 20, 0.86);
  padding: 16px 14px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
}

.team-card:hover {
  border-color: rgba(29, 126, 214, 0.42);
  background: rgba(11, 18, 26, 0.9);
}

.team-avatar {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(29, 126, 214, 0.35);
}

.team-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #edf4ff;
}

.team-card p {
  margin-top: -2px;
  font-size: 12px;
  color: #9bb0c5;
}

.team-links {
  margin-top: 2px;
  display: inline-flex;
  gap: 8px;
}

.team-link {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(29, 126, 214, 0.4);
  background: rgba(15, 26, 36, 0.9);
}

.team-link:hover {
  border-color: rgba(29, 126, 214, 0.68);
  background: rgba(21, 34, 47, 0.95);
}

.team-link-icon {
  width: 13px;
  height: 13px;
  display: block;
  object-fit: contain;
}

@media (max-width: 1080px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-shell {
    padding-top: 24px;
  }
}

@media (max-width: 520px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.characters-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(29, 126, 214, 0.12), transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(29, 126, 214, 0.06), transparent 34%),
    #080d13;
}

.characters-page .top {
  padding: 20px 12px 12px;
  background: rgba(8, 12, 18, 0.88);
  border-bottom-color: rgba(29, 126, 214, 0.22);
}

.characters-shell {
  min-height: calc(100vh - 80px);
  padding: 28px min(4vw, 36px) 48px;
}

.characters-auth-gate {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.characters-login-card {
  width: min(500px, 94vw);
  border: 1px solid rgba(29, 126, 214, 0.32);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.96), rgba(10, 16, 24, 0.98));
  padding: 20px;
  display: grid;
  gap: 10px;
  text-align: center;
}

.characters-login-card h2 {
  font-size: 24px;
  color: #eff6ff;
}

.characters-login-card p {
  color: #9eb5cc;
  font-size: 14px;
}

.characters-login-card .btn {
  width: 100%;
}

.characters-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.characters-head {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(29, 126, 214, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(12, 20, 31, 0.92), rgba(9, 15, 23, 0.94));
}

.characters-head h2 {
  font-size: 28px;
  color: #f5f9ff;
}

.characters-head p {
  color: #9eb5cc;
  font-size: 13px;
}

.characters-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.characters-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(29, 126, 214, 0.38);
  background: rgba(14, 29, 43, 0.84);
  color: #d7e8fa;
  font-size: 12px;
  font-weight: 600;
}

.characters-chip.ghost {
  border-color: rgba(96, 125, 152, 0.45);
  background: rgba(14, 21, 32, 0.75);
  color: #a6bed6;
}

.characters-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.character-card {
  border: 1px solid rgba(29, 126, 214, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(13, 21, 33, 0.93), rgba(9, 16, 25, 0.94));
  padding: 14px 14px 12px;
  display: grid;
  gap: 12px;
  box-shadow: 0 8px 20px rgba(2, 7, 13, 0.36);
}

.character-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.character-card h3 {
  font-size: 17px;
  color: #e7f0fb;
  line-height: 1.2;
}

.character-heading {
  display: grid;
  gap: 2px;
}

.character-heading p {
  font-size: 12px;
  color: #96b1ca;
  word-break: break-word;
}

.character-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.character-details > div {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(29, 126, 214, 0.18);
  border-radius: 9px;
  background: rgba(8, 14, 22, 0.74);
  padding: 8px;
}

.character-card dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8eacc9;
}

.character-card dd {
  margin: 0;
  color: #dceafa;
  word-break: break-word;
  font-size: 13px;
}

.character-footer {
  margin-top: 2px;
  border-top: 1px solid rgba(29, 126, 214, 0.17);
  padding-top: 8px;
}

.character-last-seen {
  display: inline-flex;
  font-size: 12px;
  color: #9db7cf;
}

.character-card.empty {
  text-align: center;
  justify-items: center;
  padding: 20px;
}

.character-card.empty p {
  font-size: 13px;
  color: #9eb5cc;
  max-width: 44ch;
}

@media (max-width: 780px) {
  .characters-shell {
    padding: 22px 14px 34px;
  }

  .characters-head h2 {
    font-size: 24px;
  }

  .characters-grid {
    grid-template-columns: 1fr;
  }

  .character-details {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   ARCTIC GAMING — ADMIN PANEL REDESIGN
   Smooth deep-navy design inspired by arctic style
   ═══════════════════════════════════════════════════ */

body.admin {
  --a-bg:             #090c14;
  --a-surface:        #0e1320;
  --a-surface-2:      #131928;
  --a-surface-3:      #1a2133;
  --a-border:         rgba(91, 147, 255, 0.13);
  --a-border-mid:     rgba(91, 147, 255, 0.24);
  --a-border-strong:  rgba(91, 147, 255, 0.45);
  --a-accent:         #5b93ff;
  --a-accent-glow:    rgba(91, 147, 255, 0.22);
  --a-accent-soft:    rgba(91, 147, 255, 0.12);
  --a-accent-hover:   rgba(91, 147, 255, 0.3);
  --a-text:           #e8edf8;
  --a-text-muted:     #8a97b8;
  --a-text-dim:       #5c6a88;
  --a-danger:         #f07070;
  --a-danger-soft:    rgba(240, 112, 112, 0.18);
  --a-success:        #4ade80;
  --a-success-soft:   rgba(74, 222, 128, 0.15);
  --a-warn:           #fbbd5c;
  --a-warn-soft:      rgba(251, 189, 92, 0.15);
  --a-shadow:         0 16px 40px rgba(0, 0, 0, 0.62);
  --a-shadow-sm:      0 4px 14px rgba(0, 0, 0, 0.42);
  --a-radius:         10px;
  --a-radius-sm:      7px;

  background:
    radial-gradient(ellipse at 8% -8%,  rgba(91, 147, 255, 0.11), transparent 42%),
    radial-gradient(ellipse at 92% 110%, rgba(91, 147, 255, 0.07), transparent 48%),
    var(--a-bg);
  color: var(--a-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Topbar ── */
body.admin .top {
  background: rgba(9, 12, 20, 0.92);
  border-bottom: 1px solid var(--a-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.admin .brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--a-text);
}

body.admin .brand-text span {
  font-size: 11px;
  color: var(--a-text-muted);
}

body.admin .top-profile-frame {
  border-color: var(--a-border-mid);
  background: rgba(14, 19, 32, 0.9);
}

body.admin .menu-toggle {
  border-color: var(--a-border-mid);
  background: rgba(14, 19, 32, 0.9);
  border-radius: 8px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

body.admin .menu-toggle:hover {
  background: rgba(20, 27, 44, 0.98);
  border-color: var(--a-border-strong);
}

body.admin .menu-line {
  background: rgba(200, 216, 255, 0.85);
}

/* ── Side drawer menu ── */
body.admin .side-menu {
  background: rgba(9, 12, 20, 0.98);
  border-left: 1px solid var(--a-border-mid);
  backdrop-filter: blur(8px);
}

body.admin .side-menu-head {
  border: 1px solid var(--a-border-mid);
  background: rgba(14, 19, 32, 0.9);
  border-radius: 10px;
}

body.admin .side-avatar {
  border-color: var(--a-border-strong);
}

body.admin .side-link {
  border: 1px solid var(--a-border);
  background: rgba(14, 19, 32, 0.8);
  color: var(--a-text);
  border-radius: 8px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

body.admin .side-link:hover {
  background: var(--a-accent-soft);
  border-color: var(--a-border-strong);
}

/* ── Shell layout ── */
body.admin .admin-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 20px 60px;
}

/* ── Left nav ── */
body.admin .admin-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 0;
  padding: 0;
  border-radius: var(--a-radius);
  border: 1px solid var(--a-border);
  background: linear-gradient(160deg, rgba(15, 21, 36, 0.98) 0%, rgba(10, 14, 24, 0.98) 100%);
  box-shadow: var(--a-shadow-sm);
  overflow: hidden;
}

body.admin .admin-nav-head {
  display: grid;
  gap: 4px;
  background: linear-gradient(120deg, rgba(21, 46, 90, 0.7), rgba(14, 20, 36, 0.5));
  border-bottom: 1px solid var(--a-border);
  padding: 16px 16px 14px;
}

body.admin .admin-nav-head h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-accent);
}

body.admin .admin-nav-head p {
  color: var(--a-text-muted);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 2px;
}

/* ── Nav tabs ── */
body.admin .tabs {
  display: grid;
  gap: 0;
  padding: 8px;
}

body.admin .tab {
  width: 100%;
  justify-content: flex-start;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: var(--a-radius-sm);
  border: 1px solid transparent;
  color: var(--a-text-muted);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.admin .tab:hover:not(.active) {
  background: var(--a-accent-soft);
  border-color: var(--a-border);
  color: var(--a-text);
}

body.admin .tab.active {
  background: linear-gradient(120deg, rgba(91, 147, 255, 0.22), rgba(91, 147, 255, 0.12));
  border-color: var(--a-border-strong);
  color: #c8daff;
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--a-accent);
}

body.admin .tab-badge {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--a-danger-soft);
  border: 1px solid rgba(240, 112, 112, 0.4);
  color: #ffb3b3;
}

/* ── Content area ── */
body.admin .admin-content {
  min-width: 0;
  display: flex;
}

body.admin .view {
  width: 100%;
}

body.admin .view.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Filter bar ── */
body.admin .filters {
  align-items: end;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  padding: 14px;
  border-radius: var(--a-radius);
  border: 1px solid var(--a-border);
  background: linear-gradient(160deg, rgba(15, 21, 36, 0.97) 0%, rgba(10, 14, 24, 0.97) 100%);
  box-shadow: var(--a-shadow-sm);
}

body.admin .filters .field {
  min-height: 68px;
  padding: 8px 10px;
  border-radius: var(--a-radius-sm);
  border: 1px solid rgba(91, 147, 255, 0.1);
  background: rgba(12, 16, 28, 0.7);
  transition: border-color 0.15s ease;
}

body.admin .filters .field:focus-within {
  border-color: var(--a-border-mid);
}

body.admin .filters.news-editor-grid .field {
  min-height: auto;
}

body.admin label,
body.admin .filters .field label {
  color: var(--a-text-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

body.admin input,
body.admin select,
body.admin .news-textarea {
  background: rgba(8, 11, 22, 0.9);
  border: 1px solid rgba(91, 147, 255, 0.16);
  border-radius: 6px;
  color: var(--a-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.admin input::placeholder,
body.admin .news-textarea::placeholder {
  color: var(--a-text-dim);
}

body.admin input:focus,
body.admin select:focus,
body.admin .news-textarea:focus {
  border-color: rgba(91, 147, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(91, 147, 255, 0.16);
  outline: none;
}

/* ── Buttons ── */
body.admin .filters .btn,
body.admin .filters .btn.ghost {
  height: 38px;
  margin-top: auto;
}

body.admin .btn {
  min-width: 90px;
  border-radius: var(--a-radius-sm);
  border: 1px solid var(--a-border-mid);
  background: linear-gradient(135deg, rgba(91, 147, 255, 0.2), rgba(60, 110, 230, 0.15));
  color: #c8daff;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body.admin .btn:hover {
  background: linear-gradient(135deg, rgba(91, 147, 255, 0.32), rgba(60, 110, 230, 0.26));
  border-color: var(--a-border-strong);
  box-shadow: 0 0 12px rgba(91, 147, 255, 0.18);
}

body.admin .btn.ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--a-text-muted);
}

body.admin .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--a-text);
}

body.admin .drawer-close {
  min-width: unset;
  border-radius: 6px;
  border: 1px solid var(--a-border-mid);
  background: rgba(91, 147, 255, 0.1);
  color: var(--a-text-muted);
}

body.admin .drawer-close:hover {
  background: rgba(91, 147, 255, 0.2);
  border-color: var(--a-border-strong);
  color: var(--a-text);
}

/* ── Panel cards ── */
body.admin .panel,
body.admin .detail-block,
body.admin .player-sidebar .drawer-card,
body.admin .player-sidebar .kv,
body.admin .player-sidebar .character-list,
body.admin .detail-block .drawer-filters {
  border-radius: var(--a-radius);
  border: 1px solid var(--a-border);
  background: linear-gradient(160deg, rgba(15, 21, 36, 0.98) 0%, rgba(10, 14, 24, 0.98) 100%);
  box-shadow: var(--a-shadow-sm);
}

body.admin .panel-head,
body.admin .drawer-head {
  background: linear-gradient(120deg, rgba(16, 24, 44, 0.9), rgba(11, 15, 28, 0.9));
  border-bottom: 1px solid var(--a-border);
  padding: 13px 16px;
}

body.admin .panel-head h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--a-text);
}

body.admin .status {
  font-size: 11px;
  color: var(--a-accent);
  opacity: 0.8;
}

/* ── Table rows ── */
body.admin .table {
  padding: 8px 10px 12px;
}

body.admin .row,
body.admin .player-sidebar .character-btn,
body.admin .detail-block .row {
  border: 1px solid var(--a-border);
  background: rgba(14, 20, 36, 0.7);
  border-radius: var(--a-radius-sm);
  transition: background 0.14s ease, border-color 0.14s ease;
}

body.admin .row:not(.header):hover,
body.admin .player-sidebar .character-btn:hover {
  border-color: var(--a-border-mid);
  background: rgba(20, 30, 54, 0.85);
}

body.admin .player-sidebar .character-btn.active {
  border-color: var(--a-border-strong);
  background: var(--a-accent-soft);
  color: #c8daff;
  box-shadow: inset 2px 0 0 var(--a-accent);
}

body.admin .row.header,
body.admin .detail-block .row.header {
  color: var(--a-text-dim);
  background: transparent;
  border-color: transparent;
}

/* ── Links ── */
body.admin .link-btn {
  color: var(--a-accent);
  transition: color 0.14s ease;
}

body.admin .link-btn:hover {
  color: #a0c4ff;
}

body.admin .link-btn[data-vehicle-plate] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ── Player detail drawer ── */
body.admin .drawer {
  width: min(1160px, 98vw);
  background: linear-gradient(170deg, rgba(14, 20, 36, 0.99) 0%, rgba(9, 12, 22, 0.99) 100%);
  border-left: 1px solid var(--a-border-mid);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.7);
}

body.admin .drawer-body {
  padding: 14px;
  gap: 12px;
}

body.admin .player-drawer-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body.admin .player-drawer-layout.single-character {
  grid-template-columns: 280px minmax(0, 1fr);
}

body.admin .player-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding-right: 4px;
}

body.admin .sidebar-section {
  display: grid;
  gap: 8px;
}

body.admin .sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--a-accent);
}

body.admin .sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #c8daff;
  border: 1px solid var(--a-border-mid);
  background: var(--a-accent-soft);
}

body.admin .sidebar-section-sub,
body.admin .character-meta {
  color: var(--a-text-muted);
}

body.admin .player-main,
body.admin .character-detail-stack {
  min-width: 0;
  display: grid;
  gap: 10px;
}

body.admin .detail-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body.admin .detail-overview-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius-sm);
  background: rgba(14, 20, 36, 0.8);
  transition: border-color 0.14s ease;
}

body.admin .detail-overview-item:hover {
  border-color: var(--a-border-mid);
}

body.admin .detail-overview-item span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--a-text-dim);
  font-weight: 600;
}

body.admin .detail-overview-item strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--a-text);
}

body.admin .detail-block {
  padding: 10px;
  display: grid;
  gap: 8px;
}

body.admin .character-summary {
  border-radius: var(--a-radius-sm);
  border: 1px solid var(--a-border-mid);
  background: rgba(14, 20, 40, 0.75);
  padding: 12px 14px;
}

body.admin .character-summary .character-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--a-text);
}

body.admin .player-sidebar .kv {
  gap: 8px;
}

body.admin .player-sidebar .kv-row {
  grid-template-columns: 94px 1fr;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--a-border);
}

body.admin .player-sidebar .kv-row:last-child {
  border-bottom: none;
}

body.admin .player-sidebar .kv-row span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--a-text-dim);
  font-weight: 600;
}

body.admin .player-sidebar .kv-row div {
  color: var(--a-text);
  line-height: 1.45;
  word-break: break-word;
  font-size: 12px;
}

body.admin .player-sidebar .character-list {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
  padding: 10px 2px 10px 10px;
}

body.admin .player-sidebar .character-btn {
  border-radius: var(--a-radius-sm);
  padding: 10px 12px;
  gap: 4px;
}

body.admin .player-sidebar .character-btn:hover {
  box-shadow: none;
  transform: none;
}

body.admin .detail-block .mini-table {
  padding-top: 0;
}

body.admin .detail-block .logs-table {
  max-height: 520px;
  overflow-y: auto;
}

body.admin .inventory-scroll-area,
body.admin .vehicles-scroll-area {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

body.admin .inventory-scroll-area .inventory-table {
  max-height: 230px;
  overflow-y: auto;
}

body.admin .vehicles-scroll-area .vehicle-list {
  margin-bottom: 0;
}

body.admin .detail-block .drawer-filters {
  margin-bottom: 0;
  align-items: end;
  padding: 10px;
}

body.admin .detail-block .drawer-filters .field {
  min-height: 66px;
  padding: 7px 8px;
  border-radius: var(--a-radius-sm);
  border: 1px solid rgba(91, 147, 255, 0.1);
  background: rgba(10, 14, 24, 0.8);
}

body.admin .detail-block .drawer-filters .btn {
  height: 34px;
}

/* ── Status chips / threat flags ── */
body.admin .threat-flag {
  background: var(--a-danger-soft);
  color: var(--a-danger);
  border-color: rgba(240, 112, 112, 0.35);
}

body.admin .threat-flag.resolved {
  background: var(--a-success-soft);
  color: var(--a-success);
  border-color: rgba(74, 222, 128, 0.35);
}

body.admin .status-chip {
  background: var(--a-warn-soft);
  color: var(--a-warn);
  border-color: rgba(251, 189, 92, 0.35);
}

body.admin .status-chip.resolved {
  background: var(--a-success-soft);
  color: var(--a-success);
  border-color: rgba(74, 222, 128, 0.3);
}

/* ── Responsive ── */
@media (max-width: 1360px) {
  body.admin .detail-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body.admin .admin-shell {
    grid-template-columns: 1fr;
    padding: 14px 16px 48px;
  }

  body.admin .admin-nav {
    position: static;
  }

  body.admin .tabs {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    padding: 6px;
    gap: 4px;
  }

  body.admin .tab {
    justify-content: center;
    font-size: 12px;
    padding: 8px 10px;
    box-shadow: none;
  }

  body.admin .tab-badge {
    margin-left: 6px;
  }

  body.admin .drawer {
    width: 100vw;
  }

  body.admin .player-drawer-layout,
  body.admin .player-drawer-layout.single-character {
    grid-template-columns: 1fr;
  }

  body.admin .player-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.admin .detail-block .logs-table,
  body.admin .inventory-scroll-area,
  body.admin .inventory-scroll-area .inventory-table,
  body.admin .vehicles-scroll-area,
  body.admin .player-sidebar .character-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  body.admin .admin-shell {
    padding: 10px 12px 32px;
  }

  body.admin .admin-nav-head p {
    display: none;
  }

  body.admin .filters,
  body.admin .detail-overview-grid {
    grid-template-columns: 1fr;
  }
}

body.login {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 195, 255, 0.12), transparent 42%),
    radial-gradient(circle at 80% 20%, rgba(0, 195, 255, 0.08), transparent 40%),
    #101113;
}

body.login .login-card {
  background: linear-gradient(180deg, rgba(27, 31, 37, 0.95), rgba(20, 23, 28, 0.96));
  border-color: rgba(255, 255, 255, 0.12);
}
