/* ==========================================================================
   SpamRama client portal — refined fast dark theme
   --------------------------------------------------------------------------
   iGPU-friendly:
     • No background-clip: text
     • No backdrop-filter / filter: blur()
     • No colored box-shadows
     • One cached radial on body (was two)
     • Simple linear gradients only
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Surfaces */
  --bg:        #080b12;
  --panel:     #0e131c;
  --panel-2:   #131a26;
  --panel-3:   #1a2331;
  --panel-4:   #222d3e;

  /* Borders */
  --border:    #1c2434;
  --border-2:  #26324a;
  --border-3:  #3a4d6e;

  /* Text */
  --text:      #e8eef8;
  --text-2:    #bcc9dc;
  --dim:       #77879f;
  --dim-2:     #546178;
  --dim-3:     #3a4356;

  /* Accent — brand orange→pink */
  --accent:    #ff8c42;
  --accent-2:  #f72585;
  --accent-glow: rgba(255, 140, 66, .15);

  /* Semantic */
  --green:     #4ed36a;
  --red:       #ff7066;
  --yellow:    #efb544;

  --radius:    12px;
  --radius-sm: 8px;

  /* Single-layer shadows only */
  --shadow:    0 1px 3px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.4);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
        "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(255,140,66,.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: #ffb07a; }

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--dim); font-size: 12.5px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }

* { scrollbar-width: thin; scrollbar-color: var(--border-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--border-3); background-clip: content-box; }

/* -------- app shell -------- */

.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar .brand { margin-bottom: 28px; padding: 0 4px; }

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff8c42, #f72585);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text h1 { font-size: 15px; letter-spacing: .2px; line-height: 1.2; font-weight: 600; }
.brand-text .muted { font-size: 11px; margin-top: 3px; letter-spacing: .04em; }

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--dim-2);
  padding: 0 10px 10px;
  font-weight: 700;
}

#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

#nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--dim);
  border: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
  position: relative;
}

#nav button:hover { background: rgba(255,255,255,.035); color: var(--text-2); }

#nav button.active {
  background: rgba(255,140,66,.1);
  color: var(--accent);
  font-weight: 600;
}

#nav button.active::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

#nav button .ico {
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .7;
  flex-shrink: 0;
}
#nav button .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
#nav button.active .ico { opacity: 1; }

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  font-size: 12px;
  color: var(--dim-2);
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dim-3);
  flex-shrink: 0;
  position: relative;
  transition: background .2s var(--ease);
}
.dot.ok { background: var(--green); }
.dot.bad { background: var(--red); }

.dot.ok::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  animation: pulseGreen 2.4s ease-out infinite;
}
@keyframes pulseGreen {
  0%   { transform: scale(.7); opacity: .8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.main {
  padding: 30px 40px 60px;
  max-width: 1280px;
  width: 100%;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.topbar-title h2 { font-size: 26px; letter-spacing: -.5px; line-height: 1.15; }
.topbar-title .muted { margin-top: 5px; }
.topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* -------- buttons -------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-3);
  color: var(--text);
  border: 1px solid var(--border-3);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .06s var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--panel-4); border-color: #4d638a; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn.primary {
  background: linear-gradient(135deg, #ff8c42, #f72585);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.btn.primary:hover {
  background: linear-gradient(135deg, #ffa05e, #ff3d96);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--dim);
}
.btn.ghost:hover { color: var(--text); background: var(--panel-3); }

.btn svg { width: 16px !important; height: 16px !important; flex-shrink: 0; stroke: currentColor; }

.btn.steam {
  background: #1e2d40;
  border-color: #2c4a63;
  color: #dbe7f2;
  font-weight: 500;
}
.btn.steam .ico svg {
  width: 22px !important;
  height: 22px !important;
  stroke: none;
}
.btn.steam:hover {
  background: #27394f;
  border-color: #66c0f4;
  color: #fff;
}

/* -------- cards / tables -------- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }

th {
  color: var(--dim-2);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .11em;
  background: var(--panel-2);
  user-select: none;
}

tr.clickable { cursor: pointer; transition: background .12s var(--ease); }
tr.clickable:hover { background: rgba(255,140,66,.06); }

td.num { text-align: right; font-variant-numeric: tabular-nums; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  flex-wrap: wrap;
}
.toolbar .sp { flex: 1; min-width: 8px; }

/* -------- pills -------- */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  border: 1px solid transparent;
  letter-spacing: .02em;
  vertical-align: middle;
}
.pill.g { background: rgba(78,211,106,.1); color: #79e08d; border-color: rgba(78,211,106,.24); }
.pill.r { background: rgba(255,112,102,.1); color: #ff9288; border-color: rgba(255,112,102,.3); }
.pill.y { background: rgba(239,181,68,.1); color: #f6c869; border-color: rgba(239,181,68,.26); }
.pill.n { background: rgba(122,138,160,.08); color: var(--dim); border-color: rgba(122,138,160,.18); }
.pill.accent { background: rgba(255,140,66,.12); color: #ffb07a; border-color: rgba(255,140,66,.3); }

/* -------- empty / skeleton -------- */

.empty {
  color: var(--dim);
  text-align: center;
  padding: 72px 24px;
  font-size: 13.5px;
}
.empty .big {
  font-size: 36px;
  opacity: .22;
  display: block;
  margin-bottom: 14px;
  color: var(--dim-2);
}
.empty .sub { font-size: 12px; color: var(--dim-3); margin-top: 8px; }

.skel-row { padding: 16px 20px; display: flex; gap: 16px; align-items: center; }
.skel {
  height: 14px;
  border-radius: 6px;
  background: var(--panel-2);
  animation: skelPulse 1.6s ease-in-out infinite;
}
.skel-sm { width: 60px; }
.skel-md { width: 120px; }
.skel-lg { width: 200px; flex: 1; }
@keyframes skelPulse {
  0%, 100% { opacity: .45; }
  50%      { opacity: .85; }
}

/* -------- toast -------- */

.toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--panel-2);
  border: 1px solid var(--border-3);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateY(14px);
  opacity: 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
  max-width: 380px;
  pointer-events: auto;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok  { border-color: rgba(78,211,106,.5); color: #bef3c8; }
.toast.err { border-color: rgba(255,112,102,.5); color: #ffc7c2; }

/* -------- modal -------- */

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(3,5,9,.85);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 20px;
  overflow-y: auto;
  z-index: 100;
  animation: fadeIn .15s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--panel-2);
  border: 1px solid var(--border-3);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 760px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .22s var(--ease);
}
@keyframes slideUp {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 12px;
}
.modal h2 { font-size: 19px; letter-spacing: -.3px; }
.modal h2 .mono { color: var(--accent); font-size: 16px; }
.modal .close {
  background: transparent;
  border: none;
  color: var(--dim-2);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
  border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease);
  flex-shrink: 0;
}
.modal .close:hover { color: var(--text); background: rgba(255,255,255,.07); }

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 11px 22px;
  margin: 0;
  font-size: 13px;
}
.kv dt { color: var(--dim-2); }
.kv dd { margin: 0; word-break: break-all; color: var(--text-2); }

/* -------- inputs -------- */

input.txt {
  width: 100%;
  background: #06090f;
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input.txt::placeholder { color: var(--dim-3); }
input.txt:hover { border-color: var(--border-3); }
input.txt:focus {
  outline: none;
  background: #04070c;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.txt {
  width: 100%;
  background: #06090f;
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2377879f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 38px;
}
select.txt:hover { border-color: var(--border-3); }
select.txt:focus {
  outline: none;
  background-color: #04070c;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select.txt option { background: #131a26; color: var(--text); }

/* -------- home page -------- */

.hero {
  border-radius: var(--radius);
  padding: 42px 40px 38px;
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, rgba(255,140,66,.07), rgba(247,37,133,.05) 60%, transparent),
    var(--panel-2);
  border: 1px solid var(--border-2);
}

.hero h1 {
  font-size: 40px;
  letter-spacing: -1.2px;
  line-height: 1.05;
  color: var(--text);
}
.hero h1 .accent { color: var(--accent); }

.hero p {
  margin: 14px 0 0;
  max-width: 560px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

.hero .cta-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.quick-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: border-color .15s var(--ease), transform .15s var(--ease), background .15s var(--ease);
  position: relative;
  overflow: hidden;
}
.quick-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--panel-3);
}
.quick-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ff8c42, #f72585);
}
.quick-card h3 { font-size: 15px; margin-bottom: 6px; }
.quick-card p { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.quick-card .arrow {
  position: absolute;
  top: 20px; right: 20px;
  color: var(--dim-3);
  font-size: 18px;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.quick-card:hover .arrow { color: var(--accent); transform: translateX(2px); }

/* -------- news list -------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.news-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.news-card .thumb {
  width: 100%;
  height: 150px;
  background: var(--panel-3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  position: relative;
}
.news-card .thumb.no-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,140,66,.1), rgba(247,37,133,.06)),
    var(--panel-3);
}
.news-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}
.news-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.news-card .meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--dim-2);
}

.news-detail-hero {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  max-height: 320px;
  object-fit: cover;
  display: block;
  background: rgba(0,0,0,.25);
}

.news-detail-body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.news-detail-body p { margin: 0 0 14px; }

/* -------- player profile card -------- */

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,140,66,.05), rgba(247,37,133,.03));
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff8c42, #f72585);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-meta h2 { font-size: 22px; letter-spacing: -.3px; }
.profile-meta .sub { margin-top: 4px; color: var(--dim); font-size: 13px; }

/* -------- responsive -------- */

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .sidebar .brand { margin-bottom: 0; }
  .nav-label { display: none; }
  #nav { flex-direction: row; gap: 4px; flex: 1; overflow-x: auto; }
  #nav button { padding: 8px 12px; font-size: 13px; }
  #nav button.active {
    background: rgba(255,140,66,.08);
    box-shadow: inset 0 -2px 0 var(--accent);
  }
  #nav button.active::before { display: none; }
  .sidebar-foot {
    border-top: none;
    margin-top: 0;
    padding: 0 8px;
    flex-shrink: 0;
  }

  .main { padding: 22px 18px 44px; }
  .topbar { align-items: flex-start; }
  .topbar-title h2 { font-size: 22px; }
  .hero { padding: 30px 24px 26px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 14px; }
  .modal-bg { padding: 26px 12px; }
  .modal { padding: 22px; border-radius: 14px; }
  .kv { grid-template-columns: 120px 1fr; gap: 9px 14px; }
}

@media (max-width: 480px) {
  .topbar-actions .btn span:not(.ico) { display: none; }
  .topbar-actions .btn { padding: 8px 10px; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ==========================================================================
   Visual refresh — stats, rank badges, avatars, commends
   --------------------------------------------------------------------------
   iGPU-safe: no filter / backdrop-filter, no background-clip:text, only
   single radial / linear gradients, single-layer shadows, one transition per
   property. All animations are opacity/transform (compositor only).
   ========================================================================== */

/* -------- hero -------- */

.hero { position: relative; overflow: hidden; }

.hero::before {
  content: "";
  position: absolute;
  top: -90px; right: -90px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,140,66,.10), transparent 65%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,140,66,.10);
  color: #ffb07a;
  border: 1px solid rgba(255,140,66,.25);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1, .hero p, .hero .cta-row { position: relative; z-index: 1; }

/* -------- profile head -------- */

.profile-head { position: relative; overflow: hidden; }
.profile-head::before {
  content: "";
  position: absolute;
  top: -40%; right: -10%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,140,66,.08), transparent 70%);
  pointer-events: none;
}
.profile-head > * { position: relative; }

.profile-avatar {
  border: 1px solid rgba(255,255,255,.08);
}
.profile-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* -------- stat grid -------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.stat-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.stat-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}

.stat-card.span2 { grid-column: span 2; }

.stat-label {
  color: var(--dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.stat-value.stat-danger { color: var(--red); }

.stat-sub {
  color: var(--dim-2);
  font-size: 11.5px;
  margin-top: 4px;
}

.stat-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.xp-track {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8c42, #f72585);
  border-radius: inherit;
  transition: width .4s var(--ease);
}

/* -------- rank badges -------- */

.rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.rank-unranked { background: rgba(122,138,160,.1);  color: var(--dim); border-color: rgba(122,138,160,.2); }
.rank-silver   { background: rgba(176,184,200,.12); color: #c3cad8;     border-color: rgba(176,184,200,.28); }
.rank-nova     { background: rgba(239,181,68,.12);  color: #f0c35e;     border-color: rgba(239,181,68,.3); }
.rank-mg       { background: rgba(78,150,255,.12);  color: #6cabff;     border-color: rgba(78,150,255,.3); }
.rank-eagle    { background: rgba(157,107,255,.12); color: #b599ff;     border-color: rgba(157,107,255,.3); }
.rank-supreme  { background: rgba(255,112,102,.12); color: #ff9288;     border-color: rgba(255,112,102,.32); }
.rank-global   { background: linear-gradient(135deg, rgba(255,140,66,.16), rgba(247,37,133,.16));
                 color: #ffb07a; border-color: rgba(255,140,66,.4); }

/* -------- commends -------- */

.commend-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.commend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
}

.commend-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--panel-3);
  font-size: 18px;
  flex-shrink: 0;
}
.commend-icon svg { width: 24px; height: 24px; display: block; }

.commend-val {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}

.commend-label {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  margin-top: 2px;
}

/* -------- penalty -------- */

.penalty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
}

/* -------- LTP table -------- */

.ltp-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ff8c42, #f72585);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.btn.small {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* -------- news card placeholder icon -------- */

.news-card .thumb.no-img::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  transform: translate(-50%, -50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/%3E%3Cpath d='M18 14h-8'/%3E%3Cpath d='M15 18h-5'/%3E%3Cpath d='M10 6h8v4h-8V6z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .16;
  z-index: 1;
  pointer-events: none;
}

/* -------- responsive -------- */

@media (max-width: 700px) {
  .commend-row { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .stat-card.span2 { grid-column: 1 / -1; }
  .stat-grid { padding: 18px; gap: 10px; }
}

/* ==========================================================================
   Community links + Download modal
   ========================================================================== */

.social-row {
  display: flex;
  gap: 8px;
}

.social-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s var(--ease),
              border-color .15s var(--ease),
              color .15s var(--ease);
}

.social-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.social-btn:hover {
  background: var(--panel-3);
  border-color: var(--border-3);
  color: var(--text);
}

.social-btn.discord:hover {
  border-color: #5865f2;
  color: #99a5ff;
}

.social-btn.telegram:hover {
  border-color: #29a9eb;
  color: #7fd1f5;
}

/* ---- download modal ---- */

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.download-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 15px 18px;
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .15s var(--ease),
              border-color .15s var(--ease),
              transform .06s var(--ease);
}

.download-option:hover {
  background: var(--panel-4);
  border-color: var(--border-3);
}
.download-option:active { transform: translateY(1px); }
.download-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.download-option.discord:hover  { border-color: #5865f2; }
.download-option.telegram:hover { border-color: #29a9eb; }

.download-option .dl-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.download-option.discord  .dl-icon { color: #99a5ff; }
.download-option.telegram .dl-icon { color: #7fd1f5; }

.download-option .dl-icon svg {
  width: 22px;
  height: 22px;
}

.download-option .dl-text {
  flex: 1;
  min-width: 0;
}

.download-option .dl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.download-option .dl-sub {
  font-size: 12px;
  color: var(--dim);
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-option .dl-arrow {
  color: var(--dim-3);
  font-size: 18px;
  transition: color .15s var(--ease), transform .15s var(--ease);
}

.download-option:hover .dl-arrow {
  color: var(--accent);
  transform: translateX(2px);
}