.ticket-list { display: grid; gap: 10px; }
.ticket-row { min-height: 74px; display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.ticket-row:hover { border-color: #9b9b9b; box-shadow: 0 10px 26px rgba(0, 0, 0, .08); }
.ticket-row-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; background: #ededed; color: #111; }
.ticket-row-main { min-width: 0; flex: 1; }
.ticket-row-main strong, .ticket-row-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row-main strong { font-size: 14px; }
.ticket-row-main small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.ticket-row-meta { display: flex; align-items: center; gap: 8px; color: #777; }
.ticket-row-meta>svg { width: 16px; }
.ticket-status, .ticket-priority { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border: 1px solid #bdbdbd; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.ticket-status.status-open { background: #111; color: #fff; border-color: #111; }
.ticket-status.status-pending { background: #e7e7e7; color: #111; }
.ticket-status.status-closed { background: #fff; color: #666; }
.ticket-priority.priority-high { border-color: #111; }
.ticket-priority.priority-normal, .ticket-priority.priority-low { background: #f2f2f2; color: #555; }
.ticket-form-panel { max-width: 760px; }
.ticket-form-panel form, .ticket-reply-form, .ticket-side form { display: grid; gap: 16px; margin-top: 0; }
.ticket-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.ticket-thread-head { padding-bottom: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; border-bottom: 1px solid var(--line); }
.message-list { display: grid; gap: 14px; padding: 20px 0; }
.ticket-message { max-width: 88%; padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
.ticket-message.from-user { justify-self: end; background: #111; color: #fff; border-color: #111; }
.ticket-message.from-admin { justify-self: start; background: #f5f5f5; }
.message-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; font-size: 12px; }
.message-head time { color: #888; font-size: 10px; white-space: nowrap; }
.from-user .message-head time { color: #c9c9c9; }
.message-body { margin-top: 9px; white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; }
.ticket-side dl { margin-top: 18px; }
.ticket-side .button { width: 100%; margin-top: 18px; }
.ticket-closed-note { padding: 14px; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.ticket-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.ticket-admin-stats span { padding: 13px 15px; border-right: 1px solid var(--line); }
.ticket-admin-stats span:last-child { border-right: 0; }
.ticket-admin-stats strong, .ticket-admin-stats small { display: block; }
.ticket-admin-stats strong { font-size: 20px; }
.ticket-admin-stats small { color: var(--muted); font-size: 11px; }
.ticket-admin-table { min-width: 1000px; }
.ticket-subject-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.ticket-status-form { display: inline-flex!important; align-items: center; gap: 5px!important; margin: 0 0 0 7px!important; vertical-align: middle; }
.ticket-status-form select { width: auto; min-width: 100px; min-height: 32px; padding: 5px 7px; font-size: 11px; }
.ticket-status-form .button { white-space: nowrap; }

@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } .ticket-side { order: -1; } }
@media (max-width: 620px) { .ticket-row { align-items: flex-start; } .ticket-row-meta { flex-direction: column; align-items: flex-end; } .ticket-message { max-width: 96%; } .ticket-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ticket-admin-stats span:nth-child(2) { border-right: 0; } .ticket-admin-stats span:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .ticket-form-actions { justify-content: space-between; } }
