@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.05);
    --card-border-hover: rgba(0, 0, 0, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-glow: rgba(39, 174, 96, 0.05);
    --sidebar-bg: rgba(255, 255, 255, 0.9);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(186, 230, 253, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(167, 243, 208, 0.2) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar a {
    color: var(--text-secondary);
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
}

.sidebar a:hover, .sidebar a.active {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.03);
    transform: translateX(4px);
}

.sidebar a.active {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.02));
    border-left: 3px solid #27ae60;
    color: #27ae60;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-btn {
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: #e74c3c !important;
}

.logout-btn:hover {
    background-color: rgba(231, 76, 60, 0.05) !important;
    transform: translateX(4px);
}

/* Main Content area */
.main-wrapper {
    margin-left: 250px;
    padding: 2.5rem;
    min-height: 100vh;
}

/* Glassmorphism Card design */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    pointer-events: none;
}

.glass-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Earnings Gradient Cards */
.earnings-card {
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.earnings-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.earnings-card .card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* Accents per card */
.accent-today { border-left: 4px solid #0284c7; }
.accent-yesterday { border-left: 4px solid #d97706; }
.accent-this-month { border-left: 4px solid #059669; }
.accent-last-month { border-left: 4px solid #db2777; }
.accent-this-year { border-left: 4px solid #7c3aed; }
.accent-all-time { border-left: 4px solid #e11d48; }

/* Filter Bar */
.filter-bar {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    border-radius: 0.75rem !important;
    padding: 0.6rem 1rem !important;
    transition: all 0.3s ease !important;
}

.form-control:focus, .form-select:focus {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1) !important;
    outline: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2) !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3) !important;
}

/* Beautiful custom tables */
.table {
    color: var(--text-primary) !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

.table thead th {
    background-color: rgba(241, 245, 249, 0.8) !important;
    border: none !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem !important;
}

.table tbody tr {
    background-color: rgba(255, 255, 255, 0.4) !important;
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.005);
}

.table td {
    padding: 1rem 1.25rem !important;
    border-top: 1px solid var(--card-border) !important;
    border-bottom: 1px solid var(--card-border) !important;
    vertical-align: middle !important;
}

.table td:first-child {
    border-left: 1px solid var(--card-border) !important;
    border-top-left-radius: 0.75rem !important;
    border-bottom-left-radius: 0.75rem !important;
}

.table td:last-child {
    border-right: 1px solid var(--card-border) !important;
    border-top-right-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.page-link {
    background-color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-secondary) !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
}

.page-link:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
}

/* Login screen specific */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Mobile Navigation & Responsive Enhancements */
.mobile-navbar {
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 99;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        max-width: 280px;
        width: 85vw;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
        padding: 1.25rem 1rem;
    }

    .glass-card {
        padding: 1.15rem;
    }

    .dropdown-menu {
        max-width: 90vw !important;
    }
}

@media (max-width: 575.98px) {
    .main-wrapper {
        padding: 1rem 0.75rem;
    }

    .earnings-card .card-value {
        font-size: 1.4rem;
    }

    .earnings-card .card-title {
        font-size: 0.78rem;
    }

    /* Swipeable Nav Tabs on mobile */
    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .nav-tabs .nav-link {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Preset filter button group horizontal scrolling */
    .btn-group[role="group"] {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .btn-group[role="group"] .btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .table th, .table td {
        font-size: 0.82rem;
        padding: 0.75rem 0.6rem !important;
    }
}

