/* ═══════════════════════════════════════════════
   MobileHub Pro — Global Stylesheet
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg:       #080d18;
  --bg2:      #0f1624;
  --card:     #131d2e;
  --card2:    #172034;
  --border:   #1c2d45;
  --border2:  #243550;
  --accent:   #00d4ff;
  --accent2:  #ff6b35;
  --purple:   #a78bfa;
  --green:    #00e676;
  --red:      #ff4444;
  --yellow:   #ffd60a;
  --text:     #dde8f5;
  --muted:    #6b80a0;
  --muted2:   #8fa0bc;
  --font:     'DM Sans', sans-serif;
  --head:     'Syne', sans-serif;
  --radius:   12px;
  --radius-lg:18px;
  --shadow:   0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:0 20px 60px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: var(--head); font-weight: 800; line-height: 1.2; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius); font-family: var(--font);
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: all .2s; text-decoration: none; white-space: nowrap; }
.btn-primary   { background: var(--accent); color: #000; }
.btn-primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,212,255,.3); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-ghost     { background: transparent; border: 1px solid var(--border2); color: var(--muted2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-success   { background: var(--green); color: #000; }
.btn-warning   { background: var(--yellow); color: #000; }
.btn-sm        { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-icon      { padding: 8px; border-radius: 8px; aspect-ratio: 1; }

/* ── FORM ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: var(--font);
  font-size: 14px; outline: none; transition: border .2s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,.08); }
.form-control::placeholder { color: var(--muted); }
select.form-control option { background: var(--bg2); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── CARD ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-pad { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-family: var(--head); font-size: 16px; font-weight: 700; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg2); }
th { padding: 12px 16px; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; text-align: left; white-space: nowrap; }
td { padding: 13px 16px; font-size: 13px; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-superadmin { background: rgba(167,139,250,.18); color: var(--purple); }
.badge-owner      { background: rgba(255,107,53,.18);  color: var(--accent2); }
.badge-manager    { background: rgba(0,212,255,.15);   color: var(--accent); }
.badge-staff      { background: rgba(0,230,118,.12);   color: var(--green); }
.badge-active     { background: rgba(0,230,118,.12);   color: var(--green); }
.badge-inactive   { background: rgba(255,68,68,.12);   color: var(--red); }
.badge-draft      { background: rgba(107,128,160,.15); color: var(--muted2); }
.badge-testing    { background: rgba(255,107,53,.15);  color: var(--accent2); }
.badge-published  { background: rgba(0,212,255,.15);   color: var(--accent); }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75);
  align-items: center; justify-content: center; z-index: 1000;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform:translateY(16px) scale(.98); } to { opacity:1; transform:none; } }
.modal-header { padding: 22px 24px 0; }
.modal-title  { font-family: var(--head); font-size: 20px; font-weight: 800; }
.modal-body   { padding: 20px 24px; }
.modal-footer { padding: 0 24px 22px; display: flex; gap: 10px; }
.modal-close  { position: absolute; top: 16px; right: 16px; background: var(--border);
  border: none; color: var(--muted2); width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--card2); border: 1px solid var(--border2); color: var(--text);
  padding: 13px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  max-width: 320px; box-shadow: var(--shadow);
  transform: translateY(80px); opacity: 0; transition: all .3s;
  display: flex; align-items: center; gap: 10px;
}
#toast.show          { transform: translateY(0); opacity: 1; }
#toast.toast-success { border-color: var(--green); }
#toast.toast-error   { border-color: var(--red); }
#toast.toast-warn    { border-color: var(--yellow); }

/* ── STAT CARD ── */
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 20px;
  position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-card-top    { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-icon        { font-size: 28px; opacity: .7; }
.stat-label       { font-size: 11px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; margin-top: 14px; }
.stat-value       { font-family: var(--head); font-size: 34px; font-weight: 800; margin-top: 4px; }
.stat-sub         { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-bar         { height: 3px; border-radius: 2px; margin-top: 14px; }

/* ── PAGE LAYOUT ── */
.page-header { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.page-title  { font-family: var(--head); font-size: 24px; font-weight: 800; }
.page-title .accent { color: var(--accent); }

/* ── LOADING ── */
.loading-cell { text-align: center; color: var(--muted); padding: 40px !important; }
.spinner { display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page-title { font-size: 20px; }
  .hide-mobile { display: none !important; }
}
