/* ==========================================================================
   ISHOST — تیکت (ishost105)
   مشاهده + لیست کارت اختصاصی (بدون DataTables)
   ========================================================================== */

body.ishost-ticket-page .ish-breadcrumb,
body.ishost-ticket-page .master-breadcrumb,
body.ishost-ticket-page .primary-content > h1,
body.ishost-ticket-page .primary-content > .header-lined,
body.ishost-ticket-page .ish-page-hero,
body.ishost-ticket-page .ish-ticket__steps,
body.ishost-ticket-page .ish-ticket__dept-chip {
    display: none !important;
}

body.ishost-ticketlist-page .primary-content > .card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.ishost-ticketlist-page .primary-content > .card > .card-body {
    padding: 0 !important;
}

body.ishost-viewticket-page .primary-content > .card,
body.ishost-viewticket-page .view-ticket {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.ishost-ticket-page .primary-content > .card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.ishost-ticket-page .primary-content > .card > .card-body {
    padding: 0 !important;
}

body.ishost-ticket-page .primary-content {
    background:
        radial-gradient(ellipse 70% 36% at 50% 0%, rgba(13, 62, 163, 0.04), transparent 62%);
}

.ish-ticket {
    --ish-blue: #0d3ea3;
    --ish-gold: #f5b400;
    --ish-ink: #0f172a;
    --ish-muted: #64748b;
    --ish-line: rgba(148, 163, 184, 0.24);
    direction: rtl;
    text-align: right;
    max-width: 920px;
    margin: 0 auto 2.75rem;
    padding: 0.9rem 1.1rem 0;
    font-family: "Vazir", "IRANSans", "IRANYekan", Tahoma, Arial, sans-serif;
    box-sizing: border-box;
}

.ish-ticket *,
.ish-ticket *::before,
.ish-ticket *::after {
    box-sizing: border-box;
}

/* Hero — هم‌تراز پنل، نه وسط‌چین خالی */
.ish-ticket__hero {
    margin: 0 0 0.95rem;
    padding: 0.15rem 0.15rem 0.85rem;
    text-align: right;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.ish-ticket__hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.ish-ticket__hero-text {
    min-width: 0;
    flex: 1 1 auto;
}

.ish-ticket__kicker {
    margin: 0 0 0.28rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ish-blue);
}

.ish-ticket__title {
    margin: 0 0 0.28rem;
    font-size: clamp(1.28rem, 2.2vw, 1.55rem);
    font-weight: 700;
    color: var(--ish-ink);
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.ish-ticket__lead {
    margin: 0;
    max-width: 32rem;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.65;
    color: #7c8aa0;
}

.ish-ticket__hero-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ish-blue);
    text-decoration: none;
    white-space: nowrap;
}

.ish-ticket__hero-link:hover {
    text-decoration: underline;
}

/* Panel */
.ish-ticket__panel {
    position: relative;
    padding: 1.65rem 1.7rem 1.45rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--ish-line);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 18px 40px -28px rgba(15, 23, 42, 0.4);
    overflow: hidden;
}

.ish-ticket__panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d3ea3 0%, #1a56c4 45%, #f5b400 100%);
}

.ish-ticket__row {
    display: grid;
    gap: 1rem 1.1rem;
    margin-bottom: 1.05rem;
    align-items: end;
}

.ish-ticket__row--2 {
    grid-template-columns: 1fr 1fr;
}

.ish-ticket__row--3 {
    grid-template-columns: 1.15fr 1.15fr 1fr;
}

.ish-ticket__field {
    margin-bottom: 1.05rem;
    min-width: 0;
}

.ish-ticket__row .ish-ticket__field {
    margin-bottom: 0;
}

.ish-ticket__field--full {
    grid-column: 1 / -1;
}

.ish-ticket__label {
    display: block;
    margin: 0 0 0.38rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.ish-ticket__section-label {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.ish-ticket__control,
.ish-ticket .form-control,
.ish-ticket select.form-control,
.ish-ticket textarea.form-control {
    width: 100%;
    min-height: 50px;
    border-radius: 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.36) !important;
    box-shadow: none !important;
    background: #fff !important;
    color: var(--ish-ink);
    font-family: inherit;
    font-size: 0.93rem;
    padding: 0.65rem 1rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ish-ticket__control:hover,
.ish-ticket .form-control:hover {
    border-color: rgba(13, 62, 163, 0.34) !important;
}

.ish-ticket__control:focus,
.ish-ticket .form-control:focus {
    border-color: rgba(13, 62, 163, 0.52) !important;
    box-shadow: 0 0 0 3px rgba(13, 62, 163, 0.11) !important;
    outline: none;
}

.ish-ticket__field--message {
    margin-bottom: 1.15rem;
}

.ish-ticket__textarea {
    min-height: 200px !important;
    resize: vertical;
    line-height: 1.75 !important;
    padding: 0.95rem 1.05rem !important;
    direction: rtl;
    text-align: right;
}

.ish-ticket__hint {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    font-weight: 550;
    color: #94a3b8;
    line-height: 1.55;
}

/* Priority — هم‌ارتفاع با select */
.ish-ticket__field--prio {
    position: relative;
    max-width: none;
}

.ish-ticket__prio-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.ish-ticket__prio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 3px;
    min-height: 50px;
    border-radius: 12px;
    background: #eef2f7;
    align-items: stretch;
}

.ish-ticket__prio {
    appearance: none;
    border: 0;
    background: transparent;
    border-radius: 10px;
    min-height: 44px;
    padding: 0.35rem 0.35rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.ish-ticket__prio:hover {
    color: var(--ish-blue);
}

.ish-ticket__prio.is-active {
    background: #fff;
    color: var(--ish-blue);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ish-ticket__prio[data-value="High"].is-active {
    color: #b45309;
}

/* Attach — ساختار استاندارد WHMCS */
.ish-ticket__attach {
    margin: 0 0 1.2rem;
    padding: 1.1rem 0 0;
    border-top: 1px solid #eef2f7;
}

.ish-ticket__attach .input-group,
.ish-ticket #fileUploadsContainer .input-group {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
}

.ish-ticket__attach .custom-file,
.ish-ticket #fileUploadsContainer .custom-file {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    height: 50px;
    margin-bottom: 0;
}

.ish-ticket__attach .custom-file-input,
.ish-ticket #fileUploadsContainer .custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 50px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ish-ticket__attach .custom-file-label,
.ish-ticket #fileUploadsContainer .custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: 50px;
    padding: 0.75rem 5.5rem 0.75rem 1rem;
    margin: 0;
    line-height: 1.5;
    color: #64748b;
    background-color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 0 12px 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* RTL: فیلد راست، دکمه افزودن چپ — دکمه مرور روی لبه راست */
.ish-ticket__attach .custom-file-label::after,
.ish-ticket #fileUploadsContainer .custom-file-label::after {
    content: "مرور";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    z-index: 3;
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 1rem;
    line-height: 1.5;
    color: #fff;
    background: linear-gradient(145deg, #1248b8, #0d3ea3);
    border: none;
    border-radius: 0 12px 12px 0;
    font-size: 0.82rem;
    font-weight: 750;
}

.ish-ticket__attach .input-group-append,
.ish-ticket #fileUploadsContainer .input-group-append {
    display: flex;
    margin-left: -1px;
    margin-right: 0;
}

.ish-ticket__attach .ish-ticket__attach-more,
.ish-ticket__attach #btnTicketAttachmentsAdd {
    min-height: 50px;
    padding: 0 1.05rem;
    border-radius: 12px 0 0 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.36) !important;
    border-left: 0 !important;
    background: #f8fafc !important;
    color: var(--ish-blue) !important;
    font-size: 0.84rem !important;
    font-weight: 750 !important;
    box-shadow: none !important;
    white-space: nowrap;
}

.ish-ticket__attach .ish-ticket__attach-more:hover,
.ish-ticket__attach #btnTicketAttachmentsAdd:hover {
    background: #eef2f7 !important;
}

.ish-ticket #fileUploadsContainer {
    margin-top: 0.55rem;
}

.ish-ticket #fileUploadsContainer .input-group {
    margin-bottom: 0.55rem;
}

.ish-ticket #fileUploadsContainer .custom-file-label {
    border-radius: 12px;
    padding: 0.75rem 5.5rem 0.75rem 1rem;
}

.ish-ticket #fileUploadsContainer .custom-file-label::after {
    border-radius: 0 12px 12px 0;
}

.ish-ticket__custom {
    margin: 0 0 1.1rem;
    padding: 1.05rem 0 0;
    border-top: 1px solid #eef2f7;
}

.ish-ticket__footer {
    padding-top: 0.25rem;
}

.ish-ticket__captcha {
    margin: 0 0 1rem;
    text-align: center;
}

.ish-ticket__actions {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ish-ticket__submit,
.ish-ticket #openTicketSubmit {
    flex: 1 1 auto;
    max-width: 280px;
    min-height: 50px;
    border-radius: 12px !important;
    font-weight: 650 !important;
    font-size: 0.93rem !important;
    background: linear-gradient(145deg, #1248b8, #0d3ea3) !important;
    border: none !important;
    box-shadow: 0 12px 24px -14px rgba(13, 62, 163, 0.7);
}

.ish-ticket__submit:hover,
.ish-ticket #openTicketSubmit:hover {
    filter: brightness(1.04);
}

.ish-ticket__cancel {
    font-size: 0.88rem;
    font-weight: 650;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
}

.ish-ticket__cancel:hover {
    color: var(--ish-blue);
}

.ish-ticket__alert .alert {
    border-radius: 14px;
    margin-bottom: 1rem;
}

.ish-ticket .EasyMDEContainer,
.ish-ticket .editor-toolbar,
.ish-ticket .CodeMirror {
    display: none !important;
}

.ish-ticket textarea.ish-ticket__textarea {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
}

/* Step one */
.ish-ticket--stepone {
    max-width: 920px;
}

.ish-ticket__depts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ish-ticket__dept.ish-dept-card {
    border-radius: 16px !important;
    border: 1px solid var(--ish-line) !important;
    background: #fff !important;
    box-shadow: 0 12px 28px -22px rgba(13, 62, 163, 0.4) !important;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ish-ticket__dept.ish-dept-card:hover {
    border-color: rgba(13, 62, 163, 0.35) !important;
    transform: translateY(-1px);
}

/* Confirm */
.ish-ticket__confirm-card {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.ish-ticket__confirm-msg {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--ish-ink);
}

.ish-ticket__confirm-id {
    color: var(--ish-blue);
    font-weight: 800;
    text-decoration: none;
}

.ish-ticket__confirm-desc {
    margin: 0 0 1.1rem;
    font-size: 0.88rem;
    color: var(--ish-muted);
    line-height: 1.65;
}

@media (max-width: 991.98px) {
    .ish-ticket__row--3 {
        grid-template-columns: 1fr 1fr;
    }

    .ish-ticket__row--3 .ish-ticket__field--prio {
        grid-column: 1 / -1;
        max-width: 420px;
    }
}

@media (max-width: 767.98px) {
    .ish-ticket {
        padding: 0.55rem 0.7rem 0;
        max-width: 100%;
    }

    .ish-ticket__hero-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .ish-ticket__hero-link {
        margin-bottom: 0;
    }

    .ish-ticket__panel {
        padding: 1.25rem 1.1rem 1.15rem;
        border-radius: 18px;
    }

    .ish-ticket__row--2,
    .ish-ticket__row--3,
    .ish-ticket__depts {
        grid-template-columns: 1fr;
    }

    .ish-ticket__row--3 .ish-ticket__field--prio {
        max-width: none;
    }

    .ish-ticket__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ish-ticket__submit,
    .ish-ticket #openTicketSubmit {
        max-width: none;
        width: 100%;
    }

    .ish-ticket__cancel {
        text-align: center;
    }

    .ish-ticket__attach .custom-file-label::after,
    .ish-ticket #fileUploadsContainer .custom-file-label::after {
        content: "فایل";
        padding: 0 0.75rem;
    }

    .ish-ticket__attach .ish-ticket__attach-more span,
    .ish-ticket__attach #btnTicketAttachmentsAdd {
        font-size: 0.78rem !important;
        padding: 0 0.7rem;
    }
}
/* ==========================================================================
   مشاهده تیکت — فاصله‌گذاری حرفه‌ای (ishost103)
   ========================================================================== */

.ish-ticket--view {
    --ish-surface-radius: 14px;
    --ish-surface-border: #e5eaf1;
    --ish-surface-pad-x: 1.2rem;
    --ish-gap: 1.75rem;
    --ish-msg-pad-x: 1.15rem;
    max-width: 900px;
}

.ish-ticket--view .ish-surface {
    background: #fff;
    border: 1px solid var(--ish-surface-border);
    border-radius: var(--ish-surface-radius);
    box-shadow: none;
}

/* فقط border/padding صفر — margin را صفر نکن (باگ چسبیدن) */
.ish-ticket--view .ish-ticket__hero {
    border-bottom: none;
}

/* —— Hero بالا —— جمع‌وجور + فاصلهٔ قطعی تا پیام —— */
.ish-ticket--view .ish-ticket__hero.ish-ticket__hero--view,
.ish-ticket__hero--view {
    margin: 0 0 var(--ish-gap) !important;
    padding: 0.95rem var(--ish-surface-pad-x) 0.95rem;
    text-align: right;
    box-shadow: 0 8px 24px -22px rgba(15, 23, 42, 0.3);
}

.ish-ticket__hero--view::before {
    display: none;
}

.ish-ticket__hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f7;
}

.ish-ticket__hero--view .ish-ticket__hero-link {
    display: inline-flex;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ish-blue);
    text-decoration: none;
}

.ish-ticket__hero--view .ish-ticket__hero-link:hover {
    text-decoration: underline;
}

.ish-ticket__hero-main {
    min-width: 0;
}

.ish-ticket__hero--view .ish-ticket__kicker {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #94a3b8;
}

.ish-ticket__hero--view .ish-ticket__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.12rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--ish-ink);
}

.ish-ticket__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ish-ticket__meta-item {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
}

.ish-ticket__meta-item--status {
    background: #f1f5fb;
    border-color: #e2eaf8;
    color: var(--ish-blue);
}

.ish-ticket__meta-item--status.is-closed {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.ish-ticket__toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
}

.ish-ticket__btn-reply {
    min-height: 34px;
    padding: 0.3rem 0.9rem !important;
    border-radius: 8px !important;
    font-weight: 650 !important;
    font-size: 0.8rem !important;
    background: #0d3ea3 !important;
    border: none !important;
    box-shadow: none !important;
}

.ish-ticket__btn-close,
.ish-ticket__btn-closed {
    min-height: 34px;
    padding: 0.3rem 0.8rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

.ish-ticket__btn-close:hover {
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

.ish-ticket__block-head {
    margin: 0 0 1rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #eef2f7;
}

.ish-ticket__block-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ish-ink);
}

.ish-ticket__block-desc {
    margin: 0.22rem 0 0;
    font-size: 0.78rem;
    font-weight: 400;
    color: #94a3b8;
}

/* —— گفتگو —— */
.ish-ticket__thread {
    display: flex;
    flex-direction: column;
    gap: var(--ish-gap);
    margin: 0 0 var(--ish-gap);
}

.ish-ticket__alert {
    margin-bottom: var(--ish-gap);
}

.ish-msg {
    overflow: hidden;
}

.ish-msg--staff {
    border-color: #d9e3f4;
}

.ish-msg__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem var(--ish-msg-pad-x);
    border-bottom: 1px solid #eef2f7;
    background: #fbfcfd;
}

.ish-msg--staff .ish-msg__head {
    background: #f8fafc;
}

.ish-msg__who {
    min-width: 0;
}

.ish-msg__name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.ish-msg__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ish-ink);
    line-height: 1.3;
}

.ish-msg--staff .ish-msg__name {
    color: #0d3ea3;
}

.ish-msg__badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0.08rem 0.45rem;
    border-radius: 5px;
    background: #eaf0fa;
    color: var(--ish-blue);
    font-size: 0.68rem;
    font-weight: 700;
}

.ish-msg__badge--client {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

.ish-msg__date {
    font-size: 0.74rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

.ish-msg__body,
.ish-ticket--view .ticket-reply {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.ish-msg__body .message {
    padding: 1.05rem var(--ish-msg-pad-x) 1rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.85;
    color: #1e293b;
    word-wrap: break-word;
}

.ish-msg__body .message p {
    margin: 0 0 0.65rem;
}

.ish-msg__body .message p:last-child {
    margin-bottom: 0;
}

.ish-msg__ip {
    margin: 0.75rem 0 0 !important;
    padding-top: 0.6rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.73rem !important;
    color: #94a3b8 !important;
}

/* —— پیوست ظریف —— */
.ish-msg__attach {
    padding: 0.55rem var(--ish-msg-pad-x) 0.85rem;
    border-top: none;
    background: transparent;
}

.ish-msg__attach-title {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.ish-msg__attach-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.85rem;
}

.ish-msg__attach-list li {
    display: inline-flex;
}

.ish-msg__attach-item {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    color: var(--ish-blue);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.5;
}

.ish-msg__attach-item:hover {
    text-decoration: underline;
    border-color: transparent;
}

.ish-msg__attach-item.is-removed {
    color: #94a3b8;
    text-decoration: none;
    cursor: default;
}

/* —— فوتر امتیاز —— ظریف‌تر —— */
.ish-msg__footer {
    padding: 0.55rem var(--ish-msg-pad-x) 0.7rem;
    border-top: 1px solid #f1f5f9;
    background: #fcfcfd;
}

.ish-msg__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    margin: 0;
    padding: 0;
    border: none;
}

.ish-msg__rating-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
}

.ish-msg__rating .rating,
.ish-msg__rating .rating-done {
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    gap: 0.1rem;
    direction: ltr;
}

.ish-msg__rating .star {
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    margin: 0;
    padding: 0;
    cursor: pointer;
    color: #d1d5db;
    font-size: 1.25rem;
    line-height: 1.4rem;
    text-align: center;
    user-select: none;
}

.ish-msg__rating .star::before {
    content: none !important;
}

.ish-msg__rating .rating-done .star,
.ish-msg__rating.is-done .star {
    cursor: default;
}

.ish-msg__rating .star.active,
.ish-msg__rating .star.hover,
.ish-msg__rating .star:hover,
.ish-msg__rating .rating:hover .star:hover,
.ish-msg__rating .rating:hover .star:hover ~ .star {
    color: #0d3ea3;
}

.ish-msg__rating.is-done .rated,
.ish-msg__rating .rated {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0d3ea3;
    background: transparent;
    border-radius: 0;
    padding: 0;
    line-height: 1.3;
}

/* —— فرم پاسخ —— */
.ish-ticket__reply-panel {
    margin: 0;
    padding: 1.3rem var(--ish-surface-pad-x) 1.25rem;
}

.ish-ticket__reply-panel.ish-ticket__panel::before,
.ish-ticket--view .ish-ticket__reply-panel::before {
    display: none !important;
}

.ish-ticket__reply-head {
    margin-bottom: 1rem;
}

.ish-ticket--view .ish-ticket__cancel {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.ish-ticket--view .ish-ticket__submit {
    max-width: 220px;
    background: #0d3ea3 !important;
    box-shadow: none !important;
}

.ish-ticket--view .ish-ticket__attach {
    margin-bottom: 1rem;
    padding-top: 0.9rem;
}

@media (max-width: 767.98px) {
    .ish-ticket--view {
        max-width: 100%;
        --ish-gap: 1.35rem;
        --ish-surface-pad-x: 1.05rem;
        --ish-msg-pad-x: 1rem;
    }

    .ish-ticket--view .ish-ticket__hero.ish-ticket__hero--view,
    .ish-ticket__hero--view {
        padding: 0.9rem 1.05rem 0.9rem;
    }

    .ish-ticket__hero-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .ish-ticket__toolbar {
        justify-content: flex-start;
        width: 100%;
    }

    .ish-msg__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .ish-msg__date {
        white-space: normal;
    }
}
/* ==========================================================================
   لیست تیکت‌ها — کارت اختصاصی بدون DataTables (ishost105)
   ========================================================================== */

.ish-ticket--list {
    --ish-surface-radius: 14px;
    --ish-surface-border: #e5eaf1;
    max-width: 920px;
    margin: 0 auto 2.5rem;
}

.ish-ticket--list .ish-surface {
    background: #fff;
    border: 1px solid var(--ish-surface-border);
    border-radius: var(--ish-surface-radius);
    box-shadow: none;
}

.ish-ticket--list .ish-ticket__hero {
    border-bottom: none;
}

.ish-ticket--list .ish-ticket__hero--list {
    margin: 0 0 1.25rem !important;
    padding: 1rem 1.25rem 1.05rem;
    box-shadow: 0 8px 24px -22px rgba(15, 23, 42, 0.28);
}

.ish-ticket--list .ish-ticket__hero-top {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    align-items: flex-start;
}

.ish-ticket--list .ish-ticket__lead {
    margin: 0.2rem 0 0;
    max-width: 28rem;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.6;
    color: #7c8aa0;
}

.ish-ticket--list .ish-ticket__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.1vw, 1.4rem);
}

.ish-ticket--list .ish-ticket__toolbar {
    padding-top: 0.15rem;
}

.ish-tlist {
    padding: 1rem 1.1rem 1.1rem;
}

.ish-tlist__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #eef2f7;
}

.ish-tlist__search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.ish-tlist__search-ico {
    position: absolute;
    right: 0.85rem;
    color: #94a3b8;
    font-size: 0.82rem;
    pointer-events: none;
}

.ish-tlist__search-input {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 2.4rem 0.55rem 0.9rem;
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.88rem;
    box-shadow: none;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ish-tlist__search-input::placeholder {
    color: #94a3b8;
}

.ish-tlist__search-input:focus {
    background: #fff;
    border-color: rgba(13, 62, 163, 0.4);
    box-shadow: 0 0 0 3px rgba(13, 62, 163, 0.1);
}

.ish-tlist__count {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 650;
    color: #94a3b8;
    white-space: nowrap;
}

.ish-tlist__items {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ish-tcard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.ish-tcard:hover {
    border-color: rgba(13, 62, 163, 0.22);
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
}

.ish-tcard.is-unread {
    border-color: #d7e2f4;
    background: #f7f9fc;
}

.ish-tcard__main {
    min-width: 0;
}

.ish-tcard__top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.ish-tcard__tid {
    font-size: 0.74rem;
    font-weight: 750;
    color: #0d3ea3;
}

.ish-tcard__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0d3ea3;
}

.ish-tcard__subject {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

.ish-tcard.is-unread .ish-tcard__subject {
    color: #0b2f7a;
}

.ish-tcard__dept {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 550;
    color: #94a3b8;
}

.ish-tcard__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.ish-tcard__status.label,
.ish-tcard__status {
    display: inline-flex !important;
    align-items: center;
    min-height: 26px;
    padding: 0.2rem 0.65rem !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    border: none !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}

.ish-tcard__date {
    font-size: 0.74rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

.ish-tcard__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    color: #cbd5e1;
    font-size: 0.75rem;
}

.ish-tcard:hover .ish-tcard__chevron {
    color: #0d3ea3;
}

.ish-tlist__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.25rem 1rem;
    text-align: center;
}

.ish-tlist__empty p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.ish-tlist__empty--search {
    padding: 1.25rem 0.5rem 0.5rem;
}

@media (max-width: 767.98px) {
    .ish-ticket--list {
        max-width: 100%;
    }

    .ish-tlist {
        padding: 0.85rem 0.85rem 0.95rem;
    }

    .ish-tlist__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ish-tlist__count {
        align-self: flex-start;
    }

    .ish-tcard {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "main chevron"
            "meta chevron";
        gap: 0.55rem 0.65rem;
        padding: 0.85rem 0.9rem;
    }

    .ish-tcard__main {
        grid-area: main;
    }

    .ish-tcard__meta {
        grid-area: meta;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ish-tcard__chevron {
        grid-area: chevron;
        align-self: center;
    }
}