/* School Fees Management System - Complete Admin Styles */

/* =================== GLOBAL ADMIN STYLES =================== */
.wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 20px;
    padding: 30px;
}

.wrap h1 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #3b82f6;
}

/* =================== MODERN CONTAINER =================== */
.sfms-modern-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 20px;
    padding: 30px;
}

.sfms-modern-container h1 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #3b82f6;
}

/* =================== FORMS =================== */
.sfms-form, .sfms-student-form, .sfms-class-form, .sfms-semester-form, 
.sfms-fee-structure-form, .sfms-payment-form, .sfms-bursary-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.sfms-form h3, .sfms-student-form h3, .sfms-class-form h3, 
.sfms-semester-form h3, .sfms-fee-structure-form h3, 
.sfms-payment-form h3, .sfms-bursary-form h3 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* =================== SEARCH FILTERS =================== */
.sfms-search-filters {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h3 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.filter-content {
    margin-top: 20px;
}

.sfms-filter-form .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =================== TABLES =================== */
.sfms-students-list, .sfms-classes-list, .sfms-semesters-list,
.sfms-fee-structure-list, .sfms-payments-list, .sfms-bursary-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header h2, .list-header h3 {
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.list-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.student-count {
    color: #64748b;
    font-weight: 600;
}

.sfms-table-container {
    overflow-x: auto;
}

.wrap table, .sfms-modern-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.wrap table thead, .sfms-modern-container table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.wrap table th, .sfms-modern-container table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

.wrap table td, .sfms-modern-container table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.wrap table tr:last-child td, .sfms-modern-container table tr:last-child td {
    border-bottom: none;
}

.wrap table tr:hover td, .sfms-modern-container table tr:hover td {
    background: #f8fafc;
}

/* =================== MODALS =================== */
.sfms-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.sfms-modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
}

.sfms-close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.sfms-close-modal:hover {
    color: #475569;
}

.modal-body {
    padding: 25px;
}

/* =================== BULK ACTIONS =================== */
.sfms-bulk-actions-panel {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.sfms-bulk-actions-panel h4 {
    margin: 0 0 15px 0;
    color: #1e40af;
    font-size: 16px;
    font-weight: 700;
}

.bulk-actions-content {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bulk-actions-content select {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

/* =================== DASHBOARD SPECIFIC =================== */
.sfms-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f1f5f9;
}

.sfms-dashboard .wrap {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin: 20px;
    padding: 30px;
}

.sfms-dashboard h1 {
    color: #1e293b;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =================== SEMESTER BANNER =================== */
.sfms-semester-info {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border: 2px solid #3b82f6;
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.sfms-semester-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.sfms-semester-info > div:first-child {
    flex: 1;
    position: relative;
    z-index: 1;
}

.sfms-semester-info h3 {
    color: #1e40af;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sfms-semester-info h3::before {
    animation: float 3s ease-in-out infinite;
}

.sfms-semester-info .semester-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.sfms-semester-info .semester-details span {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sfms-semester-info .semester-details span strong {
    color: #1d4ed8;
    font-weight: 700;
}

.sfms-semester-info .semester-details .dashicons {
    color: #3b82f6;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sfms-semester-info .semester-actions {
    margin-left: 20px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #9b1c1c;
}

.status-completed {
    background: #e0f2fe;
    color: #0c4a6e;
}

.status-sent {
    background: #dbeafe;
    color: #1e3a8a;
}

/* =================== STATS CARDS =================== */
.sfms-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.sfms-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sfms-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.sfms-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.sfms-stat-card .stat-icon {
    font-size: 36px;
    margin-bottom: 15px;
    display: block;
}

.sfms-stat-card .stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1;
}

.sfms-stat-card .stat-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sfms-stat-card:nth-child(6) .stat-number {
    color: #10b981;
}

.sfms-stat-card:nth-child(7) .stat-number {
    color: #8b5cf6;
}

/* =================== BUTTONS =================== */
.sfms-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.sfms-button:hover {
    transform: translateY(-2px);
}

.sfms-button-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.sfms-button-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 6px 8px rgba(59, 130, 246, 0.4);
}

.sfms-button-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.sfms-button-secondary:hover {
    background: #e2e8f0;
}

.sfms-button-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.sfms-button-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 8px rgba(239, 68, 68, 0.4);
}

.sfms-button-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.3);
}

.sfms-button-info:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    box-shadow: 0 6px 8px rgba(14, 165, 233, 0.4);
}

.sfms-button-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.sfms-button-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 6px 8px rgba(245, 158, 11, 0.4);
}

.sfms-button-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.sfms-button-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 8px rgba(16, 185, 129, 0.4);
}

/* =================== DASHBOARD CONTENT =================== */
.sfms-dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.sfms-recent-activity, .sfms-quick-actions {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sfms-recent-activity h3, .sfms-quick-actions h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sfms-recent-activity h3::before {
    content: "📊";
}

.sfms-quick-actions h3::before {
    content: "⚡";
}

/* =================== TABLE =================== */
.sfms-modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.sfms-modern-table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.sfms-modern-table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

.sfms-modern-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.sfms-modern-table tr:last-child td {
    border-bottom: none;
}

.sfms-modern-table tr:hover td {
    background: #f8fafc;
}

/* =================== QUICK ACTIONS =================== */
.quick-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-action-buttons .sfms-button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}

/* =================== ROW ACTIONS (RESPONSIVE) =================== */
.sfms-actions-toggle {
    display: none;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    /* Hide low-priority columns on small screens */
    .sfms-modern-table th:nth-child(4),
    .sfms-modern-table td:nth-child(4), /* Email */
    .sfms-modern-table th:nth-child(5),
    .sfms-modern-table td:nth-child(5), /* Phone */
    .sfms-modern-table th:nth-child(7),
    .sfms-modern-table td:nth-child(7), /* Status */
    .sfms-modern-table th:nth-child(9),
    .sfms-modern-table td:nth-child(9)  /* User Account */
    { display: none; }

    /* Actions toggle visible on mobile */
    .sfms-actions-toggle { display: inline-flex; width: 100%; justify-content: center; }

    /* Hide actions by default on mobile */
    .sfms-modern-table .action-buttons { display: none; flex-direction: column; gap: 6px; }
    .sfms-modern-table .action-buttons.is-open { display: flex; }
}

/* =================== NOTICES =================== */
.notice {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.notice-success {
    border-left-color: #10b981;
    background: #d1fae5;
}

.notice-error {
    border-left-color: #ef4444;
    background: #fee2e2;
}

.notice p {
    margin: 0;
    color: #1e293b;
    font-weight: 500;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 1200px) {
    .sfms-stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .sfms-dashboard-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* ========== CONTAINERS - FULL WIDTH ========== */
    .wrap, .sfms-modern-container {
        margin: 10px;
        padding: 15px;
        width: calc(100% - 20px);
        box-sizing: border-box;
    }
    
    .sfms-dashboard .wrap {
        margin: 10px;
        padding: 15px;
        width: calc(100% - 20px);
    }
    
    .wrap h1, .sfms-modern-container h1 {
        font-size: 22px;
        padding-bottom: 12px;
    }
    
    .sfms-dashboard h1 {
        font-size: 22px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* ========== SEMESTER INFO - FULL WIDTH ========== */
    .sfms-semester-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .sfms-semester-info .semester-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .sfms-semester-info .semester-details span {
        width: 100%;
    }
    
    .sfms-semester-info .semester-actions {
        margin-left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .sfms-semester-info .semester-actions .sfms-button {
        width: 100%;
    }
    
    /* ========== STATS CARDS - FULL WIDTH ========== */
    .sfms-stats-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sfms-stat-card {
        width: 100%;
        padding: 20px 15px;
    }
    
    .sfms-stat-card .stat-number {
        font-size: 24px;
    }
    
    /* ========== FORMS - FULL WIDTH ========== */
    .sfms-form, .sfms-student-form, .sfms-class-form, .sfms-semester-form, 
    .sfms-fee-structure-form, .sfms-payment-form, .sfms-bursary-form {
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 20px;
    }
    
    .form-row, .sfms-filter-form .filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="number"],
    .form-group input[type="date"],
    .form-group select,
    .form-group textarea {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ========== SEARCH FILTERS - FULL WIDTH ========== */
    .sfms-search-filters {
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 20px;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .filter-header h3 {
        font-size: 16px;
    }
    
    /* ========== LISTS & TABLES - FULL WIDTH ========== */
    .sfms-students-list, .sfms-classes-list, .sfms-semesters-list,
    .sfms-fee-structure-list, .sfms-payments-list, .sfms-bursary-list,
    .sfms-warnings-list, .sfms-bursary-applications-list, .sfms-communications-list {
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
        margin-top: 20px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }
    
    .list-header h2, .list-header h3 {
        font-size: 18px;
    }
    
    .list-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* ========== TABLE RESPONSIVENESS ========== */
    .sfms-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .wrap table, .sfms-modern-container table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .wrap table th, .sfms-modern-container table th {
        padding: 10px 12px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .wrap table td, .sfms-modern-container table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Hide less important columns on mobile */
    .wrap table th:nth-child(n+6),
    .wrap table td:nth-child(n+6),
    .sfms-modern-container table th:nth-child(n+6),
    .sfms-modern-container table td:nth-child(n+6) {
        display: none;
    }
    
    /* Keep important columns visible */
    .wrap table th:last-child,
    .wrap table td:last-child,
    .sfms-modern-container table th:last-child,
    .sfms-modern-container table td:last-child {
        display: table-cell;
    }
    
    /* ========== ACTION BUTTONS - FULL WIDTH ========== */
    .filter-actions, .form-actions, .list-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .sfms-button,
    .form-actions .sfms-button,
    .list-actions .sfms-button {
        width: 100%;
        justify-content: center;
    }
    
    /* ========== BULK ACTIONS - FULL WIDTH ========== */
    .sfms-bulk-actions-panel {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .bulk-actions-content {
        flex-direction: column;
        width: 100%;
    }
    
    .bulk-actions-content select,
    .bulk-actions-content .sfms-button {
        width: 100%;
        min-width: auto;
    }
    
    /* ========== MODALS - MOBILE FRIENDLY ========== */
    .sfms-modal-content {
        margin: 10% 15px;
        max-width: calc(100% - 30px);
        width: calc(100% - 30px);
    }
    
    .modal-header {
        padding: 20px 15px;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    /* ========== DASHBOARD WIDGETS - FULL WIDTH ========== */
    .sfms-dashboard-widget {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ========== QUICK ACTIONS - FULL WIDTH ========== */
    .sfms-quick-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .sfms-quick-actions .sfms-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* ========== EXTRA SMALL MOBILE ========== */
    .wrap, .sfms-modern-container,
    .sfms-dashboard .wrap {
        margin: 5px;
        padding: 12px;
        width: calc(100% - 10px);
    }
    
    .wrap h1, .sfms-modern-container h1,
    .sfms-dashboard h1 {
        font-size: 18px;
    }
    
    .sfms-semester-info {
        padding: 15px 12px;
    }
    
    .sfms-semester-info h3 {
        font-size: 16px;
    }
    
    .sfms-stat-card {
        padding: 15px 12px;
    }
    
    .sfms-stat-card .stat-number {
        font-size: 20px;
    }
    
    .sfms-button {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 9px 12px;
    }
    
    .wrap table, .sfms-modern-container table {
        font-size: 12px;
        min-width: 500px;
    }
    
    .wrap table th, .sfms-modern-container table th {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .wrap table td, .sfms-modern-container table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* =================== ANIMATIONS =================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.sfms-semester-info h3::before {
    animation: float 3s ease-in-out infinite;
}

/* =================== STUDENT AUTOCOMPLETE FOR WARNINGS =================== */
.student-autocomplete {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: none;
}

.student-search-result {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.student-search-result:hover {
    background: #f5f5f5;
}

.student-search-result strong {
    display: block;
    margin-bottom: 3px;
}

.student-search-result small {
    color: #666;
}

.no-results {
    padding: 10px;
    color: #999;
    text-align: center;
}

#student-selector {
    position: relative;
}

/* Form toggle section */
.sfms-form-toggle-section {
    margin-bottom: 20px;
}

.sfms-form-toggle-section button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sfms-form-toggle-section button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}