﻿
/* ============================================================ */
/* ===== PARENT CARD ===== */
/* ============================================================ */
.parent-card {
    background: var(--white-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(3, 98, 128, 0.06);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

    .parent-card .parent-avatar {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        color: #fff;
        flex-shrink: 0;
        box-shadow: 0 4px 16px rgba(3, 98, 128, 0.15);
    }

    .parent-card .parent-info {
        flex: 1;
    }

    .parent-card .parent-name {
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--text-dark);
    }

    .parent-card .parent-details {
        display: flex;
        gap: 12px;
        font-size: 0.6rem;
        color: var(--text-muted);
        flex-wrap: wrap;
    }

        .parent-card .parent-details i {
            font-size: 0.5rem;
            color: var(--primary-color);
        }

    .parent-card .parent-badge {
        font-size: 0.55rem;
        background: rgba(3, 98, 128, 0.06);
        padding: 4px 14px;
        border-radius: 30px;
        color: var(--text-muted);
        font-weight: 600;
        white-space: nowrap;
    }

/* ============================================================ */
/* ===== STUDENT LIST ===== */
/* ============================================================ */
.children-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================================ */
/* ===== STUDENT CARD ===== */
/* ============================================================ */
.children-card {
    background: var(--white-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 18px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(3, 98, 128, 0.06);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
    .children-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 44px rgba(3, 98, 128, 0.12);
        border-color: var(--secondary-color);
    }

        .children-card:hover::after {
            transform: scale(1.1);
        }

    /* ===== البطاقة النشطة (الطالب الحالي) ===== */
    .children-card.active {
        border-color: var(--success-color);
    }

        .children-card.active::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 5px;
            height: 100%;
            border-radius: 0 4px 4px 0;
            transition: 0.3s;
            width: 6px;
            background: var(--success-color) !important;
        }

/* ===== الصف العلوي ===== */
.children-card .children-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.children-card .children-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(3, 98, 128, 0.12);
    transition: 0.3s;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.children-card:hover .children-image {
    transform: scale(1.05) rotate(-3deg);
}

.children-card.active .children-image {
    border-color: var(--primary-color);
    box-shadow: 0 4px 24px rgba(3, 98, 128, 0.2);
    transform: scale(1.02);
}

.children-card .children-image.color-1 {
    background: linear-gradient(135deg, #036280, #16c8dd);
}

.children-card .children-image.color-2 {
    background: linear-gradient(135deg, #6c3483, #af7ac5);
}

.children-card .children-image.color-3 {
    background: linear-gradient(135deg, #1a5276, #5dade2);
}

.children-card .children-image.color-4 {
    background: linear-gradient(135deg, #0e6655, #48c9b0);
}

.children-card .children-image.color-5 {
    background: linear-gradient(135deg, #935116, #f0b27a);
}

.children-card .children-image.color-6 {
    background: linear-gradient(135deg, #6c3483, #bb8fce);
}

.children-card .children-info {
    flex: 1;
    min-width: 0;
}

.children-card .children-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: 0.3s;
}

.children-card:hover .children-name {
    color: var(--primary-color);
}

.children-card.active .children-name {
    color: var(--primary-color);
}

.children-card .children-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

    .children-card .children-tags .tag {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 0.6rem;
        font-weight: 600;
        padding: 3px 12px;
        border-radius: 30px;
        transition: 0.3s;
    }

        .children-card .children-tags .tag.class {
            background: linear-gradient(135deg, rgba(3, 98, 128, 0.08), rgba(22, 200, 221, 0.08));
            color: var(--primary-color);
            border: 1px solid rgba(3, 98, 128, 0.06);
        }

        .children-card .children-tags .tag.section {
            background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.04));
            color: var(--success-color);
            border: 1px solid rgba(39, 174, 96, 0.06);
        }

        .children-card .children-tags .tag.id {
            background: rgba(3, 98, 128, 0.03);
            color: var(--text-muted);
            border: 1px solid rgba(3, 98, 128, 0.03);
        }

.children-card.active .children-tags .tag.class {
    background: linear-gradient(135deg, rgba(3, 98, 128, 0.15), rgba(22, 200, 221, 0.15));
    transform: scale(1.02);
}

.children-card.active .children-tags .tag.section {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(39, 174, 96, 0.08));
    transform: scale(1.02);
}

.children-card .status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: 0.3s;
    margin-right: 4px;
}

    .children-card .status-dot.present {
        background: var(--success-color);
    }

    .children-card .status-dot.absent {
        background: var(--danger-color);
    }

    .children-card .status-dot.late {
        background: var(--warning-color);
    }

.children-card:hover .status-dot {
    transform: scale(1.1);
}

/* ===== الملخص ===== */
.children-card .children-card-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(3, 98, 128, 0.06);
    position: relative;
    z-index: 1;
}

    .children-card .children-card-summary .summary-item {
        text-align: center;
        padding: 6px 4px;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        display:block;
    }

.children-card:hover .children-card-summary .summary-item {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(3, 98, 128, 0.04);
}

.children-card.active .children-card-summary .summary-item {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.children-card .children-card-summary .summary-item .summary-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.children-card .children-card-summary .summary-item .summary-label {
    font-size: 0.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 500;
}

    .children-card .children-card-summary .summary-item .summary-label i {
        font-size: 0.45rem;
    }

.children-card .children-card-summary .summary-item.grade {
    background: linear-gradient(135deg, rgba(3, 98, 128, 0.06), rgba(22, 200, 221, 0.04));
    border-color: rgba(3, 98, 128, 0.04);
}

    .children-card .children-card-summary .summary-item.grade .summary-value {
        color: var(--primary-color);
    }

    .children-card .children-card-summary .summary-item.grade .summary-label {
        color: var(--primary-color);
    }

.children-card .children-card-summary .summary-item.present {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.06), rgba(39, 174, 96, 0.03));
    border-color: rgba(39, 174, 96, 0.04);
}

    .children-card .children-card-summary .summary-item.present .summary-value {
        color: var(--success-color);
    }

    .children-card .children-card-summary .summary-item.present .summary-label {
        color: var(--success-color);
    }

.children-card .children-card-summary .summary-item.absent {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.06), rgba(231, 76, 60, 0.03));
    border-color: rgba(231, 76, 60, 0.04);
}

    .children-card .children-card-summary .summary-item.absent .summary-value {
        color: var(--danger-color);
    }

    .children-card .children-card-summary .summary-item.absent .summary-label {
        color: var(--danger-color);
    }

.children-card .children-card-summary .summary-item.late {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.06), rgba(243, 156, 18, 0.03));
    border-color: rgba(243, 156, 18, 0.04);
}

    .children-card .children-card-summary .summary-item.late .summary-value {
        color: var(--warning-color);
    }

    .children-card .children-card-summary .summary-item.late .summary-label {
        color: var(--warning-color);
    }

/* ===== زر الانتقال ===== */
.children-card .children-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(3, 98, 128, 0.04);
    position: relative;
    z-index: 1;
}

    .children-card .children-card-footer .go-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 18px;
        border: none;
        border-radius: 30px;
        font-size: 0.6rem;
        font-weight: 600;
        transition: 0.3s;
        text-decoration: none;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: #fff;
        box-shadow: 0 4px 16px rgba(3, 98, 128, 0.12);
    }

.children-card.active .children-card-footer .go-btn {
    background: linear-gradient(135deg, var(--success-color), #1e8449);
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.15);
}

.children-card .children-card-footer .go-btn i {
    font-size: 0.5rem;
    transition: 0.3s;
}

.children-card .children-card-footer .go-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(3, 98, 128, 0.2);
}

    .children-card .children-card-footer .go-btn:hover i {
        transform: translateX(-4px);
    }

/* ============================================================ */
/* ===== DARK MODE ===== */
/* ============================================================ */
body.dark-mode {
    background: #0d1a26;
}

    body.dark-mode .app-header-fixed {
        background: rgba(13, 26, 38, 0.92);
        border-color: rgba(255, 255, 255, 0.05);
    }

        body.dark-mode .app-header-fixed .header-title {
            color: #e0e8f0;
        }

        body.dark-mode .app-header-fixed .back-btn {
            color: #e0e8f0;
            background: rgba(255, 255, 255, 0.06);
        }

            body.dark-mode .app-header-fixed .back-btn:hover {
                background: rgba(255, 255, 255, 0.12);
            }

        body.dark-mode .app-header-fixed .icon-btn {
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(255, 255, 255, 0.05);
            color: #e0e8f0;
        }

            body.dark-mode .app-header-fixed .icon-btn:hover {
                background: rgba(255, 255, 255, 0.12);
            }

        body.dark-mode .app-header-fixed .badge-dot {
            border-color: #0d1a26;
        }

    body.dark-mode .phone-frame {
        background: rgba(13, 26, 38, 0.9);
    }

    body.dark-mode .page-header-content {
        background: rgba(20, 40, 55, 0.6);
        border-color: rgba(255, 255, 255, 0.05);
    }

    body.dark-mode .page-header-title {
        color: #e0e8f0;
    }

    body.dark-mode .page-header-subtitle {
        color: #8a9aaa;
    }

    body.dark-mode .page-header-icon {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.05);
    }

        body.dark-mode .page-header-icon i {
            color: var(--secondary-color);
        }

    body.dark-mode .parent-card {
        background: rgba(20, 40, 55, 0.6);
        border-color: rgba(255, 255, 255, 0.05);
    }

        body.dark-mode .parent-card .parent-name {
            color: #e0e8f0;
        }

        body.dark-mode .parent-card .parent-details {
            color: #8a9aaa;
        }

    body.dark-mode .children-card {
        background: rgba(20, 40, 55, 0.7);
        border-color: rgba(255, 255, 255, 0.05);
    }

        body.dark-mode .children-card.active {
            background: rgba(20, 40, 55, 0.9);
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 4px rgba(22, 200, 221, 0.06), 0 8px 32px rgba(0, 0, 0, 0.3);
        }

            body.dark-mode .children-card.active .children-name {
                color: var(--secondary-color);
            }

        body.dark-mode .children-card .children-name {
            color: #e0e8f0;
        }

        body.dark-mode .children-card .children-tags .tag.class {
            background: linear-gradient(135deg, rgba(22, 200, 221, 0.08), rgba(3, 98, 128, 0.04));
            color: var(--secondary-color);
            border-color: rgba(22, 200, 221, 0.04);
        }

        body.dark-mode .children-card .children-tags .tag.section {
            background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.04));
            color: #2ecc71;
            border-color: rgba(39, 174, 96, 0.04);
        }

        body.dark-mode .children-card .children-tags .tag.id {
            background: rgba(255, 255, 255, 0.02);
            color: #8a9aaa;
        }

        body.dark-mode .children-card .children-card-summary .summary-item {
            background: rgba(255, 255, 255, 0.03);
            border-color: rgba(255, 255, 255, 0.02);
        }

            body.dark-mode .children-card .children-card-summary .summary-item .summary-value {
                color: #e0e8f0;
            }

            body.dark-mode .children-card .children-card-summary .summary-item .summary-label {
                color: #8a9aaa;
            }

            body.dark-mode .children-card .children-card-summary .summary-item.grade {
                background: linear-gradient(135deg, rgba(22, 200, 221, 0.06), rgba(3, 98, 128, 0.03));
            }

                body.dark-mode .children-card .children-card-summary .summary-item.grade .summary-value {
                    color: var(--secondary-color);
                }

                body.dark-mode .children-card .children-card-summary .summary-item.grade .summary-label {
                    color: var(--secondary-color);
                }

            body.dark-mode .children-card .children-card-summary .summary-item.present {
                background: linear-gradient(135deg, rgba(39, 174, 96, 0.06), rgba(39, 174, 96, 0.03));
            }

                body.dark-mode .children-card .children-card-summary .summary-item.present .summary-value {
                    color: #2ecc71;
                }

                body.dark-mode .children-card .children-card-summary .summary-item.present .summary-label {
                    color: #2ecc71;
                }

            body.dark-mode .children-card .children-card-summary .summary-item.absent {
                background: linear-gradient(135deg, rgba(231, 76, 60, 0.06), rgba(231, 76, 60, 0.03));
            }

                body.dark-mode .children-card .children-card-summary .summary-item.absent .summary-value {
                    color: #e74c3c;
                }

                body.dark-mode .children-card .children-card-summary .summary-item.absent .summary-label {
                    color: #e74c3c;
                }

            body.dark-mode .children-card .children-card-summary .summary-item.late {
                background: linear-gradient(135deg, rgba(243, 156, 18, 0.06), rgba(243, 156, 18, 0.03));
            }

                body.dark-mode .children-card .children-card-summary .summary-item.late .summary-value {
                    color: #f1c40f;
                }

                body.dark-mode .children-card .children-card-summary .summary-item.late .summary-label {
                    color: #f1c40f;
                }

        body.dark-mode .children-card:hover {
            border-color: var(--secondary-color);
        }

            body.dark-mode .children-card:hover .children-name {
                color: var(--secondary-color);
            }

        body.dark-mode .children-card::after {
            background: radial-gradient(circle at 70% 30%, rgba(22, 200, 221, 0.04), transparent 60%);
        }

        body.dark-mode .children-card.active .children-card-footer .go-btn {
            background: linear-gradient(135deg, #0d1a26, #1a2a3a);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--secondary-color);
        }

        body.dark-mode .children-card .children-card-footer .go-btn {
            background: linear-gradient(135deg, #0d1a26, #1a2a3a);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--secondary-color);
        }

            body.dark-mode .children-card .children-card-footer .go-btn:hover {
                background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
                color: #fff;
            }

        body.dark-mode .children-card .active-badge {
            background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
        }

.cursor-pointer{
    cursor:pointer;
}

.form-control {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
}