﻿
:root {
    /* ===== Color Palette ===== */
    /* Primary Colors */
    --primary: #0E6B8C;
    --primary-light: #268BB0;
    --primary-dark: #094d66;
    /* Background Colors */
    --bg-main: #f5f8fc;
    --bg-card: #ffffff;
    --bg-text: #fafdff;
    /* Text Colors */
    --text-white: #ffffff;
    --text-dark: #2b2d42;
    --text-muted: #64748b;
    /* ===== Status Colors ===== */
    /* Success */
    --success: #2ecc71;
    --success-light: #dcfce7;
    --success-light2: #bbf7d0;
    --success-dark: #166534;
    /* Danger */
    --danger: #e63946;
    --danger-light: #fee2e2;
    --danger-light2: #fee2e2;
    --danger-dark: #991b1b;
    /* Warning */
    --warning: #f4a261;
    --warning-light: #fefce8;
    --warning-light2: #fef3c7;
    --warning-dark: #f59e0b;
    /* Surface */
    --surface: #f5f7fa;
    --surface-light: #f1f5f9;
    --surface-light2: #cbd5e1;
    --surface-dark: #475569;
    /* Info */
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-light2: #bfdbfe;
    --info-dark: #1e40af;
    /* ===== Borders & Shadows ===== */
    --border-color: #eef2f6;
    --border: 1px solid var(--border-color);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    /* ===== Transaction Type Colors ===== */
    --tx-sale: #4A90D9;
    --tx-sale-bg: #dbeafe;
    --tx-purchase: #F5A623;
    --tx-purchase-bg: #fef3c7;
    --tx-receipt: #27AE60;
    --tx-receipt-bg: #d1fae5;
    --tx-payment: #E74C3C;
    --tx-payment-bg: #fee2e2;
    --tx-journal: #8B5CF6;
    --tx-journal-bg: #ede4ff;
    /**/
    /* قيد دين */
    --tx-debt-entry: #DC2626;
    --tx-debt-entry-bg: #FEE2E2;
    /* رصيد افتتاحي */
    --tx-opening-balance: #0EA5A4;
    --tx-opening-balance-bg: #CCFBF1;
    /* تحويل */
    --tx-transfer: #6366F1;
    --tx-transfer-bg: #E0E7FF;
    /* تسوية مخزون */
    --tx-stock-adjustment: #6B7280;
    --tx-stock-adjustment-bg: #F3F4F6;
    /* مردود مشتريات */
    --tx-purchase-return: #F97316;
    --tx-purchase-return-bg: #FFEDD5;
    /* مردود مبيعات */
    --tx-sale-return: #EC4899;
    --tx-sale-return-bg: #FCE7F3;
    /* ===== Layout ===== */
    --header-height: 60px;
    --nav-height: 70px;
    --max-width: 420px;
    /* ===== Scrollbar ===== */
    --scrollbar-width: 6px;
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb-start: #0E6B8C;
    --scrollbar-thumb-end: #0a526d;
    --scrollbar-radius: 10px;
    --scrollbar-margin: 8px;
}

@supports (color:color-mix(in lab, red, red)) {
    :root {
        --danger-light: color-mix(in srgb, var(--danger) 10%, white);
        --danger-light2: color-mix(in srgb, var(--danger) 24%, white);
        --danger-dark: color-mix(in srgb, var(--danger) 82%, black);
        
        --success-light: color-mix(in srgb, var(--success) 10%, white);
        --success-light2: color-mix(in srgb, var(--success) 24%, white);
        --success-dark: color-mix(in srgb, var(--success) 82%, black);
        
        --warning-light: color-mix(in srgb, var(--warning) 10%, white);
        --warning-light2: color-mix(in srgb, var(--warning) 24%, white);
        --warning-dark: color-mix(in srgb, var(--warning) 82%, black);
        
        --info-light: color-mix(in srgb, var(--info) 10%, white);
        --info-light2: color-mix(in srgb, var(--info) 24%, white);
        --info-dark: color-mix(in srgb, var(--info) 82%, black);
        
        --surface-light: color-mix(in oklab, var(--surface) 50%, transparent);
        --surface-light2: color-mix(in srgb, var(--text-dark) 8%, var(--surface));
        --surface-dark: color-mix(in srgb, var(--text-dark) 88%, white);
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo','Tajawal', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
}

body {
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
}

/* ═══════════════════════════════════════ */
/*           APP FRAME                     */
/*          الإطار الرئيسي                  */
/* ═══════════════════════════════════════ */
.app-frame {
    width: 100%;
    height: 100vh;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ===== منطقة التمرير ===== */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: calc(var(--nav-height) + 14px);
    scrollbar-width: none;
}

    .content-area::-webkit-scrollbar {
        display: none;
    }

/* ═══════════════════════════════════════ */
/*           CARDS LIST                    */
/*          قائمة الكروت                   */
/* ═══════════════════════════════════════ */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cards {
    background: var(--bg-card);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border: var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp .4s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: none;
    }
}

.cards:hover {
    border-color: var(--primary-light);
    box-shadow: 0 12px 28px -8px rgba(0,0,0,0.08);
}

.cards:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.cards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 2px solid #e9f0f5;
    padding: 10px 0;
}

    .cards-header .cards-title {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 700;
        font-size: 1.2rem;
        color: var(--primary-dark);
    }

        .cards-header .cards-title i {
            color: var(--primary);
            font-size: 1.2rem;
        }

.cards-body {
    display: flex;
    flex-direction: column;
    padding: 14px;
}

/* ===== Card Top Section ===== */
.cards-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cards-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

    /* ─── Icon Colors ─── */
    .cards-icon.color-1 {
        background: #7c3aed;
    }

    .cards-icon.color-2 {
        background: #db2777;
    }

    .cards-icon.color-3 {
        background: #ea580c;
    }

    .cards-icon.color-4 {
        background: #059669;
    }

    .cards-icon.color-5 {
        background: #0284c7;
    }

    .cards-icon.color-6 {
        background: #4f46e5;
    }

    .cards-icon.color-7 {
        background: #0d9488;
    }

    .cards-icon.color-8 {
        background: #b45309;
    }

    .cards-icon.color-9 {
        background: #6d28d9;
    }
    .cards-icon.color-10 {
        background: #6d28d9;
    }

.cards-info {
    flex: 1;
    min-width: 0;
}

.cards-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.cards-code {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

    .cards-code i {
        font-size: 0.75rem;
        opacity: 0.6;
    }


.cards-detail {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.9rem;
    color: #475569;
}

    .cards-detail i {
        color: #64748b;
        width: 18px;
        font-size: 0.85rem;
    }
    .cards-detail.small {
        font-size: 0.65rem;
    }

.cards-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

    /* ─── Badge Status ─── */
    .cards-badge .status {
        font-size: 0.6rem;
        font-weight: 700;
        padding: 2px 10px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 3px;
    }
        .cards-badge .status i {
            font-size: 0.6rem;
            opacity: 0.6;
        }

        .cards-badge .status.success {
            background: var(--success-light);
            border-color: var(--success-light2);
            color: var(--success-dark);
        }

        .cards-badge .status.danger {
            background: var(--danger-light);
            border-color: var(--danger-light2);
            color: var(--danger-dark);
        }

        .cards-badge .status.warning {
            background: var(--warning-light);
            border-color: var(--warning-light2);
            color: var(--warning-dark);
        }

        .cards-badge .status.info {
            background: var(--info-light);
            border-color: var(--info-light2);
            color: var(--info-dark);
        }

        .cards-badge .status.surface {
            background: var(--surface-light);
            border-color: var(--surface-light2);
            color: var(--surface-dark);
        }

    .cards-badge .balance,
    .cards-badge .price {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--primary);
    }

    .cards-badge .balance {
        padding: 0 16px;
        margin-bottom: 3px;
        border-radius: 14px;
        border: solid 1px;
    }

/* ===== Details Row ===== */
.cards-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: #fafcff;
    padding: 5px 14px;
    border-radius: 16px;
    margin-bottom: 10px;
    border: 1px solid #eef2f6;
}

    .cards-details-row .detail-item {
        display: flex;
        align-items: center;
        gap: 3px;
        opacity: 0.9;
        font-size: 0.70rem;
        font-weight: 700;
    }

        .cards-details-row .detail-item i {
            color: var(--text-muted);
            font-size: 0.75rem;
            opacity: 0.7;
            width: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cards-details-row .detail-item .name {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-dark);
        }

        .cards-details-row .detail-item .value {
            font-weight: 600;
            color: var(--text-muted);
        }

/* ═══════════════════════════════════════ */
/*           Buttons Actio                 */
/* ═══════════════════════════════════════ */
.actions {
    display: flex;
    justify-content: end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top:  var(--border);
}

.action-btn {
    border: none;
    outline: none;
    border-radius: 7px;
    padding: 5px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
    .action-btn i {
        font-size: 0.9rem;
        opacity:0.75;
    }
    .action-btn:focus-visible {
        outline: 3px solid;
    }
    .action-btn:hover {
        filter: brightness(0.97);
    }
    .action-btn:active {
        transform: scale(0.95);
        filter: brightness(0.90);
    }

    /* ─── Buttons Types ─── */
    .action-btn.edit {
        background: var(--success-light);
        color: #065f46;
        outline-color: var(--success-light2);
    }
    .action-btn.delete {
        background: var(--danger-light);
        color: var(--danger-dark);
        outline-color: var(--danger-light2);
    }
    .action-btn.default {
        background: var(--info-light);
        color: var(--info-dark);
        outline-color: var(--info-light2);
    }


/* ═══════════════════════════════════════ */
/*           MODAL OVERLAY                 */
/* ═══════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 77, 102, 0.35);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

    .modal-overlay.open {
        display: flex;
    }

/* ===== Modal Content ===== */
.modal-content {
    background: white;
    width: 100%;
    max-width: 540px;
    border-radius: 16px;
    box-shadow: 0 40px 80px -20px rgba(9, 77, 102, 0.35);
    padding: 10px 20px;
    animation: modalFade 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

    /* ─── Custom Scrollbar ─── */
    .modal-content::-webkit-scrollbar {
        width: var(--scrollbar-width);
        height: var(--scrollbar-width);
    }

    .modal-content::-webkit-scrollbar-track {
        background: transparent;
        border-radius: var(--scrollbar-radius);
        margin: var(--scrollbar-margin) 0;
    }

    .modal-content::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: var(--scrollbar-radius);
        transition: all 0.3s ease;
        border: 1px solid transparent;
        background-clip: padding-box;
    }

    .modal-content:hover::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
    }

    .modal-content:hover::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--scrollbar-thumb-start), var(--scrollbar-thumb-end));
    }

    .modal-content::-webkit-scrollbar-thumb:hover {
        transform: scale(1.05);
        background: linear-gradient(180deg, #1a8ab3, #0E6B8C) !important;
    }

@keyframes modalFade {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== Modal Header ===== */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 2px solid #e9f0f5;
    padding: 10px 0;
}

    .modal-header .modal-title {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 700;
        font-size: 1.2rem;
        color: var(--primary-dark);
    }

        .modal-header .modal-title i {
            color: var(--primary);
            font-size: 1.2rem;
        }

    .modal-header .modal-close {
        background: transparent;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 60px;
        font-size: 1.2rem;
        cursor: pointer;
        transition: 0.1s;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #2c4a5a;
    }

    .modal-close:hover {
        background: #f0f7fa;
        color: var(--primary-dark);
    }

/* ===== Modal Body ===== */
.modal-body {
    display: flex;
    flex-direction: column;
    padding:14px;
}

/* ═══════════════════════════════════════ */
/*           SEARCH BAR                    */
/* ═══════════════════════════════════════ */
.search-bar {
    margin-bottom: 16px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--text-white);
    border-radius: 80px;
    border: 1.5px solid #dde9f0;
    transition: 0.2s;
    padding: 5px;
    width: 100%;
    gap:5px;
}

    .search-input-wrap:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(14, 107, 140, 0.15);
        background: white;
    }

    .search-input-wrap input {
        flex: 1;
        min-width: 0;
        border: none;
        background: transparent;
        padding: 0 16px;
        font-size: 1rem;
        font-family: inherit;
        outline: none;
        color: #0f172a;
    }

        .search-input-wrap input::placeholder {
            color: #8ba3b3;
            font-weight: 300;
        }

.search-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-icon {
    background: var(--primary);
    border: none;
    border-radius: 60px;
    padding: 10px 24px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 8px;
    cursor: pointer;
    transition: 0.15s;
    font-size: 0.95rem;
    font-family: inherit;
    letter-spacing: 0.3px;
}

    .search-icon:hover {
        background: var(--primary-dark);
        transform: scale(1.02);
    }

    .search-icon i {
        font-size: 1rem;
    }

.clear-search {
    width: 30px;
    height: 30px;
    padding: 5px;
    border-radius: 50%;
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s;
}
    .clear-search:hover {
        color: var(--danger);
        background: var(--danger-light);
    }

.filter-btn {
    background: #f8fafc;
    color: var(--primary);
    border: 1.5px solid #dde9f0;
    border-radius: 60px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 8px;
    cursor: pointer;
    transition: .2s;
    font-size: .95rem;
    font-family: inherit;
    white-space: nowrap;
}

    .filter-btn:hover {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

    .filter-btn i {
        font-size: 1rem;
    }

.extra-filters {
    display: none;
    margin: 12px 0;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 12px;
}
.extra-filters {
    display: none;
}

    .extra-filters.show {
        display: block;
    }

@media (max-width: 380px) {
    .search-input-wrap {
        display: block;
        background: transparent;
        border-radius: 0;
        border: none;
        padding: 0;
    }

        .search-input-wrap input {
            min-width: 100%;
            background: var(--text-white);
            border-radius: 80px;
            border: 1.5px solid #dde9f0;
            padding: 8px 16px;
            margin-bottom: 5px;
        }

    .search-icon {
        flex: 1;
    }

    .filter-btn {
        flex: 1;
    }
}

    /* ═══════════════════════════════════════ */
    /*           FAB ADD                       */
    /*       زر الإضافة العائم                  */
    /* ═══════════════════════════════════════ */
    .fab-add {
        position: fixed;
        bottom: calc(var(--nav-height) + 14px);
        left: 32px;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        background: var(--primary);
        border: none;
        color: white;
        font-size: 2rem;
        box-shadow: 0 8px 24px rgba(14, 107, 140, 0.35);
        cursor: pointer;
        transition: 0.15s;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99;
    }

        .fab-add:hover {
            background: var(--primary-light);
            transform: scale(1.04);
        }

    /* ═══════════════════════════════════════ */
    /*           FORM                          */
    /* ═══════════════════════════════════════ */
    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 14px;
    }

        .form-group label {
            font-weight: 600;
            font-size: 0.85rem;
        }

            .form-group label i {
                color: var(--primary);
                font-size: 13px;
                opacity: 0.7;
            }

        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 10px 18px;
            border-radius: 10px;
            font-size: 0.9rem;
            transition: 0.15s;
            width: 100%;
            background: var(--bg-text);
            color: var(--text-dark);
            border: var(--border);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 70px;
        }

            .form-group input:focus,
            .form-group select:focus,
            .form-group textarea:focus {
                border-color: var(--primary);
                outline: none;
                box-shadow: 0 0 0 4px rgba(14, 107, 140, 0.2);
            }

    /* ===== Switch ===== */
    .switch-container {
        display: flex;
        flex-direction: column;
    }

    .switch-wrapper {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding-top: 0.25rem;
    }

        .switch-wrapper .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }

            .switch-wrapper .switch input {
                opacity: 0;
                width: 0;
                height: 0;
            }

            .switch-wrapper .switch .slider {
                position: absolute;
                cursor: pointer;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: #ccc;
                transition: 0.4s;
                border-radius: 24px;
            }

                .switch-wrapper .switch .slider:before {
                    position: absolute;
                    content: "";
                    height: 16px;
                    width: 16px;
                    left: 4px;
                    bottom: 4px;
                    background-color: white;
                    transition: 0.4s;
                    border-radius: 50%;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
                }

            .switch-wrapper .switch input:checked + .slider {
                background-color: var(--primary);
            }

                .switch-wrapper .switch input:checked + .slider:before {
                    transform: translateX(20px);
                }

            .switch-wrapper .switch input:focus + .slider {
                box-shadow: 0 0 0 3px var(--border-color);
            }

            .switch-wrapper .switch:hover .slider {
                opacity: 0.9;
            }

    /* ===== Form Actions ===== */
    .form-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        padding-top: 16px;
        border-top: var(--border);
    }

        .form-actions .btn {
            /* flex: 1;*/
            padding: 12px 28px;
            border-radius: 60px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            font-size: 0.95rem;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            justify-content: center;
        }

        .form-actions .btn-secondary {
            background: var(--bg-main);
            color: var(--primary-dark);
            border: var(--border);
        }

            .form-actions .btn-secondary:hover {
                background: #d5e3eb;
            }

        .form-actions .btn-primary {
            background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
            color: white;
            box-shadow: 0 4px 16px rgba(14, 107, 140, 0.25);
        }

            .form-actions .btn-primary:hover {
                background: linear-gradient(135deg, var(--primary-dark), var(--primary));
                transform: scale(1.02);
                box-shadow: 0 2px 8px rgba(14, 107, 140, 0.15);
            }

        .form-actions .btn-success {
            background: linear-gradient(135deg,var(--success-dark),var(--success));
            color: white;
            box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
        }

            .form-actions .btn-success:hover {
                transform: scale(1.02);
            }

        .form-actions .btn-danger {
            background: linear-gradient(135deg,var(--danger-dark), var(--danger));
            color: white;
            box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
        }

            .form-actions .btn-danger:hover {
                transform: scale(1.02);
            }

    /* ===== validation ===== */
    .required {
        color: var(--danger);
        font-weight: 700;
    }

    .validation-message {
        display: block;
        color: var(--danger-dark);
        font-size: 0.85rem;
        line-height: 1.4;
        font-weight: 500;
    }

        .validation-message:not(:empty)::before {
            content: "\f071";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            margin-left: 5px;
        }

    .validation-summary-valid {
        display: none;
    }



    .card {
        background: var(--bg-card);
        border-radius: 16px;
        padding: 16px;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        margin-top: 4px;
    }

    .details-toggle-container {
        display: flex;
        align-items: center;
        justify-content: end;
    }

    .details-toggle {
        background: var(--bg-main);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 5px 16px;
        font-size: 16px;
        color: var(--text-dark);
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: var(--shadow-sm);
    }

        .details-toggle.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .details-toggle:active {
            transform: scale(0.90);
        }

    /* ===== الحقول الإضافية ===== */
    .extra-fields {
        background: var(--bg-main);
        padding: 15px;
        margin-top: 10px;
        margin-bottom: 15px;
        border-radius: 16px;
        padding: 16px;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .extra-fields {
        display: none;
        animation: slideDown 0.3s ease;
    }

        .extra-fields.open {
            display: block;
        }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }



    /* ===== كلمة المرور ===== */
    .password-wrapper {
        position: relative;
    }

        .password-wrapper input {
            padding-left: 44px;
        }

        .password-wrapper .password-toggle {
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 34px;
            height: 34px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
        }

            .password-wrapper .password-toggle:hover {
                color: var(--primary);
                background: rgba(14, 107, 140, 0.06);
            }

    .password-toggle:active {
        transform: translateY(-50%) scale(0.90);
    }

    .password-wrapper .field-icon {
        position: absolute;
        inset-inline-end: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        opacity: .5;
        pointer-events: none;
        z-index: 1;
    }

    .password-wrapper .password-input {
        padding-inline-end: 42px;
    }

    /* ===== رسائل ===== */
    .validation-summary {
        border-radius: 10px;
        padding: 10px 14px;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        position: relative;
        z-index: 1;
        background: #fee2e2;
        color: #b91c1c;
        border: 1px solid #fecaca;
    }

        .validation-summary ul {
            padding-right: 20px;
        }



    /* ============================================================ */
    /* ===== TOAST ===== */
    /* ============================================================ */
    .toast-container-custom {
        position: fixed;
        top: calc(var(--header-height) + 8px);
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        width: 90%;
        max-width: calc(var(--max-width) - 20px);
    }

        .toast-container-custom .toast-custom {
            background: var(--primary);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            color: #fff;
            padding: 10px 18px;
            border-radius: 12px;
            box-shadow: 0 8px 30px rgba(3, 98, 128, 0.25);
            animation: toastIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.8rem;
            border-right: 4px solid var(--primary-light);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

            .toast-container-custom .toast-custom.info {
                background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(37, 99, 235, 0.92));
                border-right: 4px solid #60a5fa;
                box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35);
                color: #ffffff;
            }

                .toast-container-custom .toast-custom.info i {
                    color: #93c5fd;
                }

            .toast-container-custom .toast-custom.success {
                background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(22, 163, 74, 0.92));
                border-right: 4px solid #4ade80;
                box-shadow: 0 8px 32px rgba(34, 197, 94, 0.35);
                color: #ffffff;
            }

                .toast-container-custom .toast-custom.success i {
                    color: #86efac;
                }

            .toast-container-custom .toast-custom.error {
                background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(220, 38, 38, 0.92));
                border-right: 4px solid #f87171;
                box-shadow: 0 8px 32px rgba(239, 68, 68, 0.35);
                color: #ffffff;
            }

                .toast-container-custom .toast-custom.error i {
                    color: #fca5a5;
                }

            .toast-container-custom .toast-custom.warning {
                background: linear-gradient(135deg, rgba(251, 191, 36, 0.92), rgba(245, 158, 11, 0.92));
                border-right: 4px solid #fbbf24;
                box-shadow: 0 8px 32px rgba(251, 191, 36, 0.35);
                color: #1e293b;
            }

                .toast-container-custom .toast-custom.warning i {
                    color: #fde68a;
                }



            .toast-container-custom .toast-custom .close-toast {
                margin-right: auto;
                background: none;
                border: none;
                color: rgba(255, 255, 255, 0.6);
                cursor: pointer;
                font-size: 0.7rem;
                transition: 0.3s;
            }

                .toast-container-custom .toast-custom .close-toast:hover {
                    color: #fff;
                    transform: rotate(90deg);
                }

            .toast-container-custom .toast-custom i {
                color: var(--primary-light);
            }

    @keyframes toastIn {
        0% {
            opacity: 0;
            transform: translateY(-30px) scale(0.9);
        }

        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }




    #amount {
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--text-muted);
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: start !important;
        gap: 7px;
    }

        .dropdown-item i {
            font-size: 1rem;
            color: var(--primary);
        }