/* MLM Networkers Club — Premium Dark Navy & Gold Dashboard Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    /* === Core Backgrounds === */
    --bg-primary:   #04060a;
    --bg-secondary: #080b12;
    --bg-sidebar:   #06080e;
    --bg-card:      rgba(12, 15, 22, 0.90);

    /* === Gold Brand Palette === */
    --gold-primary:   #dfba6b;
    --gold-secondary: #c9a054;
    --gold-dark:      #91753c;
    --gold-light:     #f8e5c2;

    /* === Blue Accent (Card Glow Wave) === */
    --blue-glow:      rgba(0, 82, 212, 0.55);
    --blue-soft:      rgba(67, 99, 247, 0.25);

    /* === Borders === */
    --border-color: rgba(223, 186, 107, 0.15);
    --border-hover: rgba(223, 186, 107, 0.40);

    /* === Status Colors === */
    --accent-emerald: #10b981;
    --accent-rose:    #ef4444;
    --accent-amber:   #f59e0b;

    /* === Text === */
    --text-primary:   #f8f9fa;
    --text-muted:     #8b95a8;
    --text-highlight: #f8e5c2;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════
   CARD HEIGHT ALIGNMENT UTILITY
   ═══════════════════════════════════════════════ */
.row {
    display: flex;
    flex-wrap: wrap;
}
.row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}
.card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card-body {
    flex: 1 1 auto;
}

/* ═══════════════════════════════════════════════
   GLOBAL BODY & RESET
   ═══════════════════════════════════════════════ */
body {
    font-family: 'Inter', sans-serif !important;
    background: radial-gradient(circle at 60% 20%, #070d1a 0%, #04060a 100%) !important;
    color: var(--text-primary) !important;
    overflow-x: hidden;
}

.wrapper, .main {
    background: transparent !important;
}

/* ═══════════════════════════════════════════════
   CUSTOM SCROLLBAR
   ═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar, .sidebar-content {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color) !important;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.6) !important;
}

.sidebar-user {
    border-bottom: 1px solid var(--border-color) !important;
    background: rgba(6, 8, 14, 0.7) !important;
    padding: 1.5rem !important;
    text-align: center;
}

.sidebar-user img {
    max-height: 52px !important;
    width: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 0 10px rgba(223, 186, 107, 0.4)) !important;
    transition: var(--transition);
}

.sidebar-user img:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 16px rgba(223, 186, 107, 0.7)) !important;
}

.sidebar-header {
    background: transparent !important;
    color: var(--gold-primary) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    padding: 1.5rem 1.5rem 0.5rem !important;
    font-weight: 700 !important;
    opacity: 0.85;
}

/* Sidebar Links */
.sidebar-link, a.sidebar-link {
    background: transparent !important;
    color: var(--text-muted) !important;
    transition: var(--transition) !important;
    border-left: 3px solid transparent !important;
    font-weight: 500 !important;
    padding: 0.75rem 1.5rem !important;
}

.sidebar-link i, a.sidebar-link i {
    color: var(--gold-dark) !important;
    opacity: 0.8;
    transition: var(--transition) !important;
}

/* Hover State */
.sidebar-link:hover, .sidebar-item:hover > .sidebar-link {
    color: var(--gold-light) !important;
    background: rgba(223, 186, 107, 0.06) !important;
    border-left: 3px solid rgba(223, 186, 107, 0.4) !important;
}

.sidebar-link:hover i, .sidebar-item:hover > .sidebar-link i {
    color: var(--gold-primary) !important;
    opacity: 1;
    transform: scale(1.1) translateX(2px) !important;
}

/* Active State */
.sidebar-item.active { border-left: 0 !important; }

.sidebar-item.active > .sidebar-link,
.sidebar-item.active > a.sidebar-link {
    color: var(--gold-light) !important;
    background: rgba(223, 186, 107, 0.10) !important;
    border-left: 3px solid var(--gold-primary) !important;
    font-weight: 600 !important;
    box-shadow: inset 4px 0 12px rgba(223, 186, 107, 0.06) !important;
}

.sidebar-item.active > .sidebar-link i,
.sidebar-item.active > a.sidebar-link i {
    color: var(--gold-primary) !important;
    opacity: 1;
}

/* Dropdown Submenu */
.sidebar-dropdown .sidebar-link {
    padding-left: 3.5rem !important;
    border-left: none !important;
}
.sidebar-dropdown .sidebar-item.active .sidebar-link {
    border-left: none !important;
    background: transparent !important;
    color: var(--gold-light) !important;
}

/* ═══════════════════════════════════════════════
   TOP NAVBAR
   ═══════════════════════════════════════════════ */
.navbar-theme, .navbar {
    background: rgba(4, 6, 10, 0.90) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.navbar-theme .hamburger, .navbar .hamburger,
.navbar-theme .hamburger:before, .navbar-theme .hamburger:after,
.navbar .hamburger:before, .navbar .hamburger:after {
    background: var(--text-primary) !important;
}

.navbar-theme .nav-link i, .navbar .nav-link i {
    color: var(--text-muted) !important;
    transition: var(--transition);
}

.navbar-theme .nav-link i:hover, .navbar .nav-link i:hover {
    color: var(--gold-primary) !important;
}

.navbar-theme .dropdown-menu, .navbar .dropdown-menu {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    border-radius: 8px !important;
}

.navbar-theme .dropdown-item, .navbar .dropdown-item {
    color: var(--text-muted) !important;
    padding: 0.6rem 1.2rem !important;
    transition: var(--transition);
}

.navbar-theme .dropdown-item:hover, .navbar .dropdown-item:hover {
    background-color: rgba(223, 186, 107, 0.08) !important;
    color: var(--gold-light) !important;
}

/* ═══════════════════════════════════════════════
   CARD SYSTEM — SCREENSHOT BLUE-GOLD WAVE
   ═══════════════════════════════════════════════ */
.card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

/* Blue-gold wave glow in top-right corner — matches reference screenshot */
.card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--blue-glow) 0%, rgba(223, 186, 107, 0.6) 55%, rgba(0,0,0,0) 100%);
    filter: blur(12px);
    z-index: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    opacity: 0.85;
}

/* Mini logo watermark in top right */
.card::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    background-image: url('/logo/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.10;
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover) !important;
    box-shadow: 0 14px 40px rgba(0, 82, 212, 0.25) !important;
}

.card:hover::before {
    transform: scale(1.15);
    filter: blur(8px);
}

.card:hover::after {
    opacity: 0.20;
}

.card-title, .card .card-header, .card-header {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem !important;
    position: relative;
    z-index: 2;
}

.card-body {
    color: var(--text-muted) !important;
    padding: 1.5rem !important;
    position: relative;
    z-index: 2;
}

/* Dashboard Stat Value Number */
.card-body h1.display-6,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
}

/* ═══════════════════════════════════════════════
   CARD FOOTER OVERRIDE (Replaces old purple)
   ═══════════════════════════════════════════════ */
.card-footer,
.card-footer[style*="background-color:#731aa5"],
.card-footer[style*="background-color: #731aa5"],
div[style*="background-color:#731aa5"],
div[style*="background-color: #731aa5"] {
    background: linear-gradient(135deg, rgba(0, 52, 130, 0.5) 0%, rgba(223, 186, 107, 0.15) 100%) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 0 14px 14px !important;
    color: var(--text-muted) !important;
    position: relative;
    z-index: 2;
}

.card-footer a,
.card-footer[style*="background-color:#731aa5"] a,
div[style*="background-color:#731aa5"] a {
    color: var(--gold-primary) !important;
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════
   PAGE HEADERS & TITLES
   ═══════════════════════════════════════════════ */
.header-title, .page-title,
h1:not(.logo-text),
h2:not(.logo-text) {
    color: var(--text-primary) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
    border-radius: 8px !important;
    transition: var(--transition) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

.btn-primary, .btn-info {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%) !important;
    border: none !important;
    color: #04060a !important;
    box-shadow: 0 4px 14px rgba(223, 186, 107, 0.30) !important;
}
.btn-primary:hover, .btn-info:hover {
    background: linear-gradient(135deg, var(--gold-secondary) 0%, var(--gold-dark) 100%) !important;
    box-shadow: 0 6px 20px rgba(223, 186, 107, 0.50) !important;
    transform: translateY(-2px) !important;
    color: #04060a !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-emerald) 0%, #047857 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #065f46 100%) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
    transform: translateY(-2px) !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-rose) 0%, #be123c 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25) !important;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #9f1239 100%) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45) !important;
    transform: translateY(-2px) !important;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-amber) 0%, #b45309 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #78350f 100%) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
    transform: translateY(-2px) !important;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}
.btn-secondary:hover {
    background-color: rgba(223, 186, 107, 0.10) !important;
    border-color: var(--border-hover) !important;
    transform: translateY(-1px) !important;
}

/* ═══════════════════════════════════════════════
   TABLE DESIGN
   ═══════════════════════════════════════════════ */
.table {
    color: var(--text-primary) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}
.table thead th {
    background-color: rgba(4, 6, 10, 0.85) !important;
    color: var(--gold-primary) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--border-color) !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase;
    padding: 1rem 1.25rem !important;
}
.table td {
    border-bottom: 1px solid rgba(223, 186, 107, 0.06) !important;
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
    background-color: transparent !important;
    color: var(--text-muted) !important;
}

/* Alternate row styling (removing bright white backgrounds) */
.table-striped tbody tr:nth-of-type(odd) > *,
.table-striped tbody tr:nth-of-type(odd),
table.dataTable tbody tr.odd > *,
table.dataTable tbody tr.odd {
    background-color: rgba(255, 255, 255, 0.01) !important;
    color: var(--text-muted) !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-bg: transparent !important;
}

.table-striped tbody tr:nth-of-type(even) > *,
.table-striped tbody tr:nth-of-type(even),
table.dataTable tbody tr.even > *,
table.dataTable tbody tr.even {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-muted) !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-bg: transparent !important;
}

/* Hover effects */
.table-hover tbody tr:hover td,
table.dataTable tbody tr:hover > * {
    background-color: rgba(223, 186, 107, 0.06) !important;
    color: var(--text-primary) !important;
}

/* Selected rows styling */
table.dataTable tbody tr.selected > *,
table.dataTable tbody tr.selected {
    background-color: rgba(223, 186, 107, 0.15) !important;
    color: var(--text-primary) !important;
}

/* ═══════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════ */
.form-control, .form-select {
    background-color: rgba(6, 8, 14, 0.90) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(223, 186, 107, 0.20) !important;
    background-color: rgba(10, 12, 20, 0.95) !important;
}
.form-control::placeholder {
    color: #4b5563 !important;
}

/* ═══════════════════════════════════════════════
   BADGES & STATUS COLORS
   ═══════════════════════════════════════════════ */
.badge {
    padding: 0.5em 0.85em !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
}
.bg-success, .badge-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid var(--accent-emerald) !important;
    color: var(--accent-emerald) !important;
}
.bg-danger, .badge-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid var(--accent-rose) !important;
    color: var(--accent-rose) !important;
}
.bg-warning, .badge-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid var(--accent-amber) !important;
    color: var(--accent-amber) !important;
}
.bg-primary, .badge-primary {
    background-color: rgba(223, 186, 107, 0.15) !important;
    border: 1px solid var(--gold-primary) !important;
    color: var(--gold-light) !important;
}
.text-primary {
    color: var(--gold-primary) !important;
}
.text-muted, .text-black {
    color: var(--text-muted) !important;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
    background: var(--bg-sidebar) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1.5rem 0 !important;
}
.footer a {
    color: var(--text-muted) !important;
    text-decoration: none;
    transition: var(--transition);
}
.footer a:hover {
    color: var(--gold-primary) !important;
}

/* ═══════════════════════════════════════════════
   AUTH BUTTONS
   ═══════════════════════════════════════════════ */
.auth-color {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%) !important;
    color: #04060a !important;
    border: none !important;
    font-weight: 700 !important;
}
.auth-color:hover {
    background: linear-gradient(135deg, var(--gold-secondary) 0%, var(--gold-dark) 100%) !important;
    box-shadow: 0 6px 20px rgba(223, 186, 107, 0.45) !important;
}

/* ═══════════════════════════════════════════════
   WEB3 / CONNECT WALLET BUTTONS
   ═══════════════════════════════════════════════ */
#web3LoginBtn, #connectWalletRegister {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%) !important;
    color: #04060a !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(223, 186, 107, 0.30) !important;
    transition: var(--transition) !important;
}
#web3LoginBtn:hover, #connectWalletRegister:hover {
    background: linear-gradient(135deg, var(--gold-secondary) 0%, var(--gold-dark) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(223, 186, 107, 0.50) !important;
}

/* ═══════════════════════════════════════════════
   GOLD TEXT OVERRIDES (stat values)
   ═══════════════════════════════════════════════ */
span[style*="color:#dfba6b"], span[style*="color: #dfba6b"],
span[style*="color:#bfa15f"], span[style*="color: #bfa15f"] {
    color: var(--gold-primary) !important;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ═══════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════ */
.b1rem {
    border-radius: 12px !important;
}

.bg-white.border.rounded.px-2.py-1 {
    background-color: rgba(6, 8, 14, 0.70) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ═══════════════════════════════════════════════
   CARD TEXT ALIGNMENT
   ═══════════════════════════════════════════════ */
.card.text-center .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════
   PROFILE CARD SYSTEM
   ═══════════════════════════════════════════════ */
.profile-info-list {
    width: 100%;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px dashed rgba(223, 186, 107, 0.12);
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-info-label i {
    color: var(--gold-primary);
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}

.profile-info-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-header-card {
    background: rgba(12, 15, 22, 0.90) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE BORDERS
   ═══════════════════════════════════════════════ */
@media (min-width: 992px) {
    .border-lg-end {
        border-right: 1px solid var(--border-color) !important;
    }
    .border-lg-start {
        border-left: 1px solid var(--border-color) !important;
    }
}

.avatar-sm {
    transition: var(--transition);
}
.avatar-sm:hover {
    transform: scale(1.08);
}

/* ═══════════════════════════════════════════════
   GLOBAL BOOTSTRAP MODAL BACKDROP GLITCH FIXED
   ═══════════════════════════════════════════════ */
.modal-backdrop {
    display: none !important;
}
.modal.show {
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
}
