﻿/* ==========================================
   فونت فارسی
========================================== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================
   تنظیمات عمومی صفحه
========================================== */
body {
    font-family: 'Vazirmatn', Vazir, Tahoma, sans-serif;
    background: #f0f3f7;
    margin: 0;
    padding: 20px;
    direction: rtl;
    color: #333;
}

input.numeric,
#txtAmount,
#txtNationalCode,
#txtMobile {
    font-family: 'Vazirmatn', Vazir, Tahoma, sans-serif !important;
    font-size: 13px !important;
    direction: rtl;
    unicode-bidi: plaintext;
}

/* ==========================================
   Container
========================================== */
.container {
    max-width: 2000px;
    margin: auto;
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    overflow: visible;
}

.full-width {
    width: 100%;
}

/* ==========================================
   عنوان صفحه
========================================== */
h2 {
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 28px;
    color: #0056b3;
    text-align: center;
    letter-spacing: 1.1px;
}

/* ==========================================
   کنترل‌های فرم
========================================== */
.form-control {
    width: 100%;
    max-width: 1500px;
    height: 35px;
    padding: 0 8px;
    box-sizing: border-box;
    font-size: 13px;
    font-family: Tahoma;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 6px;
}

    .form-control:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 8px rgba(0,123,255,.3);
        background-color: #fefefe;
    }

select.form-control {
    min-width: 150px;
}

.row {
    display: flex;
    gap: 25px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.col {
    flex: 1;
    min-width: 250px;
}

/* ==========================================
   تب‌ها
========================================== */
.tab-container {
    margin: 20px auto;
    width: 90%;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #007bff;
    justify-content: flex-start;
}

    .tab-buttons .tab-btn {
        flex: 0 0 auto;
        padding: 12px 20px;
        border: none;
        background: #e9ecef;
        cursor: pointer;
        font-weight: bold;
        margin-left: 5px;
        border-radius: 6px 6px 0 0;
        text-decoration: none;
        color: #000;
        display: inline-block;
    }

        .tab-buttons .tab-btn.active {
            background: #007bff;
            color: #fff;
        }

.tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
}

    .tab-content.active {
        display: block;
    }

/* ==========================================
   GridView
========================================== */
.gridview {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

    .gridview th,
    .gridview td {
        border: 1px solid #ccc;
        padding: 8px;
        text-align: center;
    }

    .gridview th {
        background: #007bff;
        color: #fff;
    }

/* ==========================================
   پیام‌ها
========================================== */
.message {
    color: #28a745;
    font-weight: 700;
    margin-top: 10px;
    text-align: center;
    min-height: 24px;
}

    .message.error {
        color: #dc3545;
    }

.custom-message-label {
    display: inline-block;
    width: auto;
    background-color: yellow;
    color: red;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid #000;
    font-family: Tahoma;
    font-size: 11px;
    margin-bottom: 12px;
}

/* ==========================================
   دکمه‌ها
========================================== */
.btn {
    border: 1px solid #999 !important;
    transition: .3s;
    padding: 12px 26px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 12px;
    user-select: none;
}

.button-group {
    margin-top: 25px;
    text-align: center;
}

    .button-group .btn {
        min-width: 160px;
        margin: 0 10px;
    }

.btn-primary {
    background-color: rgba(0,0,0,.07) !important;
}

    .btn-primary:hover {
        background-color: rgba(0,123,255,.3) !important;
        border-color: #dceeff;
    }

/* ==========================================
   جدول اقلام فاکتور
========================================== */
#tblInvoiceItems {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: Tahoma, sans-serif;
    font-size: 13px;
}

    #tblInvoiceItems th,
    #tblInvoiceItems td {
        border: 1px solid #ccc;
        padding: 6px;
        text-align: center;
    }

    #tblInvoiceItems thead th {
        background-color: #e6f0ff;
        border-bottom: 2px solid #1E90FF;
        color: #1E90FF !important;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0,0,0,.1);
    }

    #tblInvoiceItems tbody tr:hover {
        background-color: #f5faff;
    }

/* ==========================================
   ورودی‌های داخل گرید
========================================== */
.grid-input {
    width: 90%;
    padding: 6px 8px;
    margin: 2px auto;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: all .2s ease-in-out;
    font-family: Tahoma, sans-serif;
    font-size: 13px;
}

    .grid-input:focus {
        border-color: #1E90FF;
        box-shadow: 0 0 5px rgba(30,144,255,.5);
        background-color: #fff;
        outline: none;
    }

/* ==========================================
   منوی راست کلیک
========================================== */
.context-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 8px rgba(0,0,0,.2);
    z-index: 10000;
    width: 150px;
    border-radius: 6px;
    font-family: Tahoma;
    font-size: 13px;
}

    .context-menu ul {
        list-style: none;
        margin: 0;
        padding: 5px 0;
    }

        .context-menu ul li {
            padding: 6px 12px;
            cursor: pointer;
            transition: background .2s;
        }

            .context-menu ul li:hover {
                background-color: #e6f3ff;
            }

/* ==========================================
   منوی افقی
========================================== */
nav {
    height: 8%;
    background-color: #0056b3;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 20px;
    gap: 25px;
    direction: rtl;
}

    nav a {
        color: #fff;
        text-decoration: none;
        font-size: 16px;
        padding: 5px 10px;
        white-space: nowrap;
    }

        nav a:hover {
            text-decoration: underline;
            background-color: #e05555;
            color: #ffd700;
        }

/* ==========================================
   فرم Select2
========================================== */
.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.w-130 {
    width: 130px;
}

.w-180 {
    width: 180px;
}

.w-250 {
    width: 250px;
}

.flex-1 {
    flex: 1;
    min-width: 220px;
}

.form-group label {
    font-size: 11px;
    color: red;
}

.hint {
    font-size: 8px;
    color: #555;
    margin-top: 2px;
    line-height: 10px;
}

/* ==========================================
   Select2
========================================== */
.select2-container {
    width: 100% !important;
}

    .select2-container .select2-selection--single {
        height: 35px !important;
        display: flex;
        align-items: center;
        border: 1px solid #ccc;
    }

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 35px !important;
    padding-left: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 35px !important;
}

button {
    cursor: pointer;
    margin-top: 8px;
}
