/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    line-height: 1.6;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

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

.sidebar-header h2 {
    color: #8B5CF6;
    font-size: 24px;
    font-weight: bold;
}

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

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #9CA3AF;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
    border-right: 3px solid #8B5CF6;
}

.sidebar-menu i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    background: rgba(20, 20, 40, 0.8);
    backdrop-filter: blur(10px);
    min-height: 100vh;
}

/* Header */
.header {
    background: rgba(30, 30, 50, 0.9);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.header-left p {
    color: #9CA3AF;
    font-size: 14px;
}

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

.search-box {
    position: relative;
}

.search-box input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 15px 10px 40px;
    color: #ffffff;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9CA3AF;
}

/* Page Content */
.page-content {
    padding: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card.revenue .stat-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.stat-card.users .stat-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.stat-card.transactions .stat-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.stat-card.support .stat-icon {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

.stat-info h3 {
    font-size: 14px;
    color: #9CA3AF;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
}

.stat-change.positive {
    color: #22C55E;
}

.stat-change.negative {
    color: #EF4444;
}

/* Chart Container */
.chart-container {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #9CA3AF;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #8B5CF6;
    color: #ffffff;
    border-color: #8B5CF6;
}

#performanceChart {
    height: 300px !important;
}

/* Transactions Container */
.transactions-container {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transactions-header {
    margin-bottom: 20px;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transaction-info h4 {
    margin-bottom: 5px;
}

.transaction-info p {
    color: #9CA3AF;
    font-size: 14px;
}

.transaction-amount {
    font-weight: bold;
    font-size: 16px;
}

.transaction-amount.positive {
    color: #22C55E;
}

.transaction-amount.negative {
    color: #EF4444;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: rgba(30, 30, 50, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #8B5CF6;
    font-size: 32px;
    margin-bottom: 10px;
}

.login-header p {
    color: #9CA3AF;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #EF4444;
    color: #EF4444;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #9CA3AF;
    font-size: 14px;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px 12px 45px;
    color: #ffffff;
    font-size: 16px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.login-btn {
    width: 100%;
    background: #8B5CF6;
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: #7C3AED;
    transform: translateY(-2px);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #9CA3AF;
    font-size: 12px;
}

/* Tables */
.users-table,
.transactions-table,
.support-table {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #9CA3AF;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details h4 {
    margin-bottom: 2px;
}

.user-details p {
    color: #9CA3AF;
    font-size: 12px;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.status.completed {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.status.open {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.status.in-progress {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.status.resolved {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.status.closed {
    background: rgba(107, 114, 128, 0.2);
    color: #6B7280;
}

.priority {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.priority.high {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.priority.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.priority.low {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.transaction-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.transaction-type.deposit {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.transaction-type.withdrawal {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.transaction-type.payment {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-action.view {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.btn-action.edit {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.btn-action.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.btn-action:hover {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #8B5CF6;
    color: #ffffff;
}

.btn-primary:hover {
    background: #7C3AED;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Settings */
.settings-container {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.settings-section h3 {
    margin-bottom: 20px;
    color: #ffffff;
}

.settings-form {
    max-width: 500px;
}

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

.settings-form label {
    display: block;
    margin-bottom: 8px;
    color: #9CA3AF;
    font-size: 14px;
}

.settings-form input,
.settings-form textarea,
.settings-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffffff;
    font-size: 14px;
}

.settings-form textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
}

.api-key-group {
    display: flex;
    gap: 10px;
}

.api-key-group input {
    flex: 1;
}

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

.error-container {
    text-align: center;
    padding: 20px;
}

.error-content {
    background: rgba(30, 30, 50, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 60px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.error-icon {
    font-size: 80px;
    color: #F59E0B;
    margin-bottom: 20px;
}

.error-content h1 {
    font-size: 72px;
    color: #8B5CF6;
    margin-bottom: 10px;
}

.error-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.error-content p {
    color: #9CA3AF;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 20px;
    }
}
