﻿/* =========================================
   SCHOOL MANAGEMENT - Global Classes
   ========================================= */

/* Flex Utilities */
.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.p-4 {
    padding: 1rem;
}

.w-12 {
    width: 3rem;
}

.w-16 {
    width: 4rem;
}

/* =========================================
   SCHOOL MANAGEMENT - Filter Section
   ========================================= */

.filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1rem;
    align-items: flex-end;
}

.filter-item {
    flex: 0 1 200px;
}

.filter-item-large {
    flex: 1;
    min-width: 250px;
}

.filter-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
}

/* =========================================
   SCHOOL MANAGEMENT - Table Enhancements
   ========================================= */

.bg-blue-light {
    background: #dbeafe;
    color: #1e40af;
}

.bg-purple-light {
    background: #f3e8ff;
    color: #6b21a8;
}

.bg-yellow-light {
    background: #fef9c3;
    color: #854d0e;
}

.bg-green-light {
    background: #dcfce7;
    color: #166534;
}

.bg-red-light {
    background: #fee2e2;
    color: #991b1b;
}

.bg-orange-light {
    background: #ffedd5;
    color: #9a3412;
}

.bg-gray-50 {
    background: #f8fafc;
}

.bg-gray-100 {
    background: #f1f5f9;
}

/* Font Utilities */
.font-mono {
    font-family: 'Courier New', monospace;
}

.text-muted {
    color: #64748b;
}

.text-red {
    color: #ef4444;
}

.text-primary {
    color: #1b6ec2;
}

.text-center {
    text-align: center;
}

/* =========================================
   SCHOOL MANAGEMENT - Card Section Header
   ========================================= */

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .card-title .material-icons-round {
        font-size: 28px;
        color: #1b6ec2;
    }

/* =========================================
   SCHOOL MANAGEMENT - Status Indicators
   ========================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

    .status-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background: #22c55e;
}

.dot-red {
    background: #ef4444;
}

.dot-yellow {
    background: #eab308;
}

.dot-orange {
    background: #f97316;
}

.dot-blue {
    background: #1b6ec2;
}

/* =========================================
   SCHOOL MANAGEMENT - Action Buttons
   ========================================= */

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #64748b;
}

    .btn-icon:hover {
        background: #f1f5f9;
        color: #1b6ec2;
        transform: scale(1.1);
    }

    .btn-icon.danger:hover {
        background: #fee2e2;
        color: #ef4444;
    }

/* =========================================
   SCHOOL MANAGEMENT - Pagination
   ========================================= */

.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
}

    .pagination-btn:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

    .pagination-btn.active {
        background: #1b6ec2;
        color: white;
        border-color: #1b6ec2;
    }

    .pagination-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* =========================================
   SCHOOL MANAGEMENT - Grid/Form Layouts
   ========================================= */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* =========================================
   SCHOOL MANAGEMENT - Info Box
   ========================================= */

.info-box {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 1rem;
    border-left: 4px solid #1b6ec2;
}

    .info-box.warning {
        background: #fff7ed;
        border-color: #ffedd5;
        border-left-color: #f97316;
    }

    .info-box.error {
        background: #fef2f2;
        border-color: #fee2e2;
        border-left-color: #ef4444;
    }

    .info-box.success {
        background: #f0fdf4;
        border-color: #dcfce7;
        border-left-color: #22c55e;
    }

/* =========================================
   SCHOOL MANAGEMENT - Badge/Tag Styles
   ========================================= */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

    .tag.primary {
        background: #dbeafe;
        border-color: #93c5fd;
        color: #1e40af;
    }

    .tag.success {
        background: #dcfce7;
        border-color: #86efac;
        color: #166534;
    }

    .tag.danger {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #991b1b;
    }

/* =========================================
   SCHOOL MANAGEMENT - Modal/Dialog
   ========================================= */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* =========================================
   SCHOOL MANAGEMENT - Form Styles
   ========================================= */

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

    .form-input:focus {
        border-color: #1b6ec2;
        box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.1);
        outline: none;
    }

    .form-input.input-has-icon {
        padding-left: 40px;
    }

.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

/* =========================================
   SCHOOL MANAGEMENT - Stats Card
   ========================================= */

.stat-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

    .stat-box:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

.stat-box-value {
    font-size: 2rem;
    font-weight: 900;
    color: #1b6ec2;
    margin: 0.5rem 0;
}

.stat-box-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

/* =========================================
   SCHOOL MANAGEMENT - Timeline
   ========================================= */

.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: #1b6ec2;
    border: 3px solid white;
    border-radius: 50%;
    margin-top: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #dbeafe;
}

.timeline-content {
    flex: 1;
}

.timeline-time {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.timeline-text {
    color: #1e293b;
    margin: 0.25rem 0 0 0;
}

/* =========================================
   SCHOOL MANAGEMENT - List View
   ========================================= */

.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

    .list-item:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

.list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #1b6ec2;
    font-weight: bold;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.list-item-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

/* =========================================
   SCHOOL MANAGEMENT - Responsive
   ========================================= */

@media (max-width: 1024px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-item,
    .filter-item-large,
    .filter-actions {
        flex: 1;
        width: 100%;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .card-title {
        font-size: 1rem;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .data-table {
        font-size: 0.75rem;
    }

        .data-table th,
        .data-table td {
            padding: 8px 12px;
        }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}
