main>.container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer>.container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after,
a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li>form>button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li>form>button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav>li>form>button.logout:focus,
.nav>li>form>button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav>li>form>button.logout:focus {
    outline: none;
}

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

/* Landing Page Styles */
.landing-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 100px;
    margin-top: -60px;
    /* Offset for fixed navbar if needed, or adjust padding */
    position: relative;
    overflow: hidden;
}

.landing-hero h1 {
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.landing-hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.btn-glow {
    background: #fff;
    color: #764ba2;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #5a387a;
    background: #f8f9fa;
}

.btn-outline-light-custom {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light-custom:hover {
    background: white;
    color: #764ba2;
}

.feature-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: none;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.stats-section {
    background: #2d3748;
    color: white;
    padding: 60px 0;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.testimonial-section {
    padding: 80px 0;
}

.footer-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

/* ... existing landing page styles ... */

/* Auth Pages (Login/Signup) */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: #f8f9fa;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: none;
    max-width: 900px;
    width: 100%;
}

.auth-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.auth-sidebar h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

.auth-sidebar ul {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.auth-sidebar li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.auth-sidebar li:before {
    content: '✓';
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 15px;
    font-size: 14px;
}

.auth-form-container {
    padding: 60px 50px;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h2 {
    font-weight: 700;
    color: #2d3748;
}

.form-floating-custom .form-control {
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    padding: 12px 20px;
    height: auto;
}

.form-floating-custom .form-control:focus {
    background: white;
    box-shadow: 0 0 0 4px rgba(118, 75, 162, 0.1);
    border-color: #764ba2;
}

.btn-auth {
    background: #764ba2;
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    margin-top: 20px;
}

.btn-auth:hover {
    background: #5a387a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 56, 122, 0.3);
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #a0aec0;
}

/* ... existing auth styles ... */

/* Navbar Enhancements */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 5px;
    border-radius: 8px;
    padding: 8px 16px !important;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.user-profile-dropdown .nav-link {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 6px 16px !important;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    /* Pill shape */
    color: white !important;
    transition: all 0.3s ease;
}

.user-profile-dropdown .nav-link:hover,
.user-profile-dropdown.show .nav-link {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hide default Bootstrap dropdown arrow */
.user-profile-dropdown .dropdown-toggle::after {
    display: none;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f2f5;
    border: 2px solid white;
    padding: 2px;
}

.school-badge {
    background: rgba(255, 215, 0, 0.2);
    color: #ffc107;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 12px;
    animation: fadeIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-top: 15px !important;
    /* Spacing from navbar */
    background: rgba(255, 255, 255, 0.98);
}

.dropdown-header {
    font-weight: 800;
    color: #4a148c;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 8px 20px;
    opacity: 0.8;
}

.dropdown-item {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.dropdown-item:hover {
    background-color: #f3e5f5;
    /* Light purple tint */
    color: #4a148c;
}

.dropdown-divider {
    border-top-color: #eee;
    margin: 8px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #4a148c;
}

/* ... existing navbar styles ... */

/* Modern Footer Styles */
.footer-modern {
    background-color: #1a202c;
    /* Dark slate */
    color: #cbd5e0;
    padding-top: 60px;
    padding-bottom: 30px;
    margin-top: auto;
    font-size: 0.95rem;
}

.footer-brand h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.footer-brand p {
    opacity: 0.7;
    line-height: 1.6;
}

.footer-heading {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
    padding-left: 5px;
    /* Subtle movement */
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.footer-bottom-links a {
    color: #718096;
    margin-left: 20px;
    text-decoration: none;
}

/* ... existing footer styles ... */

/* Dashboard / Scheduler View Styles */
.dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-title h2 {
    font-weight: 800;
    color: #2d3748;
    margin: 0;
    font-size: 2rem;
}

.dashboard-title p {
    color: #718096;
    margin: 5px 0 0;
}

.dashboard-actions .btn {
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary-soft {
    background: #e0e7ff;
    color: #4338ca;
    border: none;
}

.btn-primary-soft:hover {
    background: #c7d2fe;
    color: #3730a3;
    transform: translateY(-2px);
}

.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.schedule-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.schedule-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.schedule-header {
    background: #f8fafc;
    padding: 20px 25px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.class-title {
    font-weight: 700;
    color: #4a5568;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.class-badge {
    background: #c3dafe;
    color: #434190;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.timetable-container {
    padding: 5px;
    padding-top: 20px;
    /* Added top padding */
    overflow-x: auto;
}

/* Timetable & Master Schedule Styles */
.timetable {
    width: 100%;
    border-collapse: separate;
    /* Use separate to handle sticky borders better if needed, or collapse */
    border-spacing: 0;
    white-space: nowrap;
    background: #fff;
}

/* Base Header Styles */
.timetable th {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 0.05em;
    padding: 20px 16px;
    /* Increased vertical padding */
    font-weight: 700;
    text-align: center;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

.timetable td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
}

/* STICKY HEADER CONFIGURATION */
/* Header Row */
/* STICKY HEADER CONFIGURATION */
/* Header Row */
.timetable thead th {
    position: sticky;
    top: 60px;
    /* Adjust based on your navbar height */
    z-index: 20;
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    /* Subtle shadow below header */
}

/* STICKY COLUMNS CONFIGURATION */
/* Common sticky column styles */
.sticky-col {
    position: sticky;
    z-index: 10;
    background-color: #f8fafc;
    /* Match header or distinct */
    color: #475569;
}

/* First Column (Day Name) */
.first-col {
    left: 0;
    width: 90px;
    border-right: 2px solid #cbd5e1 !important;
    /* Stronger border to separate meta columns */
    font-weight: 700;
}

/* Second Column (Period Number) */
.second-col {
    left: 90px;
    /* Must match width of first-col */
    width: 60px;
    border-right: 2px solid #e2e8f0 !important;
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
    background-color: #fff;
    /* Period cells usually white or light gray */
}

/* CORNER INTERSECTION (Header + Sticky Col) */
/* These are the top-left cells that need to stay on top of EVERYTHING */
.timetable thead th.first-col,
.timetable thead th.second-col {
    z-index: 30 !important;
    /* Highest priority */
    background-color: #f1f5f9;
    color: #334155;
}

/* Specific styling for the intersection cells to look perfect */
.timetable thead th.first-col {
    border-right: 2px solid #cbd5e1;
}

/* Hover effect for better readability on rows */
.timetable tbody tr:hover td {
    background-color: #f8fafc;
}

/* Allow sticky cols to maintain their own background on hover */
.timetable tbody tr:hover td.sticky-col {
    background-color: #f1f5f9;
}

.timetable td {
    padding: 10px;
    vertical-align: middle;
}

.period-cell {
    font-weight: 700;
    color: #cbd5e0;
    text-align: center;
    width: 60px;
}

.slot-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.slot-card.filled {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.slot-card.filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left-color: #764ba2;
}

.slot-subject {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.slot-teacher {
    font-size: 0.8rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 5px;
}

.slot-card.break {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
}

.slot-break {
    font-weight: 600;
    color: #92400e;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.slot-break i {
    font-size: 1rem;
    color: #d97706;
}

/* Empty State */
.schedule-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
}

/* Data Management Menu Styles */
.data-mgmt-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    /* Ensure links don't have underline */
}

.data-mgmt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(118, 75, 162, 0.2);
}

.data-mgmt-card:active {
    transform: translateY(-1px);
}

.data-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
    background: #f7fafc;
    color: #4a5568;
    transition: all 0.3s ease;
}

.data-mgmt-card:hover .data-icon-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.data-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.data-card-desc {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
    /* Pushes content down if needed or fills space */
}

.data-card-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.data-mgmt-card:hover .data-card-arrow {
    opacity: 1;
    transform: translateX(0);
    background: #e0e7ff;
    color: #4338ca;
}

/* Specific colors for icons if needed, but gradient on hover is nice */
.icon-teachers {
    color: #e53e3e;
    background: #fff5f5;
}

.icon-subjects {
    color: #d69e2e;
    background: #fffff0;
}

.icon-classes {
    color: #38a169;
    background: #f0fff4;
}

.icon-assignments {
    color: #3182ce;
    background: #ebf8ff;
}

.icon-constraints {
    color: #805ad5;
    background: #faf5ff;
}

/* Override initial background for specific cards to have color hints even before hover */
.data-mgmt-card .icon-teachers {
    background: #fee2e2;
    color: #ef4444;
}

.data-mgmt-card .icon-subjects {
    background: #fef3c7;
    color: #f59e0b;
}

.data-mgmt-card .icon-classes {
    background: #dcfce7;
    color: #22c55e;
}

.data-mgmt-card .icon-assignments {
    background: #dbeafe;
    color: #3b82f6;
}

.data-mgmt-card .icon-constraints {
    background: #f3e8ff;
    color: #a855f7;
}

.empty-icon {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 20px;
}

/* Utility Classes */
.bg-soft-primary {
    background-color: #e0e7ff !important;
}

/* Ensure text-primary matches the soft background */
.text-primary-dark {
    color: #4338ca !important;
}

.bg-soft-info {
    background-color: #e0f2fe !important;
}

.text-info-dark {
    color: #0ea5e9 !important;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}