/* ============================================================
   Sensible Boost SMM Panel - Main Styles (Light Theme)
   ============================================================ */

:root {
    --primary: #6c63ff;
    --primary-dark: #574fd6;
    --primary-light: #8b85ff;
    --secondary: #ff6584;
    --accent: #22c55e;
    --bg: #f8fafc;
    --bg-2: #ffffff;
    --bg-3: #f1f5f9;
    --bg-4: #e8edf5;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow: 0 4px 20px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 40px rgba(108,99,255,0.12);
    --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    --sidebar-w: 240px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Navbar ---- */
#mainNav {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 0.5rem 0;
    z-index: 1050;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.navbar-brand .brand-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-link { color: var(--text-muted) !important; font-weight: 500; transition: var(--transition); border-radius: 8px; padding: 0.45rem 0.8rem !important; }
.nav-link:hover { color: var(--primary) !important; background: rgba(108,99,255,0.07); }
.navbar-toggler { border-color: var(--border); }

/* ---- Cards ---- */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-header { background: #f8fafc; border-bottom: 1px solid var(--border); font-family: 'Syne', sans-serif; font-weight: 600; padding: 1rem 1.25rem; color: var(--text); }
.card-body { padding: 1.25rem; }

/* ---- Forms ---- */
.form-control, .form-select { background: #f8fafc; border: 1.5px solid var(--border); color: var(--text); border-radius: 10px; padding: 0.65rem 0.9rem; font-size: 0.95rem; }
.form-control:focus, .form-select:focus { background: #fff; border-color: var(--primary); color: var(--text); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.form-control::placeholder { color: #b0bec5; }
.form-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text); }
.form-text { font-size: 0.8rem; color: var(--text-muted); }
.input-group-text { background: #f1f5f9; border: 1.5px solid var(--border); color: var(--text-muted); border-radius: 10px; }

/* ---- Buttons ---- */
.btn { border-radius: 10px; font-weight: 600; transition: var(--transition); padding: 0.5rem 1.2rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(108,99,255,0.25); }
.btn-outline-light { border-color: var(--border); color: var(--text-muted); background: #fff; }
.btn-outline-light:hover { background: var(--bg-3); color: var(--text); border-color: var(--border); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ---- Stats Cards ---- */
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: var(--transition); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0 0.2rem; color: var(--text); }
.stat-label { color: var(--text-muted); font-size: 0.8rem; }

/* ---- Tables ---- */
.table { color: var(--text); font-size: 0.9rem; }
.table > :not(caption) > * > * { background: transparent; border-color: var(--border); padding: 0.75rem; color: var(--text); }
.table-hover tbody tr:hover td { background: rgba(108,99,255,0.04); }
.table th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; background: #f8fafc; }

/* ---- SIDEBAR ---- */
.sidebar { background: #fff; border-right: 1px solid var(--border); width: var(--sidebar-w); min-height: calc(100vh - 57px); padding: 1.25rem 0.75rem; position: fixed; top: 57px; left: 0; overflow-y: auto; z-index: 200; transition: transform 0.3s ease; flex-shrink: 0; box-shadow: 2px 0 12px rgba(0,0,0,0.04); }
.sidebar-link { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.9rem; border-radius: 10px; color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: var(--transition); margin-bottom: 2px; white-space: nowrap; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(108,99,255,0.08); color: var(--primary); }
.sidebar-link.active { border-left: 3px solid var(--primary); padding-left: calc(0.9rem - 3px); }
.sidebar-link i { width: 18px; text-align: center; font-size: 0.95rem; }
.sidebar-section { color: var(--text-muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.9rem 0.9rem 0.3rem; font-weight: 600; }
.main-content { margin-left: var(--sidebar-w); padding: 1.5rem; flex: 1; min-width: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 199; }
.sidebar-overlay.show { display: block; }

/* ---- Mobile bottom nav ---- */
.mobile-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); z-index: 300; padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0,0,0,0.08); }
.mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-muted); text-decoration: none; font-size: 0.65rem; font-weight: 500; flex: 1; padding: 0.25rem; }
.mobile-bottom-nav a i { font-size: 1.1rem; }
.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover { color: var(--primary); }

/* ---- Hero ---- */
.hero { padding: 4rem 0 3rem; text-align: center; position: relative; background: linear-gradient(135deg, #f0eeff 0%, #faf8ff 60%, #eef9f2 100%); border-bottom: 1px solid var(--border); }
.hero-title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.6rem, 5vw, 2.8rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: var(--text); letter-spacing: -0.02em; }
.gradient-text { background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 2rem; line-height: 1.7; }

/* ---- Service Cards ---- */
.service-card { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem; transition: var(--transition); cursor: pointer; box-shadow: var(--shadow); }
.service-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(108,99,255,0.12); }
.service-card .service-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 0.6rem; }

/* ---- Dropdown ---- */
.glass-dropdown { background: #fff !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-lg); min-width: 200px; }
.dropdown-item { color: var(--text-muted); padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.9rem; }
.dropdown-item:hover { background: var(--bg-3); color: var(--text); }
.dropdown-divider { border-color: var(--border); }

/* ---- User Avatar ---- */
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: white; flex-shrink: 0; }

/* ---- Order Form ---- */
.order-form-wrapper { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); }
.price-display { background: #f0eeff; border: 1.5px solid rgba(108,99,255,0.2); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.price-amount { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--primary); }

/* ---- Auth Pages ---- */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: linear-gradient(135deg, #f0eeff 0%, #faf8ff 100%); }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem 1.75rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.5rem; margin-bottom: 0.3rem; color: var(--text); }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.divider { position: relative; text-align: center; margin: 1.25rem 0; }
.divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.divider span { background: #fff; padding: 0 0.75rem; position: relative; color: var(--text-muted); font-size: 0.85rem; }

/* ---- Badges ---- */
.badge { border-radius: 6px; font-weight: 500; padding: 0.35em 0.65em; font-size: 0.75rem; }
.badge.bg-success { background: #dcfce7 !important; color: #16a34a !important; }
.badge.bg-warning { background: #fef9c3 !important; color: #a16207 !important; }
.badge.bg-danger  { background: #fee2e2 !important; color: #dc2626 !important; }
.badge.bg-secondary { background: #f1f5f9 !important; color: #64748b !important; }
.badge.bg-primary { background: #ede9fe !important; color: #7c3aed !important; }
.badge.bg-info    { background: #e0f2fe !important; color: #0369a1 !important; }

/* ---- Footer ---- */
.footer { background: #fff; border-top: 1px solid var(--border); padding: 2.5rem 0 1rem; margin-top: auto; }
.footer-heading { font-family: 'Syne', sans-serif; font-weight: 700; margin-bottom: 0.75rem; font-size: 0.9rem; color: var(--text); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: var(--primary); }

/* ---- Admin ---- */
.admin-sidebar { background: #fff; }

/* ---- Alerts ---- */
.alert { border-radius: var(--radius); border: none; font-size: 0.9rem; }
.alert-success { background: #f0fdf4; color: #15803d; border-left: 4px solid var(--success); }
.alert-danger   { background: #fef2f2; color: #dc2626; border-left: 4px solid var(--danger); }
.alert-warning  { background: #fffbeb; color: #b45309; border-left: 4px solid var(--warning); }
.alert-info     { background: #eff6ff; color: #1d4ed8; border-left: 4px solid #3b82f6; }

/* ---- Progress ---- */
.progress { background: var(--bg-4); border-radius: 100px; height: 8px; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 100px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); top: 0; min-height: 100vh; padding-top: 4rem; z-index: 201; }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1rem; padding-bottom: 5rem; }
    .mobile-bottom-nav { display: flex; }
    #sidebarToggle { display: none !important; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.25rem; }
}

@media (max-width: 575px) {
    .auth-card { padding: 1.5rem 1.25rem; }
    .card-body { padding: 1rem; }
    .hero { padding: 2.5rem 0 2rem; }
    .btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
}

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 10px rgba(108,99,255,0.2); } 50% { box-shadow: 0 0 25px rgba(108,99,255,0.4); } }
.pulse-glow { animation: pulse-glow 2s infinite; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- Misc ---- */
hr { border-color: var(--border); }
.text-muted { color: var(--text-muted) !important; }
.bg-dark-3 { background: var(--bg-3); }
.border-glass { border: 1px solid var(--border); }
.rounded-xl { border-radius: var(--radius-lg); }
.payment-logo-row { gap: 1rem; flex-wrap: wrap; }
.payment-logo-row img { max-height: 36px; width: auto; }

/* ---- Dashboard override (inline dark pages get light treatment) ---- */
.dashboard-container { background: var(--bg) !important; min-height: 100vh; }
.dashboard-layout { display: flex; width: 100%; max-width: 1600px; margin: 0 auto; }
.dashboard-main { flex: 1; padding: 24px 28px; margin-left: 280px; width: calc(100% - 280px); }

@media (max-width: 992px) {
    .dashboard-main { margin-left: 0 !important; padding: 16px !important; width: 100% !important; }
    .deposit-grid { grid-template-columns: 1fr !important; }
    .method-grid { grid-template-columns: 1fr !important; }
}

/* Light overrides for deposit/profile inline styles */
.deposit-form-card, .info-card { background: #fff !important; border-color: var(--border) !important; color: var(--text) !important; }
.card-header-custom { background: #f8fafc !important; color: var(--text) !important; border-bottom-color: var(--border) !important; }
.amount-input-wrapper, .phone-input-wrapper { background: #f8fafc !important; border-color: var(--border) !important; }
.amount-input, .phone-input { color: var(--text) !important; background: transparent !important; }
.method-content { background: #f8fafc !important; border-color: var(--border) !important; }
.method-option .method-input:checked + .method-content { background: rgba(108,99,255,0.07) !important; border-color: var(--primary) !important; }
.quick-amount-btn { background: #f8fafc !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
.quick-amount-btn:hover { border-color: var(--primary) !important; color: var(--primary) !important; }
.info-card-header { background: #f8fafc !important; color: var(--text) !important; border-bottom-color: var(--border) !important; }
.history-amount { color: var(--text) !important; }
.history-date { color: var(--text-muted) !important; }
.history-item { border-bottom-color: var(--border) !important; }
.page-title { color: var(--text) !important; }
.page-subtitle { color: var(--text-muted) !important; }
.method-name { color: var(--text) !important; }
.secure-text { color: var(--text-muted) !important; }
.empty-history { color: var(--text-muted) !important; }
.balance-highlight { color: var(--success) !important; }


/* ============================================================
   GLOBAL DASHBOARD LAYOUT FIX
   Sidebar is a flex item taking 260px on desktop.
   Dashboard-main should fill remaining space — NOT have margin-left.
   ============================================================ */
.dashboard-layout {
    display: flex !important;
    width: 100%;
    align-items: stretch;
}
.dashboard-main {
    flex: 1 !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    width: auto !important;
    padding: 24px 28px;
}
@media (max-width: 992px) {
    .dashboard-main {
        padding: 16px !important;
        padding-bottom: 90px !important;
    }
}
@media (max-width: 575px) {
    .dashboard-main {
        padding: 12px !important;
        padding-bottom: 90px !important;
    }
}

/* Ensure no horizontal scroll caused by overflow */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}


/* ==== Admin Layout ==== */
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-layout .main-content { margin-left: 240px; flex: 1; min-width: 0; padding: 24px; }
.admin-layout .sidebar { width: 240px; }

@media (max-width: 991px) {
    .admin-layout { display: block; }
    .admin-layout .main-content { margin-left: 0 !important; padding: 16px !important; padding-bottom: 80px; width: 100%; }
}

/* Modal light theme */
.modal-content { background: #ffffff !important; border: 1px solid #e2e8f0 !important; color: #1e293b !important; }
.modal-header, .modal-footer { border-color: #e2e8f0 !important; }
.modal-title { color: #1e293b; }

/* Pagination */
.pagination .page-link {
    background: #fff !important;
    border-color: #e2e8f0 !important;
    color: #6c63ff !important;
}
.pagination .page-item.active .page-link {
    background: #6c63ff !important;
    border-color: #6c63ff !important;
    color: #fff !important;
}
