:root {
    --bg-dark: #080808;
    --sidebar-bg: #0f0f0f;
    --card-bg: #151515;
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --accent-soft: rgba(168, 85, 247, 0.15);
    --text-main: #ffffff;
    --text-dim: #9ca3af;
    --border: rgba(255, 255, 255, 0.05);
    --sidebar-width: 260px;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', -apple-system, sans-serif;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    padding: 25px 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.sidebar-logo {
    padding: 0 30px;
    margin-bottom: 40px;
    font-size: 1.5rem;
    font-weight: 800;
}

.sidebar-category {
    padding: 0 25px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin: 20px 0 10px 0;
    opacity: 0.6;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 25px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    background: var(--accent-soft);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 15px var(--accent);
}

/* Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
}

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

.header-section h1 { font-size: 2.2rem; font-weight: 800; }
.header-section p { color: var(--text-dim); margin-top: 5px; }

/* Cards & Tables */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

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

th {
    text-align: left;
    padding: 20px;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.02);
}

td {
    padding: 20px;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.btn-primary { background: var(--accent); color: white; border: none; }
.btn-primary:hover { background: #9333ea; transform: translateY(-2px); box-shadow: 0 8px 15px var(--accent-glow); }

.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: #ef4444; color: white; }

/* Control Support */
:focus {
    outline: none;
    border: 2px solid var(--accent) !important;
    box-shadow: 0 0 15px var(--accent-glow) !important;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 500px;
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
}

.access-input {
    background: #050505 !important;
    border: 1px solid #222 !important;
    color: #a855f7 !important;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem !important;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.access-input:focus, .access-input:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px var(--accent-soft) !important;
    background: #080808 !important;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
