.support-page .account-main {
    min-width: 0;
}

.support-title-row,
.support-detail-title,
.support-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.support-title-row h1,
.support-detail-title h1,
.support-admin-head h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.support-title-row p,
.support-admin-head p,
.support-detail-head p {
    margin: 5px 0 0;
    color: #667085;
}

.support-new-btn,
.support-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.support-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: #fff;
}

.support-filter-field,
.support-field {
    display: grid;
    gap: 7px;
}

.support-filter-field label,
.support-field label {
    font-weight: 700;
    color: #344054;
}

.support-filter-field input,
.support-filter-field select,
.support-field input,
.support-field select,
.support-field textarea,
.support-reply-box textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 11px 12px;
    color: #101828;
    background: #fff;
}

.support-field small {
    color: #667085;
}

.support-form,
.support-empty,
.support-closed-box {
    padding: 24px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: #fff;
}

.support-form-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
}

.support-form .support-field + .support-field,
.support-form-actions {
    margin-top: 18px;
}

.support-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
    color: #667085;
}

.support-empty i {
    font-size: 42px;
    color: #3366ff;
}

.support-empty h2 {
    margin: 0;
    color: #101828;
    font-size: 22px;
}

.support-ticket-list {
    display: grid;
    gap: 12px;
}

.support-list-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.support-list-card:hover {
    border-color: #b8c4d8;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .08);
    transform: translateY(-1px);
}

.support-list-card.has-unread {
    border-color: #f04438;
    background: #fffafa;
}

.support-list-top,
.support-list-meta,
.support-detail-meta,
.support-reply-actions,
.support-attachments {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.support-ticket-no {
    font-weight: 800;
    color: #1d2939;
}

.support-list-card h2 {
    margin: 8px 0;
    font-size: 18px;
    font-weight: 800;
    color: #101828;
}

.support-list-meta {
    color: #667085;
    font-size: 13px;
}

.support-list-meta span,
.support-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.support-unread-badge {
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #f04438;
    color: #fff;
    font-weight: 800;
}

.support-list-arrow {
    color: #98a2b3;
}

.support-pagination,
.support-admin-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.support-pagination a,
.support-admin-pagination a {
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #344054;
    text-decoration: none;
}

.support-pagination a.active,
.support-admin-pagination a.active {
    background: #3366ff;
    color: #fff;
    border-color: #3366ff;
}

.support-detail-head {
    padding: 20px;
    margin-bottom: 18px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: #fff;
}

.support-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #475467;
    text-decoration: none;
    font-weight: 700;
}

.support-chat {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 620px;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: #f8fafc;
}

.support-chat-card .support-chat {
    max-height: 680px;
    border: 0;
}

.support-message {
    display: flex;
    width: 100%;
}

.support-message--customer {
    justify-content: flex-end;
}

.support-message--admin {
    justify-content: flex-start;
}

.support-message--system {
    justify-content: center;
}

.support-message-bubble {
    width: min(76%, 680px);
    padding: 13px 15px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf0;
    color: #101828;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .04);
}

.support-message--customer .support-message-bubble {
    background: #eef4ff;
    border-color: #c7d7fe;
}

.support-message--admin .support-message-bubble {
    background: #fff;
}

.support-message--system .support-message-bubble {
    width: auto;
    max-width: 90%;
    background: #f2f4f7;
    color: #475467;
    text-align: center;
}

.support-message--note .support-message-bubble {
    background: #fff8db;
    border-color: #f5d76e;
}

.support-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: #667085;
    font-size: 12px;
}

.support-message-meta strong {
    color: #344054;
}

.support-message-body {
    line-height: 1.55;
    word-break: break-word;
}

.support-attachments {
    margin-top: 12px;
}

.support-attachment {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 7px 9px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
    color: #344054;
    text-decoration: none;
    font-size: 13px;
}

.support-attachment span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-reply-box {
    position: sticky;
    bottom: 0;
    display: grid;
    gap: 12px;
    padding: 16px;
    margin-top: 16px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    z-index: 3;
}

.support-reply-box--admin {
    position: static;
    margin-top: 0;
    border: 0;
    padding: 0;
}

.support-file-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(100%, 320px);
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    cursor: pointer;
    color: #344054;
    background: #fff;
}

.support-file-trigger.has-file {
    border-color: #84adff;
    background: #eef4ff;
    color: #1d4ed8;
}

.support-file-trigger span {
    min-width: 0;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-file-trigger input {
    display: none;
}

.support-closed-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.support-closed-box p {
    margin: 4px 0 0;
    color: #667085;
}

.support-js-alert {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    min-width: 260px;
    box-shadow: 0 12px 34px rgba(16, 24, 40, .16);
}

.support-admin-page .card {
    border-radius: 8px;
}

.support-admin-head h1 {
    font-size: 26px;
}

.support-stat-card .card-body {
    display: grid;
    gap: 10px;
}

.support-stat-card strong {
    font-size: 28px;
    line-height: 1;
}

.support-filter-card .form-label,
.support-side-card .form-label {
    font-weight: 700;
}

.support-admin-table th,
.support-admin-table td {
    vertical-align: middle;
}

.support-side-card .card-title {
    margin: 0;
}

.support-info-list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.support-info-list div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}

.support-info-list dt {
    color: #667085;
    font-weight: 700;
}

.support-info-list dd {
    margin: 0;
    color: #101828;
    word-break: break-word;
}

.support-control-form + .support-control-form {
    margin-top: 14px;
}

.support-log-list {
    display: grid;
    gap: 12px;
}

.support-log-item {
    display: grid;
    gap: 3px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
}

.support-log-item strong {
    color: #101828;
}

.support-log-item span,
.support-log-item small {
    color: #667085;
}

@media (max-width: 991.98px) {
    .support-filter-bar,
    .support-form-grid {
        grid-template-columns: 1fr;
    }

    .support-title-row,
    .support-detail-title,
    .support-admin-head,
    .support-closed-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .support-chat {
        max-height: 70vh;
        padding: 12px;
    }

    .support-message-bubble {
        width: min(88%, 680px);
    }
}

@media (max-width: 575.98px) {
    .support-list-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .support-list-arrow {
        display: none;
    }

    .support-message-bubble {
        width: 96%;
    }

    .support-message-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .support-reply-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .support-file-trigger,
    .support-submit-btn {
        justify-content: center;
        width: 100%;
    }
}
