/* SUPER ADMIN PANEL - Professional CSS Styling */

.super-admin-panel {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* Top Control Bar */
.admin-top-bar {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(93, 79, 232, 0.3);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
}

.admin-logo i {
    color: #ffd700;
    font-size: 28px;
}

.admin-stats-bar {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    color: #ffffff;
}

.stat-value.profit {
    color: #4ade80;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.admin-btn.danger {
    background: #ef4444;
    color: white;
}

.admin-btn.danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.admin-btn.primary {
    background: #5d4fe8;
    color: white;
}

.admin-btn.primary:hover {
    background: #4938d4;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(93, 79, 232, 0.3);
}

/* Tab Navigation */
.admin-tabs {
    background: rgba(30, 30, 40, 0.8);
    padding: 0 30px;
    display: flex;
    gap: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    padding: 15px 25px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(93, 79, 232, 0.1);
}

.tab-btn.active {
    color: #5d4fe8;
    background: rgba(93, 79, 232, 0.15);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5d4fe8, #4938d4);
}

/* Tab Content */
.admin-content {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Headers */
.section-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #5d4fe8, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-actions input {
    padding: 10px 15px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    width: 250px;
}

/* User Cards Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.user-card {
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(93, 79, 232, 0.2);
    border-color: rgba(93, 79, 232, 0.3);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #5d4fe8, #4938d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    right: 20px;
}

.user-status.online {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.user-status.offline {
    background: #888;
}

.user-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-info p {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    color: #4ade80;
    margin-bottom: 10px;
}

.user-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
}

.user-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.user-actions button {
    flex: 1;
    padding: 8px;
    background: rgba(93, 79, 232, 0.2);
    border: 1px solid rgba(93, 79, 232, 0.3);
    border-radius: 6px;
    color: #5d4fe8;
    cursor: pointer;
    transition: all 0.3s;
}

.user-actions button:hover {
    background: rgba(93, 79, 232, 0.3);
    transform: scale(1.05);
}

/* User Detail Panel */
.user-detail-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 500px;
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    z-index: 200;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 40, 0.8);
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg);
}

/* Control Sections */
.control-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section h4 {
    margin-bottom: 15px;
    color: #5d4fe8;
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.balance-item {
    background: rgba(40, 40, 50, 0.5);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-item .currency {
    color: #888;
    font-size: 14px;
}

.balance-item .amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: #4ade80;
}

.balance-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
}

.balance-actions select,
.balance-actions input {
    padding: 10px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
}

.balance-actions button {
    padding: 10px 15px;
    background: #5d4fe8;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.balance-actions button:hover {
    background: #4938d4;
    transform: scale(1.05);
}

/* Trading Controls */
.trading-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-item label {
    color: #888;
    font-size: 14px;
}

.control-item input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(40, 40, 50, 0.8);
    border-radius: 3px;
    outline: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: #5d4fe8;
    border-radius: 50%;
    cursor: pointer;
}

/* Force Trade Section */
.force-trade {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.force-trade select,
.force-trade input {
    padding: 10px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
}

.force-trade button {
    grid-column: span 2;
    padding: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.force-trade button:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* Market Controls */
.market-controls {
    display: grid;
    gap: 30px;
}

.price-quick-controls {
    background: rgba(30, 30, 40, 0.5);
    padding: 20px;
    border-radius: 12px;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.quick-buttons button {
    padding: 12px;
    background: rgba(93, 79, 232, 0.2);
    border: 1px solid rgba(93, 79, 232, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-buttons button:hover {
    background: rgba(93, 79, 232, 0.3);
    transform: scale(1.05);
}

/* Crypto Control Items */
.crypto-control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(30, 30, 40, 0.5);
    border-radius: 8px;
    margin-bottom: 10px;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crypto-symbol {
    font-size: 18px;
    font-weight: bold;
}

.crypto-price {
    font-family: 'JetBrains Mono', monospace;
    color: #4ade80;
}

.crypto-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.crypto-actions input {
    width: 120px;
    padding: 8px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
}

.crypto-actions button {
    padding: 8px 12px;
    background: rgba(93, 79, 232, 0.2);
    border: 1px solid rgba(93, 79, 232, 0.3);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.crypto-actions button:hover {
    background: rgba(93, 79, 232, 0.3);
}

/* Analytics Dashboard */
.analytics-dashboard {
    display: grid;
    gap: 30px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.metric-card {
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.metric-card h4 {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 32px;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 15px;
}

.metric-value.loss {
    color: #ef4444;
}

.metric-chart {
    height: 80px;
    background: rgba(40, 40, 50, 0.5);
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-top-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .admin-stats-bar {
        flex-wrap: wrap;
    }
    
    .user-detail-panel {
        width: 100%;
    }
    
    .admin-tabs {
        overflow-x: auto;
    }
}