html,
body {
    min-height: 100%;
    margin: 0;
    background: #061517;
    color: #f4fffd;
    font-family: "Poppins", system-ui, sans-serif;
}

.support-page {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 130px 0 70px;
    box-sizing: border-box;
}

.support-intro {
    margin-bottom: 30px;
}

.support-kicker {
    color: #62dc75;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.support-intro h1 {
    margin: 8px 0 12px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.08;
}

.support-intro p {
    max-width: 700px;
    margin: 0;
    color: #a9bfbc;
    line-height: 1.7;
}

.support-card {
    padding: 28px;
    border-radius: 18px;
    background: rgba(8, 29, 31, 0.88);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.support-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.support-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 20px;
    border: 0;
    border-radius: 16px;
    background: #0a2426;
    color: white;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.support-option:hover {
    background: #0d2e30;
    transform: translateY(-2px);
}

.support-option > i {
    color: #72918d;
}

.support-option strong,
.support-option small {
    display: block;
}

.support-option strong {
    margin-bottom: 5px;
    font-size: 18px;
}

.support-option small {
    color: #9db5b1;
    font-size: 13px;
}

.option-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.16);
    color: #62dc75;
}

.ticket-center {
    margin-top: 54px;
}

.ticket-center[hidden],
.modal-backdrop[hidden],
#ticket-detail[hidden],
.ticket-empty[hidden] {
    display: none !important;
}

.ticket-center-heading,
.ticket-modal-header,
.reply-actions,
.ticket-detail-meta {
    display: flex;
    align-items: center;
}

.ticket-center-heading {
    justify-content: space-between;
    margin-bottom: 18px;
}

.ticket-center-heading h2,
.ticket-modal-header h2 {
    margin: 4px 0 0;
}

.secondary-button,
.modal-close,
.attach-button,
#send-reply {
    border: 0;
    color: white;
    font: inherit;
    cursor: pointer;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 9px;
    background: #0d2a2d;
}

.ticket-heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-heading-actions a {
    text-decoration: none;
}

.ticket-browser {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    min-height: 620px;
    overflow: hidden;
    border-radius: 18px;
    background: #081d1f;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.ticket-list-panel {
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background: #07191b;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 720px;
    padding: 12px;
    overflow-y: auto;
}

.ticket-list-message {
    padding: 24px 14px;
    color: #8fa9a5;
    font-size: 14px;
    text-align: center;
}

.ticket-list-item {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: white;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ticket-list-item:hover,
.ticket-list-item.active {
    background: #0c292b;
}

.ticket-list-item strong {
    display: block;
    overflow: hidden;
    margin: 7px 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-list-item small,
.ticket-list-topline {
    color: #8fa9a5;
    font-size: 12px;
}

.ticket-list-topline {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    text-transform: capitalize;
}

.ticket-detail-panel {
    min-width: 0;
    padding: 28px;
    overflow-y: auto;
}

.ticket-empty {
    display: grid;
    height: 100%;
    min-height: 420px;
    place-content: center;
    color: #78918e;
    text-align: center;
}

.ticket-empty > i {
    margin-bottom: 12px;
    font-size: 36px;
}

.ticket-empty h3,
.ticket-empty p {
    margin: 4px 0;
}

.ticket-detail-header h2 {
    margin: 8px 0 4px;
    font-size: 25px;
}

.ticket-detail-header p {
    margin: 0;
    color: #8fa9a5;
    font-size: 13px;
    text-transform: capitalize;
}

.ticket-detail-meta {
    gap: 10px;
    color: #8fa9a5;
    font-size: 12px;
}

.ticket-status {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.16);
    color: #75e681;
    text-transform: capitalize;
}

.ticket-status.closed {
    background: rgba(255, 255, 255, 0.08);
    color: #a9bfbc;
}

.original-request {
    margin: 24px 0;
    padding: 18px;
    border-radius: 12px;
    background: #0a2527;
}

.original-request > span,
.conversation-title,
.reply-form > label {
    color: #8fa9a5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.original-request p {
    margin: 10px 0 0;
    color: #e9f8f6;
    line-height: 1.65;
    white-space: pre-wrap;
}

.conversation-title {
    margin: 0 0 12px;
}

.ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-status-event {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    color: #78918e;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.ticket-status-event::before,
.ticket-status-event::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(143, 169, 165, 0.22);
}

.ticket-status-event span {
    max-width: 70%;
}

.conversation-empty {
    padding: 18px;
    border-radius: 10px;
    color: #78918e;
    background: rgba(255, 255, 255, 0.025);
    font-size: 13px;
    text-align: center;
}

.ticket-message {
    max-width: 82%;
    padding: 14px;
    border-radius: 13px 13px 13px 4px;
    background: #0d3032;
}

.ticket-message.customer {
    align-self: flex-end;
    border-radius: 13px 13px 4px 13px;
    background: #164735;
}

.ticket-message-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 7px;
    color: #92aaa6;
    font-size: 11px;
}

.ticket-message-body {
    margin: 0;
    color: white;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.message-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.message-images a,
.message-images img {
    display: block;
    width: 100%;
}

.message-images img {
    max-height: 220px;
    border-radius: 8px;
    object-fit: cover;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.reply-form[hidden] {
    display: none !important;
}

.reply-form textarea {
    box-sizing: border-box;
    width: 100%;
    resize: vertical;
    border: 0;
    border-radius: 10px;
    outline: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a2426;
    color: white;
    font: inherit;
    padding: 12px;
}

.reply-form textarea:focus {
    outline: 2px solid #4caf50;
}

.reply-actions {
    gap: 10px;
}

.attach-button,
#send-reply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 9px;
}

.attach-button {
    background: #0d2a2d;
}

#send-reply {
    margin-left: auto;
    background: #399c43;
}

#send-reply:disabled {
    cursor: wait;
    opacity: 0.6;
}

#reply-message-status {
    color: #8fa9a5;
    font-size: 12px;
}

#reply-message-status.error {
    color: #ff7777;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-image {
    position: relative;
    width: 72px;
    height: 72px;
}

.preview-image img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.preview-image button {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    width: 22px;
    height: 22px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #e05252;
    color: white;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
}

.ticket-modal {
    width: min(850px, 100%);
    max-height: calc(100vh - 48px);
    box-sizing: border-box;
    overflow-y: auto;
    padding: 28px;
    border-radius: 18px;
    background: #081d1f;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

.ticket-modal-header {
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 10px;
    background: #0d2a2d;
}

.ticket-modal .support-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

body.modal-open {
    overflow: hidden;
}

#support-form,
.form-field {
    display: flex;
    flex-direction: column;
}

.form-field[hidden] {
    display: none !important;
}

#support-form {
    gap: 20px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-field {
    gap: 8px;
    color: #dff7f2;
    font-size: 14px;
    font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 10px;
    outline: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b2426;
    color: white;
    font: inherit;
    font-weight: 400;
    padding: 13px 14px;
    transition: outline-color 0.2s ease, background-color 0.2s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 170px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid #4caf50;
    background: #0d2a2d;
}

.type-description {
    margin: -6px 0 0;
    color: #8fa9a5;
    font-size: 13px;
    line-height: 1.5;
}

.support-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#support-message {
    margin: 0;
    color: #a9bfbc;
    font-size: 14px;
}

#support-message.success {
    color: #62dc75;
}

#support-message.error {
    color: #ff7777;
}

#submit-ticket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #399c43;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#submit-ticket:hover {
    background: #45b751;
    transform: translateY(-1px);
}

#submit-ticket:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

@media (max-width: 650px) {
    .support-page {
        width: min(100% - 24px, 900px);
        padding-top: 112px;
    }

    .support-card {
        padding: 20px;
    }

    .support-options,
    .ticket-browser {
        grid-template-columns: 1fr;
    }

    .ticket-list-panel {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .ticket-list {
        max-height: 260px;
    }

    .ticket-detail-panel,
    .ticket-modal {
        padding: 20px;
    }

    .ticket-message {
        max-width: 92%;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

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

    .ticket-center-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}
