* { box-sizing: border-box; }
body { margin:0; font-family: 'Segoe UI', Arial, sans-serif; background:#0f1117; color:#e6e8ee; }
.screen { min-height:100vh; }
.toast { position:fixed; top:16px; left:50%; transform:translateX(-50%) translateY(-40px); background:#1f2430; border:1px solid #333; color:#fff; padding:10px 18px; border-radius:8px; opacity:0; transition:.25s; z-index:999; max-width:90%; text-align:center; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ---- AUTH ---- */
#authScreen { display:flex; align-items:center; justify-content:center; }
.auth-card { background:#171a22; padding:32px; border-radius:14px; width:360px; max-width:92vw; box-shadow:0 10px 40px rgba(0,0,0,.4); }
.auth-card h1 { text-align:center; margin:0 0 20px; color:#6ea8fe; }
.tabs { display:flex; margin-bottom:18px; border-radius:8px; overflow:hidden; border:1px solid #2a2f3b; }
.tab-btn { flex:1; padding:10px; background:#1b1f29; color:#aab; border:none; cursor:pointer; }
.tab-btn.active { background:#6ea8fe; color:#0f1117; font-weight:600; }
.auth-form input { width:100%; padding:11px 12px; margin-bottom:10px; border-radius:8px; border:1px solid #2a2f3b; background:#0f1117; color:#fff; }
.auth-form button { width:100%; padding:11px; border:none; border-radius:8px; background:#6ea8fe; color:#0f1117; font-weight:700; cursor:pointer; }
.msg { color:#ff8585; min-height:18px; font-size:13px; margin-top:6px; }

/* ---- APP LAYOUT ---- */
.topbar { display:flex; align-items:center; gap:14px; padding:12px 18px; background:#171a22; border-bottom:1px solid #262b36; position:sticky; top:0; z-index:10; }
.brand { font-weight:800; color:#6ea8fe; }
.balance-box { margin-left:auto; font-weight:600; background:#0f1117; padding:6px 12px; border-radius:20px; border:1px solid #262b36; }
.balance-box .sep { color:#555; margin:0 6px; }
.btn-ghost { background:transparent; border:1px solid #333; color:#ddd; padding:7px 14px; border-radius:8px; cursor:pointer; }

.navtabs { display:flex; gap:6px; padding:10px 18px; background:#12141c; overflow-x:auto; }
.nav-btn { background:#1b1f29; border:1px solid #262b36; color:#ccc; padding:8px 16px; border-radius:20px; cursor:pointer; white-space:nowrap; }
.nav-btn.active { background:#6ea8fe; color:#0f1117; font-weight:700; border-color:#6ea8fe; }

main { padding:18px; max-width:900px; margin:0 auto; }
.view { display:none; }
.view.active { display:block; }

.server-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.server-tabs button { background:#1b1f29; border:1px solid #262b36; color:#ccc; padding:8px 16px; border-radius:8px; cursor:pointer; }
.server-tabs button.active { background:#22c55e; color:#06240f; font-weight:700; border-color:#22c55e; }

.card { background:#171a22; border:1px solid #262b36; border-radius:12px; padding:18px; margin-bottom:16px; }
.card h3 { margin-top:0; }
.field-row { margin-bottom:12px; }
.field-row label { display:block; margin-bottom:5px; font-size:13px; color:#9aa; }
select, input[type=number], input[type=text], input[type=email] { width:100%; padding:9px 10px; border-radius:8px; border:1px solid #2a2f3b; background:#0f1117; color:#fff; }
.price-box { background:#0f1117; border:1px solid #262b36; padding:10px 14px; border-radius:8px; margin-bottom:12px; }
.btn-primary { background:#6ea8fe; color:#0f1117; border:none; padding:11px 20px; border-radius:8px; font-weight:700; cursor:pointer; }
.btn-primary:disabled { opacity:.45; cursor:not-allowed; }
.btn-sm { padding:6px 10px; font-size:12px; border-radius:6px; border:1px solid #333; background:#1b1f29; color:#ddd; cursor:pointer; }
.btn-danger { background:#3a1620; color:#ff8585; border-color:#5a2230; }

.table { width:100%; border-collapse:collapse; margin-top:10px; font-size:13px; }
.table th, .table td { padding:8px 10px; border-bottom:1px solid #262b36; text-align:left; }
.table th { color:#9aa; font-weight:600; }

.badge { padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; }
.badge.pending { background:#3a331a; color:#ffd166; }
.badge.received, .badge.success { background:#123a22; color:#22c55e; }
.badge.cancelled, .badge.expired { background:#3a1620; color:#ff6b6b; }

.admin-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.admin-tab-btn { background:#1b1f29; border:1px solid #262b36; color:#ccc; padding:8px 14px; border-radius:8px; cursor:pointer; }
.admin-tab-btn.active { background:#f97316; color:#2a1400; font-weight:700; border-color:#f97316; }
.admin-tab-content { display:none; }
.admin-tab-content.active { display:block; }

.qr-box { text-align:center; }
.qr-box img { max-width:220px; background:#fff; padding:10px; border-radius:10px; }
.otp-box { background:#0f1117; border:2px dashed #22c55e; padding:16px; border-radius:10px; text-align:center; font-size:22px; font-weight:800; color:#22c55e; margin-top:10px; }
