/**
 * نظام إدارة الديون المالية
 * ملف الأنماط الرئيسي
 * ======================
 */

/* ==================== المتغيرات العامة ==================== */
:root {
    /* الألوان الأساسية - تصميم احترافي فاتح */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #6366F1;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* الخلفيات */
    --bg: #F8FAFC;
    --bg-light: #FFFFFF;
    --card: #FFFFFF;
    --card-hover: #F1F5F9;
    
    /* النصوص */
    --text: #1E293B;
    --text-sec: #64748B;
    --text-light: #94A3B8;
    
    /* الحدود والظلال */
    --border: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* الأبعاد */
    --radius: 12px;
    --radius-lg: 16px;
}

/* ==================== الأساسيات ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ==================== شاشة الدخول ==================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #818CF8 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.2);
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    color: var(--primary);
}

.login-box h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text);
}

.login-box > p {
    color: var(--text-sec);
    margin-bottom: 30px;
}

/* ==================== حقول PIN ==================== */
.pin-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    direction: ltr;
}

.pin-input {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 3px solid var(--border);
    border-radius: 16px;
    font-family: inherit;
    -webkit-text-security: disc;
}

.pin-input:focus {
    outline: none;
    border-color: var(--primary);
}

.pin-input.error {
    border-color: var(--danger);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.login-error {
    color: var(--danger);
    margin-top: 15px;
    font-weight: 600;
    display: none;
}

.login-error.show {
    display: block;
}

.setup-link {
    margin-top: 20px;
    color: var(--text-sec);
    font-size: 0.9rem;
}

.setup-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

/* ==================== التطبيق الرئيسي ==================== */
.app {
    display: none;
}

.app.active {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== الهيدر ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: white;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==================== الأزرار ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: var(--card-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-icon {
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: var(--radius);
    font-size: 1.3rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* ==================== الإحصائيات ==================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.stat-owed .stat-icon { 
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%); 
    color: var(--success);
}
.stat-owing .stat-icon { 
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%); 
    color: var(--danger);
}
.stat-balance .stat-icon { 
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); 
    color: var(--info);
}
.stat-people .stat-icon { 
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%); 
    color: var(--warning);
}

.stat-label {
    color: var(--text-sec);
    font-size: 0.95rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-owed .stat-value { color: var(--success); }
.stat-owing .stat-value { color: var(--danger); }

/* ==================== الإجراءات والبحث ==================== */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: var(--card);
    border-radius: 10px;
    font-family: inherit;
    cursor: pointer;
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ==================== الجدول ==================== */
.table-section {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

th {
    padding: 18px 15px;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: #f8fafc;
}

/* ==================== الشارات ==================== */
.badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.type-له { background: rgba(239,68,68,0.1); color: var(--danger); }
.type-عليه { background: rgba(16,185,129,0.1); color: var(--success); }
.status-pending { background: rgba(245,158,11,0.1); color: var(--warning); }
.status-partial { background: rgba(37,99,235,0.1); color: var(--primary); }
.status-paid { background: rgba(16,185,129,0.1); color: var(--success); }

/* ==================== أزرار الإجراءات ==================== */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.action-btn.edit { background: rgba(37,99,235,0.1); color: var(--primary); }
.action-btn.edit:hover { background: var(--primary); color: white; }

.action-btn.payment { background: rgba(16,185,129,0.1); color: var(--success); }
.action-btn.payment:hover { background: var(--success); color: white; }

.action-btn.delete { background: rgba(239,68,68,0.1); color: var(--danger); }
.action-btn.delete:hover { background: var(--danger); color: white; }

.action-btn.print { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.action-btn.print:hover { background: #8b5cf6; color: white; }

.action-btn.whatsapp { background: rgba(37,211,102,0.1); color: #25d366; }
.action-btn.whatsapp:hover { background: #25d366; color: white; }

/* ==================== الحالة الفارغة ==================== */
.empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

.empty p {
    color: var(--text-sec);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* ==================== المبالغ ==================== */
.amount {
    font-weight: 700;
    font-size: 1.05rem;
}

.amount-pos { color: var(--success); }
.amount-neg { color: var(--danger); }
.overdue { background: rgba(239,68,68,0.05); }

/* ==================== النوافذ المنبثقة ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-small {
    max-width: 400px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.3rem;
}

.close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--border);
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    background: var(--danger);
    color: white;
}

/* ==================== النماذج ==================== */
form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 10px;
}

/* ==================== الدفع والحذف ==================== */
.payment-info {
    text-align: center;
    padding: 15px;
    background: rgba(37,99,235,0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.delete-warning {
    text-align: center;
    font-size: 1.2rem;
    padding: 20px;
}

.delete-info {
    text-align: center;
    color: var(--text-sec);
    margin-bottom: 20px;
}

/* ==================== الإشعارات ==================== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    z-index: 2000;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ==================== PWA تثبيت التطبيق ==================== */
#installBtn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==================== كشف الحساب ==================== */
.statement-modal {
    max-width: 700px;
}

.statement-header {
    text-align: center;
    padding: 30px;
    border-bottom: 2px dashed var(--border);
}

.statement-header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.statement-header .date {
    color: var(--text-sec);
}

.person-info {
    padding: 20px 25px;
    background: var(--bg);
}

.person-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.person-info p {
    color: var(--text-sec);
    margin: 5px 0;
}

.statement-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px 25px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: var(--bg);
    border-radius: 12px;
}

.summary-item .label {
    font-size: 0.85rem;
    color: var(--text-sec);
    margin-bottom: 5px;
}

.summary-item .value {
    font-size: 1.3rem;
    font-weight: 700;
}

.summary-item.total-owed .value { color: var(--success); }
.summary-item.total-owing .value { color: var(--danger); }

.statement-table {
    padding: 0 25px 25px;
}

.statement-table table {
    width: 100%;
    margin-top: 15px;
}

.statement-table th {
    background: var(--text);
    color: white;
    padding: 12px;
}

.statement-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.statement-footer {
    text-align: center;
    padding: 20px;
    border-top: 2px dashed var(--border);
    color: var(--text-sec);
    font-size: 0.9rem;
}

.print-btn {
    background: var(--primary);
    color: white;
}

/* ==================== تنسيقات الطباعة ==================== */
@media print {
    body * { visibility: hidden; }
    #statementModal, #statementModal * { visibility: visible !important; }
    #statementModal {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: white !important;
        display: flex !important;
    }
    .modal { background: white !important; display: block !important; }
    .modal-content {
        box-shadow: none !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    .close-btn, .form-actions, .modal-header { display: none !important; }
    .statement-header { padding-top: 20px; }
    .badge { border: 1px solid #ccc; }
    .statement-table th {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .summary-item { border: 1px solid #ddd; }
}

/* ==================== صفحة الطباعة المنفصلة ==================== */
.print-page {
    display: none;
    background: white;
    padding: 40px;
    font-family: 'Tajawal', sans-serif;
}

/* ==================== التجاوب مع الشاشات ==================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    .actions {
        flex-direction: column;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    .action-btns {
        flex-direction: column;
        gap: 5px;
    }
    .pin-input {
        width: 50px;
        height: 58px;
        font-size: 1.5rem;
    }
}

/* ==================== إشعارات الاستحقاق ==================== */
.notification-content {
    text-align: center;
}

.notification-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.notification-content h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.notification-section {
    text-align: right;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
}

.notification-section.overdue {
    background: rgba(239, 68, 68, 0.1);
}

.notification-section.upcoming {
    background: rgba(245, 158, 11, 0.1);
}

.notification-section h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text);
}

.notification-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-section li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.notification-section li:last-child {
    border-bottom: none;
}

.notification-section .name {
    font-weight: 600;
    flex: 1;
}

.notification-section .amount {
    color: var(--danger);
    font-weight: 700;
    margin: 0 10px;
}

.notification-section .days {
    font-size: 0.8rem;
    color: var(--text-sec);
}

.notification-section.overdue .days {
    color: var(--danger);
}

.notification-section.upcoming .days {
    color: var(--warning);
}

/* ==================== الرسوم البيانية ==================== */
.chart-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.chart-section h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 15px;
    text-align: center;
}

.chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

#amountChart {
    display: block;
    margin: 0 auto;
}

/* الإحصائيات النصية */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    text-align: center;
    padding: 15px 10px;
    background: var(--bg);
    border-radius: 12px;
}

.stat-box.danger {
    background: rgba(239, 68, 68, 0.1);
}

.stat-box .stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-box.danger .stat-number {
    color: var(--danger);
}

.stat-box .stat-label {
    font-size: 0.8rem;
    color: var(--text-sec);
    margin-top: 5px;
}

/* شريط التقدم */
.progress-section {
    margin-top: 20px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-sec);
}

.progress-bar {
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: 6px;
    transition: width 0.5s ease;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container {
        flex-direction: column;
    }
}

/* ==========================================
   أنماط إرفاق الصور
   ========================================== */

.file-input-container {
    margin-top: 10px;
}

.file-input {
    display: none;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-sec);
}

.file-input-label:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary);
}

.file-input-label svg {
    width: 20px;
    height: 20px;
}

.image-preview-container {
    margin-top: 12px;
    display: none;
}

.image-preview-container.has-image {
    display: block;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
}

.image-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* زر عرض الصورة في البطاقة */
.view-image-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.view-image-btn:hover {
    background: #0284c7;
    transform: scale(1.02);
}

.view-image-btn svg {
    width: 14px;
    height: 14px;
}

/* نافذة عرض الصورة */
.view-image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    padding: 20px;
}

.view-image-modal-content img {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.image-modal-header h3 {
    margin: 0;
    color: var(--text);
}

.close-image-modal-btn {
    background: var(--bg-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-sec);
    transition: all 0.2s ease;
}

.close-image-modal-btn:hover {
    background: var(--danger);
    color: white;
}

/* ==========================================
   نافذة تأكيد الدفعة
   ========================================== */

.payment-confirm-details {
    padding: 15px 25px;
}

.confirm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.confirm-item:last-child {
    border-bottom: none;
}

.confirm-label {
    color: var(--text-sec);
    font-size: 0.95rem;
}

.confirm-value {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.confirm-value.success {
    color: var(--success);
}

.confirm-value.danger {
    color: var(--danger);
}

.payment-confirm-actions {
    padding: 15px 25px 25px;
    gap: 10px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.02);
}

.btn-whatsapp svg {
    flex-shrink: 0;
}
