.ai-feedback-detail-dialog {
    display: flex;
    flex-direction: column;
    min-height: min(82dvh, 52rem);
    padding: 0;
}

.ai-feedback-dialog-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    gap: 1.15rem;
}

.ai-feedback-dialog-state {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 16rem;
    justify-content: center;
}

.ai-feedback-dialog-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.2rem 0 0;
}

.ai-feedback-dialog-header-copy {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ai-feedback-dialog-title {
    margin: 0;
    color: #10213f;
    font-size: 1.85rem;
    line-height: 1.08;
    font-weight: 800;
}

.ai-feedback-dialog-subtitle {
    margin: 0;
    max-width: 44rem;
    color: #5d6c7e;
    font-size: 0.98rem;
    line-height: 1.55;
}

.ai-feedback-dialog-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.ai-feedback-dialog-ticket-id,
.ai-feedback-dialog-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ai-feedback-dialog-ticket-id {
    border: 1px solid #dbe4ea;
    background: #f8fafc;
    color: #334155;
}

.ai-feedback-dialog-status-badge {
    border: 1px solid transparent;
}

.ai-feedback-dialog-status-badge--submitted {
    background: #e0f2fe;
    color: #0c4a6e;
    border-color: #bae6fd;
}

.ai-feedback-dialog-status-badge--inreview {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.ai-feedback-dialog-status-badge--convertedtostory {
    background: #ede9fe;
    color: #5b21b6;
    border-color: #ddd6fe;
}

.ai-feedback-dialog-status-badge--done {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.ai-feedback-dialog-status-badge--rejected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.ai-feedback-dialog-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.ai-feedback-dialog-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.05rem;
    border: 1px solid #dce8e2;
    border-radius: 1.3rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 250, 0.98) 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.ai-feedback-dialog-section--request {
    background:
        linear-gradient(180deg, rgba(247, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.ai-feedback-dialog-section-head {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ai-feedback-dialog-section-title {
    margin: 0;
    color: #132238;
    font-size: 1.05rem;
    font-weight: 800;
}

.ai-feedback-dialog-section-copy {
    margin: 0;
    color: #607083;
    font-size: 0.92rem;
    line-height: 1.5;
}

.ai-feedback-dialog-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.ai-feedback-dialog-meta-card {
    display: flex;
    flex: 1 1 12rem;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.9rem 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.88);
}

.ai-feedback-dialog-meta-label {
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-feedback-dialog-meta-value {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ai-feedback-dialog-request-box {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 1.05rem;
    background: #0f172a;
    color: #f8fafc;
}

.ai-feedback-dialog-request-label {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-feedback-dialog-request-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-feedback-dialog-editor-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ai-feedback-dialog-field-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.ai-feedback-dialog-field-card--toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ai-feedback-dialog-toggle-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.28rem;
}

.ai-feedback-dialog-toggle-title {
    color: #10213f;
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-feedback-dialog-toggle-text {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

.ai-feedback-dialog-status-select,
.ai-feedback-dialog-textarea {
    width: 100%;
}

.ai-feedback-dialog-notes {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ai-feedback-dialog-textarea textarea {
    min-height: 15rem;
    border-radius: 1rem;
}

.ai-feedback-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.2rem;
}

@media (min-width: 900px) {
    .ai-feedback-detail-dialog {
        min-height: min(84dvh, 56rem);
    }

    .ai-feedback-dialog-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .ai-feedback-dialog-header-meta {
        justify-content: flex-end;
        max-width: 16rem;
    }

    .ai-feedback-dialog-body {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }

    .ai-feedback-dialog-section--request {
        flex: 1.05 1 0;
    }

    .ai-feedback-dialog-section--editor {
        flex: 0.95 1 0;
    }

    .ai-feedback-dialog-editor-grid {
        flex-direction: row;
    }

    .ai-feedback-dialog-field-card {
        flex: 1 1 0;
    }
}
