/* School Portal Frontend Styles */

:root {
    --sp-primary: #4F46E5;
    --sp-primary-dark: #4338ca;
    --sp-secondary: #10B981;
    --sp-text: #1F2937;
    --sp-text-light: #6B7280;
    --sp-bg: #F3F4F6;
    --sp-card-bg: #FFFFFF;
    --sp-border: #E5E7EB;
}

.school-portal-frontend-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--sp-text);
    background: var(--sp-bg);
    padding: 2rem;
    border-radius: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.school-portal-frontend-wrapper h2 {
    color: var(--sp-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Tabs */
.sp-tabs {
    display: flex;
    border-bottom: 2px solid var(--sp-border);
    margin-bottom: 2rem;
    gap: 1rem;
}

.sp-tab-link {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--sp-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.sp-tab-link:hover {
    color: var(--sp-primary);
}

.sp-tab-link.active {
    color: var(--sp-primary);
    border-bottom-color: var(--sp-primary);
}

.sp-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.sp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sp-stat-card {
    background: var(--sp-card-bg);
    padding: 1.5rem;
    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);
    text-align: center;
    transition: transform 0.2s ease;
}

.sp-stat-card:hover {
    transform: translateY(-5px);
}

.sp-stat-card h3 {
    font-size: 2rem;
    color: var(--sp-primary);
    margin: 0 0 0.5rem 0;
}

.sp-stat-card p {
    color: var(--sp-text-light);
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tables */
.sp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--sp-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.sp-table th,
.sp-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--sp-border);
}

.sp-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: var(--sp-text-light);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.sp-table tr:last-child td {
    border-bottom: none;
}

.sp-table tr:hover {
    background: #F9FAFB;
}

/* Status Colors */
.sp-status-present {
    color: #10B981;
    font-weight: 600;
}

.sp-status-absent {
    color: #EF4444;
    font-weight: 600;
}

.sp-status-leave {
    color: #F59E0B;
    font-weight: 600;
}

/* Responsive Timetable */
.sp-timetable-frontend {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.sp-entry {
    background: #EEF2FF;
    border-left: 3px solid var(--sp-primary);
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* Login Form Styling */
.sp-login-form {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.sp-login-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--sp-primary);
}

.sp-child-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-button-logout:hover {
    text-decoration: underline !important;
    opacity: 0.8;
}