.support-shell {
    --support-accent: #f3c623;
    --support-border: #293650;
    --support-muted: #a6b2c9;
    width: min(1000px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 56px;
    display: grid;
    align-content: start;
    gap: 20px;
}

.support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 54px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--support-border);
}

.support-header .admin-brand {
    padding: 0;
}

.support-header .admin-brand img {
    width: 34px;
    height: 34px;
}

.support-header .admin-brand .brand-name {
    display: flex;
    align-items: baseline;
    font-size: 21px;
    letter-spacing: -.04em;
}

.support-header .admin-brand .brand-name strong {
    color: var(--text);
}

.support-header .admin-brand .brand-name span {
    color: var(--support-accent);
    font-weight: 500;
}

.support-header .profile-tools {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    font-size: 12px;
}

#supportIdentity,
#notificationIdentity {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-header a {
    color: var(--text);
}

.support-shell > .panel {
    min-width: 0;
    padding: clamp(20px, 3vw, 30px);
    border-color: var(--support-border);
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 100% 0, rgba(243, 198, 35, .045), transparent 38%),
        linear-gradient(145deg, #121b2b, #101725 74%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .16);
}

.support-shell .panel-heading {
    align-items: center;
    gap: 22px;
    margin-bottom: 23px;
}

.support-shell .panel-heading > div {
    min-width: 0;
}

.support-shell .panel-heading h1,
.support-shell .panel-heading h2 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: clamp(21px, 2.5vw, 26px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.support-shell .panel-heading p {
    max-width: 620px;
    margin: 0;
    color: var(--support-muted);
    font-size: 13px;
    line-height: 1.65;
}

.support-shell .outline-button,
.support-shell .primary-button {
    min-height: 40px;
    border-radius: 9px;
    font-weight: 650;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease, filter .18s ease;
}

.support-shell .outline-button:hover:not(:disabled) {
    border-color: #687895;
    background: #202b40;
}

.support-shell .primary-button {
    padding: 10px 17px;
    box-shadow: 0 7px 18px rgba(243, 198, 35, .14);
}

.support-shell .primary-button:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.support-shell button:disabled {
    cursor: wait;
    opacity: .66;
}

.support-shell :is(a, button, input, textarea):focus-visible {
    outline: 3px solid rgba(243, 198, 35, .75);
    outline-offset: 3px;
}

.support-form {
    display: grid;
    gap: 17px;
}

.support-form label {
    display: grid;
    gap: 8px;
    color: #e7ecf5;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .01em;
}

.support-form input,
.support-form textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #34415b;
    border-radius: 10px;
    background: #0d1422;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.support-form textarea {
    min-height: 142px;
    resize: vertical;
}

.support-form input::placeholder,
.support-form textarea::placeholder {
    color: #8996ad;
}

.support-form :is(input, textarea):hover {
    border-color: #50607e;
}

.support-form :is(input, textarea):focus {
    border-color: var(--support-accent);
    background: #101a2b;
    box-shadow: 0 0 0 3px rgba(243, 198, 35, .11);
    outline: none;
}

.support-form button {
    justify-self: start;
}

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

.support-item {
    min-width: 0;
    padding: 19px 20px;
    border: 1px solid #2d3a53;
    border-radius: 12px;
    background: linear-gradient(135deg, #172134, #151e2e);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
    animation: support-arrive .28s ease both;
}

.support-item.unread {
    border-color: rgba(243, 198, 35, .38);
    border-left: 3px solid var(--support-accent);
    background: linear-gradient(115deg, rgba(243, 198, 35, .08), #151e2e 42%);
}

.support-item h3 {
    margin: 0 0 8px;
    color: #f5f7fb;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -.015em;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.support-item p {
    margin: 8px 0 12px;
    color: #c4cede;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.support-item small,
.support-meta {
    display: block;
    color: var(--support-muted);
    font-size: 11px;
    line-height: 1.5;
}

.notification-type {
    display: inline-flex;
    align-items: center;
    margin: 0 0 10px;
    padding: 5px 9px;
    border: 1px solid rgba(243, 198, 35, .26);
    border-radius: 999px;
    background: rgba(243, 198, 35, .09);
    color: #f2d46b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: capitalize;
}

.support-item .reply {
    margin-top: 16px;
    padding: 14px 15px;
    border: 1px solid rgba(77, 173, 112, .22);
    border-left: 3px solid #55c37b;
    border-radius: 8px;
    background: rgba(27, 74, 49, .25);
}

.support-item .reply strong {
    display: block;
    color: #a9edbd;
    font-size: 12px;
    font-weight: 650;
}

.support-item .reply p {
    margin: 6px 0 0;
}

.support-item button {
    min-height: 36px;
    margin-top: 10px;
    border-color: rgba(243, 198, 35, .3);
    border-radius: 8px;
    background: rgba(243, 198, 35, .08);
    color: #f2d46b;
}

.support-item button:hover:not(:disabled) {
    border-color: rgba(243, 198, 35, .65);
    background: rgba(243, 198, 35, .15);
}

.support-shell .empty-state {
    display: grid;
    min-height: 134px;
    place-items: center;
    margin: 0;
    padding: 24px;
    border: 1px dashed #384761;
    border-radius: 11px;
    background: rgba(12, 18, 31, .4);
    color: var(--support-muted);
    font-size: 13px;
    text-align: center;
}

.support-shell .page-message {
    margin: 0;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 13px;
}

.support-shell .page-message.error {
    border-color: #76434a;
    background: #291a24;
    color: #ffc2c2;
}

.support-shell .page-message.success {
    border-color: #2e694b;
    background: #14271f;
    color: #b2f2c5;
}

.notification-image {
    display: block;
    width: min(100%, 640px);
    max-height: 340px;
    margin: 14px 0 13px;
    border: 1px solid #35435d;
    border-radius: 10px;
    background: #0d1422;
    object-fit: cover;
}

@keyframes support-arrive {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .support-shell {
        width: calc(100% - 28px);
        padding: 16px 0 34px;
        gap: 14px;
    }

    .support-header {
        align-items: flex-start;
        padding-bottom: 13px;
    }

    .support-header .profile-tools {
        gap: 9px;
    }

    #supportIdentity,
    #notificationIdentity {
        display: none;
    }

    .support-shell > .panel {
        padding: 19px 16px;
        border-radius: 13px;
    }

    .support-shell .panel-heading {
        align-items: flex-start;
        margin-bottom: 19px;
    }

    .support-shell .panel-heading.with-action {
        align-items: center;
    }

    .support-item {
        padding: 16px;
    }
}

@media (max-width: 420px) {
    .support-header .admin-brand .brand-name {
        font-size: 19px;
    }

    .support-shell .panel-heading.with-action {
        flex-direction: column;
        align-items: stretch;
    }

    .support-shell .panel-heading.with-action > button {
        align-self: flex-start;
    }

    .support-form button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

html[data-theme="light"] body .support-shell {
    --support-accent: #9a6b0a;
    --support-border: #e2e8f0;
    --support-muted: #5b6878;
}

html[data-theme="light"] body .support-shell .support-header {
    border-color: #e2e8f0;
}

html[data-theme="light"] body .support-shell .support-header :is(
    .admin-brand, .brand-name strong, #supportIdentity, #notificationIdentity
) {
    color: #253248 !important;
}

html[data-theme="light"] body .support-shell .support-header .brand-name span {
    color: #9a6b0a !important;
}

html[data-theme="light"] body .support-shell > .panel {
    border-color: #e2e8f0 !important;
    background: #fff !important;
    color: #253248 !important;
    box-shadow: 0 12px 32px rgba(31, 45, 68, .07);
}

html[data-theme="light"] body .support-shell .panel-heading :is(h1, h2) {
    color: #172033 !important;
}

html[data-theme="light"] body .support-shell .panel-heading p {
    color: #5b6878 !important;
}

html[data-theme="light"] body .support-shell .outline-button {
    border-color: #d7dfeb !important;
    background: #f8fafc !important;
    color: #334155 !important;
}

html[data-theme="light"] body .support-shell .outline-button:hover:not(:disabled) {
    border-color: #c5a45d !important;
    background: #fbf7eb !important;
    color: #805b0c !important;
}

html[data-theme="light"] body .support-shell .support-form label {
    color: #334155 !important;
}

html[data-theme="light"] body .support-shell .support-form :is(input, textarea) {
    border-color: #cbd5e1 !important;
    background: #fff !important;
    color: #172033 !important;
}

html[data-theme="light"] body .support-shell .support-form :is(input, textarea)::placeholder {
    color: #738197 !important;
}

html[data-theme="light"] body .support-shell .support-form :is(input, textarea):focus {
    border-color: #a87908 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(168, 121, 8, .14);
}

html[data-theme="light"] body .support-shell .primary-button {
    background: linear-gradient(135deg, #f3cb70, #e6ad38) !important;
    color: #17140c !important;
}

html[data-theme="light"] body .support-shell .support-item {
    border-color: #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 6px 18px rgba(31, 45, 68, .05);
}

html[data-theme="light"] body .support-shell .support-item.unread {
    border-color: #ead9ad !important;
    border-left-color: #a87908 !important;
    background: #fffcf4 !important;
}

html[data-theme="light"] body .support-shell .support-item h3 {
    color: #172033 !important;
}

html[data-theme="light"] body .support-shell .support-item p {
    color: #475569 !important;
}

html[data-theme="light"] body .support-shell :is(.support-item small, .support-meta) {
    color: #5b6878 !important;
}

html[data-theme="light"] body .support-shell .notification-type {
    border-color: #ead9ad;
    background: #fbf7eb;
    color: #805b0c !important;
}

html[data-theme="light"] body .support-shell .support-item .reply {
    border-color: #cce8d4;
    border-left-color: #31834d;
    background: #f0faf3 !important;
}

html[data-theme="light"] body .support-shell .support-item .reply strong {
    color: #236b3b !important;
}

html[data-theme="light"] body .support-shell .support-item button {
    border-color: #d8bd78 !important;
    background: #fbf7eb !important;
    color: #805b0c !important;
}

html[data-theme="light"] body .support-shell .support-item button:hover:not(:disabled) {
    border-color: #a87908 !important;
    background: #f6edda !important;
}

html[data-theme="light"] body .support-shell .empty-state {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    color: #5b6878 !important;
}

html[data-theme="light"] body .support-shell .page-message.error {
    border-color: #fecaca !important;
    background: #fff1f2 !important;
    color: #991b1b !important;
}

html[data-theme="light"] body .support-shell .page-message.success {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

html[data-theme="light"] body .support-shell .notification-image {
    border-color: #e2e8f0;
    background: #f8fafc;
}
