.feedback-page {
    --ticket-blue: #0076a8;
    --ticket-blue-hover: #005e87;
    --ticket-ink: #10203b;
    --ticket-muted: #52667b;
    --ticket-line: #d7e5ee;
    box-sizing: border-box;
    width: min(1040px, calc(100% - 32px));
    margin-inline: auto;
    padding-block: 36px 72px;
    color: var(--ticket-ink);
    direction: rtl;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.feedback-page *, .feedback-page *::before, .feedback-page *::after { box-sizing: border-box; }
.feedback-page h1, .feedback-page h2, .feedback-page p { margin-block: 0; }
.feedback-page h1 { font-size: clamp(1.2rem, 3vw, 1.65rem); line-height: 1.8; }
.feedback-page h2 { font-size: 1rem; line-height: 1.8; }
.feedback-page a { text-decoration: none; }
.feedback-page :is(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--ticket-blue); outline-offset: 3px; }
.feedback-page :is(button, input, select, textarea) { font-family: inherit; }
.feedback-page button { cursor: pointer; }
.feedback-page bdi { unicode-bidi: isolate; }
.feedback-inbox, .ticket-form-shell, .ticket-confirm-shell, .ticket-thread, .ticket-staff-card { min-width: 0; padding: 24px; border: 1px solid var(--ticket-line); border-radius: 20px; background: #fff; box-shadow: 0 6px 24px #10203b05; }
.feedback-toolbar { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-block-end: 24px; }
.feedback-toolbar > div, .feedback-ticket-main { min-width: 0; }
.feedback-kicker { display: block; margin-block-end: 4px; color: var(--ticket-blue); font-size: .76rem; font-weight: 800; }
.feedback-toolbar p, .ticket-muted, .ticket-field-hint { margin-block-start: 6px; color: var(--ticket-muted); font-size: .82rem; line-height: 1.9; }
.feedback-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.feedback-toolbar-actions .feedback-new-action { gap: 6px; }
.feedback-toolbar-actions .feedback-new-action > span { font-size: 1.15rem; font-weight: 500; }
.feedback-new-action, .ticket-secondary-action, .ticket-form-actions button, .ticket-confirm-shell button, .feedback-filter button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 9px 16px;
    border: 1px solid var(--ticket-blue); border-radius: 12px;
    background: var(--ticket-blue); color: #fff;
    font: inherit; font-size: .82rem; font-weight: 800; line-height: 1.6; text-align: center;
    transition: background 150ms ease, border-color 150ms ease;
}
.feedback-new-action:hover, .ticket-form-actions button:hover, .ticket-confirm-shell button:hover, .feedback-filter button:hover { background: var(--ticket-blue-hover); border-color: var(--ticket-blue-hover); color: #fff; }
.ticket-secondary-action { background: #fff; color: var(--ticket-blue); border-color: var(--ticket-line); }
.ticket-secondary-action:hover { background: #eaf8fe; border-color: var(--ticket-blue); color: var(--ticket-blue-hover); }
.feedback-ticket-list { display: grid; gap: 12px; }
.feedback-ticket-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px; padding: 18px; border: 1px solid var(--ticket-line); border-radius: 14px; }
.feedback-subject { display: block; color: var(--ticket-ink); font-size: .98rem; font-weight: 800; line-height: 1.9; }
.feedback-subject:hover, .ticket-text-action:hover, .ticket-back-link:hover, .ticket-owner-actions a:hover { color: var(--ticket-blue-hover); text-decoration: underline; text-underline-offset: 4px; }
.feedback-ticket-description { margin-block-start: 5px !important; color: var(--ticket-muted); font-size: .82rem; }
.feedback-ticket-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-block-start: 10px; color: var(--ticket-muted); font-size: .72rem; }
.feedback-ticket-side { display: grid; justify-items: end; gap: 14px; }
.feedback-conversation-list { gap: 0; border: 1px solid var(--ticket-line); border-radius: 16px; overflow: hidden; }
.feedback-conversation-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; padding: 18px; border: 0; border-radius: 0; background: #fff; }
.feedback-conversation-row + .feedback-conversation-row { border-block-start: 1px solid #e7eef3; }
.feedback-conversation-row:hover { background: #f8fcff; }
.feedback-conversation-row.is-waiting { border-inline-start: 3px solid var(--ticket-blue); padding-inline-start: 15px; }
.feedback-user-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #eaf8fe; color: var(--ticket-blue); font-size: 1.05rem; font-weight: 800; line-height: 1; }
.feedback-sender-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-block-end: 3px; }
.feedback-sender { color: var(--ticket-ink); font-size: .85rem; font-weight: 800; }
.feedback-category { color: var(--ticket-muted); font-size: .7rem; }
.feedback-conversation-row .feedback-subject { font-size: .9rem; }
.feedback-conversation-row .feedback-ticket-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.9; }
.feedback-preview-author { color: #496174; font-weight: 700; }
.feedback-conversation-row .feedback-ticket-side { gap: 7px; padding-block-start: 1px; }
.feedback-row-time { color: #64778a; font-size: .7rem; white-space: nowrap; }
.feedback-conversation-row .ticket-text-action { gap: 8px; font-size: .76rem; }
.feedback-status { display: inline-flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; padding: 5px 9px; border-radius: 9px; color: #496174; background: #f0f4f7; font-size: .72rem; line-height: 1.8; }
.feedback-status::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-waiting_support { color: #00678e; background: #eaf8fe; }
.status-answered { color: #08705a; background: #eaf9f2; }
.status-closed { color: #526173; background: #f0f3f7; }
.ticket-text-action { display: inline-flex; align-items: center; min-height: 44px; color: var(--ticket-blue); font-size: .8rem; font-weight: 800; }
.feedback-empty { padding: 38px 18px; border: 1px dashed var(--ticket-line); border-radius: 14px; background: #f9fcff; text-align: center; }
.feedback-empty > span { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 12px; border-radius: 14px; color: var(--ticket-blue); background: #eaf8fe; }
.feedback-empty p { max-width: 440px; margin: 10px auto 18px; color: var(--ticket-muted); font-size: .86rem; }
.feedback-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-block-start: 24px; font-size: .78rem; }
.feedback-pagination a { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 12px; border: 1px solid var(--ticket-line); border-radius: 10px; color: var(--ticket-blue); background: #fff; }
.feedback-pagination a:hover { border-color: var(--ticket-blue); background: #eaf8fe; }
.feedback-pagination span { color: var(--ticket-muted); }
.ticket-form-shell, .ticket-confirm-shell { width: min(660px, 100%); margin-inline: auto; }
.ticket-back-link { display: inline-flex; align-items: center; min-height: 44px; margin-block-end: 14px; color: var(--ticket-blue); font-size: .83rem; font-weight: 700; }
.ticket-form-shell > p, .ticket-confirm-shell > p { margin-block: 10px 22px; color: var(--ticket-muted); font-size: .86rem; }
.ticket-form { display: grid; gap: 16px; }
.ticket-form-field { display: grid; min-width: 0; gap: 7px; }
.ticket-form-field label { font-size: .83rem; font-weight: 800; }
.ticket-form-field input, .ticket-form-field select, .ticket-form-field textarea, .feedback-filter select {
    min-width: 0; width: 100%; min-height: 46px; padding: 10px 12px;
    border: 1px solid #b4c9d8; border-radius: 11px; background: #fff; color: var(--ticket-ink);
    font: inherit; font-size: 16px; line-height: 1.8; direction: rtl; text-align: right;
}
.ticket-form-field textarea { resize: vertical; max-width: 100%; }
.feedback-page :is(.ticket-form-field select, .feedback-filter select) {
    appearance: none; -webkit-appearance: none;
    padding-inline-end: 42px; border-color: #c5d8e5; border-radius: 12px;
    background-color: #f9fcfe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' stroke='%2352667b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: left 13px center; background-repeat: no-repeat; background-size: 18px;
    cursor: pointer;
}
.feedback-page :is(.ticket-form-field select, .feedback-filter select):hover { border-color: #83bad3; }
.feedback-page :is(.ticket-form-field select, .feedback-filter select):focus { background-color: #fff; border-color: var(--ticket-blue); box-shadow: 0 0 0 3px #0076a810; }
.feedback-page select option { background: #fff; color: var(--ticket-ink); }
.ticket-form-field :is(input, select, textarea):focus { border-color: var(--ticket-blue); }
.ticket-form-field :is(input, textarea)::placeholder { color: #63788a; }
.ticket-form-error { color: #a62732; font-size: .8rem; line-height: 1.9; }
.ticket-form-error .errorlist { margin: 0; padding-inline-start: 20px; }
.ticket-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ticket-form-actions a, .ticket-confirm-shell form a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ticket-muted); font-size: .82rem; }
.ticket-form-actions .ticket-field-hint { margin: 0; }
.ticket-confirm-shell { text-align: center; }
.ticket-confirm-shell > span { display: grid; width: 46px; height: 46px; place-items: center; margin: 0 auto 14px; border-radius: 14px; color: var(--ticket-blue); background: #eaf8fe; font-size: 1.3rem; }
.ticket-confirm-shell form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.ticket-thread-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-block-end: 20px; border-block-end: 1px solid var(--ticket-line); }
.ticket-thread-header > div { min-width: 0; }
.ticket-thread-header time, .ticket-reply time { color: var(--ticket-muted); font-size: .72rem; }
.ticket-participant { margin-block: 5px !important; color: var(--ticket-muted); font-size: .82rem; }
.ticket-participant strong { color: var(--ticket-ink); }
.ticket-original, .ticket-conversation, .ticket-reply-composer { padding-block: 20px; }
.ticket-original, .ticket-conversation { border-block-end: 1px solid var(--ticket-line); }
.ticket-original h2, .ticket-conversation h2, .ticket-reply-composer h2 { margin-block-end: 12px; }
.ticket-body { color: var(--ticket-ink); font-size: .9rem; line-height: 2; text-align: start; unicode-bidi: plaintext; overflow-wrap: anywhere; }
.ticket-thread { overflow: hidden; }
.ticket-conversation { margin-inline: -24px; padding: 20px 24px 24px; background: #f7fafc; }
.ticket-conversation > h2 { color: #52667b; font-size: .8rem; font-weight: 700; }
.ticket-reply { width: fit-content; max-width: 88%; padding: 14px 17px; margin-block-start: 14px; margin-inline-end: auto; border: 1px solid #dde6ee; border-radius: 17px 17px 6px 17px; background: #fff; box-shadow: 0 2px 4px #10203b03; }
.ticket-reply-support { margin-inline-start: auto; margin-inline-end: 0; background: #eaf8fe; border-color: #c9e4f1; border-radius: 17px 17px 17px 6px; }
.ticket-reply header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-block-end: 8px; }
.ticket-reply strong { color: var(--ticket-blue); font-size: .8rem; }
.ticket-message-author { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.ticket-message-role { color: var(--ticket-muted); font-size: .68rem; }
.ticket-conversation-empty { margin-block-start: 18px !important; color: var(--ticket-muted); font-size: .78rem; text-align: center; }
.ticket-reply-composer .ticket-form-field textarea { min-height: 115px; background: #fcfdfe; }
.ticket-owner-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block-start: 12px; border-block-start: 1px solid var(--ticket-line); }
.ticket-owner-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ticket-blue); font-size: .78rem; }
.ticket-staff-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block-start: 20px; }
.ticket-staff-card h2 { margin-block-end: 10px; }
.ticket-staff-card .ticket-form { margin-block-start: 14px; }
.ticket-escalation-state { margin-block: 12px !important; color: var(--ticket-blue); font-size: .8rem; font-weight: 800; }
.ticket-notice { padding: 10px 12px; margin-block: 10px 14px !important; border: 1px solid #f1dab0; border-radius: 10px; background: #fffaf0; color: #75501c; font-size: .8rem; line-height: 1.9; }
.feedback-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px 16px; margin-block-end: 20px; border: 1px solid #e6edf2; border-radius: 14px; background: #f7fafc; font-size: .83rem; }
.feedback-filter-field { display: grid; gap: 6px; min-width: 210px; max-width: 100%; }
.feedback-filter label { font-size: .75rem; color: var(--ticket-muted); font-weight: 700; }
.feedback-filter select { max-width: 100%; font-size: .82rem; min-height: 44px; }
.feedback-filter button { min-height: 44px; padding-inline: 18px; }
@media (max-width: 700px) {
    .feedback-page { width: calc(100% - 24px); padding-block: 20px 44px; }
    .feedback-inbox, .ticket-form-shell, .ticket-confirm-shell, .ticket-thread, .ticket-staff-card { padding: 16px; border-radius: 16px; }
    .feedback-toolbar { flex-direction: column; gap: 14px; margin-block-end: 20px; }
    .feedback-toolbar-actions { width: 100%; }
    .feedback-toolbar-actions a { flex: 1 1 auto; }
    .feedback-ticket-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
    .feedback-ticket-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
    .ticket-thread-header { flex-direction: column; gap: 12px; }
    .ticket-reply { padding: 12px; }
    .feedback-conversation-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 14px 12px; }
    .feedback-conversation-row.is-waiting { padding-inline-start: 9px; }
    .feedback-user-avatar { width: 36px; height: 36px; border-radius: 12px; font-size: .92rem; }
    .feedback-conversation-row .feedback-ticket-side { grid-column: 2; gap: 5px 12px; }
    .feedback-conversation-row .feedback-row-time { order: 2; font-size: .66rem; }
    .feedback-conversation-row .ticket-text-action { order: 3; flex-basis: 100%; min-height: 40px; }
    .feedback-conversation-row .feedback-status { font-size: .66rem; }
    .feedback-sender-line { gap: 3px 8px; }
    .feedback-sender { font-size: .82rem; }
    .feedback-category { font-size: .65rem; }
    .ticket-conversation { margin-inline: -16px; padding-inline: 16px; }
    .ticket-reply { max-width: 94%; }
    .ticket-staff-tools { grid-template-columns: minmax(0, 1fr); }
    .feedback-filter { align-items: end; padding: 12px; }
    .feedback-filter-field { flex: 1 1 145px; min-width: 0; }
    .feedback-filter select { width: 100%; font-size: 16px; }
    .feedback-filter button { flex: 0 0 auto; padding-inline: 12px; }
    .ticket-staff-card .ticket-secondary-action { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .feedback-page :is(a, button) { transition: none; }
}
