:root {
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --bg-dark: #020617;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --accent: #22d3ee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #0c4a6e, #020617);
    color: #ffffff;
    min-height: 100vh;
    padding: 2rem;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

table, .table, table td, .table td, table th, .table th, table td strong, .table td strong, table td small, .table td small {
    color: #ffffff !important;
}


/* Force Bootstrap variables */
.table {
    --bs-table-color: #ffffff !important;
    --bs-table-hover-color: #ffffff !important;
}


label, .form-check-label, .form-label {
    color: #ffffff !important;
}

.modal-content, .modal .card {
    color: #ffffff !important;
}



.container {
    max-width: 1400px;
    margin: 0 auto;
}

.view-controls {
    background: var(--glass);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Premium Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 1rem;
    box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    z-index: 1001;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-wrapper {
    width: 60px;
    height: 60px;
    background: white;
    padding: 8px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header-titles h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


.header-titles p {
    margin: 0.25rem 0 0;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
}

.user-status {
    font-size: 0.7rem;
    color: #22c55e;
    font-weight: 600;
}

.logout-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* Premium Navbar Dock */
.premium-nav-container {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1000;
}

.premium-nav-dock {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    display: inline-flex;
    transition: all 0.4s ease;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link-premium {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link-premium i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.nav-link-premium:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link-premium:hover i {
    transform: translateY(-2px) scale(1.1);
}

.nav-link-premium.active {
    color: white;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.admin-link {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #020617 !important;
    border: none !important;
    padding: 0.6rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
    font-weight: 700 !important;
}

.admin-link:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6) !important;
    color: #020617 !important;
}

.admin-link i { color: #020617 !important; }


.menu-toggle-btn {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@media (max-width: 991px) {
    .premium-nav-dock {
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%) translateY(150%);
        width: 90%;
        max-width: 400px;
        opacity: 0;
        visibility: hidden;
    }
    
    .premium-nav-dock.mobile-active {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-item-wrapper {
        width: 100%;
    }
    
    .nav-link-premium {
        justify-content: center;
    }
    
    .menu-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 2rem;
        right: 2rem;
    }

    .main-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
    }
    
    .user-profile {
        border: none;
        padding: 0;
    }
}

.card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.grid-schedule {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.grid-header {
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.time-slot {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    padding-right: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Forms & Inputs */
.input-modern {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-modern:focus {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.input-modern::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #020617;
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #38bdf8, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}

/* Drag and Drop & Deletion */
.schedule-item {
    position: relative;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}
.schedule-item:last-child { margin-bottom: 0; }
.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.schedule-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.dashboard-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.sidebar {
    width: 300px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    flex-shrink: 0;
}

.draggable-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.draggable-item {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.draggable-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

main {
    flex: 1;
    min-width: 0;
}

.materia-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    display: block;
    margin-bottom: 2px;
}

.schedule-item span:not(.materia-name) {
    font-size: 0.75rem;
    opacity: 0.8;
}

.drop-target {
    min-height: 110px !important;
    padding: 10px !important;
    position: relative;
    transition: background 0.3s;
}
.drop-target:hover { background: rgba(255,255,255,0.02); }

.drop-target .content-items:empty::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    font-size: 1.5rem;
    font-weight: 300;
}

.course-header td {
    background: rgba(255,255,255,0.05);
    padding: 12px !important;
    font-weight: 700;
    font-size: 1.1rem;
    color: #38bdf8;
    border-top: 2px solid var(--glass-border);
}

.time-column {
    padding: 15px 10px !important;
    vertical-align: middle !important;
}
.delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    border: none;
    z-index: 10;
}
.schedule-item:hover .delete-btn {
    opacity: 1;
}
.delete-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}
.animate-fade-out {
    animation: fadeOut 0.3s forwards;
}
@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}
.schedule-grid {
    width: 100%;
    border-collapse: collapse !important;
    background: rgba(255, 255, 255, 0.01) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    table-layout: fixed;
}

.schedule-grid th, .schedule-grid td {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px !important;
}

.schedule-grid thead th {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #cbd5e1 !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 15px 10px !important;
    border-bottom: 2px solid rgba(255,255,255,0.2) !important;
}

.time-column {
    background: rgba(0, 0, 0, 0.3) !important;
    text-align: center;
    width: 100px;
    color: #94a3b8;
    font-weight: 600;
}

select option {
    background-color: #0f172a !important;
    color: white !important;
}


.drop-target {
    background: rgba(255,255,255,0.02) !important;
}

/* Suggestion Pills */
.suggestion-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}
.suggestion-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

