/* استایل کلی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', Arial, sans-serif;
    background: #f0f4f8;
    color: #2d3748;
    direction: rtl;
    line-height: 1.6;
}

/* کانتینر اصلی */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

/* سایدبار */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #2d3748, #1a202c);
    color: #fff;
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 20px 0;
}

.sidebar ul li a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #63b3ed;
}

/* محتوا */
.content {
    margin-right: 250px;
    padding: 20px;
    flex-grow: 1;
}

/* هدر */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

header h1 {
    color: #1a202c;
    font-size: 28px;
}

.header-buttons a {
    margin-left: 15px;
}

/* بخش‌ها */
.section {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.section h3 {
    color: #2d3748;
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 2px solid #4299e1;
    padding-bottom: 8px;
}

/* فرم‌ها */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, select, textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    background: #f7fafc;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: #4299e1;
    outline: none;
    background: #fff;
}

button {
    padding: 12px 20px;
    background: #38a169;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #2f855a;
}

/* جداول */
.tasks-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tasks-table th, .tasks-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.tasks-table th {
    background: #4299e1;
    color: #fff;
    font-weight: bold;
}

.tasks-table tr:nth-child(even) {
    background: #f7fafc;
}

.tasks-table tr:hover {
    background: #edf2f7;
}

/* دکمه‌ها */
.logout-btn, .back-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
}

.logout-btn {
    background: #f56565;
    color: #fff;
}

.logout-btn:hover {
    background: #e53e3e;
}

.back-btn {
    background: #4299e1;
    color: #fff;
}

.back-btn:hover {
    background: #3182ce;
}

/* لیست مراکز */
.locations-list {
    list-style: none;
    padding: 0;
}

.locations-list li {
    padding: 12px;
    background: #fff;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
}

.locations-list li:hover {
    background: #edf2f7;
}

/* داشبورد خلاصه */
.dashboard-summary {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    text-align: center;
}

.dashboard-summary h2 {
    color: #1a202c;
    font-size: 24px;
    margin-bottom: 15px;
}

.score-highlight {
    color: #38a169;
    font-weight: bold;
    font-size: 28px;
}

.details-btn {
    background: #4299e1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.details-btn:hover {
    background: #3182ce;
}

.score-details {
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th, .details-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
}

.details-table th {
    background: #edf2f7;
    color: #4a5568;
    font-weight: bold;
}

.details-table td {
    background: #fff;
}

.task-item {
    padding: 5px 0;
    color: #718096;
}

/* لیست مراکز داشبورد */
.location-list {
    list-style: none;
    padding: 0;
}

.location-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background 0.3s ease;
}

.location-list li:hover {
    background: #edf2f7;
}

.location-name {
    font-weight: bold;
    color: #2d3748;
}

.location-type {
    color: #718096;
    font-size: 14px;
}

.location-score {
    color: #38a169;
    font-weight: bold;
}

/* فرم‌های درون‌خطی */
.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}

.inline-form button {
    padding: 8px 15px;
    background: #38a169;
}

.inline-form button:hover {
    background: #2f855a;
}

/* لاگین */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 20px;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
}

.login-container button {
    padding: 12px;
    background: #4299e1;
}

.login-container button:hover {
    background: #3182ce;
}

.error {
    color: #e53e3e;
    text-align: center;
    margin-top: 10px;
}

/* فرم فیلتر */
.filter-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-form select, .filter-form input {
    flex: 1;
    min-width: 150px;
}

.filter-form button {
    background: #4299e1;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.filter-form button:hover {
    background: #3182ce;
}

/* پیام */
.message-section {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message {
    color: #38a169;
    text-align: center;
    font-size: 16px;
}

/* داشبورد کاربر */
.user-header {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.user-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.user-header p {
    font-size: 16px;
    opacity: 0.9;
}

.task-filter {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-filter select {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.task-filter select:focus {
    border-color: #4299e1;
    outline: none;
}

.task-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.task-card h3 {
    color: #2d3748;
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #38a169;
    padding-bottom: 8px;
}

.task-card .task-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.task-card .detail {
    flex: 1;
    min-width: 200px;
    background: #f7fafc;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #38a169;
}

.task-card .detail label {
    color: #718096;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.task-card .detail span {
    color: #2d3748;
    font-size: 16px;
}

.task-card form {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.task-card input[type="number"], .task-card input[type="text"], .task-card select {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
}

.task-card button {
    padding: 10px 15px;
    background: #38a169;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.task-card button:hover {
    background: #2f855a;
}

.no-tasks {
    text-align: center;
    color: #718096;
    padding: 20px;
}