/* ================= Game Panel v2 theme (data-mode="games", also GCS Admin data-mode="fivem") ================= */
:is([data-mode="games"],[data-mode="fivem"]) {
  --bg: #070b16;
  --bg2: #0a0f1e;
  --panel: #0f1527;
  --panel2: #151d34;
  --line: #1c2540;
  --line2: #2a3557;
  --accent: #a78bfa;
  --accent2: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --muted: #8f9bbd;
  --dim: #5b6789;
  --radius: 14px;
}
:is([data-mode="games"],[data-mode="fivem"]) body, body:is([data-mode="games"],[data-mode="fivem"]) {
  background:
    radial-gradient(900px 500px at 85% -10%, #8b5cf61f, transparent 60%),
    radial-gradient(700px 420px at -5% 110%, #22d3ee14, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
:is([data-mode="games"],[data-mode="fivem"]) .sidebar { background: #080d1bcc; backdrop-filter: blur(12px); }
:is([data-mode="games"],[data-mode="fivem"]) .brand { font-size: 17px; letter-spacing: .4px; }
:is([data-mode="games"],[data-mode="fivem"]) .logo { background: linear-gradient(135deg, var(--accent), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:is([data-mode="games"],[data-mode="fivem"]) nav a.active { background: linear-gradient(90deg, #8b5cf633, #8b5cf608); box-shadow: inset 3px 0 0 var(--accent); }
:is([data-mode="games"],[data-mode="fivem"]) nav a.active svg { color: var(--accent); }
:is([data-mode="games"],[data-mode="fivem"]) .topbar { background: #070b16b3; backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
:is([data-mode="games"],[data-mode="fivem"]) .card { background: linear-gradient(180deg, #121a30, #0f1527); border-color: var(--line); border-radius: var(--radius); }
:is([data-mode="games"],[data-mode="fivem"]) .btn.primary { background: linear-gradient(135deg, var(--accent2), #6d28d9); border-color: #7c3aed; color: #fff; box-shadow: 0 6px 20px #7c3aed40; }
:is([data-mode="games"],[data-mode="fivem"]) .btn.primary:hover { filter: brightness(1.12); }
:is([data-mode="games"],[data-mode="fivem"]) .btn.go { background: linear-gradient(135deg, #16a34a, #15803d); border-color: #16a34a; color: #fff; }
:is([data-mode="games"],[data-mode="fivem"]) .input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px #8b5cf633; }
:is([data-mode="games"],[data-mode="fivem"]) .login-card { border-color: #2a2f55; box-shadow: 0 30px 90px #000a, 0 0 0 1px #8b5cf622; }
:is([data-mode="games"],[data-mode="fivem"]) .login { background: radial-gradient(900px 500px at 20% -10%, #8b5cf630, transparent), radial-gradient(800px 500px at 110% 110%, #22d3ee22, transparent), var(--bg); }

.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; align-content: start; }
.stack.sm { gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid2.top { align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.btn.left { justify-content: flex-start; }
.note { padding: 10px 13px; border-radius: 10px; background: #8b5cf614; border: 1px solid #8b5cf633; color: #d8ccff; font-size: 13px; margin: 0 0 14px; }
.note code, .sched code { background: #0006; padding: 1px 5px; border-radius: 5px; }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-h h3 { margin: 0 !important; }
.table-wrap.flat { background: transparent; border: 0; border-radius: 0; }

/* segmented control */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #0b1122; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.seg button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 550; }
.seg button.on { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; }
.seg.sm button { padding: 3px 9px; font-size: 12px; }

/* status pill */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: #1a2240; color: var(--muted); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: #4ade80; background: #052e1a; } .pill.on i { box-shadow: 0 0 0 0 #4ade80; animation: pulse 2s infinite; }
.pill.off { color: #f87171; background: #2a0f12; }
.pill.warn { color: #fbbf24; background: #2a1d06; }
.pill.inst { color: #67e8f9; background: #082a33; } .pill.inst i { animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* game icon */
.gico { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: #334155; }
.gico.g-cs16 { background: linear-gradient(135deg, #d97706, #92400e); }
.gico.g-cs2 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.gico.g-minecraft { background: linear-gradient(135deg, #16a34a, #166534); }
.gico.g-fivem { background: linear-gradient(135deg, #ea580c, #9a3412); }

/* map thumbnail (generated from map name) */
.map-thumb { position: relative; overflow: hidden; display: grid; align-items: end; min-height: 90px;
  background: radial-gradient(120% 90% at 0% 0%, hsl(var(--h) 70% 45% / .55), transparent 60%), radial-gradient(120% 100% at 100% 100%, hsl(calc(var(--h) + 60) 70% 40% / .45), transparent 60%),
    repeating-linear-gradient(45deg, #ffffff06 0 10px, transparent 10px 20px), #0c1222; }
.map-thumb .map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-thumb:has(.map-img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #070b1600 30%, #070b16d9 100%); }
.map-thumb span { position: relative; z-index: 1; padding: 8px 12px; font-family: var(--mono); font-weight: 700; font-size: 13px; color: #fff; text-shadow: 0 2px 10px #000; letter-spacing: .3px; }

/* hero stats */
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hs { position: relative; overflow: hidden; padding: 14px 16px; border-radius: 14px; background: linear-gradient(180deg, #131b33, #0f1527); border: 1px solid var(--line); }
.hs::after { content: ""; position: absolute; inset: auto -30px -40px auto; width: 110px; height: 110px; border-radius: 50%; filter: blur(30px); opacity: .35; }
.hs.on::after { background: #22c55e; } .hs.pl::after { background: #a78bfa; } .hs.cpu::after { background: #22d3ee; } .hs.ram::after { background: #f472b6; }
.hs .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .7px; font-weight: 650; }
.hs .v { font-size: 26px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hs .v small { font-size: 15px; color: var(--dim); font-weight: 600; margin-left: 2px; }
.hs .s { font-size: 12px; color: var(--muted); }

/* server cards */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.srv { border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #121a30, #0e1426); border: 1px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.srv:hover { transform: translateY(-2px); border-color: #3b3f73; box-shadow: 0 14px 40px #0008; }
.srv.is-on { box-shadow: inset 0 2px 0 #4ade8099; }
.srv .map-thumb { min-height: 72px; }
.srv-body { padding: 12px 16px 14px; display: grid; gap: 9px; }
.srv-top { display: flex; align-items: center; gap: 8px; }
.srv-top .icon-btn { background: #0b1122cc; }
.srv-name { font-size: 16px; font-weight: 750; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-name:hover { color: var(--accent); }
.srv-addr { color: var(--muted); font-size: 12.5px; }
.srv-players b { font-size: 22px; font-weight: 800; }
.srv-players small { color: var(--muted); margin-left: 3px; }
.srv-players .tag { margin-left: 8px; }
.pbar { position: relative; height: 7px; border-radius: 6px; background: #1a2240; overflow: hidden; margin-top: 6px; }
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: #334155; border-radius: 6px; transition: width .5s; }
.pbar i.real { background: linear-gradient(90deg, var(--accent2), var(--cyan)); }
.srv-spark { width: 100%; height: 34px; display: block; }
.srv-res { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.srv-res b { color: var(--text); font-variant-numeric: tabular-nums; }
.srv-act { display: flex; gap: 6px; flex-wrap: wrap; }
.srv-act .primary { margin-left: auto; }

/* server page hero */
.srv-hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #0e1426; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0; margin-bottom: 14px; }
/* background: same map, intentionally blurred (the source images are small) */
.srv-hero > .map-thumb { position: absolute; inset: -30px; opacity: .5; filter: blur(22px) saturate(1.3); }
.srv-hero > .map-thumb span { display: none; }
.srv-hero > .map-thumb::after { display: none; }
/* sharp map shot at (near) native size */
.hero-shot { position: relative; padding: 14px 0 14px 14px; }
.hero-shot .map-thumb { width: 200px; height: 150px; min-height: 0; border-radius: 12px; box-shadow: 0 10px 30px #0009, 0 0 0 1px #ffffff1a; }
.hero-shot .map-thumb span { font-size: 12px; }
.hero-main, .hero-kpis { position: relative; padding: 18px 20px; }
.hero-l1 { display: flex; gap: 8px; align-items: center; }
.hero-main h2 { margin: 8px 0 4px; font-size: 22px; }
.hero-addr { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.hero-addr .mono { cursor: pointer; } .hero-addr .mono:hover { color: var(--text); }
.hero-kpis { display: flex; gap: 22px; align-items: center; background: linear-gradient(90deg, transparent, #070b16cc 30%); flex-wrap: wrap; }
.hero-kpis small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.hero-kpis b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-kpis b em { font-style: normal; color: var(--dim); font-size: 14px; }
.hero-kpis b.map { font-family: var(--mono); font-size: 15px; }
.hero-kpis span { display: block; color: var(--dim); font-size: 11.5px; }

/* page tabs */
.ptabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button { background: none; border: 0; color: var(--muted); padding: 10px 14px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.ptabs button:hover { color: var(--text); }
.ptabs button.on { color: #fff; border-bottom-color: var(--accent); background: linear-gradient(180deg, transparent, #8b5cf614); }

/* overview */
.ov { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.ov-side { display: grid; gap: 14px; }
.ov .lbl { margin-bottom: 10px; }
.chart { position: relative; margin-bottom: 12px; }
.ch-title { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin: 4px 0 6px; }
.ch-title i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 2px; }
.chart-max { position: absolute; top: 2px; left: 4px; font-size: 11px; color: var(--dim); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 13px; }
.chart-tip { position: absolute; top: 6px; min-width: 130px; padding: 7px 10px; border-radius: 9px; background: #0b1122f0; border: 1px solid var(--line2); font-size: 12px; pointer-events: none; z-index: 2; }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* console */
.con { display: flex; flex-direction: column; height: calc(100vh - 330px); min-height: 360px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #070b16; }
.con-term { flex: 1; min-height: 0; padding: 10px 6px 4px 12px; }
.con-cmd { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: #0b1122; border-top: 1px solid var(--line); }
.con-cmd > span { color: var(--accent); font-size: 20px; padding: 0 4px; }
.con-cmd .input { flex: 1; background: transparent; border-color: transparent; }

/* plugins */
.plug-list { display: grid; gap: 6px; }
.plug { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: #0b1122; border: 1px solid var(--line); opacity: .7; }
.plug.on { opacity: 1; border-color: #8b5cf640; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 22px; background: #2a3352; transition: .2s; }
.switch i::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #cbd5e1; transition: .2s; }
.switch input:checked + i { background: linear-gradient(135deg, #8b5cf6, #22d3ee); }
.switch input:checked + i::before { transform: translateX(16px); background: #fff; }
.switch.sm { width: 32px; height: 18px; } .switch.sm i::before { width: 12px; height: 12px; } .switch.sm input:checked + i::before { transform: translateX(14px); }

/* admins table */
table.adm td { padding: 6px 6px; }
table.adm .input { height: 30px; width: 100%; }
.flagbtn { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.flag { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 9px; background: #0b1122; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.flag b { font-family: var(--mono); color: var(--accent); width: 14px; }
.flag span { color: var(--muted); }

/* maps */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 480px; overflow: auto; }
.map-chip { border: 2px solid transparent; border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; background: none; opacity: .65; transition: .15s; }
.map-chip .map-thumb { min-height: 58px; }
.map-chip.in { border-color: var(--accent); opacity: 1; }
.map-chip:hover { opacity: 1; }
.cycle { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 480px; overflow: auto; counter-reset: c; }
.cycle li { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; background: #0b1122; counter-increment: c; }
.cycle li::before { content: counter(c); color: var(--dim); width: 22px; font-size: 12px; }
.cycle li.empty::before { content: none; }

/* schedules */
.sched-list { display: grid; gap: 8px; }
.sched { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #0b1122; border: 1px solid var(--line); flex-wrap: wrap; }
.sched.dis { opacity: .55; }
.sched-time { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--accent); }
.days { display: flex; gap: 3px; margin: 6px 0 2px; }
.days span, .days button { min-width: 26px; padding: 2px 6px; text-align: center; border-radius: 6px; font-size: 11.5px; background: #1a2240; color: var(--dim); border: 0; }
.days span.on, .days button.on { background: #8b5cf640; color: #e9e2ff; }
.days.pick button { cursor: pointer; padding: 6px 10px; font-size: 13px; }

/* databases */
.db-list { display: grid; gap: 10px; }
.db { padding: 12px 14px; border-radius: 12px; background: #0b1122; border: 1px solid var(--line); }
.db-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.icon-btn.sm { width: 24px; height: 24px; font-size: 12px; }

/* activity */
.act-list { display: grid; }
.act { display: flex; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #1a2240; align-items: flex-start; }
.act:last-child { border-bottom: 0; }
.act-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
.act-d { color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.act > .sub { text-align: right; white-space: nowrap; }

/* accounts */
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.user.dis { opacity: .6; }
.user-h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 50%), hsl(calc(var(--h) + 50) 70% 40%)); }
.user-srv { display: grid; gap: 8px; }
.perm-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.perm-chips span { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #8b5cf626; color: #ddd3ff; }
.perm-editor { display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.pe-srv { padding: 10px 12px; border-radius: 10px; background: #0b1122; border: 1px solid var(--line); }
.pe-h { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.pe-preset { height: 28px; width: auto; font-size: 12.5px; }
.pe-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.pe { display: inline-flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 8px; background: #141c33; border: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.pe:has(input:checked) { border-color: #8b5cf6; background: #8b5cf626; }

.modal label.chk { display: flex; align-items: center; gap: 8px; }
.modal label.pe { display: inline-flex; color: var(--text); font-size: 12.5px; }
.modal label.flag { display: flex; color: var(--text); }
.modal label.tpl { display: grid; color: var(--text); }
.modal .row .input { width: auto; }

/* create dialog */
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.tpl { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line2); background: #0b1122; cursor: pointer; font-size: 13px; }
.tpl input { display: none; }
.tpl:has(input:checked) { border-color: var(--accent); background: #8b5cf622; box-shadow: 0 0 0 3px #8b5cf622; }
.tpl .gico { height: 34px; min-width: 44px; font-size: 13px; }

@media (max-width: 1000px) {
  .ov, .grid2 { grid-template-columns: 1fr; }
  .srv-hero { grid-template-columns: auto 1fr; }
  .srv-hero .hero-kpis { grid-column: 1 / -1; }
  .hero-shot .map-thumb { width: 150px; height: 112px; }
  .hero-kpis { background: #070b16b3; }
}
@media (max-width: 600px) {
  .srv-grid { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .con { height: calc(100vh - 380px); }
}

/* ================= GCS Admin (FiveM) — orange accent, txAdmin-like ================= */
[data-mode="fivem"] { --accent: #fb923c; --accent2: #f97316; --cyan: #facc15; --pink: #f472b6; }
[data-mode="fivem"] body, body[data-mode="fivem"] {
  background: radial-gradient(900px 500px at 85% -10%, #f9731620, transparent 60%), radial-gradient(700px 420px at -5% 110%, #facc1510, transparent 60%), var(--bg);
}
[data-mode="fivem"] nav a.active { background: linear-gradient(90deg, #f9731633, #f9731608); }
[data-mode="fivem"] .btn.primary, [data-mode="fivem"] .seg button.on { background: linear-gradient(135deg, #f97316, #ea580c); border-color: #f97316; }
[data-mode="fivem"] .nav-sep { margin: 14px 12px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.fx-card { text-align: center; }
.fx-card .sub { margin: 0; }
.btn.cfx { height: 46px !important; font-size: 15px; font-weight: 650; gap: 10px; background: linear-gradient(135deg, #f97316, #c2410c); border: 0; color: #fff; }
.btn.cfx:hover { filter: brightness(1.08); }
.btn.cfx svg { width: 22px; height: 22px; fill: currentColor; }
.fx-card details { text-align: left; color: var(--muted); font-size: 13px; }
.fx-card details summary { cursor: pointer; margin-bottom: 10px; }
.fx-card details form { display: grid; gap: 10px; }
.fx-srv { display: flex; align-items: center; gap: 8px; }
.fx-srv select { min-width: 200px; }
.fx-me { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.fx-me img { width: 26px; height: 26px; border-radius: 50%; }
.fx-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.fx-head h2 { margin: 0; font-size: 20px; }
.adm-row { display: flex; align-items: center; gap: 12px; }
.adm-row img, .adm-row .av { width: 34px; height: 34px; border-radius: 50%; background: #1b2740; display: grid; place-items: center; font-weight: 700; color: var(--accent); flex: none; }
.role-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #f9731622; color: #fdba74; font-weight: 650; }
.role-pill.owner { background: #facc1522; color: #fde047; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.perm-grid label { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text); }
.gico.g-fivem { background: linear-gradient(135deg, #f97316, #c2410c); }
.fx-head { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(90deg, #f973161a, #0f1527 45%); }
.fx-head .gico { height: 34px; min-width: 40px; font-size: 13px; }
.fx-head .hero-kpis { padding: 0; background: none; gap: 20px; }
.fx-head .hero-kpis b { font-size: 17px; }
@media (max-width: 700px) { .fx-head .hero-kpis { width: 100%; } }

/* ================= AMX editor, compiler & generator ================= */
.amx-ed { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .amx-ed { grid-template-columns: 1fr; } }
.amx-files .input { width: 100%; margin-bottom: 8px; }
.amx-fl { display: grid; gap: 4px; max-height: 560px; overflow: auto; }
.amx-f { display: grid; text-align: left; gap: 2px; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; }
.amx-f:hover { background: #ffffff08; } .amx-f.on { border-color: var(--accent2); background: #8b5cf614; }
.amx-f small { color: var(--dim); font-size: 11px; }
.amx-main { display: grid; gap: 10px; min-width: 0; }
.amx-code { display: flex; height: 520px; border: 1px solid var(--line2); border-radius: 10px; background: #060a14; overflow: hidden; }
.amx-gut { margin: 0; padding: 10px 8px; min-width: 44px; text-align: right; color: var(--dim); background: #0a0f1e; font: 13px/1.5 var(--mono); overflow: hidden; user-select: none; border-right: 1px solid var(--line); }
.amx-code textarea { flex: 1; border: 0; outline: none; resize: none; padding: 10px 12px; background: transparent; color: #e2e8f0; font: 13px/1.5 var(--mono); tab-size: 4; white-space: pre; overflow: auto; }
.amx-out { display: grid; gap: 6px; }
.amx-out .output { max-height: 220px; overflow: auto; }
.amx-res { padding: 9px 12px; border-radius: 9px; font-weight: 650; }
.amx-res.ok { background: #052e1a; color: #4ade80; } .amx-res.bad { background: #2c0e0e; color: #fca5a5; }
.amx-diag { text-align: left; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: #0b1122; color: var(--text); cursor: pointer; font-size: 13px; }
.amx-diag.error { border-left: 3px solid #f87171; } .amx-diag.warning { border-left: 3px solid #fbbf24; }
.amx-diag:hover { background: #111a33; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.gen-card { display: grid; gap: 6px; text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, #121a30, #0f1527); color: var(--text); cursor: pointer; transition: border-color .15s, transform .15s; }
.gen-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.gen-ico { font-size: 26px; }
.gen-card .sub { font-size: 12.5px; }
