/* public/css/style.css */

body {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* یک رنگ پس‌زمینه ملایم */
    color: #333; /* رنگ متن اصلی */
    line-height: 1.6;
    direction: rtl; /* برای زبان فارسی */
}

/* Ensure all elements use Vazir font */
* {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.container {
    width: 90%;
    max-width: 1200px; /* حداکثر عرض برای خوانایی بهتر */
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff; /* پس‌زمینه سفید برای محتوا */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* سایه ملایم */
}

/* Header and Navigation */
header nav {
    background-color: #0056b3; /* رنگ آبی تیره‌تر برای هدر */
    padding: 1rem 0;
    text-align: center;
    border-bottom: 3px solid #004085;
}

header nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

header nav a:hover, header nav a.active {
    color: #ffc107; /* رنگ زرد برای هاور یا لینک فعال */
    text-decoration: none;
}

/* Main Content Area */
.main-content {
    padding: 20px 0; /* پدینگ داخلی برای محتوای اصلی */
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #343a40; /* رنگ تیره برای فوتر */
    color: white;
    margin-top: 30px;
    border-top: 3px solid #23272b;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- Alerts / Messages --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 0.95em;
    position: relative; /* برای دکمه بستن احتمالی */
}
.alert-heading { margin-top: 0; color: inherit; font-weight: bold; }
.alert-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }

/* --- Forms --- */
.form-container, .login-container {
    max-width: 500px; /* کمی بزرگتر برای فرم‌های عمومی */
    margin: 40px auto;
    padding: 25px 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.form-container h1, .login-container h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 25px;
    font-size: 1.8em;
}
.form-group {
    margin-bottom: 1.2rem; /* کمی فاصله بیشتر بین فیلدها */
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057; /* رنگ ملایم‌تر برای لیبل‌ها */
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%; /* عرض کامل */
    padding: 12px; /* پدینگ بیشتر برای راحتی */
    border: 1px solid #ced4da; /* رنگ استاندارد برای بوردر */
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); /* افکت فوکوس استاندارد Bootstrap */
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.form-text {
    font-size: 0.875em;
    color: #6c757d; /* رنگ متن راهنما */
}
.error-message {
    color: #dc3545; /* رنگ استاندارد برای خطا */
    font-size: 0.875em;
    margin-top: 0.25rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1rem; /* پدینگ دکمه‌ها */
    font-size: 1rem;
    border-radius: 0.25rem; /* کمی گردی برای دکمه‌ها */
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    text-decoration: none;
}
.btn-primary { color: #fff; background-color: #007bff; border-color: #007bff; }
.btn-primary:hover { color: #fff; background-color: #0056b3; border-color: #0056b3; }
.btn-success { color: #fff; background-color: #28a745; border-color: #28a745; }
.btn-success:hover { color: #fff; background-color: #1e7e34; border-color: #1e7e34; }
.btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; }
.btn-danger:hover { color: #fff; background-color: #c82333; border-color: #c82333; }
.btn-warning { color: #212529; background-color: #ffc107; border-color: #ffc107; }
.btn-warning:hover { color: #212529; background-color: #e0a800; border-color: #e0a800; }
.btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; }
.btn-info:hover { color: #fff; background-color: #117a8b; border-color: #117a8b; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1.25rem; }

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
table th, table td {
    border: 1px solid #dee2e6; /* رنگ بوردر روشن‌تر */
    padding: 12px 15px; /* پدینگ بیشتر برای خوانایی */
    text-align: right;
    vertical-align: top;
}
table th {
    background-color: #e9ecef; /* رنگ پس‌زمینه روشن برای هدر جدول */
    color: #495057; /* رنگ متن تیره‌تر برای کنتراست */
    font-weight: bold;
    border-bottom-width: 2px; /* بوردر ضخیم‌تر برای پایین هدر */
}
table tr:nth-child(even) {
    background-color: #f8f9fa; /* رنگ راه‌راه برای خوانایی بهتر */
}
table tr:hover {
    background-color: #f1f1f1; /* افکت هاور برای ردیف‌ها */
}
table caption {
    padding: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    caption-side: top; /* عنوان جدول در بالا */
    text-align: right;
}

/* Responsive Tables */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto; /* اسکرول افقی برای جداول بزرگ در موبایل */
    -webkit-overflow-scrolling: touch;
}
.table-responsive > .table-bordered {
    border: 0;
}


/* --- Page Specific --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.page-header h1, .page-header h2, .page-header h3 {
    margin: 0;
    color: #0056b3;
}