﻿/*        FORM Header     */

h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* ========================= */
/*        FORM CONTAINER     */
/* ========================= */

.form-card {
    max-width: 800px;
    margin-right: 0;
    margin-left: auto;
    margin-top: 20px;
}

/* ========================= */
/*            CARD           */
/* ========================= */

.rz-card.form-card {
    max-width: 800px;
    margin-left: auto;
    border-radius: 12px;
    padding: 25px;
    background: #ffffff !important;
    border: 1px solid #ff6a00;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}

    .rz-card.form-card:hover {
        box-shadow: 0 10px 15px #ff6a00 !important;
    }


/* ========================= */
/*        EXPENSE FORM       */
/* ========================= */

.rz-card.form-exp-card {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    margin-top: 20px;
    border-radius: 12px;
    padding: 25px;
    background: #ffffff !important;
    border: 1px solid #ff6a00;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}

    .rz-card.form-exp-card:hover {
        box-shadow: 0 10px 15px #ff6a00 !important;
    }
/* ========================= */
/*           FIELDS          */
/* ========================= */

.rz-form-field {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 6px;
}

.rz-form-field-label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #374151;
}

/* ========================= */
/*            INPUTS         */
/* ========================= */

.rz-inputtext,
.rz-dropdown,
.rz-numeric-input,
.rz-textarea {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    transition: all .2s;
}

    .rz-inputtext:focus,
    .rz-dropdown:focus,
    .rz-numeric-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37,99,235,.15);
    }

.rz-textarea {
    border-radius: 8px;
}

/* ========================= */
/*           BUTTONS         */
/* ========================= */

.rz-button {
    border-radius: 6px;
}

/* ========================= */
/*        FORM ACTIONS       */
/* ========================= */

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

    .form-actions .rz-button {
        min-width: 100px;
    }

.form-btn {
    flex: 1;
}

/* ========================= */
/*      GRID PAGE CARD       */
/* ========================= */

.grid-page-card {
    max-width: 1100px;
    margin-left: auto;
    margin-top: 20px;
}

/* ========================= */
/*        FILTER BAR         */
/* ========================= */

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.filter-btn {
    display: flex;
    align-items: flex-end;
}

/* ========================= */
/*       DISCOUNT BAR        */
/* ========================= */

.discount-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ========================= */
/*            MOBILE         */
/* ========================= */

@media (max-width:768px) {

    .form-card {
        max-width: 100%;
        margin: 0;
    }

    .grid-page-card {
        max-width: 100%;
        margin: 0;
    }

    .rz-card {
        padding: 18px;
    }

    .rz-stack {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions {
        flex-direction: column;
    }

        .form-actions .rz-button {
            width: 100%;
        }

    .form-btn {
        width: 100%;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-item {
        width: 100%;
    }

    .filter-btn {
        width: 100%;
    }

    .discount-bar {
        flex-direction: column;
        align-items: stretch;
    }

    /* ========================= */
    /*        FORM SECTIONS      */
    /* ========================= */

    .form-section-title {
        font-size: 18px;
        font-weight: 600;
        margin-top: 20px;
        margin-bottom: 10px;
        padding-bottom: 5px;
        border-bottom: 1px solid #e5e7eb;
        color: #374151;
    }

    .customer-badge {
        display: block;
        width: 100%;
        text-align: center;
        padding: 6px;
        border-radius: 6px;
        font-size: 13px;
    }

    .customer {
        background: #d1fae5;
        color: #065f46;
    }

    .visitor {
        background: #fee2e2;
        color: #991b1b;
    }
}

/* ========================= */
/*      DISCOUNT INPUT       */
/* ========================= */

.discount-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.percent {
    font-weight: 600;
}

/* ========================= */
/*      MOBILE FIXES         */
/* ========================= */

@media (max-width:768px) {


    .actions-row {
        flex-direction: row;
    }

        .actions-row .rz-button {
            flex: 1;
        }


    /* زر عرض البيانات */

    .filter-btn .rz-button {
        width: 100%;
    }

    /* خصم عام */

    .discount-bar {
        align-items: flex-start;
    }

    .discount-input {
        width: 100%;
    }

    /* ========================= */
    /*      GRID → CARDS         */
    /* ========================= */


    .normal-grid .rz-data-grid-table thead {
        display: none;
    }

    .normal-grid .rz-data-grid-table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #ff6a00;
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .normal-grid .rz-data-grid-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border: none;
        font-size: 14px;
    }

    .normal-grid .rz-data-grid-table td::before {
        content: attr(data-label);
        font-weight: 600;
    }



    /* الكارت */
    .normal-grid .rz-data-grid-data tr {
        display: block;
        direction: rtl;
        background: #fff;
        border: 1px solid #ff6a00;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        margin-bottom: 12px;
        padding: 12px;
    }

    /* الخلايا */
    .normal-grid .rz-data-grid-data td {
        display: block;
        width: 100%;
        border: none;
        padding: 6px 0;
        text-align: right !important;
    }

        .normal-grid .rz-data-grid-data td * {
            text-align: right !important;
        }

    /* النص داخل الخلية (المهم) */
    .normal-grid .rz-cell-data {
        width: 100%;
        text-align: right !important;
        direction: rtl;
    }

}

.price-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.price-input {
    display: flex;
    align-items: center;
    gap: 6px;
}


.units-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.actions-row {
    display: flex;
    gap: 15px;
}

    .actions-row .rz-button {
        flex: 1;
    }