:root {
  /* SMMGen-inspired functional color palette */
  --bg-main: #f5f6fa;
  --bg-sidebar: #1e1e2d;
  --bg-card: #ffffff;
  --text-main: #3f4254;
  --text-muted: #b5b5c3;
  --border-color: #ebedf3;
  
  --primary: #6610f2; /* Indigo/Purple */
  --primary-hover: #520dc2;
  --secondary: #e4e6ef;
  --secondary-text: #3f4254;
  
  --success: #1bc5bd;
  --info: #8950fc;
  --warning: #ffa800;
  --danger: #f64e60;
  
  --sidebar-text: #a2a3b7;
  --sidebar-active-bg: #1b1b28;
  --sidebar-active-text: #ffffff;
  
  --radius: 0.42rem;
  --shadow: 0px 0px 20px 0px rgba(76, 87, 125, 0.02);
  --shadow-hover: 0px 0px 30px 0px rgba(82, 63, 105, 0.05);
  
  --font-family: 'Inter', sans-serif;
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --bg-main: #151521;
  --bg-sidebar: #1e1e2d;
  --bg-card: #1e1e2d;
  --text-main: #ffffff;
  --text-muted: #a2a3b7;
  --border-color: #2b2b40;
  
  --secondary: #2b2b40;
  --secondary-text: #ffffff;
  
  --shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0px 0px 30px 0px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--primary); }
button, input, select, textarea { font-family: inherit; }

/* ─── Layout ─── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  width: 265px;
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 100;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.sidebar-header {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  background-color: rgba(0,0,0,0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
}
.logo-icon { color: var(--primary); font-size: 1.5rem; }
.mobile-sidebar-close { display: none; background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }

.user-profile-badge {
  padding: 20px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.avatar-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.user-details { display: flex; flex-direction: column; }
.username { color: #fff; font-weight: 600; font-size: 1rem; }
.user-role-badge { 
  background: rgba(255,255,255,0.1); color: #fff; 
  font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; display: inline-block; margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 15px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 15px;
  padding: 10px 25px;
  color: var(--sidebar-text);
  font-weight: 500;
  transition: var(--transition);
}
.nav-item:hover {
  background-color: var(--sidebar-active-bg);
  color: var(--primary);
}
.nav-item.active {
  background-color: var(--sidebar-active-bg);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}
.nav-item i { width: 20px; text-align: center; font-size: 1.1rem; }

.nav-divider {
  padding: 15px 25px 5px;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
  color: #565674; font-weight: 600;
}

.sidebar-footer {
  padding: 15px 25px;
  background-color: rgba(0,0,0,0.1);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-legal-link {
  font-size: 0.85rem; padding: 8px 12px; border-radius: var(--radius);
  color: var(--sidebar-text); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-legal-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.logout-btn {
  flex: 1; background: rgba(246,78,96,0.1); color: var(--danger);
  border: none; padding: 10px; border-radius: var(--radius);
  cursor: pointer; font-weight: 500; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.logout-btn:hover { background: var(--danger); color: #fff; }

/* ─── Main Content ─── */
.main-layout-container {
  flex: 1;
  margin-left: 265px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

.top-header {
  height: 65px;
  background-color: var(--bg-card);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 25px;
  box-shadow: var(--shadow);
  z-index: 90;
}
.mobile-nav-toggle {
  display: none; background: none; border: none; font-size: 1.2rem;
  color: var(--text-main); cursor: pointer;
}
.right-action { display: flex; align-items: center; gap: 20px; }
.theme-toggle-btn {
  background: var(--secondary); border: none; width: 35px; height: 35px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--secondary-text); cursor: pointer; transition: var(--transition);
}
.theme-toggle-btn:hover { background: var(--primary); color: #fff; }
.top-username { font-weight: 600; color: var(--text-main); }

.currency-switcher {
  background: var(--secondary); color: var(--secondary-text);
  border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 7px 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.currency-switcher:focus { outline: none; border-color: var(--primary); }

/* ─── Top Stats Bar (SMMGen Style) ─── */
.top-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 25px;
  background: var(--bg-main);
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
}
.bg-blue { background: #3699ff; }
.bg-green { background: #1bc5bd; }
.bg-purple { background: #8950fc; }
.bg-teal { background: #0bb783; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text-main); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.app-content-wrapper {
  padding: 0 25px 25px;
  flex: 1;
}

/* ─── Card Design ─── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}
.card-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
}
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--text-main); }
.card-body { padding: 25px; }

/* ─── Platform Filters (SMMGen Style) ─── */
.platform-filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.platform-btn {
  background: var(--secondary); color: var(--secondary-text);
  border: none; padding: 8px 15px; border-radius: var(--radius);
  font-weight: 500; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.platform-btn:hover { background: rgba(102,16,242,0.1); color: var(--primary); }
.platform-btn.active { background: var(--primary); color: #fff; }

/* ─── Forms ─── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-main); font-size: 0.95rem;
}
.form-control {
  width: 100%; padding: 12px 15px; border-radius: var(--radius);
  border: 1px solid var(--border-color); background: var(--bg-main);
  color: var(--text-main); font-size: 1rem; transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(102,16,242,0.1);
}
.btn {
  display: inline-block; padding: 10px 20px; font-weight: 500; text-align: center;
  border-radius: var(--radius); border: none; cursor: pointer; transition: var(--transition);
  font-size: 1rem;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-secondary { background: var(--secondary); color: var(--secondary-text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }

/* ─── Payment Gateways (Add Funds) ─── */
.gateway-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-bottom: 25px;
}
.gateway-card {
  border: 2px solid var(--border-color); border-radius: var(--radius); padding: 15px;
  text-align: center; cursor: pointer; transition: var(--transition); background: var(--bg-main);
}
.gateway-card:hover { border-color: var(--primary); }
.gateway-card.active { border-color: var(--primary); background: rgba(102,16,242,0.05); }
.gateway-icon { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }
.gateway-name { font-weight: 600; font-size: 0.9rem; }

.qr-code-box {
  background: var(--bg-card); color: var(--text-main);
  padding: 20px; border-radius: var(--radius); display: inline-block;
  border: 1px solid var(--border-color); margin-bottom: 15px;
}
.qr-code-box img { max-width: 250px; height: auto; }

/* ─── Static-QR deposit (PhonePe / UPI) ─── */
.qr-pay-box {
  text-align: center; margin-bottom: 20px; padding: 20px;
  background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius);
}
.qr-pay-img {
  max-width: 240px; width: 100%; height: auto; border-radius: 8px;
  background: #fff; padding: 10px;
}
.upi-id-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin-top: 14px;
}
.upi-id-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.upi-id-row code {
  background: var(--secondary); color: var(--text-main);
  padding: 6px 10px; border-radius: var(--radius); font-size: 0.9rem; word-break: break-all;
}

/* ─── Deposit fee/total breakdown ─── */
.dep-breakdown {
  border-top: 1px solid var(--border-color); margin: 8px 0 18px; padding-top: 12px;
}
.dep-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; color: var(--text-secondary); font-size: 0.9rem;
}
.dep-row.dep-total { font-size: 1.05rem; color: var(--text-main); font-weight: 700; }
.qr-placeholder {
  width: 200px; height: 200px; background: var(--secondary);
  border: 2px dashed var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); text-align: center; padding: 20px;
}

.ticket-closed-notice {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--secondary); color: var(--text-muted);
  border: 1px solid var(--border-color); text-align: center;
}

/* ─── Tables ─── */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color);
}
.table th { font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.8rem; }
.table tbody tr:hover { background: rgba(127,127,127,0.08); }

.category-header {
  background: var(--primary) !important; color: #fff !important;
  text-align: center !important; font-weight: 600; padding: 10px !important;
}

/* ─── Status Tabs ─── */
.status-tabs {
  display: flex; gap: 5px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px;
  overflow-x: auto; padding-bottom: 1px;
}
.status-tab {
  padding: 10px 20px; cursor: pointer; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; transition: var(--transition); white-space: nowrap;
}
.status-tab:hover { color: var(--primary); }
.status-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Admin Panel ─── */
.admin-top-nav {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0; padding-bottom: 0;
  overflow-x: auto;
}
.admin-top-tab {
  padding: 10px 14px; font-weight: 500; font-size: 0.9rem;
  color: var(--text-muted); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: var(--transition);
}
.admin-top-tab:hover { color: var(--primary); }
.admin-top-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-reports-nav {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px; padding: 8px 0 0;
  overflow-x: auto;
}
.admin-reports-tab {
  padding: 8px 12px; font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.admin-reports-tab:hover { color: var(--primary); }
.admin-reports-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 16px; padding: 12px 0;
}
.admin-filter-select { width: auto; min-width: 140px; }
.admin-filter-search { flex: 1; min-width: 160px; max-width: 280px; }

.admin-page-body { margin-top: 0; }
.admin-report-table th { cursor: default; }

.change-up { color: var(--success); font-weight: 600; font-size: 0.85rem; }
.change-down { color: var(--danger); font-weight: 600; font-size: 0.85rem; }
.change-na { color: var(--text-muted); font-size: 0.8rem; }
.svc-count {
  display: inline-block; margin: 0 2px; padding: 2px 6px;
  background: var(--secondary); border-radius: 4px; font-size: 0.75rem;
  color: var(--primary); text-decoration: none;
}
.svc-count:hover { background: rgba(137,80,252,0.15); }

.admin-user-actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.admin-user-actions .btn-sm { min-width: 32px; padding: 4px 10px; }

.admin-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.admin-modal {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.admin-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-color);
}
.admin-modal-title { margin: 0; font-size: 1.05rem; }
.admin-modal-close {
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  color: var(--text-muted); cursor: pointer; padding: 0 4px;
}
.admin-modal-close:hover { color: var(--text-main); }
.admin-modal-body { padding: 20px; }
.admin-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--border-color);
}

.ticket-thread {
  max-height: 420px; overflow-y: auto; padding-right: 8px;
}
.ticket-msg {
  margin-bottom: 14px; padding: 14px; border-radius: var(--radius);
}
.ticket-msg-user { background: var(--secondary); }
.ticket-msg-admin {
  background: rgba(102, 16, 242, 0.08);
  border-left: 3px solid var(--primary);
}
.ticket-msg-meta {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px;
}
.ticket-msg-body { white-space: pre-wrap; line-height: 1.5; }

/* ─── Badges ─── */
.badge {
  padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; display: inline-block;
}
.badge-pending { background: rgba(255,168,0,0.1); color: var(--warning); }
.badge-processing, .badge-in-progress { background: rgba(137,80,252,0.1); color: var(--info); }
.badge-completed { background: rgba(27,197,189,0.1); color: var(--success); }
.badge-partial, .badge-canceled, .badge-refunded { background: rgba(246,78,96,0.1); color: var(--danger); }
.badge-open { background: rgba(255,168,0,0.1); color: var(--warning); }
.badge-replied { background: rgba(27,197,189,0.1); color: var(--success); }
.badge-closed { background: var(--secondary); color: var(--secondary-text); }

/* ─── Pagination ─── */
.pagination {
  display: flex; justify-content: flex-end; gap: 5px; margin-top: 20px;
}
.page-btn {
  width: 35px; height: 35px; border-radius: var(--radius); border: 1px solid var(--border-color);
  background: var(--bg-card); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-main);
}
.page-btn:hover { background: var(--secondary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Guest Views (Login/Register) ─── */
/* ─── Premium Auth Layout ─── */
@keyframes meshGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.guest-view-container {
  display: flex; justify-content: center; align-items: center; min-height: 100vh;
  width: 100%; padding: 20px;
  background: linear-gradient(-45deg, #0f172a, #312e81, #4c1d95, #1e1b4b);
  background-size: 400% 400%;
  animation: meshGradient 15s ease infinite;
  position: relative;
  overflow: hidden;
}

/* Background floating decorative elements */
.guest-view-container::before, .guest-view-container::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px); z-index: 0;
}
.guest-view-container::before {
  width: 400px; height: 400px; background: rgba(99, 102, 241, 0.4);
  top: -100px; left: -100px; animation: float 6s ease-in-out infinite;
}
.guest-view-container::after {
  width: 300px; height: 300px; background: rgba(236, 72, 153, 0.3);
  bottom: -50px; right: -50px; animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(30px) scale(1.05); }
  100% { transform: translateY(0px) scale(1); }
}

.auth-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 100%; max-width: 420px; padding: 50px 40px; text-align: center;
  position: relative; z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

.auth-card .logo { 
  display: flex; justify-content: center; align-items: center; 
  color: #fff; margin-bottom: 25px; font-size: 2rem; font-weight: 700; letter-spacing: 1px;
}
.auth-card .logo i {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-title { font-size: 1.6rem; font-weight: 600; margin-bottom: 30px; color: #f8fafc; }

.legal-checkbox {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; cursor: pointer;
}
.legal-checkbox input { margin-top: 3px; flex-shrink: 0; }
.legal-checkbox a { color: var(--primary); }

/* ─── Legal pages (Terms, etc.) ─── */
.legal-page {
  max-width: 860px; margin: 0 auto; padding: 20px 0 40px;
}
.legal-card { margin-bottom: 24px; }
.legal-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.legal-title {
  margin: 0; font-size: 1.5rem; font-weight: 700;
}
.legal-body {
  line-height: 1.7; color: var(--text-main);
}
.legal-intro {
  font-size: 1rem; color: var(--text-muted); margin-top: 0;
  padding-bottom: 16px; border-bottom: 1px solid var(--border-color);
}
.legal-section { margin-top: 28px; }
.legal-section h2 {
  font-size: 1.15rem; font-weight: 700; margin: 0 0 12px;
  color: var(--text-main);
}
.legal-section h3 {
  font-size: 1rem; font-weight: 600; margin: 16px 0 8px;
  color: var(--text-main);
}
.legal-section p { margin: 0 0 12px; }
.legal-section ul {
  margin: 0 0 12px; padding-left: 1.4rem;
}
.legal-section li { margin-bottom: 8px; }
.legal-footer-note {
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border-color);
  font-size: 0.85rem; color: var(--text-muted);
}

.auth-card .form-control {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  transition: all 0.3s ease;
}
.auth-card .form-control:focus {
  background: rgba(15, 23, 42, 0.9);
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.auth-card .btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 10px;
  transition: all 0.3s ease;
}
.auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(168, 85, 247, 0.6);
}

.auth-card p { margin-top: 25px; color: #94a3b8; font-size: 0.95rem; }
.auth-card p a { color: #c084fc; font-weight: 600; text-decoration: none; transition: color 0.2s; }
.auth-card p a:hover { color: #e879f9; text-decoration: underline; }

/* ─── Landing / Login (SMMGen-style) ─── */
/* Guest (logged-out) views are full-bleed: no sidebar gutter, no content padding. */
.guest-mode .main-layout-container { margin-left: 0; }
.guest-mode .app-content-wrapper { padding: 0; }

.landing {
  min-height: 100vh; width: 100%;
  background: linear-gradient(160deg, #f4effe 0%, #efe7fd 45%, #e9ddfb 100%);
  color: #1e1b2e;
  display: flex; flex-direction: column;
}
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6vw; max-width: 1400px; width: 100%; margin: 0 auto;
}
.landing-brand { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; color: #2a1b4e; }
.landing-brand i { color: var(--primary); }
.landing-nav-links { display: flex; align-items: center; gap: 22px; }
.landing-nav-links a { color: #4b4063; font-weight: 600; font-size: 0.95rem; }
.landing-nav-links a.active, .landing-nav-links a:hover { color: var(--primary); }

.landing-hero {
  flex: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  max-width: 1400px; width: 100%; margin: 0 auto; padding: 8px 6vw 24px;
}
.landing-title { font-size: 2.4rem; line-height: 1.12; font-weight: 800; color: #1e1b2e; margin-bottom: 12px; }
.landing-title .accent { color: var(--primary); }
.landing-sub { font-size: 1rem; color: #5b5470; max-width: 520px; margin-bottom: 20px; }

.landing-form {
  background: #fff; border-radius: 18px; padding: 22px 24px;
  box-shadow: 0 20px 50px -20px rgba(102, 16, 242, 0.35); max-width: 440px;
  border: 1px solid #ece5fb;
}
.landing-form .form-group { margin-bottom: 14px; }
.landing-form-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; color: #2a1b4e; }
.landing-form .form-label { color: #4b4063; }
.landing-form .form-control {
  background: #faf8ff; border: 1px solid #e4daf8; color: #1e1b2e; border-radius: 12px;
}
.landing-form .form-control:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(102,16,242,0.12); }
.landing-form .btn-primary {
  background: linear-gradient(135deg, #6d28f6, #a855f7); border: none; border-radius: 12px;
  padding: 13px; font-size: 1.05rem; font-weight: 700; margin-top: 6px;
}
.landing-form .btn-primary:hover { filter: brightness(1.06); }
.landing-form-foot { margin-top: 16px; font-size: 0.9rem; color: #5b5470; text-align: center; }
.landing-form-foot a { color: var(--primary); font-weight: 700; }

/* Hero illustration card */
.landing-right { display: flex; justify-content: center; align-items: center; position: relative; }
.landing-right::before {
  content: ''; position: absolute; width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(168,85,247,0.35), transparent 70%);
  filter: blur(60px); z-index: 0;
}
.hero-card {
  background: #fff; border-radius: 22px; padding: 26px; width: 100%; max-width: 420px;
  box-shadow: 0 30px 70px -25px rgba(102, 16, 242, 0.45);
  position: relative; z-index: 1;
}
.hero-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.hero-card-title { font-weight: 700; font-size: 1.1rem; color: #1e1b2e; }
.hero-card-sub { color: #8a82a0; font-size: 0.85rem; margin-top: 2px; }
.hero-card-head i { color: var(--success); font-size: 1.4rem; }
.hero-chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding: 0 4px; }
.hero-chart span {
  flex: 1; background: linear-gradient(180deg, #a855f7, #6d28f6); border-radius: 6px 6px 0 0;
  min-height: 8px;
}
.hero-pill {
  margin-top: 22px; display: flex; align-items: center; gap: 10px;
  background: #f5f0ff; border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 0.9rem; color: #2a1b4e;
}
.hero-pill i { color: #E1306C; font-size: 1.2rem; }
.hero-progress { flex: 1; height: 6px; background: #e4daf8; border-radius: 99px; overflow: hidden; position: relative; }
.hero-progress::after { content: ''; position: absolute; inset: 0; width: 68%; background: linear-gradient(90deg, #6d28f6, #a855f7); border-radius: 99px; }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; gap: 30px; padding-top: 10px; }
  .landing-right { display: none; }
  .landing-title { font-size: 2.1rem; }
  .landing-nav-links a:not(.active) { display: none; }
}

/* ─── Toasts ─── */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--bg-card); border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-hover); padding: 15px 20px; border-radius: 4px;
  color: var(--text-main); min-width: 250px; transform: translateX(120%);
  transition: transform 0.3s ease; display: flex; justify-content: space-between; align-items: center;
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* ─── Loaders ─── */
.loader-container {
  display: flex; justify-content: center; align-items: center; min-height: 300px;
}
.spinner-ring {
  width: 40px; height: 40px; border: 3px solid var(--secondary);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─── */
.sidebar-overlay { display: none; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-layout-container { margin-left: 0; }
  .mobile-nav-toggle { display: block; }
  .mobile-sidebar-close { display: block; }

  /* Dim + block the content behind the open sidebar (sits below the sidebar's z-index). */
  .sidebar.open ~ .sidebar-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5); z-index: 99;
  }
}

/* Small phones: tighten spacing so cards and tables use the full width. */
@media (max-width: 575px) {
  body { font-size: 13px; }
  .app-content-wrapper { padding: 0 12px 16px; }
  .top-stats-bar { padding: 14px 12px; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .stat-value { font-size: 1.05rem; }
  .card-header { padding: 16px; flex-wrap: wrap; gap: 10px; }
  .card-body { padding: 16px; }
  .top-header { padding: 0 14px; }
  .auth-card { padding: 34px 22px; }
  .table th, .table td { padding: 10px 10px; }
  .admin-filters { gap: 8px; }
  .admin-filter-search { max-width: none; }
}

.hidden { display: none !important; }
