:root {
  --bg: #09090d;
  --bg-2: #101017;
  --panel: #14141d;
  --panel-2: #1a1a25;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f3f7;
  --muted: #9b97a8;
  --pink: #ff4d8d;
  --pink-2: #ff7aa8;
  --gold: #e8b86d;
  --green: #46d39a;
  --red: #ff5d6c;
  --blue: #6fa8ff;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 90% -10%, rgba(255, 77, 141, 0.14), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(232, 184, 109, 0.09), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
}
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.eyebrow {
  color: var(--pink-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.error { color: var(--red); font-size: 13px; margin-top: 8px; }
.legal { color: #625e70; font-size: 11px; text-align: center; margin-top: 18px; }

/* Login */
.login-view {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(28, 28, 40, 0.92), rgba(16, 16, 23, 0.96));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 38px 34px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(14px);
}
.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  color: #160b12;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  box-shadow: 0 12px 34px rgba(255, 77, 141, 0.35);
}
.brand-mark.small { width: 42px; height: 42px; border-radius: 14px; font-size: 20px; margin: 0; }
.login-card h1 { font-size: 30px; letter-spacing: -0.03em; margin-top: 6px; }
.login-card .muted { margin-top: 8px; line-height: 1.5; }
.login-card form { margin-top: 26px; text-align: left; display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(255, 77, 141, 0.7); background: rgba(255, 255, 255, 0.07); }
textarea { resize: vertical; min-height: 84px; }
input[type="checkbox"] { width: auto; accent-color: var(--pink); }

.btn {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.25); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--pink), #d92e6d);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 77, 141, 0.26);
}
.btn.primary:hover { background: linear-gradient(135deg, var(--pink-2), var(--pink)); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.btn.danger { color: #ffd9dd; border-color: rgba(255, 93, 108, 0.4); background: rgba(255, 93, 108, 0.1); }
.btn.wide { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { background: transparent; border: 0; color: var(--text); font-size: 20px; cursor: pointer; padding: 6px 10px; }

/* Shell */
.app { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(13, 13, 20, 0.88);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  backdrop-filter: blur(18px);
  z-index: 20;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.sidebar-brand strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.sidebar-brand span { color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 11px 12px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 600;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav-item.active { background: rgba(255, 77, 141, 0.13); color: #fff; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.nav-item.active .nav-dot { background: var(--pink); opacity: 1; box-shadow: 0 0 12px var(--pink); }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.admin-chip { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 13px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  color: #1a0d13; font-weight: 900;
  flex: none;
}
.admin-chip strong { display: block; font-size: 12px; }
.admin-chip span { display: block; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; max-width: 145px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 30px 10px;
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(9, 9, 13, 0.95), rgba(9, 9, 13, 0.7), transparent);
  backdrop-filter: blur(8px);
}
.topbar h2 { font-size: 25px; letter-spacing: -0.03em; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }
#menuBtn { display: none; }
.content { padding: 18px 30px 60px; max-width: 1400px; width: 100%; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
}
.stat-card .stat-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; margin-top: 7px; }
.stat-card .stat-sub { color: var(--muted); font-size: 11px; margin-top: 4px; }
.stat-card.accent { border-color: rgba(255, 77, 141, 0.3); background: linear-gradient(180deg, rgba(255, 77, 141, 0.13), rgba(255, 77, 141, 0.03)); }
.stat-card.gold { border-color: rgba(232, 184, 109, 0.3); background: linear-gradient(180deg, rgba(232, 184, 109, 0.12), rgba(232, 184, 109, 0.02)); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 16px; margin-top: 16px; }
.panel {
  background: rgba(20, 20, 29, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-size: 16px; letter-spacing: -0.02em; }
.panel-head .btn { margin-left: auto; }
.section-note { color: var(--muted); font-size: 12px; line-height: 1.55; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(255, 255, 255, 0.025); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.user-cell img, .user-cell .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.user-cell strong { display: block; font-size: 13px; }
.user-cell span { display: block; color: var(--muted); font-size: 11px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.08); color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.live { background: rgba(255, 77, 141, 0.14); color: var(--pink-2); border-color: rgba(255, 77, 141, 0.3); }
.badge.online { background: rgba(70, 211, 154, 0.12); color: var(--green); border-color: rgba(70, 211, 154, 0.3); }
.badge.gold { background: rgba(232, 184, 109, 0.12); color: var(--gold); border-color: rgba(232, 184, 109, 0.3); }
.badge.red { background: rgba(255, 93, 108, 0.12); color: var(--red); border-color: rgba(255, 93, 108, 0.3); }
.badge.blue { background: rgba(111, 168, 255, 0.12); color: var(--blue); border-color: rgba(111, 168, 255, 0.3); }
.badge.hidden { display: none; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 38px 20px; border: 1px dashed var(--line-strong); border-radius: 14px; }

/* Forms in modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px;
}
.modal {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(180deg, #1a1a25, #111118);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.modal-head h3 { font-size: 21px; letter-spacing: -0.03em; }
.modal-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.modal-close { margin-left: auto; background: transparent; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.photo-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.03); }
.photo-preview img { width: 64px; height: 80px; border-radius: 10px; object-fit: cover; background: #222; }
.photo-preview .meta { flex: 1; min-width: 0; }
.photo-preview .meta strong { display: block; font-size: 12px; }
.photo-preview .meta span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.check-row { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 13px; font-weight: 600; }
.check-row input { width: auto; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 13px; }
.plan-card { border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: rgba(255, 255, 255, 0.025); }
.plan-card h4 { margin: 0 0 3px; font-size: 14px; }
.plan-card .price { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; margin: 8px 0 10px; }
.plan-card .price span { font-size: 11px; color: var(--muted); font-weight: 500; }
.plan-card label { margin-top: 9px; }
.plan-card textarea { min-height: 78px; font-size: 12px; }

/* Toast */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; }
.toast {
  background: #20202c;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 15px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toastIn 0.18s ease-out;
  max-width: 340px;
}
.toast.ok { border-color: rgba(70, 211, 154, 0.4); }
.toast.err { border-color: rgba(255, 93, 108, 0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.loading { padding: 40px; text-align: center; color: var(--muted); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--pink);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 270px;
    transform: translateX(-100%); transition: transform 0.2s ease;
  }
  .sidebar.open { transform: none; }
  #menuBtn { display: block; }
  .topbar { padding: 16px 16px 8px; }
  .content { padding: 14px 16px 50px; }
  .topbar-actions .btn:first-child { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}

.verif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.id-shot { border: 1px solid var(--line, #26262f); border-radius: 10px; overflow: hidden; background: #15151c; }
.id-shot img { width: 100%; height: 190px; object-fit: cover; display: block; }
.id-shot span { display: block; padding: 8px 10px; font-size: 12px; color: var(--muted, #a29dac); }
.id-shot small { display: block; padding: 0 10px 10px; font-size: 11px; color: var(--muted, #a29dac); }
.id-shot.missing { display: grid; place-items: center; height: 190px; text-align: center; }
@media (max-width: 780px) { .verif-grid { grid-template-columns: 1fr; } }
