/* أداة إضافة الملاحظات — أنماط مخصصة */

/* ═══ أرقام الخطوات ═══ */
.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;
}

/* ═══ أزرار اللغة ═══ */
.lang-btn {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
}
.lang-btn:hover { border-color: var(--accent, #f59e0b); }
.lang-btn.active {
    border-color: var(--primary, #1a3c6e);
    background: #eff6ff;
    color: var(--primary, #1a3c6e);
}

/* ═══ أزرار القوالب ═══ */
.preset-btn {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
}
.preset-btn:hover { border-color: var(--accent, #f59e0b); }
.preset-btn.active {
    border-color: var(--accent, #f59e0b);
    background: #fffbeb;
    color: #92400e;
}

/* ═══ جدول العتبات ═══ */
.thresholds-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.thresholds-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.thresholds-table th {
    padding: 10px 12px;
    background: #f1f5f9;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}
.thresholds-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
}
.thresholds-table input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
}
.thresholds-table input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
}
.thresholds-table input:focus {
    outline: none;
    border-color: var(--primary, #1a3c6e);
    box-shadow: 0 0 0 2px rgba(26,60,110,0.1);
}
.remove-row-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.remove-row-btn:hover { background: #fef2f2; }
.add-row-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: none;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all 0.2s;
}
.add-row-btn:hover { border-color: var(--primary, #1a3c6e); color: var(--primary, #1a3c6e); }

/* ═══ الأوزان ═══ */
.weights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.weight-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}
.weight-item label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.weight-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.weight-input-wrap input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}
.weight-input-wrap input:focus {
    outline: none;
    border-color: var(--primary, #1a3c6e);
}
.weight-input-wrap span {
    color: #94a3b8;
    font-weight: 600;
}
.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;
}

/* ═══ حد الدعم ═══ */
.support-threshold-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.support-threshold-wrap input {
    width: 80px;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #dc2626;
}
.support-threshold-wrap input:focus {
    outline: none;
    border-color: #dc2626;
}
.support-threshold-wrap span {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ═══ معاينة البنية ═══ */
.structure-card {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 16px;
}
.structure-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary, #1a3c6e);
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.structure-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
}
.info-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}
.info-value {
    font-size: 0.8rem;
    color: #1e293b;
    font-weight: 700;
}

/* ═══ أزرار الإجراءات ═══ */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .action-buttons { grid-template-columns: 1fr; }
}
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-accent.action-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.btn-accent.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}
.btn-support {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.btn-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

/* ═══ شريط التقدم ═══ */
.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; }
}
.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}
