/* MC Stage — shared theme (TikTok-inspired dark) */
:root {
  --bg: #0b0b0d;
  --surface: #151518;
  --surface-2: #1d1d21;
  --surface-3: #26262b;
  --border: #2c2c32;
  --text: #f2f2f3;
  --muted: #8d8e95;
  --cyan: #25f4ee;
  --pink: #fe2c55;
  --pink-hover: #ff4d70;
  --green: #2bd97c;
  --amber: #ffb020;
  --red: #ff4545;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "IBM Plex Sans Arabic", "Inter", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 .8em; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* brand mark: two offset glyphs like the TikTok note */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: #000;
  display: grid; place-items: center; position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.brand-mark span {
  font-weight: 800; font-size: 15px; color: #fff;
  text-shadow: -2px -1px 0 var(--cyan), 2px 1px 0 var(--pink);
}

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 { font-size: 16px; }

/* buttons */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  background: var(--surface-3); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: #303036; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-hover); }
.btn-cyan { background: transparent; border-color: var(--cyan); color: var(--cyan); }
.btn-cyan:hover { background: rgba(37, 244, 238, .1); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: rgba(255, 69, 69, .5); color: var(--red); }
.btn-danger:hover { background: rgba(255, 69, 69, .1); }
.btn-wa { background: #1faa59; color: #fff; }
.btn-wa:hover { background: #23c065; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* forms */
label.field { display: block; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
input[dir="ltr"], .ltr { direction: ltr; text-align: left; }
textarea { min-height: 80px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* segmented choices / chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500;
}
.chip[aria-pressed="true"] { border-color: var(--pink); background: rgba(254, 44, 85, .12); color: #fff; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px;
  font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.b-active, .b-paid { color: var(--green); background: rgba(43, 217, 124, .1); }
.b-unused { color: var(--cyan); background: rgba(37, 244, 238, .1); }
.b-expired, .b-cancelled { color: var(--muted); }
.b-suspended { color: var(--red); background: rgba(255, 69, 69, .1); }
.b-awaiting_payment { color: var(--amber); background: rgba(255, 176, 32, .12); }
.plan { font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 6px; border: 1px solid; }
.plan-normal { color: #c9cad0; border-color: #4a4b52; }
.plan-silver { color: #dfe6ee; border-color: #9fb0c2; background: rgba(159, 176, 194, .1); }
.plan-gold { color: #ffd76a; border-color: #c9a227; background: rgba(255, 215, 106, .1); }
.plan-master { color: #fff; border-color: var(--pink); background: linear-gradient(90deg, rgba(37,244,238,.18), rgba(254,44,85,.18)); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; background: var(--surface); position: sticky; top: 0; }
tbody tr { background: var(--bg); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50;
}
.modal {
  width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 22px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { font-size: 19px; margin: 0; }
.x-btn { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; }
.x-btn:hover { color: #fff; }

/* toasts */
#toasts { position: fixed; bottom: 18px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
[dir="rtl"] #toasts { transform: translateX(50%); }
.toast { background: var(--surface-3); border: 1px solid var(--border); border-inline-start: 3px solid var(--cyan); border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow); font-size: 14px; }
.toast.err { border-inline-start-color: var(--red); }
.toast.ok { border-inline-start-color: var(--green); }

/* key/value list */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #000; border: 1px dashed var(--cyan); border-radius: 10px; padding: 12px 14px;
  font-family: var(--mono); font-size: 16px; letter-spacing: .04em; direction: ltr;
}
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.lang-select { width: auto; padding: 6px 10px; font-size: 13px; }
/* packages (2026-10) */
.plan-games { color: #6ff7f2; border-color: #25f4ee; background: rgba(37, 244, 238, .1); }
.plan-intro { color: #ff8aa3; border-color: #fe2c55; background: rgba(254, 44, 85, .1); }
.plan-dj { color: #c4b5fd; border-color: #8b5cf6; background: rgba(139, 92, 246, .12); }
.plan-allinone { color: #ffd76a; border-color: #c9a227; background: linear-gradient(90deg, rgba(37,244,238,.12), rgba(254,44,85,.12)); }
.plan-mix { color: #e7e8ee; border-color: #8b8d99; background: rgba(255, 255, 255, .06); }
