/* ============================================================
   admin-table.css — سیستم سراسری جداول
   ------------------------------------------------------------
   پنل ادمین | Laravel + Blade | RTL
   وابستگیها: Bootstrap v4.1.3 — Font Awesome 4.2.0
   ------------------------------------------------------------
   این فایل فقط اجزای عمومی جدول را مدیریت میکند:
   - آواتار
   - منوی عملیات
   - سلول تاریخ
   - کارت متن دیدگاه و مقاله
   - ریزاستایلها و کمککلاسهای جدول
   ============================================================ */

/* ------------------------------------------------------------
   ۲) آواتار کاربر — قابل استفاده در تمام جداول
   ------------------------------------------------------------ */
.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 150px;       /* عرض ثابت مجموعه آواتار و اطلاعات */
    margin: 0 auto;     /* قرارگیری کل مجموعه در وسط سلول */
    text-align: right;
}

.admin-user-cell .avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d9e8f5;
    flex: 0 0 auto;
}

.admin-user-cell .avatar-fallback {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf2f9;
    color: #557898;
    border-radius: 50%;
    font-weight: 700;
    flex: 0 0 auto;
}

.admin-user-cell .admin-user-info {
    min-width: 0;
    flex: 1;            /* فضای باقی‌مانده پس از آواتار */
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    overflow: hidden;
}

.admin-user-cell .admin-user-name {
    font-size: 12px;
    font-weight: 500;
    color: #2d3e50;
    white-space: nowrap;
    overflow: hidden;
    /*text-overflow: ellipsis;*/
}

.admin-user-cell .admin-user-meta {
    font-size: 11px;
    color: #8a94a0;
    white-space: nowrap;
    overflow: hidden;
    /*text-overflow: ellipsis;*/
}

/* ------------------------------------------------------------
   ۳) دکمه عملیات (Action Dropdown)
   ------------------------------------------------------------ */
.admin-action-trigger {
    padding: 6px 8px;
    color: #8a94a0;
    font-size: 18px;
    line-height: 1;
}

.admin-action-trigger:hover,
.admin-action-trigger:focus {
    color: #3d6f9f;
    text-decoration: none;
}

.admin-actions-menu {
    min-width: 165px;
    padding: 6px;
    border: 1px solid #e8ebee;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(40, 55, 70, .12);
}

.admin-actions-menu .dropdown-item {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.admin-actions-menu .dropdown-item i {
    margin-left: 5px;
    width: 18px;
    text-align: center;
}

.admin-actions-menu .dropdown-item.approve {
    color: #28794d;
}

.admin-actions-menu .dropdown-item.approve:hover {
    background: #e8f7ee;
}

.admin-actions-menu .dropdown-item.reject {
    color: #b96824;
}

.admin-actions-menu .dropdown-item.reject:hover {
    background: #fff1e5;
}

.admin-actions-menu .dropdown-item.delete {
    color: #c4454a;
}

.admin-actions-menu .dropdown-item.delete:hover {
    background: #fcebed;
}

/* ------------------------------------------------------------
   ۴) سلول تاریخ / ساعت
   آیکن در Blade با <i> میآید
   ------------------------------------------------------------ */
.cell-date {
    display: table-caption;
    align-items: center;
    white-space: nowrap;
    font-size: 11px;
    color: #6c757d;
    line-height: 1.8;
    justify-content: center;
}

.cell-date > i {
    margin-left: 5px;
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
}

.cell-date--created > i {
    color: #5d7285;
}

.cell-date--updated > i {
    color: #5d7285;
}

.cell-date--start > i {
    color: #0b5fbf;
}

.cell-date--end > i {
    color: #0b5fbf;
}

.cell-date--time > i {
    color: #6c757d;
}

/* ------------------------------------------------------------
   ۵) چند کمککلاس عمومی برای جدول
   ------------------------------------------------------------ */
.admin-table-nowrap {
    white-space: nowrap;
}

.admin-table-center {
    text-align: center;
}

.admin-table-muted {
    color: #8a94a0;
    font-size: 11px;
}

.admin-table-cell-tight {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* ------------------------------------------------------------
   ۶) استایل هدر جدول (جایگزین استایل inline قبلی)
   ------------------------------------------------------------ */
.admin-table thead th {
    padding: 15px;

    font-family: 'yekanbold', 'Roboto', sans-serifs;

    /*
    font-size: 17px;
    */
    font-weight: 500;
    color: #4a5568;
    background-color: #f5faff;
    border-bottom: 1px solid #e0efff;
    text-align: center;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   ۷) ابعاد ستونها (جایگزین style="width:...")
   ------------------------------------------------------------ */
.admin-cell-content {
    width: 30%;
    min-width: 280px;
}

.admin-cell-article {
    width: 10%;
    min-width: 130px;
}

/* ------------------------------------------------------------
   ۸) کارت متن دیدگاه
   ------------------------------------------------------------ */
.admin-content-card {
    max-width: 100%;
}

.admin-content-text {
    padding: 12px 14px;
    text-align: justify;
    background: #f8f9fa;
    border: 1px solid #edf0f3;
    border-right: 3px solid #7e9fc2; /* نوار تاکیدی — امضای کارت */
    border-radius: 8px;
    color: #39424e;
    font-size: 13px;
    font-weight: 500;
    line-height: 2;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 10; /* ←  فقط تعداد این خط رو نشون میده */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: background-color .2s ease, border-color .2s ease;
}

.admin-content-card:hover .admin-content-text {
    background-color: #eef3f8;
    border-color: #d3e4f5;
    border-right-color: #3d6f9f;
}

.admin-reply-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 8px;
    color: #727d89;
    /*background-color: #eef3f8;*/
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
}

.admin-reply-meta i {
    font-size: 10px;
    margin-left: 3px;
}

/* ------------------------------------------------------------
   ۹) کارت مقاله
   ------------------------------------------------------------ */
.admin-article-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
}

.admin-article-link {
    display: block;
    width: 100%;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.admin-article-link:hover {
    background-color: #eef2f6;
    color: #2d3e50;
    text-decoration: none;
}

.admin-article-link i {
    margin-left: 4px;
}

.admin-empty-state {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #8a94a0;
}

.admin-empty-state i {
    font-size: 13px;
}

/* ------------------------------------------------------------
   ۱۰) باکس تاریخ دومرحلهای (تاریخ + ساعت با خط جداکننده)
   ------------------------------------------------------------ */
.admin-date-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 11px;
    color: #4a5568;
    line-height: 1.8;
    font-weight: 500;
}

.admin-date-box .cell-date + .cell-date {
    border-top: 1px solid #e9ecef;
    padding-top: 2px;
}

/* ------------------------------------------------------------
   ۱۱) ردیف خالی
   ------------------------------------------------------------ */
.admin-empty-row {
    padding: 40px 0;
    font-size: 14px;
    color: #8a94a0;
}

/* ------------------------------------------------------------
   ۱۲) هاور ردیفهای جدول (مثل comment-row قبلی)
   ------------------------------------------------------------ */
.admin-table tbody tr {
    transition: background-color .2s ease, box-shadow .2s ease;
}

.admin-table tbody tr:hover {
    background-color: #fcfdff;
}

/* ابعاد ستون‌های جدول مقاله */
.admin-cell-image {
    width: 12%;
    min-width: 100px;
}

.admin-cell-title {
    width: 30%;
    min-width: 240px;
}


/* ------------------------------------------------------------
   ۱۳) تگ عنوان / گروه
   ------------------------------------------------------------ */

.admin-content-text--tag {
    display: table;
    padding: 4px 8px;
    background: #f1f6fc;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #2b5e8f;
}

.admin-content-text--tag.muted {
    background: #f4f5f7;
    color: #7a8794;
    font-size: 11px;
}

/* کارت تصویر مقاله */
.article-image-wrapper {
    display: block;
    width: 100px;
    height: 60px;
    margin: 0 auto;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .08);
    overflow: hidden;
    position: relative;
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-overlay-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    color: #9aa3ac;
    font-size: 11px;
}

/* ------------------------------------------------------------
   ۱۴) جدول موضوعات / دوره‌ها
------------------------------------------------------------ */

/* ابعاد ستون‌ها */
.admin-cell-title {
    width: 30%;
    min-width: 240px;
}

.admin-cell-capacity {
    width: 16%;
    min-width: 150px;
}

.admin-cell-rule {
    width: 20%;
    min-width: 170px;
}

.admin-cell-action {
    width: 10%;
    min-width: 80px;
}

/* بج پایه (مشترک همه باکس‌ها) */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

/* عنوان موضوع */
.admin-badge--title {
    background: #eaf2fc;
    color: #1e56a0;
    min-width: 200px;
}

/* ظرفیت آنلاین (سبز) */
.admin-badge--online {
    background: #e1f6ea;
    color: #1f7a3d;
}

/* ظرفیت حضوری (آبی ملایم) */
.admin-badge--offline {
    background: #eaf2fc;
    color: #4a5568;
}

/* قانون ثبت‌نام — حالت‌ها */
.admin-badge--rule-unknown {
    background: #f1f3f5;
    color: #718096;
}

.admin-badge--rule-concurrent {
    background: #fff8db;
    color: #b7791f;
    min-width: 180px;

}

.admin-badge--rule-single {
    background: #ffe3e3;
    color: #c53030;
    min-width: 180px;
}

.admin-badge--rule-single-reg {
    background: #f3e8fd;
    color: #dd6b20;
    min-width: 180px;

}

/* ------------------------------------------------------------
   ۱۵) جدول انواع برگزاری (class_types)
------------------------------------------------------------ */

/* ابعاد ستون‌ها */
.admin-cell-title {
    width: 30%;
    min-width: 240px;
}

.admin-cell-order {
    width: 14%;
    min-width: 120px;
}

.admin-cell-terms {
    width: 28%;
    min-width: 200px;
}

.admin-cell-action {
    width: 10%;
    min-width: 80px;
}


/* ترتیب نمایش */
.admin-badge--order {
    background: #f8e9f9;
    color: #ca29d5;
    min-width: 60px;

}

/* قوانین و مقررات — دارای قوانین */
.admin-badge--terms {
    background: #fff8db;
    color: #b7791f;
}

.admin-terms-link:hover .admin-badge--terms {
    background: #fef3c7;
    color: #92400e;
}

/* قوانین و مقررات — ثبت نشده */
.admin-badge--no-terms {
    background: #f1f3f5;
    color: #a0aec0;

}

/* برای یکدست شدن رنگ آیکن‌ها */
.admin-badge--type-title i {
    color: #6d28d9;
}

/* ------------------------------------------------------------
   ۱۶) استایل‌های اختصاصی جدول کلاس‌ها (Classes Table)
------------------------------------------------------------ */

/* عرض و اندازه ستون کد کلاس */
.admin-cell-class-code {
    width: 8%;
    min-width: 90px;
}

/* بج کد کلاس */
.admin-badge--class-code {
    display: inline-block;
    background: #356195;
    color: #ffffff !important;
    text-decoration: none !important;
    text-align: center;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color .2s ease;
}

.admin-badge--class-code:hover,
.admin-badge--class-code:focus {
    background: #063c7d;
    color: #ffffff !important;
}

/* باکس ظرفیت کلاس */
.admin-capacity-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.admin-badge--capacity {
    background: #eaf2fc;
    color: #1e56a0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.admin-capacity-meta {
    font-size: 10px;
    color: #7a8794;
    font-weight: 500;
}

/* وضعیت‌های کلاس (Status Badges) */
.admin-badge--status-pending {
    background: #fff8db;
    color: #b7791f;
}

.admin-badge--status-running {
    background: #e1f6ea;
    color: #1f7a3d;
}

.admin-badge--status-exam {
    background: #eaf2fc;
    color: #0b5fbf;
}

.admin-badge--status-ended {
    background: #f1f3f5;
    color: #6c757d;
}

.admin-badge--status-default {
    background: #f1f3f5;
    color: #4a5568;
}

/* باکس هشدار وضعیت گذشته از موعد */
.admin-status-warning {
    display: inline-block;
    color: #b45309;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 4px;
}

/*ظرفیت مجاز */
.admin-capacity-meta--over {
    color: #d9534f;
    font-weight: 500;
}

.admin-capacity-meta--over .fa {
    margin-left: 4px;
    color: #d9534f;
}

.teacher-name-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 150px;
    white-space: normal;
    text-align: center;
    line-height: 1.6;
    overflow-wrap: break-word;
}
/* ============================================================
   Registration Classes Table
   جدول انتخاب کلاس در پنل زبان آموز
   ============================================================ */

.registration-classes-table {
    margin-bottom: 0;
}

.registration-classes-table tbody td {
    vertical-align: middle;
    border-color: #edf1f5;
}

.registration-classes-table tbody tr {
    transition: background-color .2s ease, box-shadow .2s ease;
}

.registration-classes-table tbody tr:hover {
    background-color: #fcfdff;
    box-shadow: inset 3px 0 0 #7e9fc2;
}

/* ردیف کلاسی که ظرفیت آن تکمیل شده است */
.registration-classes-table tbody tr.registration-class-row--full {
    background-color: #fffafb;
}

.registration-classes-table tbody tr.registration-class-row--full:hover {
    background-color: #fff6f7;
    box-shadow: inset 3px 0 0 #d9534f;
}

/* ------------------------------------------------------------
   عرض ستون ها
   ------------------------------------------------------------ */

.admin-cell-select {
    width: 7%;
    min-width: 75px;
}

.admin-cell-subject {
    width: 18%;
    min-width: 190px;
}

.admin-cell-teacher-time {
    width: 15%;
    min-width: 170px;
}

.admin-cell-level {
    width: 10%;
    min-width: 125px;
}

.admin-cell-date-range {
    width: 13%;
    min-width: 145px;
}

.admin-cell-class-type {
    width: 15%;
    min-width: 160px;
}

.admin-cell-status {
    width: 10%;
    min-width: 120px;
}

/* ------------------------------------------------------------
   انتخاب کلاس
   ------------------------------------------------------------ */

.registration-selection-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
}

.registration-selection-box input[type="radio"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #28794d;
}

.registration-selection-box input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.registration-selection-box small {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.registration-selection-box--disabled {
    opacity: .8;
}

/* ------------------------------------------------------------
   عنوان درس، جنسیت و رده سنی
   ------------------------------------------------------------ */

.registration-subject-title {
    max-width: 220px;
    color: #2d3e50;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
    white-space: normal;
    overflow-wrap: anywhere;
}

.registration-subject-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.registration-subject-meta .admin-content-text--tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
}

/* ------------------------------------------------------------
   نام استاد و زمان
   ------------------------------------------------------------ */

.registration-teacher-name {
    width: auto;
    max-width: 165px;
    margin-bottom: 4px;
    padding: 3px 7px;
    background-color: #f4f8fc;
    border-radius: 5px;
    color: #3d5e7a;
    font-size: 11px;
    font-weight: 600;
}

.registration-time-cell {
    display: inline-flex;
    margin-top: 2px;
}

.registration-time-separator {
    display: inline-block;
    margin: 0 3px;
    color: #8a94a0;
    font-size: 10px;
}

/* ------------------------------------------------------------
   سطح و ترم
   ------------------------------------------------------------ */

.registration-level-title {
    max-width: 145px;
    color: #34495e;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
    white-space: normal;
}

.registration-level-title + .admin-content-text--tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
}

/* ------------------------------------------------------------
   ظرفیت
   ------------------------------------------------------------ */

.admin-badge--capacity-unknown {
    background: #f1f3f5;
    color: #6c757d;
}

.admin-badge--capacity-full {
    background: #fcebed;
    color: #c4454a;
}

.admin-badge--capacity-low {
    background: #fff8db;
    color: #b7791f;
}

.registration-classes-table .admin-badge--capacity,
.registration-classes-table .admin-badge--capacity-unknown,
.registration-classes-table .admin-badge--capacity-full,
.registration-classes-table .admin-badge--capacity-low {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
}

/* ------------------------------------------------------------
   تاریخ شروع و پایان
   ------------------------------------------------------------ */

.registration-date-box {
    min-width: 125px;
    padding: 5px 9px;
}

.registration-date-box .cell-date {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    font-size: 10px;
    line-height: 1.9;
}

.registration-date-box .cell-date > i {
    margin-left: 5px;
}

/* ------------------------------------------------------------
   نوع کلاس: مجازی / حضوری
   ------------------------------------------------------------ */

.registration-type-badge {
    justify-content: center;
    min-width: 90px;
}

.registration-place {
    max-width: 180px;
    margin-top: 6px;
    color: #6c757d;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.7;
    white-space: normal;
    overflow-wrap: anywhere;
}

.registration-place i {
    color: #557898;
}

.registration-place + .admin-content-text--tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
}

/* ------------------------------------------------------------
   وضعیت
   ------------------------------------------------------------ */

.registration-classes-table .admin-badge--status-pending,
.registration-classes-table .admin-badge--status-running,
.registration-classes-table .admin-badge--status-exam,
.registration-classes-table .admin-badge--status-ended,
.registration-classes-table .admin-badge--status-default {
    justify-content: center;
    min-width: 90px;
}

/* ------------------------------------------------------------
   واکنش گرایی
   ------------------------------------------------------------ */

@media (max-width: 991.98px) {
    .registration-classes-table {
        min-width: 1200px;
    }


}
