﻿:root {
    --bg-gold-base: #C8A355;
    --bg-gold-light: #DFBF73;
    --btn-green: #0A6B4A;
    --btn-green-hover: #074E36;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --radius-card: 16px;
    --radius-input: 8px;
    --emerald-dark: #0A3728;
    --gold-border: #C8A355; 
    --gold-accent: #8A6D2B;
    --bg-cream: #F8F6F0;
    --bg-sidebar: #0A3728;
    --font-heading: #2C3E35;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #DFBF73 0%, #C8A355 50%, #B28D3F 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: #FFFFFF;
    border-radius: var(--radius-card);
    padding: 36px 32px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 440px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-logo {
    max-width: 110px;
    height: auto;
    margin-bottom: 12px;
    display: block;
}

.login-card h2 {
    font-size: 1.6rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 22px;
}

.input-group {
    width: 100%;
    margin-bottom: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #CBD5E1;
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .form-control:focus {
        border-color: var(--btn-green);
        box-shadow: 0 0 0 3px rgba(10, 107, 74, 0.15);
    }

.btn-submit {
    width: 100%;
    background-color: var(--btn-green);
    color: #FFFFFF;
    border: none;
    padding: 13px;
    border-radius: var(--radius-input);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s;
}

    .btn-submit:hover {
        background-color: var(--btn-green-hover);
    }

.forgot-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        width: 95%;
    }
}

/* Dashboard Layout */
/* Dashboard Wrapper Structure */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: #fff;
    padding: 24px 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Larger & Sharper Logo Header */
.sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(200, 163, 85, 0.3);
    margin-bottom: 20px;
}

.brand-logo-sidebar {
    width: 210px; /* Increased from 140px for prominent visibility */
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Menu items with improved font sizes & left alignment */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .nav-menu li {
        margin-bottom: 8px;
    }

    .nav-menu a {
        color: #E2E8F0;
        text-decoration: none;
        font-size: 16px; /* Increased font size */
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 16px; /* Optimized padding removes excess gap */
        border-radius: var(--radius-input);
        transition: all 0.2s ease;
    }

        .nav-menu a:hover,
        .nav-menu li.active a {
            background-color: #124E3A;
            color: var(--bg-gold-light);
            font-weight: 600;
        }

    .nav-menu li a i {
        font-size: 18px; /* Larger, prominent icons */
        width: 24px;
        text-align: center;
        color: var(--gold-border);
    }

/* Main Content Area */
.main-content {
    flex: 1;
    background-color: var(--bg-cream);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Header */
.top-header {
    background: #E6C200;
    padding: 16px 30px;
    border-bottom: 2px solid var(--emerald-dark);
    text-align: right;
    font-weight: 700;
    color: #0A3728;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.content-body {
    padding: 30px;
    flex: 1;
}

/* Mobile Header Bar (Hidden on Desktop) */
.mobile-navbar {
    display: none;
    background-color: var(--bg-sidebar);
    padding: 12px 20px;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--gold-border);
    font-size: 22px;
    cursor: pointer;
}

.mobile-logo {
    height: 44px;
}

/* Cards & Referral Box */
.card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-card);
    border: 1.5px solid var(--gold-border);
    box-shadow: 0 4px 15px rgba(10, 107, 74, 0.05);
    margin-bottom: 25px;
}

.form-control-inline {
    width: 70%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-card);
    border: 2px solid var(--gold-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(200, 163, 85, 0.2);
    }

    .stat-card.primary,
    .stat-card.success,
    .stat-card.info,
    .stat-card.warning {
        border-left: 6px solid var(--emerald-dark);
    }

    .stat-card h3 {
        font-size: 14px;
        color: var(--text-dark);
        font-weight: 600;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .stat-card .amount,
    .stat-card .count {
        font-size: 26px;
        font-weight: 700;
        color: var(--gold-accent);
        margin: 0 0 5px 0;
    }

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #ffffff;
    border-radius: var(--radius-input);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--gold-border);
}

    .data-table th {
        background-color: var(--emerald-dark);
        color: #ffffff;
        padding: 12px 15px;
        text-align: left;
        font-size: 14px;
    }

    .data-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e2e8f0;
        font-size: 14px;
        color: #334155;
    }

    .data-table tr:nth-child(even) {
        background-color: #FAF6ED;
    }

    .data-table tr:hover {
        background-color: #F3EBD9;
    }

.alert-success {
    display: block;
    background-color: #f0fdf4;
    color: var(--emerald-dark);
    border: 1px solid #bbf7d0;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
}

/* Referral Grid Layout */
.card-title-gold {
    color: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
}

.referral-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .referral-grid {
        grid-template-columns: 1fr;
    }
}

.referral-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.input-copy-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .input-copy-group .form-control-inline {
        flex: 1;
        width: 100%;
        background-color: #FAFAF5;
        border: 1px solid var(--gold-border);
        color: #334155;
        font-size: 13px;
        word-break: break-all;
    }

/* Copy Button Gold */
.btn-copy-gold {
    background-color: var(--bg-sidebar);
    color: var(--gold-border);
    border: 1.5px solid var(--gold-border);
    padding: 8px 14px;
    border-radius: var(--radius-input);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .btn-copy-gold:hover {
        background-color: var(--gold-border);
        color: #0A3728;
    }

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

    .sidebar-overlay.active {
        display: block;
    }

/* ========================================================= */
/* RESPONSIVE DESIGN (MOBILE & TABLET VIEW)                  */
/* ========================================================= */

@media (max-width: 991px) {
    .dashboard-wrapper {
        flex-direction: column;
    }

    .mobile-navbar {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hide sidebar off-screen by default */
        height: 100vh;
        z-index: 1000;
        box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    }

        .sidebar.active {
            left: 0; /* Slide-in menu on mobile button click */
        }

    .content-body {
        padding: 16px;
    }

}

/* Submenu & Dropdown Styles */
.has-submenu {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 14px !important;
    transition: transform 0.3s ease;
}

.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 20px;
    display: none;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-input);
    margin-top: 4px;
    margin-bottom: 4px;
}

.has-submenu.open .submenu {
    display: block;
}

.submenu li a {
    font-size: 14px;
    padding: 8px 12px;
    color: #CBD5E1;
}

    .submenu li a:hover {
        color: var(--bg-gold-light);
        background-color: transparent;
    }

.badge-success {
    background-color: #28a745 !important;
    color: #ffffff !important;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.badge-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

