:root {
    --theme-primary: #6366f1;
}

/* Admin Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 0;
    transition: all 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 10px;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu a svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.sidebar-menu a:hover svg { opacity: 1; }

.sidebar-menu a.active {
    background: color-mix(in srgb, var(--theme-primary) 15%, transparent);
    color: var(--theme-primary);
    font-weight: 600;
}

.sidebar-menu a.active svg {
    opacity: 1;
    color: var(--theme-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 28px;
    min-height: 100vh;
    width: calc(100% - 260px);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    color: #e2e8f0;
    backdrop-filter: blur(20px);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

.sidebar-overlay.active { display: block; }

/* Fix dropdowns */
select.form-input, select {
    color: #e2e8f0 !important;
    background: rgba(255,255,255,0.05) !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 36px !important;
}

select.form-input option, select option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 10px !important;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 10%, transparent);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* Glass Card */
.glass-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 24px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--theme-primary);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px color-mix(in srgb, var(--theme-primary) 40%, transparent);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    color: #e2e8f0;
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: color-mix(in srgb, var(--theme-primary) 15%, transparent);
    color: var(--theme-primary);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; padding: 20px 16px; }
    .mobile-menu-toggle { display: block; }
    .top-bar { padding-left: 50px; flex-direction: column; gap: 10px; }
}

@media (max-width: 640px) {
    .main-content { padding: 16px 12px; }
}