/* --- استایل‌های عمومی و فرم ثبت (بدون تغییر) --- */
.ipr-form { max-width: 700px; margin: 20px auto; padding: 20px; border: 1px solid #ddd; border-radius: 5px; background: #f9f9f9; direction: rtl; }
.ipr-form h3 { text-align: center; margin-bottom: 20px; }
.ipr-field-group { margin-bottom: 15px; }
.ipr-field-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.ipr-form input[type="text"], .ipr-form select, .ipr-form textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.ipr-form input[readonly] { background-color: #eee; }
.ipr-checkbox-list label, .ipr-radio-list label { display: block; margin-bottom: 8px; font-weight: normal; }
.ipr-checkbox-list input[type="text"] { display: inline-block; width: auto; margin-right: 5px; }
.required { color: red; }
.ipr-submit-btn { display: block; width: 100%; padding: 10px; background-color: #0073aa; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }
.ipr-submit-btn:hover { background-color: #005a87; }
.ipr-success { color: green; border: 1px solid green; padding: 10px; background: #e9f7e9; text-align: center; }
.ipr-error { color: red; border: 1px solid red; padding: 10px; background: #fbebeb; text-align: center; }

/* --- START: استایل‌های جدید برای لیست گزارشات --- */
.ipr-reports-list { direction: rtl; }

/* فیلترها */
.ipr-filters-wrapper { background-color: #f5f5f5; padding: 15px; border: 1px solid #e3e3e3; border-radius: 4px; margin-bottom: 20px; }
.ipr-filters-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; }
.ipr-filter-item { flex: 1; min-width: 200px; }
.ipr-filter-item label { font-weight: bold; margin-bottom: 5px; display: block; }
.ipr-filter-btn, .ipr-filter-reset-btn { padding: 8px 15px; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.ipr-filter-btn { background-color: #0073aa; color: white; }
.ipr-filter-reset-btn { background-color: #787c82; color: white; margin-right: 5px; }

/* جدول آکاردئونی */
.ipr-reports-table { width: 100%; border-collapse: collapse; }
.ipr-reports-table th, .ipr-reports-table td { padding: 12px 15px; text-align: right; border-bottom: 1px solid #ddd; }
.ipr-reports-table thead th { background-color: #f8f9fa; border-bottom-width: 2px; }
.ipr-accordion-toggle { cursor: pointer; transition: background-color 0.2s; }
.ipr-accordion-toggle:hover { background-color: #f1f1f1; }
.ipr-accordion-toggle.collapsed-row { background-color: #e7f1ff; } /* رنگ ردیف باز شده */

.ipr-details-row td { padding: 0; border: 0; }
.ipr-details-content { padding: 20px; background-color: #fafafa; }
.ipr-details-content strong { display: block; margin-top: 15px; margin-bottom: 5px; font-size: 1.1em; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.ipr-details-content strong:first-child { margin-top: 0; }
.ipr-details-content ul { list-style: disc; padding-right: 20px; margin-bottom: 15px; }
.ipr-details-content p { background: #f0f0f0; border-right: 3px solid #0073aa; padding: 10px; margin: 0; }

.ipr-status-normal { color: #198754; font-weight: bold; }
.ipr-status-inform { color: #ffc107; font-weight: bold; }
.ipr-status-urgent { color: #dc3545; font-weight: bold; }

.ipr-pagination { margin-top: 20px; text-align: center; }
/* --- استایل‌های جدید برای لیست گزارشات مدرس --- */
.ipr-divider {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.ipr-teacher-reports-list {
    direction: rtl;
    margin-top: 30px;
}

.ipr-teacher-reports-list h3 {
    text-align: center;
    margin-bottom: 20px;
}

.ipr-teacher-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ipr-teacher-table th,
.ipr-teacher-table td {
    padding: 12px 15px;
    text-align: right;
    border: 1px solid #ddd;
}

.ipr-teacher-table thead th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.ipr-teacher-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ipr-action-links a {
    margin-left: 10px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 13px;
}

.ipr-action-links .ipr-edit-link {
    background-color: #ffc107;
    color: #000;
}

.ipr-action-links .ipr-delete-link {
    background-color: #dc3545;
    color: #fff;
}

.ipr-cancel-edit-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}
.ipr-cancel-edit-btn:hover {
    background-color: #5a6268;
    color: white;
}
/* --- استایل‌های جدید برای باکس آمار --- */
.ipr-stats-wrapper {
    direction: rtl;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 25px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.ipr-stats-title {
    font-size: 16px;
    padding: 12px 15px;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ipr-stats-toggle {
    font-size: 20px;
    font-weight: bold;
    user-select: none;
}

.ipr-stats-content {
    padding: 15px;
    display: none; /* این خط را اضافه کنید */
}

.ipr-stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 2;
    column-gap: 20px;
}

.ipr-stats-list li {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border-bottom: 1px dashed #eee;
}

.ipr-stats-teacher-name {
    font-weight: bold;
}

.ipr-stats-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
}

.ipr-status-green { background-color: #28a745; }
.ipr-status-yellow { background-color: #ffc107; color: #212529; }
.ipr-status-red { background-color: #dc3545; }
.ipr-status-gray { background-color: #6c757d; }

/* Responsive columns for stats box */
@media (max-width: 768px) {
    .ipr-stats-list {
        column-count: 1;
    }
}
/* --- استایل‌های جدید برای بخش یادداشت مدیریت --- */

/* فرم در پنل مدیریت */
.ipr-admin-note-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}
.ipr-admin-note-section textarea {
    width: 100%;
    margin-bottom: 10px;
}
.ipr-admin-note-submit {
    background-color: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}
.ipr-admin-note-submit:hover {
    background-color: #1e639c;
}

/* نمایش یادداشت در پنل مدرس */
.ipr-teacher-view .ipr-admin-note-row td {
    padding: 0;
    border-top: 0; /* حذف خط جداکننده بالای این ردیف */
}
.ipr-teacher-view-note {
    background-color: #fffbe6; /* A light yellow background */
    padding: 15px;
    border-right: 4px solid #ffb900; /* A yellow border */
}
.ipr-teacher-view-note strong {
    display: block;
    margin-bottom: 5px;
    color: #50575e;
}
.ipr-teacher-view-note p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #3c434a;
}
/* --- استایل‌های جدید برای فیدبک AJAX --- */
.ipr-admin-note-section {
    position: relative;
}

.ipr-ajax-spinner {
    display: none; /* Hidden by default */
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

.ipr-ajax-spinner.is-active {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ipr-ajax-message {
    font-size: 13px;
    font-weight: bold;
    vertical-align: middle;
}

.ipr-ajax-message.success {
    color: #28a745;
}

.ipr-ajax-message.error {
    color: #dc3545;
}