/* 🧪 Logic Labs - Cyberpunk Glassmorphism Theme (Enhanced) */

/* --- 1. CORE VARIABLES --- */
:root {
    --bg-dark: #09090b;
    --glass-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    --text-main: #e4e4e7;
    --muted: #a1a1aa;

    --accent: #22c55e;
    /* Student Green */
    --accent-glow: rgba(34, 197, 94, 0.4);

    --accent-admin: #f59e0b;
    /* Admin Amber */
    --danger: #ef4444;

    --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --radius: 16px;
}

/* --- 2. GLOBAL RESET & ANIMATION --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font);
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;

    /* Breathing Gradient Background */
    background: radial-gradient(circle at 50% 50%, #1a2e1f 0%, #09090b 70%);
    background-size: 200% 200%;
    animation: breathe 15s ease infinite;
}

@keyframes breathe {
    0% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 50% 40%;
    }

    100% {
        background-position: 50% 50%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

a {
    color: var(--muted);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: #fff;
}

a.link-accent {
    color: var(--accent);
    font-weight: 600;
}

/* --- 3. LAYOUT & CONTAINERS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.center-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Glass Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

/* --- 4. HEADER & BRANDING --- */
/* (Handled by partials/nav.php CSS mostly, but defaults here) */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--accent);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* --- 5. FORMS & INPUTS --- */
form {
    margin-top: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.input,
input,
select,
textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.2s;
}

.input:focus,
input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 14px;
    color: var(--muted);
    pointer-events: none;
}

.input-with-icon {
    padding-left: 50px !important;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 14px;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.toggle-password:hover {
    color: var(--accent);
}

/* --- 6. BUTTONS --- */
button,
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    width: 100%;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--muted);
}

.btn-ghost:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-amber {
    background: var(--accent-admin);
    color: #000;
}

.btn-amber:hover {
    filter: brightness(1.1);
}

/* --- 7. UTILITIES --- */
.text-center {
    text-align: center;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.message.warn,
.error-box {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message.ok,
.success-box {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* --- 8. TABLES & BADGES --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

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

th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.status-inactive {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.status-banned {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* --- 9. MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-active {
    display: flex;
}

.modal-window {
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    background: #09090b;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 700;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
}

.modal-body {
    flex: 1;
    background: #000;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- 10. RESPONSIVE --- */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .header,
    .dashboard-split {
        flex-direction: column;
        gap: 20px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}