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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 20px;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #ddd;
    text-decoration: none;
    transition: 0.3s;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 25px;
}

.sidebar-menu li a i {
    margin-right: 10px;
    width: 20px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    background: #f5f5f5;
}

.topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
}

.balance-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.profile-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.profile-btn:hover {
    background: #555;
    transform: scale(1.1);
}

.dropdown-header {
    padding: 8px 16px;
    font-weight: normal;
    white-space: normal;
}

.dropdown-item.text-danger {
    color: #dc3545 !important;
}

.dropdown-item.text-danger:hover {
    background: #dc3545;
    color: #fff !important;
}

.content-area {
    padding: 30px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input, .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
}

.form-group input:focus, .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    pointer-events: none;
    padding-left: 40px;
}

.btn-primary.loading::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 15px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.text-center {
    text-align: center;
    margin-top: 20px;
}

.text-center a {
    color: #667eea;
    text-decoration: none;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card i {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 18px;
    margin: 0;
}

.table-responsive {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-overlay.active {
    display: flex;
}

.loader-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    font-weight: 500;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 10px 15px;
    }
    
    .topbar-right {
        gap: 10px;
    }
    
    .balance-box {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .profile-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .service-card i {
        font-size: 36px;
    }
    
    .service-card h3 {
        font-size: 16px;
    }
    
    .table-responsive {
        padding: 15px;
    }
    
    .table th, .table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .login-box {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .form-group input, .form-control {
        padding: 10px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 10px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
}

.btn-info {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
    font-size: 14px;
}

.btn-info:hover {
    background: #218838;
    color: #fff;
}
