@font-face {
    font-family: 'vazir';
    src: url('../webfonts/Vazir.ttf') format('truetype'),
         url('../webfonts/Vazir.woff') format('woff'),
         url('../webfonts/Vazir.woff2') format('woff2');
         font-weight: normal;
         font-style: normal;
}
@font-face {
    font-family: 'vazir-bold';
    src: url('../webfonts/Vazir-Bold.ttf') format('truetype'),
         url('../webfonts/Vazir-Bold.woff') format('woff'),
         url('../webfonts/Vazir-Bold.woff2') format('woff2');
         font-weight: normal;
         font-style: normal;
}
@font-face {
    font-family: 'Vazir-Thin';
    src: url('../webfonts/Vazir-Thin.ttf') format('truetype'),
         url('../webfonts/Vazir-Thin.woff') format('woff'),
         url('../webfonts/Vazir-Thin.woff2') format('woff2');
         font-weight: normal;
         font-style: normal;
}
@font-face {
    font-family: 'Vazir-Medium';
    src: url('../webfonts/Vazir-Medium.ttf') format('truetype'),
         url('../webfonts/Vazir-Medium.woff') format('woff'),
         url('../webfonts/Vazir-Medium.woff2') format('woff2');
         font-weight: normal;
         font-style: normal;
}
:root {
    --primary-color: #1a2a44;
    --accent-color: #ff6f61;
    writing-mode: horizontal-tb;
    direction: rtl;
    text-orientation: mixed;
}

h1 {
    font-size: 1.8em;
    margin: 60px 0 20px 0;
    color: #1a2a44;
    font-family: 'vazir-bold';
}

.nav-menu li:last-child {
    margin-right: auto; /* این باعث می‌شود آخرین آیتم (خوشامدگویی) به سمت چپ بچسبد */
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: 'vazir-thin';
    direction: rtl;
    background-color: #f4f4f4;
}


.status-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}
.status-btn:hover {
    background-color: #0056b3;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* استایل هدر */
.modern-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #1a2a44;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 10px 0;
}

.modern-header nav {
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    margin: 0 auto;
    padding: 0 20px;
}

.modern-header .logo {
    font-size: 1.4em;
    font-weight: bold;
    color: white;
    width: 60px;
    margin-left: 30px;
}

/* دکمه همبرگری */
.modern-header .nav-toggle {
    display: none;
    font-size: 1.3em;
    color: white;
    cursor: pointer;
}

.modern-header .nav-menu {
    list-style: none;
    display: flex;
    gap: 10px; /* فاصله کمتر بین لینک‌ها */
    margin: 0;
    padding: 0;
    width: 100%;
}

.modern-header .nav-menu li {
    position: relative;
}

.modern-header .nav-menu li a.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.95em;
    position: relative;
    transition: color 0.3s ease;
    padding: 5px 8px;
}

/* افکت خط زیرین متحرک برای لینک‌ها */
.modern-header .nav-menu li a.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: #ff6f61;
    transition: width 0.3s ease;
}

.modern-header .nav-menu li a.nav-link:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

/* استایل لینک‌های اصلی */
.modern-header .nav-menu li a.public-link {
    color: #ffffff;
}

.modern-header .nav-menu li a.public-link:hover {
    color: #dfdfce;
    font-family: 'vazir-bold';
}

/* استایل زیرمنو */
.modern-header .dropdown {
    position: relative;
}

.modern-header .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.modern-header .dropdown-toggle i {
    font-size: 0.8em;
}

.modern-header .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a2a44;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    z-index: 1001;
}

.modern-header .dropdown-menu.show {
    display: block;
}

.modern-header .dropdown-menu li {
    margin: 0;
}

.modern-header .dropdown-menu li a.nav-link {
    color: #d1d8e0;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    justify-content: right;
    width: 100px !important;
    text-wrap-mode:nowrap;
}

.modern-header .dropdown-menu li a.nav-link:hover {
    color: white;
    background: none; /* حذف پس‌زمینه هنگام هاور */
}

/* اضافه کردن padding به بدنه صفحه */
main {
    padding-top: 51px;
    padding-bottom:40px;
}

/* تنظیمات برای صفحه‌های کوچک */
@media (max-width: 768px) {
    .modern-header .nav-toggle {
        display: block;
    }

    main {
        padding-top: 70px; /* بیشتر کردن فاصله تو موبایل به خاطر هدر */
    }
    .modern-header .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: #2c3e50;
        width: 200px;
        padding: 10px;
        border-radius: 0 0 0 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .modern-header .nav-menu.active {
        display: flex;
    }

    .modern-header .nav-menu li {
        margin: 5px 0;
    }

    .modern-header .nav-menu li a.nav-link {
        font-size: 0.9em;
        padding: 8px 10px;
    }

    /* زیرمنو توی صفحه‌های کوچک */
    .modern-header .dropdown-menu {
        position: static;
        background: #34495e;
        box-shadow: none;
        padding: 5px 10px;
    }

    .modern-header .dropdown-menu li a.nav-link {
        font-size: 0.85em;
    }

    /* مخفی کردن لینک‌های کناری */
    .nav-links.hidden {
        display: none;
    }


}

@media (max-width: 480px) {
    .modern-header .nav-menu {
        width: 150px;
    }

    .modern-header .nav-menu li a.nav-link {
        font-size: 0.85em;
    }
}

/* بقیه استایل‌ها */
footer {
  background-color: #1a2a44;
  color: white;
  text-align: center;
  padding: 3px;
  width: 100%;
  position: fixed;
  bottom: 0;
  z-index: 990;
}

footer p {
  margin-top: 5px;
  margin-bottom: 5px;
}


 .parag {
    color: #000;
    font-size: 1em;
    margin-bottom: 30px;
    text-align: justify;
    padding: 30px 15px 60px 60px;
    text-shadow: 0 0 5px #ffffff;
}



.contact {
    padding: 20px;
    min-height: calc(100vh - 60px); /* تغییر از height به min-height */
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start; /* تغییر از center به flex-start */
    justify-content: center;
}


.contact h1 {
    font-size: 1.8em;
    color: #1a2a44;
    margin-bottom: 20px;
}

.contact form {
    flex: 1;
    max-width: 100%;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: right;
}

.contact form label {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #1a2a44;
}

.contact form input,
.contact form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.contact form textarea {
    height: 100px;
    resize: none;
}

.contact form button {
    background-color: #ff6f61;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact form button:hover {
    background-color: #e65b50;
}

.contact .map {
    flex: 1;
    max-width: 100%;
}

.contact .map iframe {
    width: 100%;
    height: 300px;
    border-radius: 10px;
}

.contact .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.gallery {
    padding: 0;
    height: calc(100vh - 60px);
    box-sizing: border-box;
    overflow: hidden;
}

.gallery-container {
    display: flex;
    height: 100%;
    gap: 10px;
}
.Flex_item{
    display: flex;
}

.project-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: right;
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

#project-title {
    font-size: 1.8em;
    color: #1a2a44;
    margin-bottom: 10px;
    border-bottom: 2px solid #ff6f61;
    padding-bottom: 8px;
}

#project-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.5;
}

.gallery-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.main-image {
    position: relative;
    width: 100%;
    flex: 0 0 70%;
    max-height: 70vh;
}

.main-image img {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.thumbnail-gallery-wrapper {
    flex: 0 0 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.thumbnail-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
    justify-content: center;
    scroll-behavior: smooth;
}

.thumbnail-item {
    flex: 0 0 auto;
}

.thumbnail-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, border 0.3s;
    border: 2px solid transparent;
}

.thumbnail-item img:hover {
    transform: scale(1.1);
}

.thumbnail-item img.active {
    border: 2px solid #ff6f61;
    transform: scale(1.1);
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2em;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.arrow:disabled {
    background-color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
}

.left-arrow {
    left: 10px;
}

.right-arrow {
    right: 10px;
}

.messages {
    padding: 20px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.messages h1 {
    font-size: 2.5em;
    color: #1a2a44;
    margin-bottom: 20px;
}

.messages table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.messages table th,
.messages table td {
    padding: 10px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.messages table th {
    background-color: #1a2a44;
    color: white;
}

.messages table tr.unread {
    background-color: #f8d7da;
}



.messages .btn {
    background-color: #1a2a44;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.messages .btn:hover {
    background-color: #0f1a2b;
}

.messages .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.login {
    padding: 20px;
   /* height: calc(100vh - 60px);*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login h1 {
    font-size: 2.5em;
    color: #1a2a44;
    margin-bottom: 5px;
}

.login form {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: right;
    max-width: 400px;
   /* width: 100%;*/
}

.login form label {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #1a2a44;
}

.login form input {
    width: 95%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.login form button {
    background-color: #ff6f61;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.login form button:hover {
    background-color: #e65b50;
}

.error-message{
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.login .btn {
    background-color: #1a2a44;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.login .btn:hover {
    background-color: #0f1a2b;
}

.dashboard {
    padding: 20px;
    text-align: center;
}

.dashboard h1 {
    font-size: 2.5em;
    color: #1a2a44;
    margin-bottom: 20px;
}

.dashboard-item {
    margin: 20px 0;
}

.dashboard-item a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ff6f61;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.dashboard-item a:hover {
    background-color: #e65b50;
}

.dashboard-item .icon {
    margin-right: 10px;
}

.report {
    padding: 20px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.report h1 {
    font-size: 2.5em;
    color: #1a2a44;
    margin-bottom: 20px;
}

.report table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.report table th,
.report table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.report table th {
    background-color: #1a2a44;
    color: white;
}

.report p {
    font-size: 1.2em;
    color: #666;
}

.manage-data {
    padding: 20px;
    min-height: calc(100vh - 60px);
    overflow-y: auto;
}

.manage-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
}

/* لینک‌های ناوبری */
.nav-links {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 900;
}

.nav-link {
    font-family: 'Vazir-Medium';
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
   /* background-color: #1a2a44;*/
    color: white;
    text-decoration: none;
    border-radius: 25px;
    
    transition: all 0.3s ease;
    font-size: 1em;
    font-weight: 500;
}



/* دکمه بازگشت به بالا */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.7em;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    z-index: 1000;
    align-content: center !important; 
    padding: 0% !important;
    margin: 0% !important;
    
}

.scroll-to-top:hover {
    background-color: #e67e22;
}


/*
.nav-link:hover {
    background-color: #112139;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
*/
/* چیدمان عمودی بخش‌ها */
.sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
}


.section {
    padding-top: 0px;
    transition: opacity 0.3s ease;
}
.section[style*="display: none"]{
    opacity:  0;;
}

/* استایل جدول‌ها و فرم‌ها */
.table-wrapper {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    flex-wrap: wrap;
}

.form-group label {
    font-size: 0.9em;
    color: #1a2a44;
    white-space: nowrap;
}

.form-group input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
    min-width: 100px;
    margin-right: 30px;;
}

.form-group button {
    background-color: #ff6f61;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-group button:hover {
    background-color: #e65b50;
}

.dataTables_length{
    text-align: left;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

/* استایل‌های DataTables */
.dataTables_wrapper {
    margin: 5px 0;
    width: 98%;
}

.dataTables_filter {
    margin-bottom: 10px;
}

.dataTables_filter label {
    font-size: 0.9em;
    color: #1a2a44;
}

.dataTables_filter input {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

/* اطمینان از اینکه استایل‌های جدول پروژه اعمال بشن */
table.display {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table.display th, table.display td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}

table.display th {
    background-color: #1a2a44;
    color: white;
    text-align: center !important;
}

/* استایل ستون عملیات */
table.display th:last-child,
table.display td:last-child {
    width: auto;
    white-space: nowrap;
    min-width: 120px;
    max-width: 150px;
}

table.display td {
    background-color: #f9f9f9;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #c82333;
}

.edit-btn {
    background-color: #007bff;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
}

.edit-btn:hover {
    background-color: #0056b3;
}

.edit-form {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.edit-form input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex: 1;
}

.edit-form button {
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.edit-form button:hover {
    background-color: #218838;
}

/* پاپ‌آپ پیام فلش */
.flash-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #d4edda;
    color: #155724;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* دکمه بازگشت به بالا */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.7em;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    z-index: 1000;
    align-content: center !important; 
    padding: 0% !important;
    margin: 0% !important;
    
}

.scroll-to-top:hover {
    background-color: #e67e22;
}

/* برای جلوگیری از روی هم افتادن در صفحات کوچک */
@media (max-width: 768px) {
    .gallery {
        height: calc(100vh - 50px);
    }

    .gallery-container {
        flex-direction: column;
        padding: 5px;
    }

    .project-details {
        flex: 0 0 30%;
        padding: 10px;
    }

    #project-title {
        font-size: 1.4em;
    }

    #project-description {
        font-size: 0.9em;
    }

    .gallery-right {
        flex: 1;
    }

    .main-image {
        flex: 0 0 60%;
        max-height: 60vh;
    }

    .main-image img {
        max-height: 60vh;
    }

    .thumbnail-gallery-wrapper {
        flex: 0 0 30%;
        padding: 0 10px;
    }

    .thumbnail-item img {
        width: 90px;
        height: 60px;
    }

    .arrow {
        font-size: 1.5em;
        padding: 5px;
    }



    .contact form {
        max-width: 100%;
    }

    .contact .map {
        max-width: 100%;
    }

    .contact .map iframe {
        height: 200px;
    }


    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group input {
        width: 100%;
        min-width: 150 px;
    }

    .form-group button {
        width: 100%;
    }

    .edit-form {
        flex-direction: column;
    }

    .edit-form input {
        width: 100%;
        min-width: unset;
    }

    .edit-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery {
        height: calc(100vh - 40px);
    }

    .project-details {
        flex: 0 0 25%;
        padding: 8px;
    }

    #project-title {
        font-size: 1.2em;
    }

    #project-description {
        font-size: 0.8em;
    }

    .main-image {
        flex: 0 0 55%;
        max-height: 55vh;
    }

    .main-image img {
        max-height: 55vh;
    }

    .thumbnail-gallery-wrapper {
        flex: 0 0 25%;
        padding: 0 5px;
    }

    .thumbnail-item img {
        width: 70px;
        height: 50px;
    }

    .arrow {
        font-size: 1.2em;
        padding: 3px;
    }

    .contact .map iframe {
        height: 150px;
    }

    .table-wrapper {
        padding: 10px;
    }


    .form-group label {
        font-size: 0.9em;
    }

    .form-group input {
        font-size: 0.9em;
    }

    .form-group button {
        font-size: 0.9em;
    }



    .scroll-to-top {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}
/* استایل‌های مربوط به فرم ثبت فاکتور */
.create-invoice .scan-management {
    padding: 20px;
    margin: 0 auto;
}


.create-invoice h1, .create-invoice h2, .scan-management h2{
    font-size: 1.5em;
    color: #1a2a44;
    margin-bottom: 20px;
    text-align: center;
}


.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-column {
    flex: 1;
    min-width: 300px;
    max-width: 1100px;;
}

.form-column label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #1a2a44;
}

.form-column input,
.form-column select,
.form-column textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
    box-sizing: border-box;
}

.form-column textarea {
    height: 100px;
    resize: none;
}

.form-column .choices {
    margin-bottom: 15px;
}

.create-invoice button,
.create-invoice #add-item {
    background-color: #ff6f61;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin: 10px auto;
}

.create-invoice #add-item {
    background-color: #28a745;
}

.create-invoice button:hover {
    background-color: #e65b50;
}

.create-invoice #add-item:hover {
    background-color: #218838;
}

/* استایل جدول اقلام فاکتور */
#items-table-container {
    margin-top: 20px;
}

#items-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#items-table th,
#items-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#items-table th {
    background-color: #121a26;
    color: white;
}

#items-table td {
    background-color: #f9f9f9;
}

#items-table .edit-item-btn,
#items-table .delete-item-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
}

#items-table .edit-item-btn {
    background-color: #007bff;
    color: white;
}

#items-table .edit-item-btn:hover {
    background-color: #0056b3;
}

#items-table .delete-item-btn {
    background-color: #dc3545;
    color: white;
}

#items-table .delete-item-btn:hover {
    background-color: #c82333;
}

/* استایل بخش مدیریت فاکتورها */
.invoice-management {
    margin-top: 40px;
    overflow: auto;
}

.invoice-management h2 {
    font-size: 1.5em;
    color: #1a2a44;
    margin-bottom: 20px;
    text-align: center;
}

.search-bar {
    margin-bottom: 20px;
    text-align: center;
}

.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
}

#invoices-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#invoices-table th,
#invoices-table td {
    padding: 0px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#invoices-table th {
    background-color: #1a2a44;
    color: white;
    width:min-content;
}

#invoices-table td {
    background-color: #f9f9f9;
}

#invoices-table .view-items-btn,
#invoices-table .edit-btn,
#invoices-table .delete-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    text-decoration: none;
    color: white;
}

#invoices-table .view-items-btn {
    background-color: #17a2b8;
}

#invoices-table .view-items-btn:hover {
    background-color: #138496;
}

#invoices-table .edit-btn {
    background-color: #007bff;
}

#invoices-table .edit-btn:hover {
    background-color: #0056b3;
}

#invoices-table .delete-btn {
    background-color: #dc3545;
}

#invoices-table .delete-btn:hover {
    background-color: #c82333;
}

/* استایل مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
}

#modal-items-table {
    width: 100%;
    border-collapse: collapse;
}

#modal-items-table th,
#modal-items-table td {
    padding: 2px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#modal-items-table th {
    background-color: #1a2a44;
    color: white;
}

#modal-items-table td {
    background-color: #f9f9f9;
}

#modal-items-table .delete-btn {
    padding: 5px 10px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#modal-items-table .delete-btn:hover {
    background-color: #c82333;
}

/* رسپانسیو کردن */
@media (max-width: 768px) {
    .form-column {
        min-width: 100%;
    }

    .form-row {
        flex-direction: column;
    }

    #items-table th,
    #items-table td,
    #invoices-table th,
    #invoices-table td,
    #modal-items-table th,
    #modal-items-table td {
        font-size: 0.9em;
        padding: 8px;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

@media (max-width: 480px) {
    .create-invoice h1,
    .create-invoice h2,
    .invoice-management h2 {
        font-size: 1.5em;
    }

    #items-table th,
    #items-table td,
    #invoices-table th,
    #invoices-table td,
    #modal-items-table th,
    #modal-items-table td {
        font-size: 0.8em;
        padding: 6px;
    }

    .search-bar input {
        max-width: 100%;
    }
}

/* استایل‌های کلی */
body {
    font-family:'Vazir-Thin', Arial, sans-serif,"IRANSansWeb_Light";
    direction: rtl;
    text-align: right;
}

/* استایل فرم دو ستونی */
.invoice-form {
    margin:0 50px 0 70px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.form-column {
    flex: 1;
    margin-left: 10px;
}

.form-column:last-child {
    margin-left: 0;
}

.form-column label {
    display: block;
    margin-bottom: 5px;
}

.form-column input,
.form-column select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* استایل جدول اقلام */
#items-table-container {
    margin-top: 20px;
}

#items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#items-table th,
#items-table td {
    border: 1px solid #ddd;
    padding: 0px;
    text-align: center;
}

#items-table th {
    background-color: #1a2a44;
}

#items-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* استایل دکمه‌ها */
button, .edit-btn, .delete-btn {
    padding: 5px 10px;
    cursor: pointer;
    margin-top:  0% !important;
    margin-bottom: 0% !important;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}

.delete-btn {
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}


.move-btn {
    background-color: #ffd285;
    color: black;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 2px;
}

.move-btn:hover {
    background-color: #f7ab28;
}

/* استایل مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* استایل جستجو */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* رسپانسیو کردن */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .form-column {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .form-column:last-child {
        margin-bottom: 0;
    }
}


    .form-section {
        margin-bottom: 20px;
    }
    .form-row {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        margin-bottom: 15px;
    }
    .form-column {
        flex: 1;
        min-width: 200px;
    }
    .form-column label {
        display: block;
        margin-bottom: 5px;
        font-size: 0.9em;
    }
    .form-column input, .form-column select {
        width: 100%;
        padding: 8px;
        font-size: 0.9em;
    }
    .checkbox-label {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.9em;
        white-space: nowrap;
        color: red !important;
        font-weight:bold !important;
    }
    .checkbox-label input {
        width: auto;
    }
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }
    th, td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: center;
    }
    th {
        background-color: #f2f2f2;
    }
    button {
        padding: 10px 20px;
        font-size: 0.9em;
        margin-top: 10px;
    }

    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    input[type="number"] {
        -moz-appearance: textfield; /* برای فایرفاکس */
    }
    .report {
        padding: 20px;
        height: calc(100vh - 60px);
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-y: auto;
        width: 100%;
        margin: 0 auto;
    }
    
    .report-container {
        max-width: 95%;
        margin: 20px auto;
        width: 100%;
    }
    
    .report-form {
        width: 90%%;
        max-width: 90%;
    }
    
    .report-result {
        width: 90%%;
        max-width: 90%;
    }

    .select2-container {
        width: 100% !important;
    }
    
    .select2-container--default .select2-selection--single {
        height: 34px;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 8px;
        font-size: 0.9em;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 18px;
        color: #1a2a44;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 34px;
    }
    
    .select2-dropdown {
        border: 1px solid #ccc;
        border-radius: 5px;
        direction: rtl;
    }
    
    .select2-search__field {
        direction: rtl;
    }
    /* متمایز کردن قسمت تایپ */
.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #d1e6f8; /* رنگ پس‌زمینه متمایز (مثلاً آبی روشن) */
    border: 1px solid #1a2a44;
    border-radius: 5px;
    padding: 5px;
    color: #1a2a44;
    font-size: 0.9em;
    direction: rtl;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: #ff6f61; /* رنگ حاشیه هنگام فوکوس */
}
