/* ==========================================================================
   FORGAMES.UZ  -  design system v1  (config.tpl: {var:theme}3)
   Loaded AFTER main.css and theme_ghost.css (dark base). Everything is scoped to body.fg,
   so removing the theme (set {var:theme}2) restores the old look with no other change.

   Rules that protect GameCMS behaviour:
   * Server cards (.fg-server) must NOT get transform / filter / backdrop-filter / will-change /
     contain / z-index / opacity<1: the players + RCON modals live INSIDE the card and are
     position:fixed - any of those properties would trap them inside the card.
   * Do not rename legacy hooks (#servers, .monitoring, .collapsible, .user-menu, .modal...).
   ========================================================================== */

:root {
  --fg-bg: #0b0b0d;
  --fg-surface: #131316;
  --fg-surface-2: #18181c;
  --fg-surface-3: #202026;
  --fg-border: rgba(255, 255, 255, .07);
  --fg-border-strong: rgba(255, 255, 255, .14);
  --fg-text: #e6e8f0;
  --fg-muted: #98a0b6;
  --fg-faint: #6a7189;
  --fg-accent: #ff6a2b;          /* text / icons on dark */
  --fg-accent-solid: #e04a14;    /* button background (white text = AA) */
  --fg-accent-hover: #ff5a1f;
  --fg-accent-soft: rgba(255, 106, 43, .14);
  --fg-ok: #34d399;
  --fg-warn: #f5a524;
  --fg-danger: #f0586a;
  --fg-info: #60a5fa;
  --fg-radius: 14px;
  --fg-radius-sm: 9px;
  --fg-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --fg-font: Inter, "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fg-header-h: 64px;
}

/* ---------- base ---------------------------------------------------------- */
html { scroll-behavior: smooth; }
html, body.fg {
  height: auto; min-height: 100%;
  background: var(--fg-bg);
  color: var(--fg-text);
  font-family: var(--fg-font);
  font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.fg { background: radial-gradient(1100px 520px at 50% -160px, rgba(255, 90, 31, .16), transparent 70%), var(--fg-bg); }
.fg ::selection { background: rgba(255, 106, 43, .45); color: #fff; }
.fg a, .fg a[onclick] { color: var(--fg-accent); text-decoration: none; transition: color .15s; }
.fg a:hover, .fg a[onclick]:hover { color: #ffb38f; text-decoration: none; }
.fg h1, .fg h2, .fg h3, .fg h4, .fg h5, .fg h6 { font-family: var(--fg-font); color: var(--fg-text); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.fg hr { border-color: var(--fg-border); }
.fg .text-muted, .fg small { color: var(--fg-muted) !important; }
.fg .container { max-width: 1240px; padding-left: 20px; padding-right: 20px; }
.fg .wapper { height: auto; min-height: 100vh; padding: 0; }
.fg .wapper > .content { flex: 1 0 auto; width: 100%; }
.fg ::-webkit-scrollbar { width: 10px; height: 10px; }
.fg ::-webkit-scrollbar-track { background: transparent; }
.fg ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 10px; border: 2px solid var(--fg-bg); }
.fg #servers { scroll-margin-top: calc(var(--fg-header-h) + 16px); }
.fg :focus-visible { outline: 2px solid var(--fg-accent); outline-offset: 2px; }

/* ---------- column order: content first, sidebar on the right (legacy had the sidebar on the left) ---------- */
@media (min-width: 992px) {
  .fg .order-is-first { order: -1; }
  .fg .order-is-last { order: 13; }
}

/* ---------- reset legacy "bleed" margins (old blocks had 30px padding and pulled children out with -30px) -------- */
.fg .block.block-search > .input-search { margin: 0 0 14px; padding: 0; width: auto; background: none; border: 0; }
.fg .block .block_head_image { width: auto; margin: 0 0 16px; border-radius: 10px; }
.fg .vertical-navigation { margin: 0; padding: 0; }
.fg .vertical-navigation ul li a.active { margin: 0; padding: 9px 12px; background: var(--fg-accent-soft); border: 0; color: #fff; }
.fg #new_news, .fg .news { margin-left: 0; margin-right: 0; margin-bottom: 0; }
.fg .topic-answers { margin-left: 0; margin-right: 0; margin-bottom: 0; }
.fg #forum .row:last-child, .fg #forum_topics .row:last-child, .fg #forum.row:last-child, .fg #forum_topics.row:last-child { margin-bottom: 0; }

/* ---------- eyebrow / section head ---------------------------------------- */
.fg .fg-eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-accent); }
.fg .fg-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.fg .fg-section-head h2 { margin: 0; font-size: 20px; }
.fg .fg-section-head span { font-size: 12px; color: var(--fg-muted); letter-spacing: .06em; }

/* ---------- header --------------------------------------------------------- */
.fg .wapper .header {
  position: sticky; top: 0; z-index: 1030;
  min-height: 0; height: auto;
  background: rgba(8, 10, 16, .88);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--fg-border);
}
.fg .wapper .header .container { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 0 18px; min-height: var(--fg-header-h); }
.fg .wapper .header .clearfix { display: none !important; }

.fg .fg-brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--fg-text) !important; text-decoration: none !important; order: 1; }
.fg .fg-brand__mark { width: 34px; height: 34px; border-radius: 9px; display: block; }
.fg .fg-brand__text { display: flex; flex-direction: column; line-height: 1; }
.fg .fg-brand__text b { font-size: 17px; font-weight: 800; letter-spacing: .04em; color: var(--fg-text); }
.fg .fg-brand__text b i { font-style: normal; color: var(--fg-accent); }
.fg .fg-brand__text small { margin-top: 5px; font-size: 9.5px; font-weight: 600; letter-spacing: .22em; color: var(--fg-muted); }

.fg .wapper .header #hidden-menu { order: 2; }
.fg .wapper .header .collapsible-menu { font-family: var(--fg-font); list-style: none; margin: 0; padding: 0; }
.fg .wapper .header .collapsible-menu > li { position: relative; }
.fg .wapper .header .collapsible-menu > li > a {
  position: relative; display: block; height: auto; float: none; white-space: nowrap;
  padding: 8px 9px; margin: 0; line-height: 20px; font-family: var(--fg-font);
  font-size: 13.5px; font-weight: 500; color: var(--fg-muted);
  background: none; border: 0; border-radius: var(--fg-radius-sm);
  transition: color .15s, background .15s;
}
.fg .wapper .header .collapsible-menu > li > a::before { display: none; }
.fg .wapper .header .collapsible-menu > li:not(.collapsible) > a::after { display: none; }   /* legacy vertical separators */
.fg .wapper .header .collapsible-menu > li > a:hover,
.fg .wapper .header .collapsible-menu > li > a.open { color: var(--fg-text); background: var(--fg-surface-3); border: 0; }
.fg .wapper .header .collapsible-menu > li.collapsible { padding-right: 0; }
.fg .wapper .header .collapsible-menu > li.collapsible::after,
.fg .wapper .header .collapsible-menu > li.collapsible::before { display: none; }
.fg .wapper .header .collapsible-menu > li.collapsible > a { width: auto; }
.fg .wapper .header .collapsible-menu > li.collapsible > a::after {
  content: "\f078"; font-family: "Font Awesome 5 Free", "FontAwesome"; font-weight: 900; font-size: 8px;
  position: static; display: inline-block; width: auto; height: auto; background: none; margin-left: 7px; vertical-align: 1px; opacity: .7;
}
.fg .wapper .header .collapsible-menu > li ul {
  list-style: none; margin: 0; padding: 6px; z-index: 1040;
  background: var(--fg-surface-2); border: 1px solid var(--fg-border-strong);
  border-radius: 12px; box-shadow: var(--fg-shadow); overflow: hidden;
  min-width: 190px !important;
}
.fg .wapper .header .collapsible-menu > li ul > li:hover { background: none; }
.fg .wapper .header .collapsible-menu > li ul > li > a {
  display: block; height: auto; width: auto; margin: 0; padding: 9px 12px; line-height: 20px;
  font-size: 13px; color: var(--fg-text); border: 0; border-radius: 8px; white-space: nowrap;
}
.fg .wapper .header .collapsible-menu > li ul > li > a:hover { background: var(--fg-accent-soft); color: #fff; }
.fg .wapper .header .collapsible-menu > li.fg-nav-sep { width: 1px; height: 18px; margin: 0 8px; background: var(--fg-border-strong); }

/* guest actions */
.fg .fg-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; order: 3; }
.fg .fg-header-actions .btn { margin: 0; }

/* authorised user menu (markup injected by core: home/left.tpl) */
.fg .wapper .header .collapsible-menu.user-menu { order: 3; margin-left: auto; width: auto; height: auto; float: none; overflow: visible; position: relative; top: auto; right: auto; }
.fg .wapper .header .collapsible-menu.user-menu > li { width: auto; height: auto; padding: 0; position: relative; }
.fg .wapper .header .collapsible-menu.user-menu > li > a {
  display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; align-items: center;
  width: auto; min-width: 150px; height: auto; padding: 6px 10px 6px 6px; background: var(--fg-surface-2); border: 1px solid var(--fg-border);
}
.fg .wapper .header .collapsible-menu.user-menu > li > a:hover,
.fg .wapper .header .collapsible-menu.user-menu > li > a.open { background: var(--fg-surface-3); border: 1px solid var(--fg-border-strong); }
.fg .wapper .header .collapsible-menu.user-menu > li > a > img { grid-row: 1 / 3; float: none; width: 36px; height: 36px; margin: 0; border-radius: 50%; object-fit: cover; }
.fg .wapper .header .collapsible-menu.user-menu > li > a > h3,
.fg .wapper .header .collapsible-menu.user-menu > li > a > p {
  position: static; grid-column: 2; width: auto; max-width: 140px; margin: 0; text-align: left; right: auto; top: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fg .wapper .header .collapsible-menu.user-menu > li > a > h3 { grid-row: 1; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--fg-text); letter-spacing: 0; }
.fg .wapper .header .collapsible-menu.user-menu > li > a > p { grid-row: 2; height: auto; font-size: 11px; line-height: 14px; color: var(--fg-muted); }
.fg .wapper .header .collapsible-menu.user-menu > li.collapsible > a::after { grid-column: 3; grid-row: 1 / 3; margin: 0; }
.fg .wapper .header .collapsible-menu.user-menu .point { position: absolute; top: 4px; left: 36px; right: auto; width: 10px; height: 10px; background: var(--fg-ok); border: 2px solid var(--fg-surface-2); border-radius: 50%; }
.fg .wapper .header .collapsible-menu.user-menu #check_mess { position: absolute; top: -6px; right: -4px; z-index: 2; }
.fg .wapper .header .collapsible-menu.user-menu > li > ul { position: absolute; right: 0; left: auto; top: calc(100% + 8px); min-width: 230px !important; }
.fg .wapper .header .collapsible-menu.user-menu > li > ul > li > a { height: auto; width: auto; margin: 0; }

/* desktop nav */
@media (min-width: 992px) {
  .fg .wapper .header .container { flex-wrap: nowrap; }
  .fg .wapper .header #hidden-menu { flex: 1 1 0; min-width: 0; }
  .fg .wapper .header .collapsible-menu { display: flex; align-items: center; flex-wrap: wrap; width: auto; height: auto; overflow: visible; float: none; gap: 2px; }
  .fg .wapper .header .collapsible-menu > li { float: none; }
  .fg .wapper .header .collapsible-menu > li > a { height: auto; }
  .fg .wapper .header .collapsible-menu > li ul { position: absolute; top: calc(100% + 8px); left: 0; }
  .fg .wapper .header .menu-trigger { display: none !important; }
  .fg .wapper .header .collapsible-menu.user-menu { display: block; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .fg .wapper .header .collapsible-menu > li > a { padding: 8px 8px; font-size: 13px; }
  .fg .fg-brand__text small { display: none; }
}

/* mobile nav */
.fg .wapper .header .menu-trigger {
  order: 4; flex: 0 0 auto; width: 40px; height: 40px; margin: 0 0 0 10px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fg-surface-2); color: var(--fg-text); border: 1px solid var(--fg-border-strong); border-radius: 10px; font-size: 16px; line-height: 1;
}
.fg .wapper .header .menu-trigger:hover, .fg .wapper .header .menu-trigger:focus, .fg .wapper .header .menu-trigger:active,
.fg .wapper .header .menu-trigger:not(:disabled):not(.disabled):active { background: var(--fg-surface-3); color: #fff; border-color: rgba(255, 106, 43, .55); box-shadow: none; outline: 0; }
@media (max-width: 991.98px) {
  .fg .wapper .header .container { min-height: 58px; }
  .fg .wapper .header #hidden-menu { order: 6; flex: 0 0 100%; padding: 4px 0 12px; border-top: 1px solid var(--fg-border); margin-top: 0; }
  .fg .wapper .header .collapsible-menu { display: block; }
  .fg .wapper .header .collapsible-menu > li { display: block; }
  .fg .wapper .header .collapsible-menu > li > a { height: auto; padding: 12px 10px; border-bottom: 0; font-size: 15px; }
  .fg .wapper .header .collapsible-menu > li.collapsible > a { width: 100%; }
  .fg .wapper .header .collapsible-menu > li ul { position: static; margin: 2px 0 6px 10px; box-shadow: none; background: var(--fg-surface); min-width: 0 !important; }
  .fg .wapper .header .collapsible-menu > li.fg-nav-sep { width: auto; height: 1px; margin: 6px 0; }
  .fg .wapper .header .collapsible-menu.user-menu { order: 3; margin-left: auto; position: relative; width: auto; }
  .fg .wapper .header .collapsible-menu.user-menu > li { position: relative; width: auto; height: auto; }
  .fg .wapper .header .collapsible-menu.user-menu > li > ul { position: absolute; margin: 0; }
  .fg .wapper .header .collapsible-menu.user-menu > li > ul > li > a { padding: 11px 12px; }
}
@media (max-width: 575.98px) {
  .fg .wapper .header .container { gap: 0 10px; }
  .fg .wapper .header .menu-trigger { margin-left: 0; }
  .fg .fg-header-actions .auth-reg { display: none; }
  .fg .fg-brand__text small { display: none; }
  .fg .wapper .header .collapsible-menu.user-menu > li > a { min-width: 0; grid-template-columns: auto auto; padding: 4px 8px 4px 4px; }
  .fg .wapper .header .collapsible-menu.user-menu > li > a > h3,
  .fg .wapper .header .collapsible-menu.user-menu > li > a > p { display: none; }
  .fg .wapper .header .collapsible-menu.user-menu > li.collapsible > a::after { grid-column: 2; }
}

/* breadcrumbs ({page_name} / {nav} come from core) */
.fg .wapper .navigation { height: auto; margin: 0 0 18px; background: transparent; border-bottom: 1px solid var(--fg-border); }
.fg .wapper .navigation .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; height: auto; min-height: 40px; line-height: 40px; margin: 0; padding: 0; background: none; font-size: 12.5px; color: var(--fg-muted); overflow: visible; white-space: normal; }
.fg .wapper .navigation .breadcrumb > li { display: inline-flex; margin: 0; font-size: 12.5px; }
.fg .wapper .navigation .breadcrumb > li + li::before { content: "/"; margin: 0 9px; color: var(--fg-faint); padding: 0; }
.fg .wapper .navigation .breadcrumb > li a { color: var(--fg-muted); }
.fg .wapper .navigation .breadcrumb > li a:hover { color: var(--fg-text); }
.fg .wapper .navigation .breadcrumb > li.active { color: var(--fg-text); }

/* ---------- buttons --------------------------------------------------------- */
.fg .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: auto; padding: 9px 16px; margin: 0;
  font-family: var(--fg-font); font-size: 13.5px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; text-decoration: none;
  border: 1px solid transparent; border-radius: var(--fg-radius-sm); box-shadow: none; text-shadow: none;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.fg .btn-block { display: flex; width: 100%; }
.fg .btn-block + .btn-block { margin-top: 8px; }
.fg .btn.btn-primary, .fg .btn.btn-outline-primary, .fg .btn.btn-default, .fg .btn.btn-success, .fg .btn.btn-danger { font-weight: 600; }   /* legacy a.btn.btn-outline-primary sets weight 100 */
.fg .btn-sm, .fg .btn-xs { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.fg .btn-xl, .fg .btn-lg { padding: 12px 22px; font-size: 14.5px; }
.fg .btn.btn-primary, .fg .btn.btn-primary:focus { background: var(--fg-accent-solid); border-color: var(--fg-accent-solid); color: #fff; }
.fg .btn.btn-primary:not([disabled]):not(.disabled):hover, .fg .btn.btn-primary:not([disabled]):not(.disabled):active, .fg .btn.btn-primary:not([disabled]):not(.disabled):focus:active { background: var(--fg-accent-hover); border-color: var(--fg-accent-hover); color: #fff; box-shadow: none; }
.fg .btn.btn-outline-primary, .fg .btn.btn-outline-primary:focus { background: transparent; border-color: var(--fg-border-strong); color: var(--fg-text); }
.fg .btn.btn-outline-primary:not([disabled]):not(.disabled):hover, .fg .btn.btn-outline-primary:not([disabled]):not(.disabled):active { background: var(--fg-surface-3); border-color: rgba(255, 106, 43, .55); color: #fff; box-shadow: none; }
.fg .btn.btn-default, .fg .btn.btn-secondary, .fg .btn.btn-default:focus { background: var(--fg-surface-3); border-color: var(--fg-border); color: var(--fg-text); }
.fg .btn.btn-default:not([disabled]):not(.disabled):hover, .fg .btn.btn-secondary:not([disabled]):not(.disabled):hover, .fg .btn.btn-default:not([disabled]):not(.disabled):active { background: #232a42; border-color: var(--fg-border-strong); color: #fff; box-shadow: none; }
.fg .btn.btn-success { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .35); color: var(--fg-ok); }
.fg .btn.btn-success:not([disabled]):not(.disabled):hover { background: rgba(52, 211, 153, .24); border-color: rgba(52, 211, 153, .5); color: #6ee7b7; box-shadow: none; }
.fg .btn.btn-danger { background: rgba(240, 88, 106, .14); border-color: rgba(240, 88, 106, .4); color: #ff8b99; }
.fg .btn.btn-danger:not([disabled]):not(.disabled):hover { background: rgba(240, 88, 106, .26); border-color: rgba(240, 88, 106, .6); color: #ffb3bc; box-shadow: none; }
.fg .btn.btn-link { background: none; border: 0; color: var(--fg-accent); padding: 0 4px; }
.fg .btn:disabled, .fg .btn.disabled { opacity: .5; cursor: not-allowed; }
.fg .btn.auth-in, .fg .btn.auth-reg { position: static; float: none; margin: 0; }

/* ---------- badges ---------------------------------------------------------- */
.fg .fg-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; white-space: nowrap;
  color: var(--fg-muted); background: rgba(255, 255, 255, .06); border: 1px solid var(--fg-border);
}
.fg .fg-badge--online { color: var(--fg-ok); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .28); }
.fg .fg-badge--online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fg .fg-badge--nodata { color: var(--fg-muted); }
.fg .fg-badge--danger { color: #ff8b99; background: rgba(240, 88, 106, .1); border-color: rgba(240, 88, 106, .3); }
.fg .fg-badge--muted { color: var(--fg-faint); }
.fg .fg-badge--accent { color: #c4b5ff; background: var(--fg-accent-soft); border-color: rgba(255, 106, 43, .35); }
.fg .fg-badge--warn { color: var(--fg-warn); background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .3); }

/* ---------- blocks / sidebars ----------------------------------------------- */
.fg .block, .fg .wapper .block {
  margin: 0 0 16px; padding: 22px;
  background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: var(--fg-radius);
  box-shadow: none; background-image: none;
}
.fg .block_head, .fg .wapper .block .block_head {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  margin: 0 0 16px; padding: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--fg-text); background: none; border: 0;
}
.fg .block_head::before { content: ""; flex: 0 0 3px; align-self: stretch; min-height: 16px; border-radius: 3px; background: var(--fg-accent); margin-right: 2px; }
.fg .block_head > button, .fg .block_head > a { margin-left: auto; }
.fg .block.block-search .block_head { margin-bottom: 14px; }
.fg .vertical-navigation ul { list-style: none; margin: 0; padding: 0; }
.fg .vertical-navigation ul li { margin: 0; border: 0; }
.fg .vertical-navigation ul li a { display: block; height: auto; line-height: 20px; padding: 9px 12px; margin: 0; border: 0; border-radius: 8px; color: var(--fg-muted); font-size: 13.5px; font-weight: 500; }
.fg .vertical-navigation ul li a:hover { background: var(--fg-accent-soft); color: #fff; }
.fg .order-is-last .block { padding: 18px; }
.fg #online_users a, .fg #online_users .user { color: var(--fg-text); }
.fg .empty-element { padding: 28px 12px; text-align: center; color: var(--fg-muted); }

/* ---------- hero + quick links ---------------------------------------------- */
.fg .fg-hero {
  position: relative; overflow: hidden; margin: 0 0 16px; padding: 44px 38px;
  border: 1px solid var(--fg-border); border-radius: 20px;
  background: radial-gradient(560px 260px at 88% -10%, rgba(255, 90, 31, .32), transparent 70%), linear-gradient(180deg, var(--fg-surface-2), var(--fg-surface));
}
.fg .fg-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 14px); -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000); mask-image: linear-gradient(90deg, transparent 35%, #000); }
.fg .fg-hero > * { position: relative; z-index: 1; }
.fg .fg-hero__title { margin: 0 0 12px; font-size: clamp(34px, 6vw, 58px); font-weight: 800; line-height: 1; letter-spacing: -.025em; }
.fg .fg-hero__title span { color: var(--fg-accent); }
.fg .fg-hero__lead { max-width: 520px; margin: 0 0 24px; font-size: 16px; line-height: 1.55; color: var(--fg-muted); }
.fg .fg-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.fg .fg-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.fg .fg-quick__item {
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: 12px;
  color: var(--fg-text); transition: border-color .15s, background .15s;
}
.fg .fg-quick__item:hover { border-color: rgba(255, 106, 43, .5); background: var(--fg-surface-2); color: var(--fg-text); }
.fg .fg-quick__item i { grid-row: 1 / 3; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--fg-accent-soft); color: var(--fg-accent); font-size: 15px; }
.fg .fg-quick__item b { font-size: 14px; font-weight: 700; line-height: 1.2; }
.fg .fg-quick__item span { font-size: 12px; line-height: 1.35; color: var(--fg-muted); }

/* ---------- server monitor ---------------------------------------------------- */
.fg .fg-servers { margin: 0 0 22px; }
.fg .wapper .monitoring { height: auto; max-height: none; max-width: none; width: 100%; overflow: visible; margin: 0; text-align: left; position: static; border-radius: 0; }
.fg .wapper .monitoring > div { white-space: normal; height: auto; width: 100%; }
.fg .wapper .monitoring #servers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fg .wapper .monitoring #servers > .loader { grid-column: 1 / -1; }
.fg .wapper .monitoring #servers > .server:first-child,
.fg .wapper .monitoring #servers > .server:last-child { margin: 0 !important; }
.fg .wapper .monitoring .server,
.fg .wapper .monitoring .server:nth-child(2n+1),
.fg .wapper .monitoring .server:nth-child(3n) {
  position: relative; display: flex; flex-direction: column; gap: 12px; width: auto; height: auto; margin: 0; padding: 16px;
  background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); box-shadow: none;
  transition: border-color .15s, background .15s;       /* no transform here: modals live inside */
}
.fg .wapper .monitoring .server:hover { border-color: rgba(255, 106, 43, .45); background: var(--fg-surface-2); }
.fg .fg-server__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fg .wapper .monitoring .server h3.fg-server__name { flex: 1 1 auto; min-width: 0; margin: 0; width: auto; font-size: 15px; line-height: 1.25; font-weight: 700; color: var(--fg-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg .fg-server__manage { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--fg-muted); cursor: pointer; transition: background .15s, color .15s; }
.fg .fg-server__manage:hover { background: var(--fg-surface-3); color: #fff; }
.fg .wapper .monitoring .server .map-image { position: relative; left: auto; bottom: auto; width: 100%; height: auto; aspect-ratio: 16 / 7; border-radius: 10px; background-size: cover !important; background-position: center !important; background-color: var(--fg-surface-3); border: 1px solid var(--fg-border); }
.fg .fg-server__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.fg .fg-server__meta > div { min-width: 0; }
.fg .fg-server__meta dt { margin: 0 0 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-server__meta dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--fg-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fg .fg-server__players { cursor: pointer; }
.fg .fg-server__players:hover { color: var(--fg-accent); }
.fg .fg-server__bar { height: 5px; margin: -2px 0 0; background: rgba(255, 255, 255, .07); border-radius: 999px; box-shadow: none; overflow: hidden; }
.fg .progress-bar { background: var(--fg-accent); border-radius: 999px; box-shadow: none; }
.fg .progress-bar.bg-success { background: var(--fg-ok) !important; }
.fg .progress-bar.bg-warning { background: var(--fg-warn) !important; }
.fg .progress-bar.bg-danger { background: var(--fg-danger) !important; }
.fg .fg-server__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--fg-border); }
.fg .fg-server__ip { min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--fg-muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg .fg-server__ip:hover { color: var(--fg-accent); }
.fg .fg-server__links { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.fg .fg-server__links a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--fg-muted); font-size: 12px; }
.fg .fg-server__links a:hover { background: var(--fg-accent-soft); color: #fff; }
.fg .monitoring-table { background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); }

/* compact monitor on every page except the homepage (the hero marks the homepage) */
.fg:not(:has(.fg-hero)) .fg-servers .map-image { display: none; }
.fg:not(:has(.fg-hero)) .wapper .monitoring .server { gap: 8px; padding: 12px 14px; }
.fg:not(:has(.fg-hero)) .fg-server__foot { padding-top: 8px; }
.fg:not(:has(.fg-hero)) .fg-server__meta dt { display: none; }
.fg:not(:has(.fg-hero)) .fg-servers .fg-section-head { margin-bottom: 10px; }
@media (max-width: 991.98px) {
  .fg .wapper .monitoring #servers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .fg .wapper .monitoring #servers { grid-template-columns: minmax(0, 1fr); }
  /* inner pages on phones: swipeable strip instead of 8 stacked cards */
  .fg:not(:has(.fg-hero)) .wapper .monitoring #servers { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .fg:not(:has(.fg-hero)) .wapper .monitoring #servers > .server { flex: 0 0 78%; scroll-snap-align: start; }
  /* homepage on phones: same compact strip, so the hero is reachable without scrolling past 8 tall cards */
  .fg .fg-servers .map-image { display: none; }
  .fg .wapper .monitoring .server { gap: 8px; padding: 12px 14px; }
  .fg .fg-server__foot { padding-top: 8px; }
  .fg .fg-server__meta dt { display: none; }
  .fg .wapper .monitoring #servers { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .fg .wapper .monitoring #servers > .server { flex: 0 0 78%; scroll-snap-align: start; }
}

/* ---------- authorised home: welcome board + privileges banner -------------------------------- */
.fg #hero1.fg-board, .fg .fg-board { margin: 0 0 16px; padding: 22px 22px 18px; background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); overflow: visible; }   /* #hero1 = legacy id kept; this beats its old rule */
.fg .fg-board__hello { text-align: center; margin-bottom: 18px; }
.fg .fg-board__hello h4 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--fg-text); background: none; -webkit-text-fill-color: currentColor; }
.fg .fg-board__hello p { margin: 0; color: var(--fg-muted); font-size: 14px; }
.fg .fg-board__hello strong { color: var(--fg-accent); font-weight: 700; }
.fg .fg-board__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fg .fg-board__grid li { margin: 0; padding: 0; }
.fg .fg-board__grid a { display: flex; align-items: center; gap: 10px; height: 100%; padding: 10px 12px; border: 1px solid var(--fg-border); border-radius: var(--fg-radius-sm); background: var(--fg-bg); color: var(--fg-text); font-size: 13.5px; font-weight: 600; transition: border-color .15s, background .15s; }
.fg .fg-board__grid a:hover { border-color: rgba(255, 106, 43, .5); background: var(--fg-surface-3); color: #fff; }
.fg .fg-board__ic { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--fg-accent-soft); }
.fg .fg-board__ic img { width: 20px; height: 20px; object-fit: contain; border: 0 !important; padding: 0 !important; border-radius: 0 !important; }
.fg .fg-promo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: linear-gradient(100deg, rgba(255, 106, 43, .16), rgba(255, 106, 43, .03)), var(--fg-surface); }
.fg .fg-promo__icon { flex: 0 0 auto; width: 48px; height: 48px; margin: 0; object-fit: contain; }
.fg .fg-promo__text p { margin: 0 0 2px; font-size: 15px; font-weight: 700; color: var(--fg-text); }
.fg .fg-promo__text a { font-size: 13px; font-weight: 600; color: var(--fg-accent); }
.fg .fg-promo__text a:hover { color: #fff; }

/* privilege tier cards (parts/priv.tpl): wrapper + row carry inline negative margins / transparent skin */
.fg .block.servers { background: none !important; border: 0; padding: 0; margin: 0 0 16px !important; box-shadow: none; }
.fg .block.servers > .row { margin-left: -8px !important; margin-right: -8px !important; }
.fg .block.servers > .row > [class*="col-"] { padding-left: 8px; padding-right: 8px; margin-bottom: 12px; cursor: pointer; }

/* ---------- forms ------------------------------------------------------------- */
.fg label { color: var(--fg-muted); font-weight: 500; }
.fg .form-control, .fg input[type="text"], .fg input[type="password"], .fg input[type="email"], .fg input[type="number"], .fg select, .fg textarea {
  height: auto; padding: 10px 13px; font-family: var(--fg-font); font-size: 14px; line-height: 1.4;
  color: var(--fg-text); background: var(--fg-bg); border: 1px solid var(--fg-border-strong); border-radius: var(--fg-radius-sm); box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.fg select.form-control { padding-right: 30px; }
.fg .form-control::placeholder, .fg textarea::placeholder, .fg input::placeholder { color: var(--fg-faint); opacity: 1; }
.fg .form-control:focus, .fg input:focus, .fg select:focus, .fg textarea:focus { color: var(--fg-text); background: var(--fg-bg); border-color: var(--fg-accent); box-shadow: 0 0 0 3px rgba(255, 106, 43, .2); outline: 0; }
.fg .form-control:disabled, .fg .form-control[readonly] { background: var(--fg-surface-2); color: var(--fg-muted); }
.fg .form-group { margin-bottom: 14px; }
.fg .input-group .form-control { border-radius: var(--fg-radius-sm); }
.fg .input-group-prepend .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fg .input-group-prepend + .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.fg .input-search { position: relative; margin-bottom: 14px; }
.fg .input-search .form-control { padding-left: 40px; }
.fg .input-search > i { position: absolute; z-index: 2; left: 14px; top: 50%; transform: translateY(-50%); color: var(--fg-faint); cursor: pointer; }
.fg .input-search > i:hover { color: var(--fg-accent); }
.fg .block.block-search > .input-search i.fa-search { left: 14px; top: 50%; font-size: 13px; color: var(--fg-faint); transform: translateY(-50%); }
.fg .block.block-search > .input-search input, .fg .block.block-search > .input-search select {
  margin: 0; height: auto; line-height: 1.4; padding: 10px 13px 10px 40px; border: 1px solid var(--fg-border-strong); border-radius: var(--fg-radius-sm);
}
.fg .authorization .form-control, .fg .registration .form-control { margin-bottom: 10px; }

/* ---------- tables ------------------------------------------------------------- */
.fg .table-responsive { margin-bottom: 0; background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: 12px; }
.fg .block .table-responsive { background: transparent; }
.fg table.table { margin: 0; color: var(--fg-text); background: transparent; border-collapse: separate; border-spacing: 0; }
.fg table.table > thead > tr > td, .fg table.table > thead > tr > th {
  padding: 11px 14px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-faint);
  background: rgba(255, 255, 255, .02); border: 0; border-bottom: 1px solid var(--fg-border); white-space: nowrap;
}
.fg table.table > tbody > tr > td, .fg table.table > tbody > tr > th, .fg table.table-bordered td, .fg table.table-bordered th {
  padding: 12px 14px; font-size: 13.5px; color: var(--fg-text); background: transparent; border: 0; border-top: 1px solid var(--fg-border); vertical-align: middle;
}
.fg table.table-bordered td, .fg table.table-bordered th { border-width: 0 !important; border-top-width: 1px !important; border-style: solid !important; border-color: var(--fg-border) !important; }
.fg table.table-bordered > thead > tr > td, .fg table.table-bordered > thead > tr > th { border-top-width: 0 !important; border-bottom-width: 1px !important; }
.fg .table-responsive > table.table > thead > tr > th, .fg .table-responsive > table.table > tbody > tr > th { border-left: 0 !important; border-right: 0 !important; }
.fg table.table > tbody > tr:first-child > td { border-top-width: 0 !important; }
.fg table.table > tbody > tr:hover > td { background: rgba(255, 255, 255, .03); }
.fg table.table > tbody > tr[data-toggle="modal"] { cursor: pointer; }
.fg table.table > tbody > tr > td:first-child { font-weight: 600; }
.fg table.table > tbody > tr.danger > td { background: rgba(240, 88, 106, .06); color: var(--fg-text); }
.fg table.table > tbody > tr.warning > td { background: rgba(245, 165, 36, .06); color: var(--fg-text); }
.fg table.table > tbody > tr.success > td { background: rgba(52, 211, 153, .05); color: var(--fg-text); }
.fg table.table > tbody > tr.danger > td:first-child { box-shadow: inset 3px 0 0 var(--fg-danger); }
.fg table.table > tbody > tr.warning > td:first-child { box-shadow: inset 3px 0 0 var(--fg-warn); }
.fg table.table > tbody > tr.success > td:first-child { box-shadow: inset 3px 0 0 var(--fg-ok); }
.fg table.table > tbody > tr * { color: inherit; }
.fg table.table > tbody > tr a { color: var(--fg-accent); }
.fg table.table > tbody > tr.hidden-tr > td { padding: 0; border: 0; }
.fg .modal-body table.table-bordered td:first-child { color: var(--fg-muted); width: 38%; }

/* ---------- pagination ----------------------------------------------------------- */
.fg #pagination2 { margin: 16px 0 0; text-align: center; }
.fg .pagination { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; justify-content: center; }
.fg .pagination > li, .fg .pagination .page-item { display: inline-block; margin: 0; }
.fg .pagination > li > a, .fg .pagination > li > span, .fg .pagination .page-link {
  display: block; min-width: 36px; padding: 7px 11px; margin: 0; text-align: center; line-height: 20px;
  background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: 8px; color: var(--fg-muted); font-weight: 600;
}
.fg .pagination > li > a:hover, .fg .pagination .page-link:hover { background: var(--fg-surface-3); color: #fff; border-color: var(--fg-border-strong); }
.fg .pagination > .active > a, .fg .pagination > .active > span, .fg .pagination .page-item.active .page-link { background: var(--fg-accent-solid); border-color: var(--fg-accent-solid); color: #fff; }

/* ---------- notices ---------------------------------------------------------------- */
.fg .noty-block { margin: 0 0 12px; padding: 14px 16px; background: var(--fg-surface-2); border: 1px solid var(--fg-border-strong); border-left: 3px solid var(--fg-accent); border-radius: 10px; box-shadow: none; color: var(--fg-text); background-image: none; text-align: left; font-size: 14px; }
.fg .noty-block h4 { margin: 0 0 6px; font-size: 15px; }
.fg .noty-block p { margin: 0; color: var(--fg-text); }
/* typed notices: the legacy sheets paint them solid (error uses !important) and force a colour on every child.
   :where(.fg) keeps the child reset at legacy specificity, so buttons/links/our own classes still win. */
.fg .noty-block.info, .fg .noty-block.bs-callout-info { background: rgba(255, 106, 43, .08) !important; border-color: rgba(255, 106, 43, .28); border-left-color: var(--fg-accent); }
.fg .noty-block.success, .fg .noty-block.bs-callout-success { background: rgba(52, 211, 153, .08) !important; border-color: rgba(52, 211, 153, .28); border-left-color: var(--fg-ok); }
.fg .noty-block.error, .fg .noty-block.danger, .fg .noty-block.bs-callout-danger, .fg .noty-block.bs-callout-error { background: rgba(240, 88, 106, .08) !important; border-color: rgba(240, 88, 106, .28); border-left-color: var(--fg-danger); }
.fg .noty-block.warning, .fg .noty-block.bs-callout-warning { background: rgba(245, 166, 35, .08) !important; border-color: rgba(245, 166, 35, .28); border-left-color: var(--fg-warn); }
:where(.fg) .noty-block.info *, :where(.fg) .noty-block.bs-callout-info *, :where(.fg) .noty-block.success *, :where(.fg) .noty-block.bs-callout-success *,
:where(.fg) .noty-block.error *, :where(.fg) .noty-block.bs-callout-danger *, :where(.fg) .noty-block.bs-callout-error *, :where(.fg) .noty-block.warning *, :where(.fg) .noty-block.bs-callout-warning * { color: var(--fg-text); }
.fg .noty-block .m-icon.icon-remove { color: var(--fg-muted); }
.fg .noty-block .m-icon.icon-remove:hover { color: #fff; }

/* ---------- modals ------------------------------------------------------------------ */
.fg .modal-backdrop.show { opacity: .72; background: #03040a; }
.fg .modal-content { background: var(--fg-surface-2); color: var(--fg-text); border: 1px solid var(--fg-border-strong); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.fg .modal-header { padding: 18px 22px; border-bottom: 1px solid var(--fg-border); background: none; align-items: center; }
.fg .modal-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--fg-text); }
.fg .modal-body { padding: 22px; }
.fg .modal-footer { border-top: 1px solid var(--fg-border); }
.fg .modal-header .close { margin: 0 0 0 auto; padding: 4px 8px; font-size: 26px; line-height: 1; color: var(--fg-muted); opacity: 1; text-shadow: none; background: none; border: 0; border-radius: 8px; }
.fg .modal-header .close:hover { color: #fff; background: var(--fg-surface-3); }
.fg .modal-header .close + .modal-title { order: -1; }

/* ---------- misc components ---------------------------------------------------------- */
.fg .dropdown-menu, .fg .popover, .fg .tooltip-inner { background: var(--fg-surface-3); color: var(--fg-text); border: 1px solid var(--fg-border-strong); border-radius: 10px; box-shadow: var(--fg-shadow); }
.fg .dropdown-item { color: var(--fg-text); }
.fg .dropdown-item:hover { background: var(--fg-accent-soft); color: #fff; }
.fg .nav-tabs { border-bottom: 1px solid var(--fg-border); }
.fg .nav-tabs .nav-link { color: var(--fg-muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; }
.fg .nav-tabs .nav-link.active, .fg .nav-tabs .nav-link:hover { color: #fff; border-bottom-color: var(--fg-accent); background: none; }
.fg .label, .fg .badge { border-radius: 999px; font-weight: 700; }
.fg .loader { opacity: .8; }

/* ---------- forum (hooks come from core: #forum / #forum_topics, col-lg-8 + col-lg-4) -------- */
.fg #forum > h2, .fg #forum_topics > h2, .fg #forum .col-lg-12 > h2, .fg #forum_topics .col-lg-12 > h2 {
  margin: 0; padding: 14px 16px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted);
  background: rgba(255, 255, 255, .025); border: 0; border-bottom: 1px solid var(--fg-border);
}
.fg #forum .row, .fg #forum_topics.row, .fg #forum_topics .row, .fg #forum.row {
  margin: 0 0 16px; background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: 12px; overflow: hidden;
}
.fg #forum .row .col-lg-12, .fg #forum_topics .row .col-lg-12, .fg #forum.row .col-lg-12, .fg #forum_topics.row .col-lg-12 { padding: 0; border: 0; background: none; }
.fg #forum .row .col-lg-8, .fg #forum_topics .row .col-lg-8, .fg #forum.row .col-lg-8, .fg #forum_topics.row .col-lg-8 {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; margin: 0; border: 0; border-top: 1px solid var(--fg-border); background: none; min-width: 0;
}
.fg #forum .row .col-lg-12 + .col-lg-8, .fg #forum_topics .row .col-lg-12 + .col-lg-8 { border-top: 0; }
.fg #forum .row .col-lg-8 img, .fg #forum_topics .row .col-lg-8 img, .fg #forum.row .col-lg-8 img, .fg #forum_topics.row .col-lg-8 img {
  flex: 0 0 44px; float: none; width: 44px; height: 44px; margin: 0; object-fit: cover; border-radius: 10px; background: var(--fg-surface-3); padding: 0; border: 1px solid var(--fg-border);
}
.fg #forum .row .col-lg-8 > div, .fg #forum_topics .row .col-lg-8 > div, .fg #forum.row .col-lg-8 > div, .fg #forum_topics.row .col-lg-8 > div { margin: 0; padding: 0; min-width: 0; flex: 1 1 auto; }
.fg #forum .row .col-lg-8 > div h3, .fg #forum_topics .row .col-lg-8 > div h3, .fg #forum.row .col-lg-8 > div h3, .fg #forum_topics.row .col-lg-8 > div h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.fg #forum .row .col-lg-8 > div h3 a, .fg #forum_topics .row .col-lg-8 > div h3 a, .fg #forum.row .col-lg-8 > div h3 a, .fg #forum_topics.row .col-lg-8 > div h3 a { color: var(--fg-text); }
.fg #forum .row .col-lg-8 > div h3 a:hover, .fg #forum_topics .row .col-lg-8 > div h3 a:hover { color: var(--fg-accent); }
.fg #forum .row .col-lg-8 > div p, .fg #forum_topics .row .col-lg-8 > div p, .fg #forum.row .col-lg-8 > div p, .fg #forum_topics.row .col-lg-8 > div p { margin: 0; font-size: 12.5px; color: var(--fg-muted); line-height: 1.5; }
.fg #forum_topics .row .col-lg-8 > div p span, .fg #forum_topics.row .col-lg-8 > div p span { display: inline-block; margin: 6px 14px 0 0; color: var(--fg-muted); }
.fg #forum_topics .row .col-lg-8 > div p span i, .fg #forum_topics.row .col-lg-8 > div p span i { margin-right: 4px; color: var(--fg-faint); }
.fg #forum .row .col-lg-4, .fg #forum_topics .row .col-lg-4, .fg #forum.row .col-lg-4, .fg #forum_topics.row .col-lg-4 {
  padding: 16px; margin: 0; border: 0; border-top: 1px solid var(--fg-border); border-left: 1px solid var(--fg-border); background: rgba(255, 255, 255, .012); font-size: 12.5px; color: var(--fg-muted);
}
.fg #forum .row .col-lg-4 p, .fg #forum_topics .row .col-lg-4 p, .fg #forum.row .col-lg-4 p, .fg #forum_topics.row .col-lg-4 p { margin: 0 0 2px; font-size: 12.5px; color: var(--fg-muted); }
.fg #forum .row .col-lg-12 + .col-lg-8 + .col-lg-4 { border-top: 0; }

.fg .block:has(> #forum), .fg .block:has(> #forum_topics) { padding: 0; background: none; border: 0; }
.fg .block:has(> #forum) > .block_head, .fg .block:has(> #forum_topics) > .block_head { margin-bottom: 14px; }
.fg #forum .row .col-lg-4 a, .fg #forum_topics .row .col-lg-4 a { color: var(--fg-accent); }
.fg #forum .row .col-lg-4 a:hover, .fg #forum_topics .row .col-lg-4 a:hover { color: #ffb38f; }

/* ---------- footer --------------------------------------------------------------------- */
.fg .footer.fg-footer { margin-top: 40px; padding: 40px 0 26px; background: var(--fg-surface); border-top: 1px solid var(--fg-border); box-shadow: none; flex: 0 0 auto; }
.fg .fg-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.fg .fg-footer__brand p { max-width: 320px; margin: 14px 0 0; color: var(--fg-muted); font-size: 13px; line-height: 1.6; }
.fg .fg-footer__col h6 { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-footer__col ul { list-style: none; margin: 0; padding: 0; }
.fg .fg-footer__col li { margin: 0 0 8px; }
.fg .fg-footer__col a { font-size: 13.5px; color: var(--fg-muted); }
.fg .fg-footer__col a:hover { color: #fff; }
.fg .fg-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--fg-border); color: var(--fg-faint); font-size: 12.5px; }
.fg .fg-footer__bottom p { margin: 0; }
.fg .fg-footer__bottom a { color: var(--fg-muted); }

/* ---------- error page --------------------------------------------------------------------- */
.fg .noty-block.fg-error { padding: 44px 28px; text-align: center; border: 1px solid var(--fg-border); border-left: 1px solid var(--fg-border); border-radius: 20px; background: radial-gradient(420px 200px at 50% 0, rgba(240, 88, 106, .14), transparent 70%), var(--fg-surface) !important; }
.fg .fg-error__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 16px; background: rgba(240, 88, 106, .12); border: 1px solid rgba(240, 88, 106, .3); color: #ff8b99; font-size: 22px; }
.fg .noty-block.fg-error .fg-eyebrow { color: #ff8b99; }
.fg .noty-block.fg-error .fg-error__msg { color: var(--fg-muted); }
.fg .noty-block.fg-error h4 { color: #fff; }
.fg .fg-error h4 { margin: 0 0 8px; font-size: 24px; }
.fg .fg-error__msg { max-width: 460px; margin: 0 auto 22px !important; font-size: 14.5px; }
.fg .fg-error__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- responsive ------------------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .fg .fg-footer__grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .fg .fg-footer__brand { grid-column: 1 / -1; }
  .fg .fg-hero { padding: 34px 26px; }
  .fg .order-is-last { margin-top: 4px; }
}
@media (max-width: 767.98px) {
  .fg .fg-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fg .fg-board__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fg #forum .row .col-lg-4, .fg #forum_topics .row .col-lg-4 { border-left: 0; }
}
@media (max-width: 575.98px) {
  .fg .container { padding-left: 15px; padding-right: 15px; }
  .fg .block, .fg .wapper .block { padding: 16px; border-radius: 12px; }
  .fg .fg-hero { padding: 28px 20px; border-radius: 16px; }
  .fg .fg-hero__lead { font-size: 15px; }
  .fg .fg-quick { gap: 8px; }
  .fg .fg-quick__item { grid-template-columns: 34px 1fr; padding: 12px; column-gap: 10px; }
  .fg .fg-quick__item i { width: 34px; height: 34px; font-size: 13px; }
  .fg .fg-quick__item span { display: none; }
  .fg .fg-footer__grid { grid-template-columns: 1fr 1fr; }
  .fg .modal-body, .fg .modal-header { padding: 16px; }
  .fg #forum .row .col-lg-8, .fg #forum_topics .row .col-lg-8 { padding: 14px; }
  .fg table.table > tbody > tr > td, .fg table.table > thead > tr > td { padding: 10px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fg *, .fg *::before, .fg *::after { transition: none !important; animation: none !important; }
}

/* Social links */
.fg .fg-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fg .fg-social__btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--fg-radius-sm); border: 1px solid var(--fg-border-strong); background: var(--fg-surface-2); color: var(--fg-text); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.fg .fg-social__btn i { font-size: 16px; }
.fg .fg-social__btn:hover { color: #fff; text-decoration: none; transform: translateY(-1px); }
.fg .fg-social__btn--ig:hover { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); border-color: transparent; }
.fg .fg-social__btn--tg:hover { background: #229ed9; border-color: transparent; }
.fg .fg-copyright, .fg .fg-copyright a { color: var(--fg-faint); font-size: 12px; }

/* Server names: show full name (2 lines max) */
.fg .wapper .monitoring .server h3.fg-server__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }

/* ===== v2: inner pages — compact one-row server strip (content stays above the fold) ===== */
.fg:not(:has(.fg-hero)) .wapper .monitoring #servers { display: flex; grid-template-columns: none; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--fg-surface-3) transparent; }
.fg:not(:has(.fg-hero)) .wapper .monitoring #servers > .server { flex: 0 0 236px; scroll-snap-align: start; }
.fg:not(:has(.fg-hero)) .wapper .monitoring .server h3.fg-server__name { font-size: 13.5px; -webkit-line-clamp: 1; }
.fg:not(:has(.fg-hero)) .fg-server__meta dd { font-size: 13px; }
.fg:not(:has(.fg-hero)) .fg-server__prefix { display: none; }
.fg:not(:has(.fg-hero)) .fg-servers { margin-bottom: 18px; }
.fg:not(:has(.fg-hero)) .fg-servers .fg-section-head h2 { font-size: 16px; }

/* ===== v2: header social icons ===== */
.fg .collapsible-menu > li.fg-nav-social > a { display: inline-flex; align-items: center; justify-content: center; width: 34px; padding: 0; font-size: 16px; color: var(--fg-muted); }
.fg .collapsible-menu > li.fg-nav-social > a:hover { color: #fff; }

/* ===== v2: guest home — how to start + community ===== */
.fg .fg-start { margin: 0 0 22px; }
.fg .fg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: fgstep; }
.fg .fg-steps li { position: relative; padding: 18px 18px 18px 62px; background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); counter-increment: fgstep; min-width: 0; }
.fg .fg-steps li::before { content: counter(fgstep); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--fg-accent-soft); color: var(--fg-accent); font-weight: 800; }
.fg .fg-steps b { display: block; margin: 0 0 6px; font-size: 15px; color: #fff; }
.fg .fg-steps span { display: block; font-size: 13px; line-height: 1.55; color: var(--fg-muted); }
.fg .fg-steps code { padding: 1px 6px; border-radius: 5px; background: var(--fg-surface-3); color: var(--fg-text); font-size: 12px; white-space: nowrap; }
.fg .fg-community { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 0 0 22px; padding: 20px 22px; border-radius: var(--fg-radius); border: 1px solid rgba(34, 158, 217, .35); background: linear-gradient(120deg, rgba(34, 158, 217, .16), rgba(255, 106, 43, .12)); }
.fg .fg-community__text b { display: block; font-size: 16px; color: #fff; }
.fg .fg-community__text span { font-size: 13.5px; color: var(--fg-muted); }
.fg .fg-community .fg-social { margin: 0; }
.fg .block_head > a { font-size: 12.5px; font-weight: 600; color: var(--fg-accent); }
@media (max-width: 991.98px) { .fg .fg-steps { grid-template-columns: minmax(0, 1fr); } }

/* ===== v2: user cabinet dropdown icons ===== */
.fg .user-menu ul li a i { width: 18px; margin-right: 8px; text-align: center; color: var(--fg-accent); }

/* ===== v2: profile (forum-style) ===== */
.fg .fg-p__hero { position: relative; margin: 0 0 20px; padding: 0 22px 20px; background: var(--fg-surface); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); overflow: hidden; }
.fg .fg-p__cover { height: 120px; margin: 0 -22px; background:
	radial-gradient(120% 140% at 0% 0%, rgba(255, 106, 43, .55), transparent 60%),
	radial-gradient(90% 120% at 100% 0%, rgba(96, 165, 250, .35), transparent 60%),
	linear-gradient(180deg, var(--fg-surface-3), var(--fg-surface)); }
.fg .fg-p__identity { display: flex; align-items: flex-end; gap: 18px; margin-top: -56px; }
.fg .fg-p__avatar { flex: 0 0 auto; width: 112px; height: 112px; border-radius: 22px; object-fit: cover; border: 4px solid var(--fg-surface); background: var(--fg-surface-2); box-shadow: var(--fg-shadow); }
.fg .fg-p__who { min-width: 0; padding-bottom: 6px; }
.fg .fg-p__name { margin: 0 0 6px; font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; color: #fff; overflow-wrap: anywhere; }
.fg .fg-p__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--fg-muted); }
.fg .fg-p__group { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--gc, var(--fg-accent)); background: var(--fg-surface-3); border: 1px solid var(--fg-border-strong); }
.fg .fg-p__seen i { margin-right: 4px; }
.fg .fg-p__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.fg .fg-p__stats li { padding: 12px 14px; background: var(--fg-surface-2); border: 1px solid var(--fg-border); border-radius: var(--fg-radius-sm); min-width: 0; }
.fg .fg-p__stats b { display: block; font-size: 18px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg .fg-p__stats li:last-child b { font-size: 14px; line-height: 1.3; white-space: normal; }
.fg .fg-p .block_head > a { margin-left: 0; color: var(--fg-text); }
.fg .fg-p .block_head > a small { color: var(--fg-faint); margin-left: 6px; }
.fg .fg-p__stats span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-p__actions { margin-top: 16px; }
.fg .fg-p__actions ul { display: flex; flex-wrap: wrap; gap: 8px; }
.fg .fg-p__actions ul:empty { display: none; }
.fg .fg-p__actions li { cursor: pointer; }
.fg .vertical-navigation .fg-p__actions ul li a, .fg .fg-p__btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--fg-radius-sm); border: 1px solid var(--fg-border-strong); background: var(--fg-surface-2); color: var(--fg-text); font-size: 13px; font-weight: 600; text-decoration: none; }
.fg .fg-p__btn:hover { background: var(--fg-surface-3); color: #fff; text-decoration: none; }
.fg .fg-p__btn--primary { background: var(--fg-accent-solid); border-color: var(--fg-accent-solid); color: #fff; }
.fg .fg-p__btn--primary:hover { background: var(--fg-accent-hover); }
.fg .fg-p__btn--ok { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .35); color: var(--fg-ok); }
.fg .fg-p__btn--ghost { background: transparent; color: var(--fg-muted); }
.fg .fg-p__dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 0; }
.fg .fg-p__dl > div { padding: 11px 0; border-bottom: 1px solid var(--fg-border); min-width: 0; }
.fg .fg-p__dl-wide { grid-column: 1 / -1; }
.fg .fg-p__dl dt { margin: 0 0 3px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-p__dl dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--fg-text); overflow-wrap: anywhere; }
.fg .fg-p__h { margin: 18px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-p__contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.fg .fg-p__contact { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--fg-radius-sm); background: var(--fg-surface-2); border: 1px solid var(--fg-border); color: var(--fg-text); font-size: 13px; font-weight: 600; }
.fg .fg-p__contact img { width: 20px; height: 20px; border-radius: 50%; }
.fg .fg-p__contact--tg:hover { background: #229ed9; color: #fff; text-decoration: none; }
.fg .fg-p__contact--steam:hover { background: #1b2838; color: #fff; text-decoration: none; }
.fg .fg-p__wallet-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--fg-border); font-size: 13.5px; color: var(--fg-muted); }
.fg .fg-p__wallet-row b { color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.fg .fg-p__admin .vertical-navigation li { cursor: pointer; }
.fg .fg-p__admin .vertical-navigation i { width: 18px; margin-right: 6px; color: var(--fg-accent); }
.fg .fg-p__empty { margin: 0; color: var(--fg-muted); }
@media (max-width: 767.98px) {
	.fg .fg-p__hero { padding: 0 16px 16px; }
	.fg .fg-p__cover { height: 90px; margin: 0 -16px; }
	.fg .fg-p__identity { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: -48px; }
	.fg .fg-p__avatar { width: 92px; height: 92px; border-radius: 18px; }
	.fg .fg-p__name { font-size: 22px; }
	.fg .fg-p__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fg .fg-p__dl { grid-template-columns: minmax(0, 1fr); }
}

/* ===== v3: official logo (FORGAMES.UZ logo pack). Proportional sizing only, no filters/glow. ===== */
.fg .fg-logo { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 0; text-decoration: none; }
.fg .fg-logo img { display: block; width: 100%; height: auto; max-width: 100%; filter: none; box-shadow: none; }
.fg .fg-logo--compact { width: 160px; }                  /* desktop navbar 140-170 */
.fg .fg-logo--full { width: min(420px, 100%); }
.fg .fg-logo--wordmark { width: 160px; }
.fg .fg-logo--mark { width: 40px; }
.fg .fg-logo--vertical { width: min(260px, 100%); }
.fg .fg-logo--special { width: min(300px, 100%); }
.fg .fg-logo--16 { width: 16px; } .fg .fg-logo--20 { width: 20px; } .fg .fg-logo--24 { width: 24px; }
.fg .fg-logo--32 { width: 32px; } .fg .fg-logo--40 { width: 40px; } .fg .fg-logo--48 { width: 48px; }
.fg .fg-footer .fg-logo--compact { width: 160px; }      /* footer 140-170 */
.fg .fg-hero__title--logo { margin: 0 0 14px; line-height: 0; }
.fg .fg-hero__title--logo .fg-logo--full { width: min(440px, 100%); }
.fg .fg-modal-logo { display: flex; justify-content: center; margin: 0 0 16px; }
.fg .fg-modal-logo .fg-logo--full { width: 210px; }
.fg .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 991.98px) { .fg .fg-logo--compact { width: 135px; } }   /* tablet 125-145 */
@media (max-width: 575.98px) { .fg .fg-logo--compact { width: 120px; } }   /* mobile 110-130 */

/* ===== v3: servers block only on the home page and on /servers ===== */
.fg:not(:has(.fg-hero)):not(:has(.fg-servers-page)) .fg-servers { display: none; }
/* /servers: full cards (undo the compact inner-page strip) */
.fg:has(.fg-servers-page) .fg-servers { display: block; }
.fg:has(.fg-servers-page) .wapper .monitoring #servers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; overflow: visible; padding: 0; }
.fg:has(.fg-servers-page) .wapper .monitoring #servers > .server { flex: initial; }
.fg:has(.fg-servers-page) .fg-servers .map-image { display: block; }
.fg:has(.fg-servers-page) .fg-server__meta dt { display: block; }
.fg:has(.fg-servers-page) .fg-server__prefix { display: none; }
.fg:has(.fg-servers-page) .wapper .monitoring .server h3.fg-server__name { font-size: 15px; }
@media (max-width: 1199.98px) { .fg:has(.fg-servers-page) .wapper .monitoring #servers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .fg:has(.fg-servers-page) .wapper .monitoring #servers { grid-template-columns: minmax(0, 1fr); } }
.fg .fg-servers-page__lead { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--fg-muted); }
.fg .fg-servers-page__how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fg .fg-servers-page__how > div { padding: 12px 14px; border-radius: var(--fg-radius-sm); background: var(--fg-surface-2); border: 1px solid var(--fg-border); }
.fg .fg-servers-page__how b { display: block; margin-bottom: 4px; font-size: 13.5px; color: var(--fg-text); }
.fg .fg-servers-page__how span { font-size: 12.5px; line-height: 1.5; color: var(--fg-muted); }
@media (max-width: 767.98px) { .fg .fg-servers-page__how { grid-template-columns: minmax(0, 1fr); } }

/* ===== v3: readable nicknames — group colours from the DB can be too dark for the dark theme ===== */
.fg span[style^="color"]:not(:has(img)), .fg a[style^="color"]:not(:has(img)), .fg div.author[style*="color"] { filter: brightness(1.55) saturate(1.1); }
.fg .fg-p__group { filter: brightness(1.45); }
.fg #users_online_number { color: var(--fg-muted) !important; font-weight: 600; }

/* ===== v3: empty states are inline spans with padding -> make them blocks ===== */
.fg .empty-element { display: block; padding: 18px 12px; border-radius: var(--fg-radius-sm); background: var(--fg-surface-2); font-size: 13px; line-height: 1.4; }
.fg #friends { background: none; }

/* ===== v3: dark form controls everywhere ===== */
.fg select, .fg .custom-select, .fg select.form-control { background-color: var(--fg-surface-2); color: var(--fg-text); border-color: var(--fg-border-strong); }
.fg select option, .fg select optgroup { background: var(--fg-surface-2); color: var(--fg-text); }
.fg .form-control:disabled, .fg .form-control[readonly] { background: var(--fg-surface); color: var(--fg-faint); opacity: 1; }
.fg .form-control::placeholder, .fg textarea::placeholder { color: var(--fg-faint); opacity: 1; }
.fg .input-group-text { background: var(--fg-surface-3); border-color: var(--fg-border-strong); color: var(--fg-muted); }
.fg .list-group-item { background: var(--fg-surface); border-color: var(--fg-border); color: var(--fg-text); }
.fg .list-group-item.active { background: var(--fg-accent-soft); border-color: rgba(255, 106, 43, .4); color: #fff; }
.fg .alert { border-radius: var(--fg-radius-sm); border: 1px solid var(--fg-border-strong); background: var(--fg-surface-2); color: var(--fg-text); }
.fg .alert-success { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .35); color: #9af0cf; }
.fg .alert-danger { background: rgba(240, 88, 106, .1); border-color: rgba(240, 88, 106, .4); color: #ffb3bc; }
.fg .alert-warning { background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .4); color: #ffd28a; }
.fg .alert-info, .fg .alert-primary { background: rgba(96, 165, 250, .1); border-color: rgba(96, 165, 250, .35); color: #b7d6ff; }
.fg .text-muted { color: var(--fg-muted) !important; }
.fg .text-dark, .fg .text-black { color: var(--fg-text) !important; }
.fg .bg-white, .fg .bg-light { background: var(--fg-surface-2) !important; color: var(--fg-text); }
.fg .table, .fg .table td, .fg .table th { color: var(--fg-text); border-color: var(--fg-border); }
.fg .table-striped tbody tr:nth-of-type(odd) { background: rgba(255, 255, 255, .02); }
.fg .table-bordered, .fg .table-bordered td, .fg .table-bordered th { border-color: var(--fg-border); }
.fg .table thead td, .fg .table thead th { color: var(--fg-faint); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--fg-surface-2); }
.fg .popover { background: var(--fg-surface-2); border: 1px solid var(--fg-border-strong); }
.fg .popover-body { color: var(--fg-text); }
.fg .popover .arrow::after { border-top-color: var(--fg-surface-2); border-bottom-color: var(--fg-surface-2); }
.fg .dropdown-menu { background: var(--fg-surface-2); border: 1px solid var(--fg-border-strong); }
.fg .dropdown-item { color: var(--fg-text); }
.fg .dropdown-item:hover, .fg .dropdown-item:focus { background: var(--fg-accent-soft); color: #fff; }
.fg .close { color: var(--fg-muted); text-shadow: none; opacity: 1; }
.fg .close:hover { color: #fff; }
.fg h1, .fg h2, .fg h3, .fg h4, .fg h5, .fg h6 { color: var(--fg-text); }
.fg small, .fg .small { color: var(--fg-muted); }
.fg hr { border-color: var(--fg-border); }
.fg code { color: #ffb38f; }
.fg pre { background: var(--fg-surface-2); border: 1px solid var(--fg-border); color: var(--fg-text); border-radius: var(--fg-radius-sm); padding: 10px 12px; }

/* ===== v3: jQuery UI datepicker / timepicker (admin end date, ban/mute end date) ===== */
.ui-datepicker { z-index: 2000 !important; padding: 10px; background: #18181c; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); color: #e6e8f0; font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif; font-size: 13px; }
.ui-datepicker .ui-datepicker-header { position: relative; padding: 4px 0 8px; background: none; border: 0; color: #fff; font-weight: 700; text-align: center; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position: absolute; top: 2px; cursor: pointer; color: #98a0b6; font-size: 0; width: 26px; height: 26px; border-radius: 7px; }
.ui-datepicker .ui-datepicker-prev { left: 0; } .ui-datepicker .ui-datepicker-next { right: 0; }
.ui-datepicker .ui-datepicker-prev::before, .ui-datepicker .ui-datepicker-next::before { font-size: 16px; line-height: 26px; display: block; text-align: center; }
.ui-datepicker .ui-datepicker-prev::before { content: "‹"; } .ui-datepicker .ui-datepicker-next::before { content: "›"; }
.ui-datepicker .ui-datepicker-prev:hover, .ui-datepicker .ui-datepicker-next:hover { background: #202026; color: #fff; }
.ui-datepicker table { width: 100%; border-collapse: collapse; }
.ui-datepicker th { padding: 4px; color: #6a7189; font-size: 11px; font-weight: 700; }
.ui-datepicker td { padding: 1px; }
.ui-datepicker td a, .ui-datepicker td span { display: block; padding: 5px 0; border-radius: 7px; color: #e6e8f0; text-align: center; text-decoration: none; }
.ui-datepicker td a:hover { background: rgba(255, 106, 43, .2); color: #fff; }
.ui-datepicker .ui-state-active, .ui-datepicker .ui-state-highlight.ui-state-active { background: #e04a14; color: #fff; }
.ui-datepicker .ui-state-highlight { box-shadow: inset 0 0 0 1px rgba(255, 106, 43, .6); }
.ui-datepicker .ui-datepicker-other-month a { color: #6a7189; }
.ui-datepicker .ui-datepicker-buttonpane { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .07); }
.ui-datepicker .ui-datepicker-buttonpane button { flex: 1 1 auto; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); background: #202026; color: #e6e8f0; font-size: 12px; font-weight: 600; cursor: pointer; }
.ui-datepicker .ui-datepicker-buttonpane button:hover { background: #e04a14; border-color: #e04a14; color: #fff; }
.ui-timepicker-div dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 8px 0 0; align-items: center; }
.ui-timepicker-div dt { color: #98a0b6; font-weight: 600; }
.ui-timepicker-div dd { margin: 0; }
.ui-timepicker-div select { width: 100%; padding: 4px 6px; border-radius: 7px; background: #131316; color: #e6e8f0; border: 1px solid rgba(255, 255, 255, .14); }
.ui-slider { position: relative; height: 6px; border-radius: 6px; background: #202026; }
.ui-slider .ui-slider-handle { position: absolute; top: -5px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #ff6a2b; border: 0; cursor: pointer; }

/* ===== v3: TinyMCE dark (skin oxide-dark is forced in forgames.js) ===== */
.fg .tox-tinymce { border-color: var(--fg-border-strong) !important; border-radius: var(--fg-radius-sm) !important; }

/* ===== v3: admin issuing page ===== */
.fg .fg-issue__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.fg .fg-issue__field label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-muted); }
.fg .fg-issue__field label b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--fg-accent-soft); color: var(--fg-accent); font-size: 11px; }
.fg .fg-issue__hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--fg-faint); }
.fg .fg-issue__hint a { color: var(--fg-accent); }
.fg .fg-issue__warn { display: none; margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .4); color: #ffd28a; }
.fg .fg-issue__warn a { color: #fff; text-decoration: underline; }
.fg .fg-issue__ids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fg .fg-issue__ids .form-control { margin: 0 !important; }
.fg .fg-issue__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fg-border); }
.fg .fg-issue__help { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--fg-radius-sm); background: var(--fg-surface-2); border: 1px solid var(--fg-border); font-size: 12.5px; line-height: 1.6; color: var(--fg-muted); }
.fg .fg-issue__help b { color: var(--fg-text); }
@media (max-width: 767.98px) { .fg .fg-issue__steps, .fg .fg-issue__ids { grid-template-columns: minmax(0, 1fr); } }

/* ===== v3: FORUM (XenForo-like) ===== */
.fg .fg-fhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 0 0 18px; padding: 22px 24px; border-radius: var(--fg-radius); border: 1px solid var(--fg-border); background: radial-gradient(100% 160% at 0% 0%, rgba(255, 106, 43, .22), transparent 60%), var(--fg-surface); }
.fg .fg-fhead h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.fg .fg-fhead p { margin: 0; font-size: 13.5px; color: var(--fg-muted); }
.fg .fg-fhead p a { color: var(--fg-accent); }
.fg .fg-fhead__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fg .block.fg-forum { padding: 0; background: none; border: 0; box-shadow: none; }
.fg .fg-forum > #forum > .empty-element, .fg .fg-forum #forum_topics > .empty-element { display: block; padding: 40px 16px; border-radius: var(--fg-radius); border: 1px dashed var(--fg-border-strong); background: var(--fg-surface); }

/* sections */
.fg .fg-fsec { margin: 0 0 18px; border-radius: var(--fg-radius); border: 1px solid var(--fg-border); background: var(--fg-surface); overflow: hidden; }
.fg .fg-fsec__head { padding: 12px 18px; background: linear-gradient(90deg, var(--fg-accent-solid), #a8360d 70%, rgba(168, 54, 13, .6)); }
.fg .fg-fsec__head h2 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; }

/* forum row */
.fg .fg-frow__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; text-align: center; }
.fg .fg-frow__stats dt { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-frow__stats dd { margin: 0; font-size: 14px; font-weight: 700; color: var(--fg-text); font-variant-numeric: tabular-nums; }
.fg .fg-frow { display: grid; grid-template-columns: 46px minmax(0, 1fr) 150px minmax(0, 260px); align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--fg-border); }
.fg .fg-fsec__body > .fg-frow:first-child { border-top: 0; }
.fg .fg-frow:hover { background: var(--fg-surface-2); }
.fg .fg-frow__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--fg-accent-soft); overflow: hidden; }
.fg .fg-frow__icon img { width: 30px; height: 30px; object-fit: contain; }
.fg .fg-frow__icon i { font-size: 19px; color: var(--fg-accent); }
.fg .fg-frow__icon:hover { background: var(--fg-accent-solid); text-decoration: none; }
.fg .fg-frow__icon:hover i { color: #fff; }
.fg .fg-frow__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.fg .fg-frow__title a { color: #fff; }
.fg .fg-frow__title a:hover { color: var(--fg-accent); text-decoration: none; }
.fg .fg-frow__desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--fg-muted); }
.fg .fg-frow__desc:empty { display: none; }
.fg .fg-frow__last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fg .fg-frow__avatar { flex: 0 0 auto; }
.fg .fg-frow__avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--fg-surface-3); }
.fg .fg-frow__lastinfo { display: flex; flex-direction: column; min-width: 0; }
.fg .fg-frow__lasttopic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--fg-text); }
.fg .fg-frow__lasttopic:hover { color: var(--fg-accent); text-decoration: none; }
.fg .fg-frow__meta { font-size: 12px; color: var(--fg-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg .fg-frow__empty { font-size: 12.5px; color: var(--fg-faint); }

/* topic list */
.fg .fg-tlist { display: block; margin: 0; border-radius: var(--fg-radius); border: 1px solid var(--fg-border); background: var(--fg-surface); overflow: hidden; }
.fg .fg-tlist__title { padding: 10px 18px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); background: var(--fg-surface-2); border-top: 1px solid var(--fg-border); }
.fg .fg-tlist > .fg-tlist__title:first-child { border-top: 0; }
.fg .fg-trow { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 190px; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--fg-border); }
.fg .fg-trow:hover { background: var(--fg-surface-2); }
.fg .fg-trow.is-pinned { background: rgba(255, 106, 43, .05); }
.fg .fg-trow__avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--fg-surface-3); }
.fg .fg-trow__title { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.fg .fg-trow__title a { color: #fff; }
.fg .fg-trow__title a:hover { color: var(--fg-accent); text-decoration: none; }
.fg .fg-trow.is-locked .fg-trow__title a { color: var(--fg-muted); }
.fg .fg-trow__meta { margin: 2px 0 0; font-size: 12.5px; }
.fg .fg-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; margin-right: 6px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; vertical-align: 2px; }
.fg .fg-tag--pinned { background: rgba(245, 165, 36, .14); color: #ffc65c; }
.fg .fg-tag--locked { background: rgba(240, 88, 106, .14); color: #ff8b99; }
.fg .fg-trow__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; text-align: center; }
.fg .fg-trow__stats dt { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); }
.fg .fg-trow__stats dd { margin: 0; font-size: 14px; font-weight: 700; color: var(--fg-text); font-variant-numeric: tabular-nums; }
.fg .fg-trow__last { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; text-align: right; }
.fg .fg-trow__last .fg-frow__lastinfo { align-items: flex-end; font-size: 12.5px; }

/* topic page: posts (markup from core: .top-area / .center-area / .bottom-area with .left-side/.right-side) */
.fg .topic-answers > div[id^="answer_"] { display: grid; grid-template-columns: 180px minmax(0, 1fr); grid-template-areas: "user top" "user body" "user foot"; margin: 0 0 14px; border-radius: var(--fg-radius); border: 1px solid var(--fg-border); background: var(--fg-surface); overflow: hidden; }
.fg .topic-answers > div[id^="answer_"]:target { border-color: rgba(255, 106, 43, .6); box-shadow: 0 0 0 3px var(--fg-accent-soft); }
.fg .topic-answers .top-area, .fg .topic-answers .center-area, .fg .topic-answers .bottom-area { display: contents; }
.fg .topic-answers .top-area > .left-side { grid-area: top; justify-self: start; align-self: center; float: none; width: auto; padding: 10px 18px; font-size: 14px; font-weight: 700; }
.fg .topic-answers .top-area > .left-side a { color: #fff; }
.fg .topic-answers .top-area > .right-side { grid-area: top; justify-self: end; align-self: center; display: flex; align-items: center; gap: 12px; float: none; width: auto; padding: 10px 18px; font-size: 12px; color: var(--fg-faint); }
.fg .topic-answers .center-area > .right-side { border-top: 1px solid var(--fg-border); }
.fg .topic-answers .top-area > .right-side a { color: var(--fg-faint); }
.fg .topic-answers .top-area > .right-side a:hover { color: #fff; }
.fg .topic-answers .center-area > .left-side { grid-area: user; float: none; width: auto; padding: 18px 14px; text-align: center; background: var(--fg-surface-2); border-right: 1px solid var(--fg-border); }
.fg .topic-answers .center-area > .left-side img { display: block; width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 16px; object-fit: cover; }
.fg .topic-answers .center-area > .left-side p { margin: 0 0 2px; font-size: 12px; color: var(--fg-muted); }
.fg .topic-answers .center-area > .left-side p:first-of-type { display: inline-block; margin-bottom: 8px; padding: 2px 9px; border-radius: 999px; background: var(--fg-surface-3); font-size: 11.5px; font-weight: 700; }
.fg .topic-answers .center-area > .left-side br { display: none; }
.fg .topic-answers .center-area > .right-side { grid-area: body; float: none; width: auto; padding: 16px 18px; min-width: 0; }
.fg .topic-answers .center-area > .clearfix { display: none; }
.fg .topic-answers .with_code { color: var(--fg-text); font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.fg .topic-answers .with_code img { max-width: 100%; height: auto; border-radius: 8px; }
.fg .topic-answers .with_code blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--fg-accent); background: var(--fg-surface-2); border-radius: 0 8px 8px 0; color: var(--fg-muted); }
.fg .topic-answers .edited { margin-top: 12px; font-size: 12px; color: var(--fg-faint); }
.fg .topic-answers .signature { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--fg-border-strong); font-size: 12.5px; color: var(--fg-muted); }
.fg .topic-answers .bottom-area > .left-side { grid-area: foot; float: none; width: auto; padding: 10px 18px; border-top: 1px solid var(--fg-border); }
.fg .topic-answers .bottom-area > .right-side { grid-area: foot; float: none; justify-self: end; align-self: center; padding: 10px 18px; font-size: 12px; color: var(--fg-muted); }
.fg .topic-answers .bottom-area > .clearfix { display: none; }
.fg .topic-answers .bottom-area .btn-group { gap: 6px; }
.fg .topic-answers .bottom-area .btn-group .btn { border-radius: 8px !important; }
.fg .topic-answers .profile-frame { margin: 0 auto 10px !important; }
.fg .disabled_input { color: var(--fg-muted); background: var(--fg-surface-2); }

/* prefixes */
.fg .fg-px { display: inline-flex; align-items: center; height: 20px; margin-right: 4px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .02em; vertical-align: 1px; white-space: nowrap; }
.fg .fg-px--cw { background: linear-gradient(90deg, #e04a14, #ff6a2b); color: #fff; }
.fg .fg-px--green { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.fg .fg-px--red { background: rgba(240, 88, 106, .16); color: #ff8b99; }
.fg .fg-px--amber { background: rgba(245, 165, 36, .16); color: #ffc65c; }
.fg .fg-px--blue { background: rgba(96, 165, 250, .16); color: #93c5fd; }
.fg .fg-px--violet { background: rgba(255, 106, 43, .18); color: #ffb38f; }
.fg .fg-px--teal { background: rgba(45, 212, 191, .14); color: #5eead4; }
.fg .fg-px--gray { background: var(--fg-surface-3); color: var(--fg-muted); }
.fg .fg-prefix-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.fg .fg-prefix-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--fg-border-strong); background: var(--fg-surface-2); color: var(--fg-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fg .fg-prefix-chip .fg-px { margin: 0; }
.fg .fg-prefix-chip:hover { border-color: rgba(255, 106, 43, .5); }
.fg .fg-prefix-chip.is-active { border-color: var(--fg-accent); box-shadow: 0 0 0 2px var(--fg-accent-soft); color: #fff; }
.fg .fg-newtopic h4 { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-muted); }
.fg .fg-newtopic__img { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--fg-radius-sm); border: 1px solid var(--fg-border); background: var(--fg-surface-2); }
.fg .fg-newtopic__img summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.fg .fg-newtopic__imgrow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.fg .fg-newtopic__imgrow img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.fg .fg-newtopic__imgrow form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* home (fanmi-like layout, own styling) */
.fg .fg-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.fg .fg-feature { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 16px; border-radius: var(--fg-radius); border: 1px solid var(--fg-border); background: var(--fg-surface); }
.fg .fg-feature i { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--fg-accent-soft); color: var(--fg-accent); font-size: 17px; }
.fg .fg-feature b { font-size: 14px; color: #fff; }
.fg .fg-feature span { font-size: 12.5px; line-height: 1.45; color: var(--fg-muted); }
.fg .fg-home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fg .fg-home-grid > div > .block { margin-bottom: 16px; }
.fg .fg-about { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 22px; padding: 16px 18px; border-radius: var(--fg-radius); border: 1px solid var(--fg-border); background: var(--fg-surface); }
.fg .fg-about__age { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--fg-border-strong); font-weight: 800; color: var(--fg-muted); }
.fg .fg-about p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--fg-muted); }
.fg .fg-board__grid--icons .fg-board__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--fg-accent-soft); color: var(--fg-accent); font-size: 15px; }
.fg .fg-were a, .fg .fg-were span { font-size: 12.5px; }
@media (max-width: 991.98px) {
	.fg .fg-features, .fg .fg-home-grid { grid-template-columns: minmax(0, 1fr); }
}

/* forum sidebar */
.fg .fg-act { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--fg-border); min-width: 0; }
.fg .fg-act:last-child { border-bottom: 0; }
.fg .fg-act__title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--fg-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fg .fg-act__title:hover { color: var(--fg-accent); text-decoration: none; }
.fg .fg-act__meta { font-size: 11.5px; color: var(--fg-faint); }
.fg .fg-side--social .fg-social { margin: 0; }
.fg .fg-side--social .fg-social__btn { flex: 1 1 auto; justify-content: center; }

@media (max-width: 991.98px) {
	.fg .fg-frow { grid-template-columns: 40px minmax(0, 1fr); }
	.fg .fg-frow__last { grid-column: 2; }
	.fg .fg-frow__stats { grid-column: 2; display: flex; gap: 14px; text-align: left; }
	.fg .fg-frow__stats > div { display: flex; gap: 5px; align-items: baseline; }
	.fg .fg-trow { grid-template-columns: 36px minmax(0, 1fr); }
	.fg .fg-trow__stats { display: none; }
	.fg .fg-trow__last { grid-column: 2; justify-content: flex-start; text-align: left; }
	.fg .fg-trow__last .fg-frow__lastinfo { align-items: flex-start; }
	.fg .topic-answers > div[id^="answer_"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "user" "top" "body" "foot"; }
	.fg .topic-answers .center-area > .left-side { display: grid; grid-template-columns: 48px 1fr; gap: 0 12px; align-items: center; text-align: left; border-right: 0; border-bottom: 1px solid var(--fg-border); padding: 12px 14px; }
	.fg .topic-answers .center-area > .left-side img { grid-row: 1 / 6; width: 48px; height: 48px; margin: 0; border-radius: 12px; }
}
