:root {
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #d946ef;
    --accent: #00f2ff;
    --bg-main: #030305;
    --sidebar-bg: rgba(13, 13, 18, 0.95);
    --card-bg: rgba(22, 22, 28, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --input-bg: #111116;
    --text-white: #f8fafc;
    --text-dim: #cbd5e1;
    --text-muted: #94a3b8;
    --neon-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.text-dim {
    color: var(--text-dim) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

body {
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    color: var(--text-white);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.01em;
    min-height: 100vh;
    overflow-x: hidden;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
}

.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: var(--text-dim);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    padding: 12px 25px;
    margin: 4px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.sidebar .nav-link:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-white);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    box-shadow: inset 5px 0 15px rgba(139, 92, 246, 0.05);
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.1);
}

.text-neon {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(0, 242, 255, 0.4);
    letter-spacing: 1px;
}

label,
.form-label {
    color: var(--text-dim) !important;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
}

h2,
h3,
h4 {
    letter-spacing: -0.02em;
}

.btn {
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    white-space: nowrap !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
    filter: brightness(1.1);
}

.form-control,
.form-select {
    background: var(--input-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px;
    color: var(--text-white) !important;
    padding: 12px 18px;
}

.form-control:focus {
    background: #000 !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15) !important;
}

.table {
    --bs-table-bg: transparent;
    color: var(--text-white);
    margin-bottom: 0;
}

.table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-dim);
    border-bottom: 2px solid var(--card-border);
    white-space: nowrap;
}

.table td {
    padding: 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.stat-card {
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.4;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: rgba(13, 13, 18, 0.8);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-box h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.bg-success {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.modal-content {
    background: #0d0d12 !important;
    background-color: #0d0d12 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8) !important;
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.05) !important;
    background: transparent !important;
}

.modal-title {
    color: var(--accent) !important;
}

.modal-body {
    background: transparent !important;
    color: var(--text-white) !important;
}

.btn-close {
    filter: invert(1) !important;
}

@media (max-width: 768px) {
    .sidebar {
        position: static;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar .nav-link {
        display: inline-flex;
        margin: 0 5px;
        padding: 8px 16px;
    }

    .login-box {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-box h3 {
        font-size: 1.5rem;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .card {
        border-radius: 15px;
    }

    .btn, 
    .btn-primary {
        font-size: 0.9rem;
        padding: 12px 20px;
        white-space: nowrap !important;
    }

    .form-control, 
    .form-select {
        font-size: 16px !important;
    }

    .mb-4.d-flex.justify-content-between.align-items-center,
    .card > .p-4.border-bottom.d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }

    .mb-4.d-flex.justify-content-between.align-items-center > div {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .mb-4.d-flex.justify-content-between.align-items-center > div > .btn {
        width: 100%;
        margin: 0 !important;
    }

    form.d-flex.gap-2 {
        flex-wrap: wrap;
        width: 100%;
    }

    form.d-flex.gap-2 > select,
    form.d-flex.gap-2 > input:not([type="hidden"]) {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 5px);
    }

    form.d-flex.gap-2 > button {
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 5px;
    }

    form.d-flex.gap-2 > .w-auto {
        width: 100% !important;
    }
}