/* School Management System - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-radius: 4px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--dark-color);
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 1.5rem;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.nav-link:hover, .nav-link.active {
    background-color: var(--light-color);
}

.nav-link.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
}

.nav-link.btn:hover {
    background-color: var(--secondary-color);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 130px);
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.card-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.card-label {
    color: #777;
    font-size: 0.9rem;
}

/* Forms */
.form-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    text-align: center;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-block {
    display: block;
    width: 100%;
}

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

.btn-success:hover {
    background-color: #27ae60;
}

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

.btn-warning:hover {
    background-color: #e67e22;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table .actions {
    display: flex;
    gap: 0.5rem;
}

/* Search */
.search-container {
    display: flex;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

/* Filters */
.filter-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    min-width: 150px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    list-style: none;
}

.pagination li {
    margin: 0 0.25rem;
}

.pagination a {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    color: var(--dark-color);
    transition: var(--transition);
}

.pagination a:hover, .pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left-color: var(--success-color);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-left-color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger-color);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-left-color: var(--primary-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-text {
    color: #777;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        margin: 0.5rem 0;
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 1.5rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .filter-container {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}

/* Timetable Styles */
.timetable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.timetable th, .timetable td {
    border: 1px solid #ddd;
    padding: 0.75rem;
}

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

.timetable tr:nth-child(even) {
    background-color: #f8f9fa;
}

.timetable .time-slot {
    font-weight: 600;
    background-color: #f1f1f1;
}

.tab-container {
    margin-bottom: 2rem;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1.5rem;
}

.tab-link {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-link.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.curriculum-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.curriculum-activity {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.remove-activity, .remove-curriculum {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.25rem;
}

.add-activity-btn, .add-curriculum-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #f0f8ff;
    border: 1px dashed #1e88e5;
    border-radius: 6px;
    padding: 0.75rem;
    color: #1e88e5;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.add-activity-btn:hover, .add-curriculum-btn:hover {
    background-color: #e3f2fd;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-col {
    flex: 1;
}

.file-upload-container {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-container:hover {
    border-color: #1e88e5;
}

.file-upload-icon {
    font-size: 2rem;
    color: #1e88e5;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: #555;
    margin-bottom: 0.5rem;
}

.file-upload-info {
    font-size: 0.875rem;
    color: #777;
}

.file-preview {
    display: none;
    margin-top: 1rem;
}

.file-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #555;
}

.curriculum-activities {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.curriculum-block {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Additional styles for faculty table */
.faculty-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.faculty-table th,
.faculty-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.faculty-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.faculty-table tr:hover {
    background-color: #f9f9f9;
}

.faculty-table .faculty-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
}

.faculty-table .faculty-name {
    display: flex;
    align-items: center;
}

.faculty-actions {
    display: flex;
    gap: 0.5rem;
}

.faculty-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.search-faculty {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-faculty input {
    flex: 1;
}

.faculty-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.faculty-filters select {
    min-width: 150px;
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
}

.empty-state-icon {
    font-size: 4rem;
    color: #1e88e5;
    margin-bottom: 1rem;
}

.faculty-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-professor {
    background-color: #e3f2fd;
    color: #1565c0;
}

.badge-assistant {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-lecturer {
    background-color: #fff8e1;
    color: #f57f17;
}

.badge-guest {
    background-color: #f5f5f5;
    color: #616161;
}

.faculty-selection {
    margin-top: 2rem;
}

.faculty-selection h3 {
    margin-bottom: 1rem;
}

.faculty-selection-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.faculty-selection-table th,
.faculty-selection-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.faculty-selection-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.faculty-selection-table tr:hover {
    background-color: #f9f9f9;
}

.faculty-selection-table .checkbox-cell {
    width: 40px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button.active {
    background-color: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
}

.pagination button:hover:not(.active) {
    background-color: #f5f5f5;
}

.tab-container {
    margin-bottom: 2rem;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1.5rem;
}

.tab-link {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-link.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Print Styles for PDF */
@media print {
    body {
        background-color: white;
        font-size: 12pt;
    }

    .header, .footer, .nav-menu, .btn, .actions {
        display: none;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .card, .table, .form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .timetable th {
        background-color: #f1f1f1;
        color: black;
    }
}
