/**
 * School Fee Management System - Frontend CSS
 */

/* Container & Layout */
.sfms-frontend-wrapper {
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px 0;
}

.sfms-frontend-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.sfms-frontend-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
}

.sfms-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.sfms-header-top h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.sfms-user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sfms-user-name {
    font-size: 14px;
    opacity: 0.9;
}

.sfms-logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 14px;
}

.sfms-logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Navigation Tabs */
.sfms-header-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sfms-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.sfms-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sfms-nav-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

/* Tab Content */
.sfms-tab-content {
    display: none;
    padding: 30px 20px;
    animation: fadeIn 0.3s ease-in;
}

.sfms-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statistics Grid */
.sfms-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.sfms-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.sfms-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sfms-stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sfms-stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Sections */
.sfms-dashboard-section {
    margin-bottom: 40px;
}

.sfms-dashboard-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Tables */
.sfms-table-container {
    overflow-x: auto;
}

.sfms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sfms-table thead {
    background: #f8f9fa;
}

.sfms-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.sfms-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    color: #555;
}

.sfms-table tbody tr:hover {
    background: #f8f9fa;
}

.sfms-table tbody tr:last-child td {
    border-bottom: none;
}

.sfms-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px !important;
}

/* Status Badges */
.sfms-status-active {
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.sfms-status-inactive {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.sfms-status-success {
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.sfms-status-pending {
    background: #fff3cd;
    color: #856404;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Buttons */
.sfms-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.sfms-btn-primary {
    background: #667eea;
    color: white;
}

.sfms-btn-primary:hover {
    background: #5568d3;
}

.sfms-btn-secondary {
    background: #6c757d;
    color: white;
}

.sfms-btn-secondary:hover {
    background: #5a6268;
}

.sfms-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.sfms-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sfms-form-group {
    display: flex;
    flex-direction: column;
}

.sfms-form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.sfms-form-group input,
.sfms-form-group select {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.sfms-form-group input:focus,
.sfms-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sfms-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Filter Section */
.sfms-filter-section {
    margin-bottom: 20px;
}

.sfms-search-input {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.sfms-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Modal */
.sfms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.sfms-modal.active {
    display: flex;
}

.sfms-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sfms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.sfms-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.sfms-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.sfms-modal-close:hover {
    color: #333;
}

#payment-form {
    padding: 20px;
}

/* Notifications */
.sfms-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(300px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sfms-notification-success {
    background: #28a745;
}

.sfms-notification-error {
    background: #dc3545;
}

.sfms-notification-info {
    background: #17a2b8;
}

/* Loading State */
.sfms-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Error State */
.sfms-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sfms-frontend-container {
        margin: 10px;
    }

    .sfms-frontend-header {
        padding: 20px 15px;
    }

    .sfms-header-top {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .sfms-header-top h1 {
        font-size: 22px;
    }

    .sfms-user-menu {
        width: 100%;
        justify-content: space-between;
    }

    .sfms-header-nav {
        flex-wrap: wrap;
    }

    .sfms-nav-btn {
        flex: 1;
        min-width: 45%;
        text-align: center;
    }

    .sfms-tab-content {
        padding: 20px 15px;
    }

    .sfms-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
    }

    .sfms-stat-number {
        font-size: 24px;
    }

    .sfms-table {
        font-size: 12px;
    }

    .sfms-table th,
    .sfms-table td {
        padding: 10px 8px;
    }

    .sfms-modal-content {
        width: 95%;
    }

    .sfms-notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .sfms-header-top h1 {
        font-size: 18px;
    }

    .sfms-nav-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .sfms-stats-grid {
        grid-template-columns: 1fr;
    }

    .sfms-form-actions {
        flex-direction: column;
    }

    .sfms-btn {
        width: 100%;
    }
}
