/* ============================================================================
   School Management System - Main Stylesheet
   ============================================================================ */

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

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    background: #f1f5f9;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url('../photo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

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

.login-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 13px;
    opacity: 0.9;
}

.login-form {
    padding: 30px;
}

.login-footer {
    padding: 20px 30px;
    background: #f8fafc;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

/* Main Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu > ul > li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background: #334155;
    color: white;
}

.sidebar-menu a.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-menu a span {
    margin-right: 10px;
    font-size: 18px;
}

.menu-section {
    margin-top: 10px;
}

.menu-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
    cursor: pointer !important;
    user-select: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.menu-title:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer !important;
}

.menu-title.active {
    background: var(--primary-color);
    color: white;
}

.menu-toggle {
    display: inline-block;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.submenu {
    list-style: none;
}

.submenu a {
    padding-left: 50px;
    font-size: 13px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background: white;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
}

.user-role {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 30px;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
    text-align: center;
    font-size: 13px;
    color: var(--secondary-color);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark-color);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #dcfce7;
    border-color: var(--success-color);
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--info-color);
    color: #1e40af;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

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

.btn-secondary:hover {
    background: #475569;
}

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

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

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

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

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

.btn-logout {
    background: var(--danger-color);
    color: white;
    padding: 8px 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Multi-select searchable widget for subjects */
.multi-select {
    position: relative;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}

.multi-select .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.multi-select .tag {
    background: #eef2ff;
    color: var(--dark-color);
    padding: 6px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.multi-select .tag-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #374151;
}

.multi-select .multi-input {
    border: none;
    outline: none;
    flex: 1 1 200px;
    min-width: 120px;
    font-size: 14px;
    padding: 6px;
}

.multi-select .dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-height: 240px;
    overflow: auto;
    box-shadow: 0 6px 18px rgba(18, 24, 38, 0.08);
    z-index: 9999;
    display: none;
}

.multi-select .dropdown-item,
.multi-select .dropdown-add {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.multi-select .dropdown-item:hover,
.multi-select .dropdown-add:hover {
    background: #f1f5f9;
}

.multi-select .dropdown-add {
    font-weight: 600;
    color: var(--primary-color);
}

.stat-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 14px;
    color: var(--secondary-color);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-widget {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.widget-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.widget-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.widget-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

/* Activity List */
.activity-list {
    list-style: none;
}

.activity-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-user {
    font-weight: 500;
    color: var(--dark-color);
}

.activity-action {
    font-size: 13px;
    color: var(--secondary-color);
}

.activity-time {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Notification List */
.notification-list {
    list-style: none;
}

.notification-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.notification-list li:last-child {
    border-bottom: none;
}

.notification-list strong {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.notification-list p {
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.notification-time {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.filter-form input[type="text"],
.filter-form input[type="date"] {
    flex: 1;
    min-width: 200px;
}

.filter-form select {
    min-width: 150px;
}

/* Data Table */
.data-table {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light-color);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--secondary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Searchable Dropdown Component */
.searchable-dropdown {
    position: relative;
    overflow: visible;
}

.dropdown-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-field:hover {
    border-color: var(--primary-color);
    background-color: #fafbfc;
}

.dropdown-display {
    font-weight: 500;
    color: var(--dark-color);
    flex: 1;
}

.dropdown-icon {
    font-size: 11px;
    color: var(--secondary-color);
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.searchable-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-top: -1px;
    z-index: 1000;
    display: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: visible;
    box-sizing: border-box;
    min-width: 100%;
    width: 100%;
}

.dropdown-content.show {
    display: flex !important;
    flex-direction: column;
}

.dropdown-search {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    flex-shrink: 0;
}

.dropdown-search:focus {
    outline: none;
    background-color: #f8fafc;
}

.dropdown-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 0;
    min-height: 50px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.dropdown-list-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    visibility: visible !important;
    height: auto;
    min-height: 40px;
}

.dropdown-list-item:last-child {
    border-bottom: none;
}

.dropdown-list-item .item-name {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
    display: block;
}

.dropdown-list-item .item-info {
    color: var(--secondary-color);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.dropdown-list-item:hover {
    background-color: #f0f4ff;
}

.no-results-message {
    padding: 20px 15px;
    text-align: center;
    color: var(--secondary-color);
    font-size: 14px;
}

/* Searchable Select Wrapper */
.searchable-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.select-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.select-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.parent-select-dropdown {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.parent-select-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.parent-select-dropdown option:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
}

/* Readonly Field Styles */
.readonly-field {
    background-color: #f8fafc !important;
    color: #64748b;
    cursor: not-allowed;
}

.readonly-field:focus {
    background-color: #f8fafc !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================================================ */

/* Tablets and Small Laptops (max-width: 992px) */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        width: 260px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-110%);
        transition: transform 0.25s ease-in-out;
        z-index: 1100;
        overflow-y: auto;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    #sidebarToggle { 
        display: inline-block !important; 
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        padding: 0 15px;
    }

    .content-wrapper {
        padding: 20px 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 24px;
    }

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

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

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

    .filter-form {
        flex-direction: column;
        gap: 10px;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
    }

    .data-table {
        overflow-x: auto;
    }

    .data-table table {
        width: 100%;
        min-width: 700px;
    }

    .data-table table thead th,
    .data-table table td {
        padding: 10px;
        font-size: 13px;
    }

    .modal-content {
        margin: 20px auto;
        width: 95%;
        max-width: 700px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-footer {
        padding: 15px 20px;
    }

    .sidebar-header, .sidebar-menu {
        padding: 16px;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .submenu a {
        padding-left: 50px;
        font-size: 12px;
    }

    .card, .stat-card, .student-card {
        margin-bottom: 16px;
    }

    img { 
        max-width: 100%; 
        height: auto; 
    }

    .user-menu {
        gap: 10px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Mobile Phones (max-width: 768px) */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 20px;
    }

    .stat-info h3 {
        font-size: 20px;
    }

    .data-table table {
        min-width: 600px;
    }

    .data-table table thead th,
    .data-table table td {
        padding: 8px;
        font-size: 12px;
    }

    .modal-content {
        margin: 15px auto;
        width: 96%;
        max-width: 600px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .sidebar {
        width: 240px;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .page-header h1 {
        font-size: 18px;
    }

    .page-header {
        margin-bottom: 15px;
    }

    .content-wrapper {
        padding: 15px 10px;
    }

    .top-bar {
        padding: 0 10px;
        height: 60px;
    }

    .page-title {
        font-size: 16px;
    }

    .btn {
        padding: 8px 10px;
        font-size: 12px;
        margin-bottom: 5px;
    }

    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .stat-info h3 {
        font-size: 18px;
    }

    .stat-info p {
        font-size: 12px;
    }

    .data-table {
        overflow-x: auto;
    }

    .data-table table {
        min-width: 500px;
        font-size: 11px;
    }

    .data-table table thead th,
    .data-table table td {
        padding: 6px;
        font-size: 11px;
    }

    .modal-content {
        margin: 10px auto;
        width: 98%;
        max-width: 500px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 8px;
    }

    .filter-form {
        flex-direction: column;
        gap: 8px;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }

    .sidebar {
        width: 220px;
    }

    .sidebar-header h2 {
        font-size: 14px;
    }

    .sidebar-menu a {
        padding: 10px 15px;
        font-size: 13px;
    }

    .sidebar-menu a span {
        margin-right: 8px;
    }

    .submenu a {
        padding-left: 40px;
        font-size: 12px;
    }

    .user-menu {
        gap: 5px;
        font-size: 12px;
    }

    .user-name {
        display: none;
    }

    .user-role {
        display: none;
    }

    .modal-large {
        max-width: 90vw;
    }
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-header .close {
    font-size: 30px;
    font-weight: 300;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 1;
}

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

.modal-content form {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Search Section */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
}

/* Student Cards */
.student-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.student-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.student-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-card .card-header h3 {
    font-size: 18px;
}

.admission-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.student-card .card-body {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}


.info-row strong {
    color: var(--dark-color);
}

.student-card .card-footer {
    padding: 15px 20px;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

.student-card hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.student-card h4 {
    font-size: 14px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}
/* ============================================================================
   Searchable Dropdown Styles
   ============================================================================ */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-search {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    transition: all 0.3s ease;
}

.dropdown-search:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 12px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    user-select: none;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f0f9ff;
    color: var(--primary-color);
    font-weight: 500;
}

.dropdown-item:first-child {
    color: #999;
    font-style: italic;
}

.dropdown-item:first-child:hover {
    background-color: #f8fafc;
    color: #999;
}

/* ============================================================================
   Teacher Dashboard Styles
   ============================================================================ */

.classes-table {
    overflow-x: auto;
}

.classes-table .table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.classes-table .table thead {
    background-color: #f5f5f5;
}

.classes-table .table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.classes-table .table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.classes-table .table tbody tr:hover {
    background-color: #fafafa;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.badge-warning {
    background-color: #fff3e0;
    color: #e65100;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

.badge-info {
    background-color: #e0f2f1;
    color: #00695c;
}

.quick-action {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-action p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

/* Multi-select styling */
select[multiple] {
    min-height: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

select[multiple] option {
    padding: 5px;
    margin: 2px 0;
}

select[multiple] option:checked {
    background-color: var(--primary-color, #1976d2);
    color: white;
}