/* ====== ADMIN PANEL STYLES ====== */

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark) 0%, #1a0a2e 50%, var(--dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-box {
    background: rgba(10, 14, 39, 0.95);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 0 30px var(--secondary),
        0 0 60px rgba(255, 0, 255, 0.3),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h1 {
    color: var(--secondary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: var(--glow-pink);
}

.login-box h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: var(--glow-green);
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-box input {
    padding: 0.8rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: rgba(0, 255, 255, 0.1);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s;
}

.login-box input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px var(--secondary);
}

.login-box .btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.login-box .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--secondary);
}

.error {
    color: #ff4444;
    font-weight: bold;
    text-shadow: 0 0 10px #ff4444;
    margin-top: 0.5rem;
}

/* ====== ADMIN PANEL ====== */

.admin-panel {
    min-height: 100vh;
    background: var(--dark);
}

.admin-navbar {
    background: linear-gradient(90deg, var(--dark), #0f0520, var(--dark));
    border-bottom: 3px solid var(--primary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
}

.admin-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: var(--glow-green);
}

.btn-logout {
    background: linear-gradient(90deg, var(--secondary), #ff0066);
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-logout:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--secondary);
}

.admin-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ====== TABS ====== */

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent);
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary);
    text-shadow: var(--glow-green);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-shadow: var(--glow-green);
}

.badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 50%;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    font-weight: bold;
}

/* ====== TAB CONTENT ====== */

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-content h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-green);
    font-size: 2rem;
}

/* ====== CONTROLS ====== */

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.controls input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: rgba(0, 255, 255, 0.1);
    color: var(--text);
    font-size: 1rem;
}

.controls input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px var(--secondary);
}

.btn-small {
    background: linear-gradient(90deg, var(--secondary), #ff0066);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--secondary);
}

.btn-delete {
    background: linear-gradient(90deg, #ff4444, #ff0066);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-delete:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px #ff4444;
}

/* ====== TABLE ====== */

.table-container {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text);
}

.admin-table thead {
    background: rgba(0, 255, 65, 0.1);
    border-bottom: 2px solid var(--primary);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    color: var(--primary);
    font-weight: bold;
    text-shadow: var(--glow-green);
}

.admin-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.admin-table tbody tr:hover {
    background: rgba(0, 255, 65, 0.05);
}

.admin-table code {
    background: rgba(255, 0, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    color: var(--secondary);
}

.admin-table a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-table a:hover {
    color: var(--secondary);
    text-shadow: var(--glow-pink);
}

.empty-message {
    text-align: center;
    color: var(--accent);
    padding: 2rem;
    display: none;
}

/* ====== STATS ====== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(255, 0, 255, 0.1));
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
    border-color: var(--secondary);
}

.stat-title {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-shadow: var(--glow-cyan);
}

.stat-value {
    color: var(--primary);
    font-size: 3rem;
    font-weight: bold;
    text-shadow: var(--glow-green);
}

.chart-container {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.chart-container h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-green);
}

#activityChart {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

/* ====== RESPONSIVE ====== */

@media (max-width: 768px) {
    .admin-navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        padding: 0.8rem 1rem;
    }

    .controls {
        flex-direction: column;
    }

    .controls input,
    .btn-small {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        margin: 2rem;
        padding: 2rem 1.5rem;
    }
}
