:root {
  --bg-0: #0d1117;
  --bg-1: #151b23;
  --bg-2: #1e252e;
  --bg-3: #2a323d;
  --border: #30363d;
  --text: #e6edf3;
  --text-dim: #9aa4ad;
  --accent: #ff7849;
  --accent-dim: #c25c33;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --blue: #4493f8;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(255, 120, 73, 0.09), transparent 26%),
    linear-gradient(180deg, rgba(255, 120, 73, 0.04), transparent 220px),
    var(--bg-0);
  color: var(--text);
  font: 14px/1.5 var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  position: relative;
  min-height: 100vh;
}

.site-header,
.site-main {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(21, 27, 35, 0.94);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.site-main {
  margin-top: 16px;
  padding-bottom: 24px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.eyebrow,
.hero-kicker,
.section-text,
.fact-label,
.summary-pair span,
.hero-stat span,
.mini-stat span,
.profile-stat span {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link,
.button,
.tab-button,
.category-link {
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  min-width: 0;
}

.nav-link,
.button,
.tab-button,
.category-link,
.field,
.search-results,
.list-panel,
.hero-panel,
.panel-card,
.helper-card,
.market-note,
.vip-card,
.profile-stat,
.fact-card,
.kill-card,
.hero-stat,
.mini-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.nav-link {
  padding: 9px 12px;
  color: var(--text-dim);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-2);
}

.hero-panel,
.panel-card {
  background: rgba(21, 27, 35, 0.94);
}

.hero-panel,
.panel-card,
.market-note,
.vip-card {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 340px;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.hero-copy h1,
.profile-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
}

.hero-text,
.section-text {
  margin: 12px 0 0;
  color: var(--text-dim);
}

.hero-actions,
.button-row,
.mode-row,
.tab-row,
.vip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.button-row > *,
.hero-actions > *,
.mode-row > *,
.vip-actions > * {
  min-width: 0;
}

.hero-actions {
  margin-top: 18px;
}

.button,
.tab-button,
.category-link {
  background: var(--bg-2);
  color: var(--text);
  padding: 9px 14px;
  cursor: pointer;
}

.button:hover,
.tab-button:hover,
.category-link:hover {
  background: var(--bg-3);
}

.button.primary,
.tab-button.active,
.category-link.active {
  border-color: var(--accent);
  background: rgba(255, 120, 73, 0.14);
  color: var(--text);
}

.hero-side {
  display: grid;
  gap: 12px;
}

.hero-stat,
.mini-stat,
.account-summary,
.compact-stats article,
.profile-stat,
.fact-card,
.kill-card,
.dev-card {
  padding: 14px;
  background: var(--bg-1);
}

.hero-stat strong,
.mini-stat strong,
.server-number,
.profile-stat strong,
.fact-value,
.product-price,
.summary-pair strong,
.account-summary strong,
.compact-stats strong,
.vip-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
}

.hero-stat strong {
  font-size: 28px;
}

.hero-stat-accent {
  background: linear-gradient(180deg, rgba(255, 120, 73, 0.18), rgba(255, 120, 73, 0.08));
  border-color: rgba(255, 120, 73, 0.28);
}

.overview-grid,
.content-grid,
.profile-layout,
.market-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.overview-grid {
  grid-template-columns: 320px minmax(0, 1fr);
}

.content-grid {
  grid-template-columns: minmax(0, 1.15fr) 360px;
}

.panel-card {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2,
.vip-top h3,
.product-title {
  margin: 4px 0 0;
  font-size: 18px;
  color: var(--text);
}

.server-number {
  font-size: clamp(54px, 8vw, 84px);
  line-height: 0.9;
}

.server-label,
.kill-meta,
.helper-card p,
.market-note p,
.dev-card p,
.product-desc,
.vip-empty,
.profile-uuid {
  color: var(--text-dim);
}

.status-pill,
.section-badge,
.vip-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill.running {
  color: var(--green);
  background: rgba(63, 185, 80, 0.14);
  border-color: rgba(63, 185, 80, 0.25);
}

.status-pill.crashed {
  color: var(--red);
  background: rgba(248, 81, 73, 0.14);
  border-color: rgba(248, 81, 73, 0.25);
}

.status-pill.stopped {
  color: var(--text-dim);
  background: rgba(154, 164, 173, 0.1);
}

.mini-stats,
.compact-stats,
.profile-grid,
.vip-grid,
.market-summary,
.products-grid,
.dev-grid {
  display: grid;
  gap: 12px;
}

.mini-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chart-shell {
  margin-top: 14px;
  height: 182px;
  padding: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    var(--bg-1);
  background-size: 100% 25%, 12.5% 100%, auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chart-shell svg {
  width: 100%;
  height: 100%;
}

.chart-shell polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-box {
  position: relative;
  margin-bottom: 14px;
}

.field {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background: var(--bg-1);
  color: var(--text);
  outline: none;
}

.field:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 120, 73, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow: hidden;
  background: var(--bg-1);
  z-index: 5;
}

.search-item,
.leader-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item:hover,
.leader-row:hover,
.product-tile:hover {
  background: var(--bg-2);
}

.list-panel {
  overflow: hidden;
  background: var(--bg-1);
}

.leader-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.leader-row:last-child {
  border-bottom: 0;
}

.leader-rank {
  color: var(--accent);
  font-weight: 700;
}

.leader-main {
  display: grid;
  gap: 4px;
}

.leader-main strong {
  color: var(--text);
}

.leader-main small {
  color: var(--text-dim);
}

.leader-value {
  font-weight: 700;
  color: var(--text);
}

.side-stack,
.form-stack,
.market-sidebar,
.market-content,
.fact-list,
.kills-list {
  display: grid;
  gap: 16px;
}

.helper-card,
.market-note {
  padding: 14px;
  background: var(--bg-1);
}

.helper-card strong,
.mono,
.profile-uuid {
  font-family: var(--mono);
}

.account-summary,
.summary-row {
  display: grid;
  gap: 12px;
}

.summary-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 18px;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.vip-card {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 120, 73, 0.16), rgba(21, 27, 35, 0.96) 42%),
    var(--bg-1);
}

.vip-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vip-state {
  background: rgba(255, 255, 255, 0.06);
}

.vip-state.active {
  color: var(--green);
  border-color: rgba(63, 185, 80, 0.28);
  background: rgba(63, 185, 80, 0.12);
}

.vip-state.frozen {
  color: var(--yellow);
  border-color: rgba(210, 153, 34, 0.28);
  background: rgba(210, 153, 34, 0.12);
}

.vip-state.expired,
.vip-state.revoked,
.vip-state.none {
  color: var(--text-dim);
}

.vip-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.vip-metric {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(13, 17, 23, 0.28);
  min-width: 0;
}

.vip-empty {
  margin-top: 12px;
}

.error-text {
  margin: 10px 0 0;
  color: #ffb2ad;
}

.success-text {
  margin: 10px 0 16px;
  color: #b7f7c2;
}

.empty-state {
  padding: 26px 18px;
  text-align: center;
  color: var(--text-dim);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 16px;
}

.profile-stat strong {
  font-size: 26px;
}

.profile-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.fact-value {
  font-size: 22px;
}

.kill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kill-title {
  font-weight: 700;
}

.market-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.market-summary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.market-grid {
  grid-template-columns: 280px minmax(0, 1fr);
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.section-badge {
  color: var(--accent);
  border-color: rgba(255, 120, 73, 0.28);
  background: rgba(255, 120, 73, 0.12);
}

.products-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product-tile {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: linear-gradient(180deg, rgba(255, 120, 73, 0.2), rgba(30, 37, 46, 0.92));
}

.product-image.placeholder {
  display: grid;
  place-items: center;
  color: var(--text-dim);
}

.product-body {
  padding: 14px;
}

.product-price {
  font-size: 24px;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.product-tag {
  color: var(--text-dim);
  font-size: 12px;
}

.dev-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dossier-hero {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.dossier-tabs {
  margin-bottom: 16px;
}

.dossier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.idcard-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #050608;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.idcard-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.idcard-field {
  position: absolute;
  color: #f1f3f5;
  font-weight: 650;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idcard-title {
  left: 39.0%;
  top: 28.1%;
  width: 43%;
  font-size: clamp(12px, 1.8vw, 25px);
}

.idcard-name {
  left: 39.0%;
  top: 37.5%;
  width: 43%;
  font-size: clamp(12px, 1.65vw, 23px);
}

.idcard-rank {
  left: 39.0%;
  top: 47.4%;
  width: 24%;
  font-size: clamp(11px, 1.45vw, 20px);
}

.idcard-unit {
  left: 67.2%;
  top: 47.4%;
  width: 13%;
  font-size: clamp(11px, 1.45vw, 20px);
}

.idcard-number {
  left: 39.0%;
  top: 56.9%;
  width: 43%;
  font-size: clamp(11px, 1.55vw, 22px);
}

.idcard-issued {
  left: 39.0%;
  top: 67.2%;
  width: 13.7%;
  font-size: clamp(9px, 1.13vw, 16px);
}

.idcard-valid {
  left: 54.8%;
  top: 67.2%;
  width: 14.2%;
  font-size: clamp(9px, 1.13vw, 16px);
}

.idcard-status {
  left: 70.5%;
  top: 67.2%;
  width: 12.4%;
  font-size: clamp(9px, 1.08vw, 15px);
}

.field-label {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
}

.dossier-folder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 120, 73, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 120, 73, 0.08), transparent 34%),
    var(--bg-1);
}

.dossier-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-bottom: 16px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.person-folder {
  position: relative;
  padding-top: 24px;
}

.folder-tab {
  position: absolute;
  left: 14px;
  top: 0;
  min-width: 150px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
}

.folder-body {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 120, 73, 0.08), transparent 90px),
    var(--bg-1);
}

.folder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.folder-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.folder-fields {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .hero-panel,
  .overview-grid,
  .content-grid,
  .profile-hero,
  .profile-layout,
  .dossier-layout,
  .dossier-hero,
  .market-grid {
    grid-template-columns: 1fr;
  }

  .compact-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header,
  .site-main {
    width: min(1280px, calc(100% - 20px));
  }

  .hero-panel,
  .panel-card,
  .vip-card {
    padding: 14px;
  }

  .profile-grid,
  .market-summary,
  .mini-stats,
  .compact-stats,
  .dossier-filters,
  .summary-row {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .hero-actions,
  .button-row,
  .mode-row,
  .tab-row,
  .vip-actions {
    width: 100%;
  }

  .site-nav > *,
  .hero-actions > *,
  .button-row > *,
  .mode-row > *,
  .tab-row > *,
  .vip-actions > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .leader-row,
  .kill-head,
  .vip-top,
  .panel-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}
