@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Regular.eot');
    src: url('../fonts/Vazir-Regular.eot?#iefix') format('embedded-opentype'), url('../fonts/Vazir-Regular.woff2') format('woff2'), url('../fonts/Vazir-Regular.woff') format('woff'), url('../fonts/Vazir-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Bold.eot');
    src: url('../fonts/Vazir-Bold.eot?#iefix') format('embedded-opentype'), url('../fonts/Vazir-Bold.woff2') format('woff2'), url('../fonts/Vazir-Bold.woff') format('woff'), url('../fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Black.eot');
    src: url('../fonts/Vazir-Black.eot?#iefix') format('embedded-opentype'), url('../fonts/Vazir-Black.woff2') format('woff2'), url('../fonts/Vazir-Black.woff') format('woff'), url('../fonts/Vazir-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Medium.eot');
    src: url('../fonts/Vazir-Medium.eot?#iefix') format('embedded-opentype'), url('../fonts/Vazir-Medium.woff2') format('woff2'), url('../fonts/Vazir-Medium.woff') format('woff'), url('../fonts/Vazir-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Light.eot');
    src: url('../fonts/Vazir-Light.eot?#iefix') format('embedded-opentype'), url('../fonts/Vazir-Light.woff2') format('woff2'), url('../fonts/Vazir-Light.woff') format('woff'), url('../fonts/Vazir-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/Vazir-Thin.eot');
    src: url('../fonts/Vazir-Thin.eot?#iefix') format('embedded-opentype'), url('../fonts/Vazir-Thin.woff2') format('woff2'), url('../fonts/Vazir-Thin.woff') format('woff'), url('../fonts/Vazir-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

body {
    font-family: "Vazir", "Tahoma", sans-serif !important;
    margin: 0 auto;
    max-width: 768px;
    background: #f5f6fa;
    color: #333;
    padding-top: 60px;
    padding-bottom: 100px;
    direction: rtl;
}

/* هدر ثابت */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 768px;
    margin: 0 auto;
    background: linear-gradient(90deg, #007bff, #00c6ff);
    color: #fff;
    padding: 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 2px solid #0056b3;
    z-index: 1000;
}
/* منوی پایین */
nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 768px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

    nav a {
        text-decoration: none;
        color: #555;
        font-size: 0.85rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

        nav a.active {
            color: #007bff;
            font-weight: bold;
        }

        nav a i {
            font-size: 1.3rem;
            margin-bottom: 0.2rem;
        }

.btn, button {
    font-family: "Vazir", "Tahoma", sans-serif !important;
}

.btn {
    width: 100%;
    padding: 0.9rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    /*margin-top: 1rem;*/
}

    .btn:hover {
        background: #0056b3;
    }
/* بخش برگشت */
.back-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.back-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

    .back-btn i {
        margin-left: 0.4rem;
    }

.back-title {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

    .search-bar input {
        flex: 1;
        padding: 0.8rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .search-bar button {
        padding: 0.8rem 1rem;
        background: #007bff;
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }

        .search-bar button:hover {
            background: #0056b3;
        }

.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-info {
    flex: 1;
}

    .product-info h3 {
        margin: 0;
        font-size: 1rem;
        color: #007bff;
    }

    .product-info p {
        margin: 0.3rem 0;
        font-size: 0.85rem;
        color: #555;
    }

.edit-btn {
    background: #ffc107;
    color: #fff;
}

.delete-btn {
    background: #dc3545;
    color: #fff;
}

.edit-btn:hover {
    background: #e0a800;
}

.delete-btn:hover {
    background: #c82333;
}
/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

    .pagination button {
        border: none;
        padding: 0.6rem 0.9rem;
        border-radius: 6px;
        background: #f0f0f0;
        cursor: pointer;
        font-size: 0.85rem;
    }

        .pagination button.active {
            background: #007bff;
            color: #fff;
            font-weight: bold;
        }

        .pagination button:hover {
            background: #00c6ff;
            color: #fff;
        }

.actions {
    display: flex;
    gap: 0.5rem;
}

    .actions button {
        border: none;
        padding: 0.5rem 0.7rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
    }

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

input, select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

    input:focus {
        border-color: #007bff;
        outline: none;
    }

.product-card-invoice {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-add {
    background: #28a745;
    margin-top: 0.5rem;
}

    .btn-add:hover {
        background: #218838;
    }

.rows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

    .rows span {
        font-size: 0.9rem;
        color: #333;
        font-weight: bold;
    }

.btn-Invoice {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    
}
.btn-delete {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-edit {
    background: #e0a800;
    color: #fff;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.alerts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* بکگراند خاکستری */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* باکس داخلی پیام */
.alert-box {
    padding: 25px;
    background-color: white;
    color: black;
    width: 350px;
    border-radius: 8px;
    text-align: center;
    position: relative;
}

/* دکمه بستن */
.closebtn {
    position: absolute;
    top: 10px;
    left: 15px;
    color: black;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
}

    .closebtn:hover {
        color: black;
    }

.okbtn {
    margin-top: 20px;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    background-color: blue;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

    .okbtn:hover {
        background-color:;
    }

#loading{
    display:none;
    position:fixed;
    width:100%;
    height:100%;
    background-color : black;
    opacity:0.4;
    right:0px;
    top:0px;
    z-index:99999;
}
    #loading p {
        position: absolute;
        left: 47%;
        top: 50%;
        z-index: 9999999;
        opacity:1;
    }
.loaderAnimation {
    position: absolute;
    left: 47%;
    top: 30%;
    z-index: 1;
    margin:0px auto;
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}