.feedback-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.feedback-page--narrow {
    width: min(100%, 1180px);
}

.feedback-page--detail {
    width: min(100%, 1320px);
}

.feedback-header,
.feedback-workspace,
.feedback-form,
.feedback-detail {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-soft);
}

.feedback-header {
    min-height: 174px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.feedback-header__copy {
    max-width: 760px;
}

.feedback-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--brand-red);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.feedback-header h2,
.feedback-form__header h2,
.feedback-detail__header h2 {
    margin: 0;
    color: var(--text-main);
    letter-spacing: 0;
}

.feedback-header h2 {
    font-size: 30px;
    line-height: 1.18;
}

.feedback-header p,
.feedback-form__header p,
.feedback-section-heading p,
.feedback-empty p,
.feedback-response p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.feedback-header__actions,
.feedback-form__actions,
.feedback-detail-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feedback-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-surface);
}

.feedback-metric {
    min-height: 86px;
    padding: 17px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-right: 1px solid var(--border-soft);
}

.feedback-metric:last-child {
    border-right: 0;
}

.feedback-metric span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.feedback-metric strong {
    color: var(--text-main);
    font-size: 28px;
    line-height: 1;
}

.feedback-metric--success strong {
    color: var(--success-text);
}

.feedback-workspace {
    padding: 24px;
}

.feedback-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.feedback-section-heading h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 21px;
}

.feedback-filters {
    margin: 20px 0;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(190px, 280px) auto auto;
    align-items: end;
    gap: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-surface-soft);
}

.feedback-filters label,
.feedback-field {
    display: grid;
    gap: 7px;
}

.feedback-filters label > span,
.feedback-field > label,
.feedback-fieldset legend {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
}

.feedback-filters select,
.feedback-field input[type="text"],
.feedback-field input[type="url"],
.feedback-field textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--input-bg);
    color: var(--input-text);
    font: inherit;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.feedback-filters select,
.feedback-field input[type="text"],
.feedback-field input[type="url"] {
    min-height: 42px;
    padding: 0 12px;
}

.feedback-field textarea {
    min-height: 154px;
    padding: 12px;
    resize: vertical;
    line-height: 1.55;
}

.feedback-filters select:focus,
.feedback-field input[type="text"]:focus,
.feedback-field input[type="url"]:focus,
.feedback-field textarea:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px var(--brand-red-soft);
}

.feedback-filter-reset,
.feedback-back {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.feedback-filter-reset {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
}

.feedback-filter-reset:hover,
.feedback-back:hover,
.feedback-facts a:hover {
    color: var(--brand-red);
}

.feedback-list {
    display: grid;
    gap: 8px;
}

.feedback-row {
    min-width: 0;
    padding: 17px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.feedback-row:hover {
    border-color: var(--border-strong);
    background: var(--bg-surface-soft);
}

.feedback-row__main {
    min-width: 0;
}

.feedback-row__meta,
.feedback-row__state {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.feedback-row__meta {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.feedback-row h3 {
    margin: 8px 0 4px;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.35;
}

.feedback-row p {
    margin: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feedback-row__state {
    justify-content: flex-end;
}

.feedback-row__arrow {
    color: var(--text-soft);
    font-size: 20px;
}

.feedback-response-mark {
    color: var(--info-text);
    font-size: 12px;
    font-weight: 800;
}

.feedback-kind,
.feedback-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.feedback-kind {
    background: var(--brand-red-soft);
    color: var(--brand-red);
}

.feedback-kind--idea {
    background: var(--info-bg);
    color: var(--info-text);
}

.feedback-kind--improvement {
    background: var(--success-bg);
    color: var(--success-text);
}

.feedback-kind--other,
.feedback-status--neutral {
    background: var(--neutral-bg);
    color: var(--neutral-text);
}

.feedback-status--info {
    background: var(--info-bg);
    color: var(--info-text);
}

.feedback-status--warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.feedback-status--success {
    background: var(--success-bg);
    color: var(--success-text);
}

.feedback-status--danger {
    background: var(--brand-red-soft);
    color: var(--brand-red);
}

.feedback-empty {
    min-height: 260px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    text-align: center;
}

.feedback-empty__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-red-soft);
    color: var(--brand-red);
    font-size: 24px;
}

.feedback-empty h3 {
    margin: 0;
    color: var(--text-main);
}

.feedback-empty .btn {
    margin-top: 18px;
}

.feedback-back {
    width: fit-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.feedback-form {
    overflow: hidden;
}

.feedback-form__header {
    padding: 26px 28px 22px;
    border-bottom: 1px solid var(--border-soft);
}

.feedback-form__header h2 {
    font-size: 25px;
}

.feedback-form-errors {
    margin: 20px 28px 0;
    padding: 12px 14px;
    border: 1px solid var(--border-accent);
    border-radius: 7px;
    background: var(--brand-red-soft);
    color: var(--brand-red);
}

.feedback-fieldset {
    min-width: 0;
    margin: 0;
    padding: 22px 28px;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
}

.feedback-fieldset legend {
    padding: 0;
}

.feedback-choice-grid {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.feedback-choice-grid--kind {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feedback-choice {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.feedback-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-choice--kind {
    min-height: 86px;
    padding: 15px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-surface-soft);
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.feedback-choice--kind:hover {
    border-color: var(--border-strong);
}

.feedback-choice--kind:has(input:checked) {
    border-color: var(--brand-red);
    background: var(--brand-red-soft);
}

.feedback-choice--kind:has(input:focus-visible),
.feedback-choice--impact:has(input:focus-visible) {
    outline: 3px solid var(--brand-red-soft);
    outline-offset: 2px;
}

.feedback-choice__body {
    display: grid;
    gap: 5px;
}

.feedback-choice__body strong {
    color: var(--text-main);
    font-size: 14px;
}

.feedback-choice__body small,
.feedback-field > small,
.feedback-upload small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.feedback-form__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.7fr);
}

.feedback-form__main,
.feedback-form__aside {
    padding: 25px 28px;
    display: grid;
    align-content: start;
    gap: 20px;
}

.feedback-form__aside {
    border-left: 1px solid var(--border-soft);
    background: var(--bg-surface-soft);
}

.feedback-fieldset--compact {
    padding: 0;
    border: 0;
}

.feedback-choice-list {
    margin-top: 10px;
    display: grid;
    gap: 7px;
}

.feedback-choice--impact {
    min-height: 40px;
    padding: 0 12px 0 36px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
}

.feedback-choice--impact::before {
    content: "";
    position: absolute;
    left: 13px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
}

.feedback-choice--impact:has(input:checked) {
    border-color: var(--brand-red);
    background: var(--brand-red-soft);
}

.feedback-choice--impact:has(input:checked)::before {
    border-color: var(--brand-red);
    background: var(--brand-red);
    box-shadow: inset 0 0 0 2px var(--bg-surface);
}

.feedback-upload__control {
    min-height: 118px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: var(--bg-surface);
}

.feedback-upload input[type="file"] {
    max-width: 100%;
    color: var(--text-muted);
    font-size: 12px;
}

.feedback-upload input[type="file"]::file-selector-button {
    min-height: 34px;
    margin-right: 10px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--bg-surface-soft);
    color: var(--text-main);
    font-weight: 800;
    cursor: pointer;
}

.feedback-form__actions {
    justify-content: flex-end;
    padding: 18px 28px;
    border-top: 1px solid var(--border-soft);
}

.feedback-form .errorlist {
    margin: 0;
    padding: 0;
    color: var(--brand-red);
    font-size: 12px;
    font-weight: 700;
    list-style: none;
}

.feedback-detail-nav {
    justify-content: space-between;
}

.feedback-detail {
    overflow: hidden;
}

.feedback-detail__header {
    padding: 26px 28px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--border-soft);
}

.feedback-detail__header h2 {
    margin-top: 10px;
    font-size: 26px;
    line-height: 1.25;
}

.feedback-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
}

.feedback-detail__content {
    min-width: 0;
    padding: 28px;
    display: grid;
    gap: 26px;
}

.feedback-detail__aside {
    padding: 28px;
    border-left: 1px solid var(--border-soft);
    background: var(--bg-surface-soft);
}

.feedback-detail__section h3 {
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 15px;
}

.feedback-detail__text {
    overflow-wrap: anywhere;
    color: var(--text-main);
    line-height: 1.65;
}

.feedback-screenshot {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-muted);
}

.feedback-screenshot img {
    width: 100%;
    max-height: 720px;
    display: block;
    object-fit: contain;
}

.feedback-attachment {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-surface-soft);
    color: var(--text-main);
    text-decoration: none;
}

.feedback-attachment:hover,
.feedback-attachment:focus-visible {
    border-color: var(--border-accent);
}

.feedback-attachment__icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-red-soft);
    color: var(--brand-red);
    font-size: 11px;
    font-weight: 900;
}

.feedback-attachment strong,
.feedback-attachment small {
    display: block;
    overflow-wrap: anywhere;
}

.feedback-attachment small {
    margin-top: 3px;
    color: var(--text-muted);
}

.feedback-response {
    padding: 18px;
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg-surface-soft);
}

.feedback-response--ready {
    border-left-color: var(--success-text);
}

.feedback-response__label {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
}

.feedback-facts {
    margin: 0;
    display: grid;
}

.feedback-facts > div {
    padding: 13px 0;
    border-bottom: 1px solid var(--border-soft);
}

.feedback-facts > div:first-child {
    padding-top: 0;
}

.feedback-facts > div:last-child {
    border-bottom: 0;
}

.feedback-facts dt {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.feedback-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
}

.feedback-facts a {
    color: var(--brand-red);
    text-decoration: none;
}

@media (max-width: 1000px) {
    .feedback-choice-grid--kind {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feedback-form__grid,
    .feedback-detail__layout {
        grid-template-columns: 1fr;
    }

    .feedback-form__aside,
    .feedback-detail__aside {
        border-top: 1px solid var(--border-soft);
        border-left: 0;
    }
}

@media (max-width: 760px) {
    .feedback-page {
        gap: 12px;
    }

    .feedback-header {
        min-height: 0;
        padding: 21px;
        align-items: flex-start;
        flex-direction: column;
    }

    .feedback-header h2 {
        font-size: 24px;
    }

    .feedback-header__actions,
    .feedback-header__actions .btn {
        width: 100%;
    }

    .feedback-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feedback-metric:nth-child(2) {
        border-right: 0;
    }

    .feedback-metric:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border-soft);
    }

    .feedback-workspace,
    .feedback-form__header,
    .feedback-fieldset,
    .feedback-form__main,
    .feedback-form__aside,
    .feedback-form__actions,
    .feedback-detail__header,
    .feedback-detail__content,
    .feedback-detail__aside {
        padding: 20px;
    }

    .feedback-filters {
        grid-template-columns: 1fr;
    }

    .feedback-filters .btn,
    .feedback-filter-reset {
        width: 100%;
        justify-content: center;
    }

    .feedback-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feedback-row p {
        display: -webkit-box;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .feedback-row__state {
        justify-content: flex-start;
    }

    .feedback-row__arrow {
        margin-left: auto;
    }

    .feedback-choice-grid--kind {
        grid-template-columns: 1fr;
    }

    .feedback-detail__header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .feedback-summary {
        grid-template-columns: 1fr;
    }

    .feedback-metric {
        min-height: 68px;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }

    .feedback-metric:last-child {
        border-bottom: 0;
    }

    .feedback-header__actions .btn,
    .feedback-form__actions .btn {
        width: 100%;
    }
}
