/* ============================================
   SMMPRO PANEL — GLOBAL DESIGN SYSTEM
   Dark Theme | Syne + Plus Jakarta Sans
   ============================================ */

:root {
  /* Core Colors */
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #0f0f1a;
  --bg-card:       #13131f;
  --bg-card-hover: #1a1a2e;
  --bg-input:      #1a1a2e;
  --border:        #1e1e35;
  --border-light:  #2a2a45;

  /* Accent */
  --red:           #e63946;
  --red-dark:      #c1121f;
  --red-glow:      rgba(230, 57, 70, 0.25);
  --red-light:     #ff6b6b;

  /* Text */
  --text-primary:  #f0f0f8;
  --text-secondary:#9898b8;
  --text-muted:    #5a5a7a;

  /* Status */
  --green:         #2ecc71;
  --yellow:        #f39c12;
  --blue:          #3498db;
  --purple:        #9b59b6;

  /* Gradients */
  --grad-red:      linear-gradient(135deg, #e63946, #c1121f);
  --grad-dark:     linear-gradient(135deg, #13131f, #1a1a2e);
  --grad-glow:     linear-gradient(135deg, rgba(230,57,70,0.15), rgba(193,18,31,0.05));

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-red: 0 4px 20px rgba(230,57,70,0.3);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---- TYPOGRAPHY ---- */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--grad-red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  box-shadow: var(--shadow-red);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(230,57,70,0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--red);
  color: var(--red-light);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--red-light);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid var(--red);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.btn-outline:hover {
  background: var(--red-glow);
  transform: translateY(-2px);
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 15px 36px; font-size: 1rem; }
.btn-xl { padding: 18px 48px; font-size: 1.1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- FORM ELEMENTS ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); color: var(--text-primary); }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-link { color: var(--red-light); font-size: 0.85rem; transition: var(--transition); }
.form-link:hover { color: var(--red); }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 44px; }
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: var(--transition);
}
.toggle-password:hover { opacity: 1; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

/* ---- BADGES / TAGS ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-success { background: rgba(46,204,113,0.15); color: var(--green); border: 1px solid rgba(46,204,113,0.3); }
.badge-warning { background: rgba(243,156,18,0.15); color: var(--yellow); border: 1px solid rgba(243,156,18,0.3); }
.badge-danger  { background: rgba(230,57,70,0.15);  color: var(--red-light); border: 1px solid rgba(230,57,70,0.3); }
.badge-info    { background: rgba(52,152,219,0.15); color: var(--blue); border: 1px solid rgba(52,152,219,0.3); }
.badge-purple  { background: rgba(155,89,182,0.15); color: var(--purple); border: 1px solid rgba(155,89,182,0.3); }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg-card-hover); }
thead th {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-card-hover); }
tbody td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  vertical-align: middle;
}

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg-input);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { background: var(--red); color: #fff; }
.modal-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.modal-title { font-size: 1.6rem; margin-bottom: 6px; }
.modal-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }
.modal-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-secondary); }
.modal-switch a { color: var(--red-light); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red); color: var(--red-light); }
.toast.info    { border-color: var(--blue); color: var(--blue); }

/* ---- SIDEBAR LAYOUT (for panels) ---- */
.panel-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-nav ul { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.sidebar-nav li a.active {
  background: var(--red-glow);
  color: var(--red-light);
  border-left: 3px solid var(--red);
}
.sidebar-nav .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 14px 6px;
}
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--bg-card-hover); }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-balance { font-size: 0.75rem; color: var(--green); font-weight: 600; }

/* ---- PANEL MAIN CONTENT ---- */
.panel-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.panel-topbar {
  height: 64px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
}
.topbar-btn:hover { border-color: var(--red); background: var(--bg-card-hover); }
.topbar-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}
.panel-content { flex: 1; padding: 28px; }

/* ---- STAT CARDS ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card-icon.red    { background: rgba(230,57,70,0.15); }
.stat-card-icon.green  { background: rgba(46,204,113,0.15); }
.stat-card-icon.blue   { background: rgba(52,152,219,0.15); }
.stat-card-icon.yellow { background: rgba(243,156,18,0.15); }
.stat-card-icon.purple { background: rgba(155,89,182,0.15); }
.stat-card-body { flex: 1; }
.stat-card-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat-card-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.stat-card-change { font-size: 0.75rem; font-weight: 600; margin-top: 4px; }
.stat-card-change.up   { color: var(--green); }
.stat-card-change.down { color: var(--red-light); }

/* ---- PAGE HEADER ---- */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header p { color: var(--text-secondary); font-size: 0.9rem; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- SECTION HEADER (landing) ---- */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--red-glow);
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-light);
  margin-bottom: 16px;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 16px; }
.section-subtitle { color: var(--text-secondary); font-size: 1rem; max-width: 560px; margin: 0 auto; }
.text-accent { color: var(--red-light); }

/* ---- LOGO ---- */
.nav-logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 1.4rem; }
.logo-text { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.logo-accent { color: var(--red-light); }

/* ---- ANIMATIONS ---- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes glow { 0%,100% { box-shadow: 0 0 20px var(--red-glow); } 50% { box-shadow: 0 0 40px rgba(230,57,70,0.5); } }

/* ---- LOADING SPINNER ---- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* ---- PAGINATION ---- */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 24px; }
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover, .page-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .panel-main { margin-left: 0; }
  .panel-topbar { padding: 0 16px; }
  .panel-content { padding: 16px; }
}
@media (max-width: 768px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .modal-box { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 13px 24px; }
}