/* Shared styles of the server site. Look from site/design (dark ground, orange accent, Russo One + Inter). */
:root {
	--bg: #121110;
	--bg-deep: #0F0E0D;
	--panel: #1C1A17;
	--strip: #161513;
	--line: #2E2A25;
	--line-2: #3A352F;
	--text: #ECE7E1;
	--muted: #A39A8F;
	--accent: #E0662F;
	--accent-hover: #F08A57;
	--ok: #7CC46A;
	--ok-text: #9BD98A;
	--ok-bg: #1F2A1C;
	--warn: #E8B35A;
	--danger-bg: #3A1F18;
	--danger-line: #5A2E22;
	--danger-text: #F3A58A;
	--display: 'Russo One', Inter, system-ui, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; }
.display { font-family: var(--display); font-weight: 400; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.sub { background: var(--strip); border-radius: 8px; }
.label { font-size: 13px; color: var(--muted); }
.big { font-family: var(--display); font-size: 28px; margin-top: 6px; }

/* buttons */
.btn { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px;
	border-radius: 6px; font: 600 14px Inter, sans-serif; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn-accent { background: var(--accent); color: var(--bg); font-weight: 700; }
.btn-accent:hover { background: var(--accent-hover); color: var(--bg); }
.btn-light { background: var(--text); color: var(--bg); font-weight: 700; }
.btn-light:hover { color: var(--bg); background: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-dark { background: var(--line); color: var(--text); border: 0; }
.btn-dark:hover { color: var(--text); background: var(--line-2); }
.btn-danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-line); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 5px; }
.btn-block { width: 100%; }
input, select { height: 44px; padding: 0 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
	border-radius: 6px; font: 500 14px Inter, sans-serif; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--strip); }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark { width: 36px; height: 36px; border-radius: 6px; background: var(--accent); display: flex; align-items: center;
	justify-content: center; font-family: var(--display); color: var(--bg); font-size: 18px; }
.logo-name { font-family: var(--display); font-size: 20px; letter-spacing: 1px; }
.logo-tag { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 6px; }
.nav { display: flex; flex-wrap: wrap; gap: 0; flex: 1 1 auto; }
.nav a { color: var(--muted); padding: 10px 12px; font-weight: 600; font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--text); }
.online-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; background: var(--ok-bg);
	color: var(--ok-text); font-size: 13px; font-weight: 600; }
.online-pill.off { background: var(--danger-bg); color: var(--danger-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.off .dot { background: var(--danger-text); }
.lang { position: relative; }
.lang-btn { background: var(--panel); color: var(--text); border-color: var(--line); padding: 0 12px; }
.lang-menu { position: absolute; right: 0; top: 50px; z-index: 10; width: 190px; background: var(--panel); border: 1px solid var(--line-2);
	border-radius: 8px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.lang-menu[hidden] { display: none; }
.lang-menu button { width: 100%; height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 6px;
	font: 500 14px Inter, sans-serif; color: var(--text); cursor: pointer; text-align: left; background: transparent; }
.lang-menu button.on, .lang-menu button:hover { background: var(--line); }
.lang-menu b { width: 30px; font-size: 11px; color: var(--muted); }

/* header login / user chip */
.auth-slot { display: flex; min-width: 0; }
.user-chip { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 6px; background: var(--panel);
	border: 1px solid var(--line); color: var(--text); border-radius: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
.user-chip:hover { color: var(--text); border-color: var(--line-2); }
.user-chip img, .user-chip .ava-ph { width: 32px; height: 32px; border-radius: 4px; background: var(--line-2); flex: none; }
.user-chip .nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .bal { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* top-up window (topup.js): same look as the site (panels, orange accent, Russo One) */
.tu-bg { position: fixed; inset: 0; z-index: 50; background: rgba(8,7,6,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tu { width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.tu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.tu-head h2 { margin: 0; font-size: 32px; font-weight: 400; }
.tu-bal { height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.tu-x { margin-left: auto; width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 16px; }
.tu-x:hover { color: var(--text); border-color: var(--line-2); }
.tu-tabs { margin-top: 18px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.tu-tab { height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 600; font-size: 14px; }
.tu-tab.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.tu-body { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tu-grid { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tu-card { position: relative; min-height: 112px; text-align: left; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
	cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; font: inherit; min-width: 0; transition: border-color .15s, background .15s; }
.tu-card:hover { border-color: var(--line-2); background: #221F1B; }
.tu-card.on { border-color: var(--accent); background: #2A1E16; box-shadow: inset 0 0 0 1px var(--accent); }
.tu-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tu-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 6px; margin-bottom: auto; padding-bottom: 6px; min-width: 0; }
.tu-kind { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; }
.tu-kind.best { color: var(--accent); letter-spacing: .5px; font-size: 10px; }
.tu-amount { font-family: var(--display); font-size: 26px; line-height: 1; }
.tu-gets { font-size: 12px; font-weight: 600; color: var(--ok-text); }
.tu-gets.muted { color: var(--muted); font-weight: 500; }
.tu-badge { flex: none; padding: 3px 7px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-text); font-size: 11px; font-weight: 700; }
.tu-badge.best { background: var(--accent); color: var(--bg); }
.tu-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tu-method, .tu-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.tu-method { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tu-method b { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 1px; }
.tu-tebex { font-size: 12px; color: var(--muted); }
.tu-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.tu-tiers { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 8px; }
.tu-tier { height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--strip); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.tu-tier.past { color: var(--text); }
.tu-tier.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tu-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 6px; font-size: 11px; text-align: center; }
.tu-sum { display: flex; flex-direction: column; gap: 8px; background: var(--strip); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.tu-sum > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.tu-bonus { padding: 2px 8px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-text); }
.tu-bonus.none { background: none; color: var(--muted); padding: 0; }
.tu-total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 16px !important; }
.tu-total b { font-family: var(--display); font-weight: 400; color: var(--accent); font-size: 22px; }
.tu-pay { background: var(--accent); color: var(--bg); border: 0; height: 56px; font-size: 16px; font-weight: 700; }
.tu-pay:hover:not(:disabled) { background: var(--accent-hover); color: var(--bg); }
.tu-pay:disabled { opacity: .45; cursor: not-allowed; }
.tu-note { margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--danger-bg); color: var(--danger-text); font-size: 13px; line-height: 1.5; }
.tu-msg { margin: 0; color: var(--danger-text); font-size: 13px; }
.tu-msg:empty { display: none; }
.tu-fine { margin: 0; font-size: 12px; line-height: 1.5; }
@media (max-width: 640px) { .tu { padding: 18px; } .tu-head h2 { font-size: 26px; } .tu-grid { grid-template-columns: repeat(2, 1fr); } }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; }

/* status */
.badge { padding: 6px 10px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-text); font-size: 12px; font-weight: 700; }
.badge.off { background: var(--danger-bg); color: var(--danger-text); }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; background: var(--ok); width: 0; transition: width .4s; }

/* tables */
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 8px; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; }
td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }

/* side menus (account, admin) */
.side-menu button { height: 44px; display: flex; align-items: center; padding: 0 14px; border: 0; border-radius: 6px;
	font: 600 14px Inter, sans-serif; cursor: pointer; text-align: left; background: transparent; color: var(--muted); width: 100%; }
.side-menu button.on, .side-menu button:hover { background: var(--line); color: var(--text); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1180px) {
	.logo-tag { display: none; }
	.nav { order: 3; flex-basis: 100%; margin: -6px 0 -8px -12px; }
}
@media (max-width: 640px) {
	.header-right { flex-wrap: wrap; }
	.steam-label { display: none; }
	.user-chip .nm { max-width: 90px; }
	.online-pill { padding: 8px 10px; }
	.wrap { padding-left: 16px; padding-right: 16px; }
	.hide-sm { display: none; }
}
