:root {
    --primary: #8B0000;
    --primary-light: #B22222;
    --secondary: #2E8B57;
    --accent: #FF8C00;
    --success: #228B22;
    --warning: #FFD700;
    --danger: #DC143C;
    --dark: #2F4F4F;
    --light: #F8F9FA;
    --gray: #708090;
    --lunch-bg: #FFFACD;
    --campus-blue: #003366;
    --campus-gold: #FFD700;
    --border-radius: 12px;
    --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    zoom: 0.9999999999999995;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #F5F7FA 0%, #E6E9F0 100%);
    min-height: 100vh;
    padding: 15px;
    color: var(--dark);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23003366' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    border: 2px solid var(--campus-blue);
}

.export-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.export-content {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--box-shadow);
    border: 3px solid var(--campus-blue);
    position: relative;
}

.close-export {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-header {
    text-align: center;
    margin-bottom: 30px;
}

.export-header h3 {
    font-family: 'Exo 2', sans-serif;
    color: var(--campus-blue);
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.export-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .export-grid {
        grid-template-columns: 1fr;
    }
}

.export-option {
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.export-option:hover {
    transform: translateY(-5px);
    border-color: var(--campus-blue);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.15);
}

.export-option i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--campus-blue);
}

.export-option.pdf i { color: #DC143C; }
.export-option.img i { color: #228B22; }
.export-option.json i { color: #FF8C00; }
.export-option.csv i { color: #003366; }

.export-option h4 {
    font-family: 'Exo 2', sans-serif;
    margin-bottom: 10px;
    color: var(--dark);
}

.export-option p {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.4;
}

.export-footer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #F0F7FF, #E6F0FF);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--campus-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-family: 'Exo 2', sans-serif;
    color: var(--campus-blue);
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.university-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, var(--campus-blue), #001F3F);
    border-radius: var(--border-radius);
    color: white;
    position: relative;
    overflow: hidden;
}

.university-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--campus-gold) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
}

.university-logo {
    flex-shrink: 0;
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--campus-gold), #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border: 3px solid white;
}

.university-info {
    flex: 1;
}

.university-name {
    font-family: 'Exo 2', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.university-tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 8px;
}

.academic-year {
    display: inline-block;
    padding: 5px 15px;
    background: var(--campus-gold);
    color: var(--campus-blue);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.setup-section {
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--campus-blue);
    position: relative;
}

.setup-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--campus-blue), var(--campus-gold), var(--campus-blue));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .setup-grid {
        grid-template-columns: 1fr;
    }
}

.setup-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #E9ECEF;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.setup-card:hover {
    transform: translateY(-5px);
    border-color: var(--campus-blue);
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.15);
}

.setup-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--campus-blue), var(--campus-gold));
}

.setup-card h3 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.3rem;
    color: var(--campus-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #E9ECEF;
}

.setup-card h3 i {
    color: var(--campus-blue);
    font-size: 1.4rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #DEE2E6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: white;
}

.input-group input:focus, 
.input-group select:focus {
    outline: none;
    border-color: var(--campus-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.color-selection {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #DEE2E6;
}

.color-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.color-header h4 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.1rem;
    color: var(--campus-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.generate-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--campus-blue), var(--primary));
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    background: #F8F9FA;
    border-radius: 8px;
}

.color-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.color-item:hover {
    transform: translateY(-3px);
    border-color: var(--campus-blue);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.color-item.selected {
    border-color: var(--campus-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);
    transform: scale(1.05);
}

.color-preview {
    width: 100%;
    height: 45px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 2px solid rgba(0,0,0,0.1);
}

.color-info {
    text-align: center;
}

.color-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-code {
    font-family: 'Monaco', monospace;
    font-size: 0.75rem;
    color: var(--gray);
}

.selected-color-info {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #F0F7FF, #E6F0FF);
    border-radius: 8px;
    text-align: center;
    border: 2px dashed var(--campus-blue);
}

.selected-color-info span {
    font-weight: 700;
    color: var(--campus-blue);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Exo 2', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--campus-blue), var(--primary));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    border: 2px solid var(--campus-blue);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #32CD32);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
    border: 2px solid #32CD32;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #FFA500);
    color: var(--dark);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    border: 2px solid #FFA500;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #FF4500);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
    border: 2px solid #FF4500;
}

.btn:hover {
    transform: translateY(-3px);
}

.legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--campus-blue);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 5px solid;
    transition: transform 0.3s;
}

.legend-item:hover {
    transform: translateX(10px);
}

.legend-red { border-left-color: var(--danger); }
.legend-yellow { border-left-color: var(--warning); }
.legend-green { border-left-color: var(--success); }

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-red .legend-color { background-color: var(--danger); }
.legend-yellow .legend-color { background-color: var(--warning); }
.legend-green .legend-color { background-color: var(--success); }

.legend-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.legend-text p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.4;
}

.timetable-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    border: 3px solid var(--campus-blue);
    position: relative;
}

.timetable-header {
    background: linear-gradient(135deg, var(--campus-blue), #001F3F);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--campus-gold);
}

.timetable-header h2 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.timetable-status {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 18px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timetable-grid {
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.9rem;
}

th, td {
    padding: 10px 6px;
    text-align: center;
    border: 1px solid #DEE2E6;
    height: 70px;
    vertical-align: middle;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

th {
    background: linear-gradient(135deg, var(--campus-blue), #002244);
    color: white;
    font-weight: 700;
    font-family: 'Exo 2', sans-serif;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--campus-gold);
}

.time-column {
    background: linear-gradient(135deg, #001F3F, #002244);
    font-weight: 700;
    width: 90px;
}

.day-header {
    background: linear-gradient(135deg, #001A33, #002244);
    width: 70px;
    border-right: 2px solid var(--campus-gold);
}

.lunch-column {
    background: linear-gradient(135deg, var(--lunch-bg), #FFE4B5);
    color: #B8860B;
    font-weight: 700;
    border-left: 3px double #DAA520;
    border-right: 3px double #DAA520;
    width: 80px;
    font-size: 1rem;
}

.course-slot {
    padding: 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    min-height: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
}

.course-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.course-slot .course-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 3px;
    color: var(--dark);
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-slot .course-code {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 2px;
    opacity: 0.8;
}

.course-faculty {
    font-size: 0.75rem;
    color: var(--dark);
    opacity: 0.9;
    font-style: italic;
    margin-bottom: 3px;
}

.course-venue {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    margin-top: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}

.cell-selected {
    position: relative;
    animation: pulse 2s infinite;
    border-color: var(--campus-blue) !important;
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.3) !important;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 51, 102, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 51, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 51, 102, 0); }
}

.cell-selected::after {
    content: '✓';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background: var(--campus-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 5;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.transition-marker {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.transition-red { background-color: var(--danger); border-color: var(--danger); }
.transition-yellow { background-color: var(--warning); border-color: var(--warning); }
.transition-green { background-color: var(--success); border-color: var(--success); }

.empty-slot {
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-style: italic;
    background: repeating-linear-gradient(45deg, #F8F9FA, #F8F9FA 8px, #E9ECEF 8px, #E9ECEF 16px);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px dashed #CED4DA;
    font-size: 0.85rem;
}

.empty-slot:hover {
    background: repeating-linear-gradient(45deg, #E9ECEF, #E9ECEF 8px, #DEE2E6 8px, #DEE2E6 16px);
    color: var(--campus-blue);
    border-color: var(--campus-blue);
    transform: scale(1.02);
}

.selected-slots {
    background: linear-gradient(135deg, #F0F7FF, #E6F0FF);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 25px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: none;
    border: 2px solid var(--campus-blue);
}

.selected-slots h3 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.3rem;
    color: var(--campus-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 50px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px dashed var(--campus-blue);
    margin-bottom: 15px;
}

.slot-tag {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--campus-blue);
}

/* Courses Table Styles */
.courses-table-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.courses-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
}

.courses-table thead {
    background: linear-gradient(135deg, var(--campus-blue), #001F3F);
    color: white;
}

.courses-table thead th {
    padding: 14px 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 2px solid var(--campus-gold);
    font-family: 'Exo 2', sans-serif;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Column width adjustments */
.courses-table thead th:nth-child(1) { width: 50px; } /* # */
.courses-table thead th:nth-child(2) { width: 25%; } /* Course Name */
.courses-table thead th:nth-child(3) { width: 12%; } /* Code */
.courses-table thead th:nth-child(4) { width: 15%; } /* Faculty */
.courses-table thead th:nth-child(5) { width: 10%; } /* Location */
.courses-table thead th:nth-child(6) { width: 18%; } /* Time Slots */
.courses-table thead th:nth-child(7) { width: 15%; } /* Actions */

.courses-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.courses-table tbody tr:hover {
    background: #f8f9fa;
}

.courses-table td {
    padding: 12px 8px;
    vertical-align: middle;
    text-align: center;
    font-size: 0.9rem;
    height: 60px;
}

/* Center align all cells */
.courses-table td {
    text-align: center;
}

/* Course Name column - left aligned with centered start */
.courses-table td:nth-child(2) {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

/* Code and Faculty columns - centered */
.courses-table td:nth-child(3),
.courses-table td:nth-child(4) {
    text-align: center;
}

/* Location column - centered */
.courses-table td:nth-child(5) {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Time Slots column - centered badges */
.courses-table td:nth-child(6) {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

/* Actions column - centered buttons */
.courses-table td:nth-child(7) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.course-color-indicator {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.slot-badge {
    display: inline-block;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin: 2px;
    border-left: 3px solid;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-buttons-table {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-weight: 600;
    min-width: 80px;
    justify-content: center;
}

.edit-btn {
    background: linear-gradient(135deg, var(--campus-blue), #004488);
    color: white;
    border: 1px solid var(--campus-blue);
}

.edit-btn:hover {
    background: linear-gradient(135deg, #004488, var(--campus-blue));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.2);
}

.delete-btn {
    background: linear-gradient(135deg, var(--danger), #c82333);
    color: white;
    border: 1px solid var(--danger);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c82333, var(--danger));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 20, 60, 0.2);
}

.no-courses-message {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Ensure table scrolls on mobile */
@media (max-width: 768px) {
    .courses-table-container {
        overflow-x: auto;
    }
    
    .courses-table {
        min-width: 800px;
    }
    
    .action-buttons-table {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-btn {
        min-width: 60px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

.footer {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--campus-blue), #001F3F);
    color: white;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.95rem;
    border-top: 3px solid var(--campus-gold);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--campus-gold);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.notification {
    position: fixed;
    top: 25px;
    right: 25px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    z-index: 3000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    max-width: 350px;
    border-left: 5px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success { 
    background: linear-gradient(135deg, var(--success), #32CD32);
    border-left-color: #32CD32;
}
.notification.error { 
    background: linear-gradient(135deg, var(--danger), #FF4500);
    border-left-color: #FF4500;
}
.notification.info { 
    background: linear-gradient(135deg, var(--campus-blue), var(--primary));
    border-left-color: var(--campus-gold);
}

.edit-mode-active {
    position: relative;
    border-color: var(--campus-gold) !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3) !important;
    animation: editPulse 2s infinite;
}

@keyframes editPulse {
    0% { box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3); }
}

.edit-mode-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--campus-gold), #FFA500);
    color: var(--campus-blue);
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    z-index: 100;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.optional-field {
    color: var(--gray);
    font-weight: 500;
}

.optional-field::after {
    content: " (Optional)";
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: normal;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--campus-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

@media (max-width: 768px) {
    .setup-grid {
        grid-template-columns: 1fr;
    }
    
    .university-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .university-name {
        font-size: 1.8rem;
    }
    
    .timetable-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        min-width: unset;
    }
    
    .legend {
        grid-template-columns: 1fr;
    }
    
    .courses-table thead th {
        padding: 10px 5px;
        font-size: 0.85rem;
    }
    
    .courses-table td {
        padding: 10px 5px;
        font-size: 0.85rem;
    }
}

.courses-table thead th {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 8px !important;
}

.courses-table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 8px !important;
}

.courses-table td:nth-child(2) div {
    justify-content: center !important;
    text-align: center !important;
}

.courses-table-container {
    width: 100% !important;
    overflow-x: auto !important;
}

.courses-table {
    width: 100% !important;
    table-layout: auto !important;
}

.courses-table th:nth-child(1) { width: 60px; } 
.courses-table th:nth-child(2) { width: 20%; } 
.courses-table th:nth-child(3) { width: 12%; } 
.courses-table th:nth-child(4) { width: 15%; } 
.courses-table th:nth-child(5) { width: 10%; } 
.courses-table th:nth-child(6) { width: 20%; } 
.courses-table th:nth-child(7) { width: 15%; } 

.course-color-indicator {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    vertical-align: middle !important;
}

.action-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
}

.slot-badge {
    display: inline-block !important;
    margin: 2px !important;
}

