/* أداة حساب المعدل العام — أنماط مخصصة */

/* ═══ أرقام الخطوات ═══ */
.step-num {
    width: 32px;
    height: 32px;
    background: #cbd5e1;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    flex-shrink: 0;
}
.step-num.active {
    background: var(--primary, #1a3c6e);
    box-shadow: 0 2px 8px rgba(26,60,110,0.3);
}
.step-num.done {
    background: #10b981;
}
.step-disabled {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.4s;
}

/* ═══ بطاقات المستوى ═══ */
.level-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}
.level-card:hover {
    border-color: var(--accent, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.level-card.selected {
    border-color: var(--primary, #1a3c6e);
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 4px 16px rgba(26,60,110,0.15);
}
.level-icon { font-size: 2.5rem; }
.level-name { font-size: 1.1rem; font-weight: 700; color: #1e293b; }
.level-hint { font-size: 0.8rem; color: #94a3b8; }

/* ═══ قسم الإعدادات ═══ */
.settings-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
}
.settings-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

/* ═══ الأوزان ═══ */
.weights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 640px) {
    .weights-grid {
        grid-template-columns: 1fr;
    }
}
.weight-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 10px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    background: #fff;
    transition: all 0.3s;
}
/* الفروض الكتابية */
.weight-box:nth-child(1) { border-color: #93c5fd; background: #eff6ff; }
.weight-box:nth-child(1) label { color: #1e3a8a; }
.weight-box:nth-child(1) input { color: #1d4ed8; background: #fff; border: 2px solid #bfdbfe; }
.weight-box:nth-child(1) input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }
.weight-box:nth-child(1) span { color: #3b82f6; border: 2px solid #bfdbfe; }

/* الفرض الشفهي */
.weight-box:nth-child(2) { border-color: #c4b5fd; background: #f5f3ff; }
.weight-box:nth-child(2) label { color: #4c1d95; }
.weight-box:nth-child(2) input { color: #6d28d9; background: #fff; border: 2px solid #ddd6fe; }
.weight-box:nth-child(2) input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.2); }
.weight-box:nth-child(2) span { color: #8b5cf6; border: 2px solid #ddd6fe; }

/* الأنشطة (تلقائي) */
.weight-box:nth-child(3) { border-color: #6ee7b7; background: #ecfdf5; }
.weight-box:nth-child(3) label { color: #064e3b; }
.weight-box:nth-child(3) input { color: #047857; background: #f1f5f9; border: 2px solid #a7f3d0; opacity: 0.9; }
.weight-box:nth-child(3) span { color: #10b981; border: 2px solid #a7f3d0; }

.weight-box label {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
}
.weight-input-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.weight-input-square input {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    transition: all 0.3s;
    -moz-appearance: textfield;
}
.weight-input-square input::-webkit-outer-spin-button,
.weight-input-square input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.weight-input-square input:focus {
    outline: none;
    transform: translateY(-3px);
}
.weight-input-square span {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}
.weight-input-square.disabled input {
    cursor: not-allowed;
}
.weight-warning {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 600;
}
.weight-ok {
    margin-top: 8px;
    padding: 8px 12px;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ═══ منطقة رفع الملف ═══ */
.file-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s;
}
.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: var(--primary, #1a3c6e);
    background: #eff6ff;
}
.file-drop-zone .icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: inline-block;
}
.file-drop-zone .hint {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ═══ شريط التقدم ═══ */
.progress-wrap {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary, #1a3c6e), var(--accent, #f59e0b));
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s;
    animation: progressPulse 1.5s infinite;
}
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
