:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --dark-blue: #1e3a8a;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    --text-dark: #1e293b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}
/* New css for better styling of class */

/* .assignment-row {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px;
    background-color: #f8f9fa;
}

.subject-assignments-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #007bff;
} */

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.1);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--medium-gray);
}

.school-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.school-logo h1 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.school-logo p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: var(--secondary-blue);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.user-info h4 {
    margin-bottom: 0.2rem;
}

.user-info span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 1rem 0;
}

.menu-item {
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--secondary-blue);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: var(--light-gray);
}

/* Top Navigation */
.top-nav {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

.search-box {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Content Area */
.content {
    padding: 2rem;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.card-icon.blue { background: var(--primary-blue); }
.card-icon.green { background: var(--success); }
.card-icon.orange { background: var(--warning); }
.card-icon.red { background: var(--danger); }

.card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 0.5rem;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex: 0 0 auto;
    padding: 0.8rem 1.2rem;
    background: var(--light-blue);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-blue);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-item.active {
    background: var(--primary-blue);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        padding: 1rem;
    }
    
    .search-box {
        margin: 0 1rem;
    }
    
    .mobile-bottom-nav {
        display: block;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Teacher Dashboard Specific Styles */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.class-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.class-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-blue);
}

.class-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Mark Entry Styles */
.mark-entry-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.mark-entry-table th,
.mark-entry-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.mark-entry-table th {
    background: var(--light-blue);
    font-weight: 600;
}

.mark-input {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--medium-gray);
    border-radius: 6px;
    text-align: center;
}

.mark-input:focus {
    border-color: var(--primary-blue);
    outline: none;
}

/* Attendance Styles */
.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.attendance-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .class-actions {
        flex-direction: column;
    }
    
    .class-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Filter Section */
.filter-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--medium-gray);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}


/* Communication Styles */
.communication-tabs {
    display: flex;
    border-bottom: 2px solid var(--medium-gray);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 1rem 2rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    border-bottom-color: var(--primary-blue);
    color: var(--primary-blue);
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Message Styles */
.message-thread {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    max-width: 80%;
}

.message.sent {
    background: var(--light-blue);
    margin-left: auto;
    border: 1px solid var(--secondary-blue);
}

.message.received {
    background: var(--light-gray);
    margin-right: auto;
    border: 1px solid var(--medium-gray);
}

.message-time {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 0.5rem;
}

/* Schedule Styles */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.schedule-day {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 1.5rem;
}

.day-header {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    text-align: center;
}

.schedule-item {
    background: var(--light-blue);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary-blue);
}

.event-item {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--success);
}

.event-exam {
    border-left-color: var(--danger);
}

.event-meeting {
    border-left-color: var(--warning);
}

.event-conference {
    border-left-color: var(--primary-blue);
}

.time-slot {
    font-weight: bold;
    color: var(--primary-blue);
}

.current-time {
    background: #fff3cd;
    border: 2px solid var(--warning);
}

/* Report Styles */
.report-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.report-option {
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-option:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.report-option.selected {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.report-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

/* Template Styles */
.template-card {
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Recipient List Styles */
.recipient-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1rem;
}

.recipient-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.recipient-item:last-child {
    border-bottom: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .communication-tabs {
        flex-direction: column;
    }
    
    .tab {
        padding: 0.8rem 1rem;
        text-align: center;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .report-options {
        grid-template-columns: 1fr;
    }
    
    .message {
        max-width: 95%;
    }
}