/* Dashboard Styles - Dark Theme */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1a2e;
    --sidebar-active: linear-gradient(135deg, #FD79A8, #E84393);
    --card-bg: #16213e;
    --card-hover: #1e2a4a;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --border-color: #2a2a3e;
}

body {
    background: #0f0f1e;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid var(--border-color);
}

.sidebar-brand {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-brand .brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
}

.sidebar-brand .brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0.25rem 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-link.active {
    background: var(--sidebar-active);
    color: white;
    font-weight: 600;
}

.sidebar-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-nav-link .dropdown-icon {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.sidebar-nav-link[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-submenu.show {
    max-height: 500px;
}

.sidebar-submenu-item {
    margin: 0;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 3.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sidebar-submenu-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 4rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 80px;
    }
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.summary-card:hover {
    background: var(--card-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.summary-card.large {
    grid-column: span 1;
}

.summary-card.account-balance {
    background: linear-gradient(135deg, #6C5CE7, #FD79A8);
    border: none;
}

.summary-card.account-balance::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.summary-card.account-balance::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.summary-card.blue {
    background: linear-gradient(135deg, #0984E3, #74B9FF);
    border: none;
}

.summary-card.green {
    background: linear-gradient(135deg, #00B894, #55EFC4);
    border: none;
}

.summary-card.red {
    background: linear-gradient(135deg, #D63031, #E17055);
    border: none;
}

.summary-card.orange {
    background: linear-gradient(135deg, #FDCB6E, #E17055);
    border: none;
}

.card-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    display: flex;
    align-items: center;
}

.card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    opacity: 0.3;
}

/* Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}


@media (max-width: 576px) {
    .main-content {
        padding: 0.75rem;
        padding-top: 70px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .summary-card {
        padding: 1rem;
        min-height: 110px;
    }
    
    .card-label {
        font-size: 0.75rem;
    }
    
    .card-value {
        font-size: 1.35rem;
    }
    
    .card-icon {
        font-size: 1.75rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .status-cards {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .status-card {
        padding: 1rem;
        min-height: 100px;
    }
    
    .status-label {
        font-size: 0.75rem;
    }
    
    .status-value {
        font-size: 1.15rem;
    }
    
    .status-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}

.status-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    color: #FFFFFF !important;
}

.status-card:hover {
    background: var(--card-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.status-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.status-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.status-icon.orange {
    background: linear-gradient(135deg, #FDCB6E, #E17055);
}

.status-icon.blue {
    background: linear-gradient(135deg, #74B9FF, #0984E3);
}

.status-icon.green {
    background: linear-gradient(135deg, #00B894, #55EFC4);
}

.status-arrow {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.status-card:hover .status-arrow {
    color: var(--text-primary);
    transform: translate(3px, -3px);
}

.status-label {
    font-size: 0.85rem;
    color: #B8B8B8 !important;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.status-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF !important;
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Referral Section */
.referral-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.referral-link-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.referral-link-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.referral-link-input:focus {
    outline: none;
    border-color: #6C5CE7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.btn-copy {
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    border: none;
    border-radius: 10px;
    padding: 0.875rem 2rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* Content Cards */
.content-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    color: #FFFFFF !important;
}

.content-card .form-select,
.content-card .form-control {
    background: rgba(22, 33, 62, 0.8) !important;
    border: 1px solid var(--border-color) !important;
    color: #FFFFFF !important;
}

.content-card .form-select option,
.content-card .form-control option {
    background: var(--card-bg) !important;
    color: #FFFFFF !important;
}

.content-card label {
    color: #FFFFFF !important;
}

.content-card .text-center {
    color: #FFFFFF !important;
}

.content-card .text-muted {
    color: #B8B8B8 !important;
}

/* Tables */
.table-dark-custom {
    background: var(--card-bg);
    color: #FFFFFF;
    border-collapse: separate;
    border-spacing: 0;
}

.table-dark-custom thead {
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--border-color);
}

.table-dark-custom thead th {
    border: none;
    color: #FFFFFF !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 1rem;
    background: rgba(22, 33, 62, 0.95) !important;
}

.table-dark-custom tbody td {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    color: #FFFFFF !important;
    background: rgba(22, 33, 62, 0.6) !important;
}

.table-dark-custom tbody tr {
    background: rgba(22, 33, 62, 0.6) !important;
}

.table-dark-custom tbody tr:hover {
    background: rgba(22, 33, 62, 0.9) !important;
}

.table-dark-custom tbody tr:hover td {
    color: #FFFFFF !important;
    background: rgba(22, 33, 62, 0.9) !important;
}

.table-dark-custom .text-center {
    color: #FFFFFF !important;
}

.table-dark-custom .text-muted {
    color: #B8B8B8 !important;
}

.table-dark-custom .text-danger {
    color: #FF6B6B !important;
}

.table-dark-custom .badge {
    color: #FFFFFF !important;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .summary-card.account-balance {
        grid-column: span 2;
    }
    
    .status-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .summary-cards {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .summary-card.account-balance {
        grid-column: span 1 !important;
    }
    
    .status-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 80px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .summary-card.account-balance {
        grid-column: span 1 !important;
    }
    
    .summary-card {
        padding: 1.25rem;
        min-height: 120px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .card-label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .card-value {
        font-size: 1.5rem;
        word-break: break-word;
    }
    
    .card-icon {
        font-size: 2rem;
        top: 1rem;
        right: 1rem;
    }
    
    .status-cards {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .status-card {
        padding: 1.25rem;
        min-height: 110px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .status-label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .status-value {
        font-size: 1.25rem;
        word-break: break-word;
    }
    
    .status-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .referral-link-group {
        flex-direction: column;
    }
    
    .page-header {
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}
