/* استایل فرم لاگین */
/* استایل فرم لاگین */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.login-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 350px; /* عرض باکس لاگین */
    text-align: center;
}

h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

.error {
    color: red;
    margin-top: 10px;
}
/* استایل فرم لاگین پیان*/
/* استایل کلی برای واکنش‌گرا بودن */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* استایل هدر */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    padding: 15px 20px;
    color: white;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}
.content {
    padding-top: 80px; /* فضای خالی برای هدر */
    padding-bottom: 60px; /* فضای خالی برای فوتر */
    min-height: 100vh; /* حداقل ارتفاع برای پوشش کامل صفحه */
    box-sizing: border-box; /* اطمینان از درستی محاسبه padding و height */
    overflow-y: auto; /* فعال‌سازی اسکرول در صورت نیاز */
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 15px;
}

.logout-button {
    background-color: #f44336;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
}

.logout-button:hover {
    background-color: #d32f2f;
}
/*///// صفحه اصلی  */
/* استایل صفحه ایندکس */
.index-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 100px); /* ارتفاع صفحه منهای ارتفاع هدر و فوتر */
    padding: 20px;
    box-sizing: border-box;
}

.index-container h2 {
    margin-bottom: 20px;
}

.index-container input[type="text"] {
    padding: 10px;
    width: 300px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.index-container .button-container {
    display: flex;
    gap: 10px;
}

.index-container button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.index-container button:hover {
    background-color: #007BFF;
    color: white;
}

.popup {
    display: none; /* مخفی به صورت پیش‌فرض */
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    z-index: 1000;
    width: 400px; /* عرض پنجره پاپ‌آپ */
}

.popup.active {
    display: block; /* نمایش پنجره پاپ‌آپ */
}

.popup h3 {
    margin-bottom: 15px;
}

.popup input[type="text"],
.popup input[type="date"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.popup button {
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.popup button:hover {
    background-color: #0056b3;
}

.close {
    cursor: pointer;
    float: right;
    font-size: 18px;
}

/* استایل فوتر */
.footer-container {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed; /* ثابت کردن فوتر در پایین صفحه */
    bottom: 0;
    left: 0;
    width: 100%; /* عرض کامل صفحه */
    font-size: 14px;
}

/* برای محتوای صفحه که به درستی با فوتر هماهنگ باشه */
.main-container {
    min-height: 100vh; /* ارتفاع صفحه باید حداقل به اندازه کل صفحه باشه */
    padding-bottom: 60px; /* فضای لازم برای فوتر */
}

/* برای واکنش‌گرا بودن */
@media (max-width: 768px) {
    nav ul li {
        margin-right: 10px;
    }

    form {
        padding: 20px;
    }

    input[type="text"], button {
        width: 100%;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        margin-top: 10px;
    }
}

/* شروع استایل کلی برای فرم و اطلاعات مشتری */

.invoice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.customer-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.customer-info .left-section, 
.customer-info .right-section {
    width: 200px;
}

.info-box {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.green-box {
    background-color: #e0f7ea;
    border-color: #4caf50;
}

.invoice-form {
    width: 100%;
    max-width: 600px;
}

.invoice-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.invoice-form .form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.invoice-form .form-group input[type="text"], 
.invoice-form .form-group input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.invoice-form .label {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

.error {
    color: #f44336;
    font-weight: bold;
}

.success {
    color: #4caf50;
    font-weight: bold;
}

.btn-green {
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-green:hover {
    background-color: #388e3c;
}

.submit-button {
    margin-top: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .customer-info {
        flex-direction: column;
    }

    .customer-info .left-section, 
    .customer-info .right-section {
        width: 100%;
    }
}

/*  پایان شروع استایل کلی برای فرم و اطلاعات مشتری */


/* شروع جدول لیست خرید مشتری در صفحه فاکتور*/
.table-container {
    
    max-width: 100%;
    height: 400px;  /* تنظیم ارتفاع برای اسکرول عمودی */
    overflow-y: auto; /* برای اسکرول عمودی */
    margin-top: 20px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    text-align: right;
    direction: rtl;
}

.styled-table thead tr {
    background-color: #007bff;
    color: #ffffff;
    text-align: center;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.styled-table tbody tr:nth-child(even) {
    background-color: #e3f2fd; /* آبی کم‌رنگ */
}

.styled-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
    background-color: #d6e9f9; /* آبی تیره‌تر در هنگام هاور */
}

.red-text {
    color: #ff4d4d; /* قرمز روشن */
    font-weight: bold;
}

/* پایان جدول لیست خرید مشتری در صفحه فاکتور*/