/* 3. CORE COMPONENTS & UI */
.glass-panel {
    background: var(--bg-glass); backdrop-filter: blur(20px);
    border: var(--border-subtle); border-radius: 16px; padding: 24px;
}

/* Buttons */
.btn-main-action {
    background: var(--text-primary); color: black; border: none;
    font-weight: 800; padding: 12px 24px; border-radius: 6px;
    letter-spacing: 0.05em; cursor: pointer; transition: 0.2s;
}
.btn-main-action:hover { background: var(--neon-cyan); box-shadow: 0 0 20px var(--neon-cyan); }

.btn-danger { background: transparent; border: 1px solid var(--neon-pink); color: var(--neon-pink); }
.btn-danger:hover { background: var(--neon-pink); color: white; box-shadow: 0 0 20px var(--neon-pink); }

.btn-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    cursor: pointer;
}
.btn-icon:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }

/* Inputs */
input, select {
    width: 100%; background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1); color: white;
    padding: 12px; border-radius: 6px; margin-bottom: 15px;
}
input:focus, select:focus { outline: none; border-color: var(--neon-cyan); }

/* Shared glass dropdown */
.neon-select {
    position: relative;
    width: 100%;
    min-width: 0;
    margin-bottom: 15px;
}

.neon-select-form-value {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.neon-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid rgba(0, 243, 255, 0.22);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.38);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.neon-select-trigger:hover {
    border-color: rgba(0, 243, 255, 0.48);
    background: rgba(0, 243, 255, 0.05);
}

.neon-select-trigger:focus-visible,
.neon-select.is-open .neon-select-trigger {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.1), 0 0 16px rgba(0, 243, 255, 0.14);
}

.neon-select.is-invalid .neon-select-trigger {
    border-color: #ff5d78;
    box-shadow: 0 0 0 2px rgba(255, 93, 120, 0.1);
}

.neon-select-value {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.neon-select-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.neon-select-copy strong,
.neon-select-copy small,
.neon-select-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neon-select-copy strong {
    color: var(--text-primary);
    font-size: 0.82rem;
}

.neon-select-copy small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
}

.neon-select-placeholder {
    color: #718096;
}

.neon-select-chevron {
    flex: 0 0 auto;
    color: var(--neon-cyan);
    font-size: 0.76rem;
    transition: transform 180ms ease;
}

.neon-select.is-open .neon-select-chevron {
    transform: rotate(180deg);
}

.neon-select-menu {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 3600;
    max-height: 280px;
    padding: 5px;
    overflow-y: auto;
    border: 1px solid rgba(0, 243, 255, 0.24);
    border-radius: 8px;
    background: rgba(12, 16, 27, 0.98);
    backdrop-filter: blur(24px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 243, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-5px) scaleY(0.96);
    transform-origin: top;
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.neon-select.is-open .neon-select-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scaleY(1);
}

.neon-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.neon-select-option:hover,
.neon-select-option.is-active {
    background: rgba(0, 243, 255, 0.09);
    color: var(--text-primary);
}

.neon-select-option.is-selected {
    background: rgba(0, 243, 255, 0.14);
    color: var(--neon-cyan);
}

.neon-select-option:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.neon-select-check {
    flex: 0 0 auto;
    color: var(--neon-green);
    font-size: 1rem;
}

.neon-select.is-disabled {
    opacity: 0.55;
}

.neon-select.is-disabled .neon-select-trigger {
    cursor: not-allowed;
}

.neon-select.compact {
    margin-bottom: 0;
}

.neon-select.compact .neon-select-trigger {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Badges */
.dept-badge {
    display: inline-block; padding: 4px 10px; border-radius: 4px;
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
    background: rgba(255,255,255,0.1); color: white; letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.badge-CYBER { background: rgba(0, 243, 255, 0.15); color: var(--neon-cyan); border: 1px solid rgba(0, 243, 255, 0.2); }
.badge-VIDEO { background: rgba(255, 0, 85, 0.15); color: var(--neon-pink); border: 1px solid rgba(255, 0, 85, 0.2); }
.badge-GLOBAL { background: rgba(0, 255, 157, 0.15); color: var(--neon-green); border: 1px solid rgba(0, 255, 157, 0.2); }
.badge-PUBLIC { background: rgba(255, 153, 0, 0.15); color: var(--neon-orange); border: 1px solid rgba(255, 153, 0, 0.2); }
.status-badge { text-transform: uppercase; font-size: 0.7rem; font-weight: bold; color: var(--text-secondary); }
.status-posted { color: var(--neon-green); }

/* Modals */
.modal-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; padding: 16px; overflow-y: auto;
}
.modal-box {
    width: min(600px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
    box-sizing: border-box; background: #0f1115; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 40px; box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease-out;
}
@media (max-width: 640px) {
    .modal-box { padding: 24px; }

    .btn-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .neon-select-trigger,
    .neon-select.compact .neon-select-trigger {
        min-height: 48px;
    }

    .neon-select-option {
        min-height: 44px;
    }
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Notifications */
.neon-notification-region {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 5000;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 36px));
    pointer-events: none;
}

.neon-notification {
    --notification-accent: var(--neon-cyan);
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    gap: 12px;
    align-items: start;
    min-height: 78px;
    padding: 16px 14px 17px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 3px solid var(--notification-accent);
    border-radius: 8px;
    background: rgba(8, 11, 18, 0.97);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.48), 0 0 24px color-mix(in srgb, var(--notification-accent) 15%, transparent);
    color: var(--text-primary);
    pointer-events: auto;
    animation: notificationIn 180ms ease-out;
}

.neon-notification.success { --notification-accent: var(--neon-green); }
.neon-notification.error { --notification-accent: #ff5d78; }
.neon-notification.warning { --notification-accent: #fbbf24; }

.neon-notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in srgb, var(--notification-accent) 42%, transparent);
    border-radius: 50%;
    color: var(--notification-accent);
    background: color-mix(in srgb, var(--notification-accent) 10%, transparent);
    font-size: 1rem;
}

.neon-notification-copy {
    min-width: 0;
}

.neon-notification-copy strong {
    display: block;
    margin: 1px 0 5px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
}

.neon-notification-copy p {
    margin: 0;
    color: #aab8c8;
    font-size: 0.78rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.neon-notification-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #7f8fa3;
    background: transparent;
    cursor: pointer;
}

.neon-notification-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.neon-notification-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--notification-accent);
    transform-origin: left;
    animation: notificationProgress var(--notification-duration) linear forwards;
}

@keyframes notificationIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes notificationProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 640px) {
    .neon-notification-region {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .neon-notification,
    .neon-notification-progress {
        animation: none;
    }
}

/* Login */
.login-screen {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #0f1525 0%, #030507 100%);
}
.login-box { width: 400px; border: 1px solid var(--neon-blue); box-shadow: 0 0 100px rgba(0, 102, 255, 0.2); }
