:root {
    --rejection-modal-surface: var(--theme-surface-strong);
    --rejection-modal-border: var(--theme-border);
    --rejection-modal-shadow: none;
    --rejection-modal-ink: var(--theme-text);
    --rejection-modal-muted: var(--theme-text-muted);
    --rejection-chip-bg: var(--theme-bg);
    --rejection-chip-border: var(--theme-border);
    --rejection-chip-text: var(--theme-text);
}

.app-rejection-modal .modal-dialog {
    max-width: 720px;
}

.app-rejection-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--rejection-modal-border);
    border-radius: var(--erp-control-radius);
    background: var(--theme-surface-strong);
    box-shadow: none;
}

.app-rejection-modal .modal-header,
.app-rejection-modal .modal-footer {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

.app-rejection-modal .modal-header {
    align-items: flex-start;
    padding-top: 1.1rem;
    padding-bottom: 1.05rem;
    border-bottom-color: rgba(21, 32, 51, 0.08);
}

.app-rejection-modal .modal-body {
    max-height: min(68vh, 620px);
    padding: 1.2rem 1.35rem;
    overflow-y: auto;
}

.app-rejection-modal .modal-footer {
    gap: 0.65rem;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-top-color: rgba(21, 32, 51, 0.08);
    background: rgba(248, 250, 255, 0.88);
}

.app-rejection-modal .modal-title {
    color: var(--rejection-modal-ink);
    font-family: var(--app-font-display);
    font-size: var(--app-font-size-22);
    font-weight: var(--app-font-weight-bold);
    letter-spacing: -0.02em;
}

.app-rejection-modal .btn-close {
    width: 2.25rem;
    height: 2.25rem;
    margin: -0.25rem -0.35rem 0 0;
    border-radius: 999px;
    background-color: rgba(21, 32, 51, 0.06);
    background-size: 0.74rem;
    opacity: 0.78;
}

.app-rejection-modal .btn-close:hover,
.app-rejection-modal .btn-close:focus {
    background-color: rgba(21, 32, 51, 0.1);
    opacity: 1;
}

.app-rejection-modal .btn {
    min-height: 2.55rem;
    padding: 0.65rem 1.05rem;
    border-radius: var(--erp-control-radius);
    font-weight: var(--app-font-weight-extrabold);
    line-height: 1;
}

.app-rejection-modal .btn-secondary {
    border-color: rgba(21, 32, 51, 0.12);
    background: #ffffff;
    color: var(--rejection-modal-ink);
}

.app-rejection-modal .btn-primary {
    border-color: #2157cf;
    background: #2157cf;
    box-shadow: none;
}

.app-rejection-modal .btn-primary:disabled {
    border-color: rgba(100, 116, 139, 0.18);
    background: rgba(100, 116, 139, 0.12);
    color: rgba(100, 116, 139, 0.72);
    box-shadow: none;
}

.app-rejection-header {
    background: rgba(255, 255, 255, 0.78);
}

.app-rejection-title-block {
    display: grid;
    gap: 0.25rem;
}

.app-rejection-kicker {
    color: #2157cf;
    font-size: var(--app-font-size-12);
    font-weight: var(--app-font-weight-extrabold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-rejection-intro {
    max-width: 52rem;
    margin: 0 0 1rem;
    color: var(--rejection-modal-muted);
    font-size: var(--app-font-size-15);
    line-height: 1.6;
}

.app-rejection-composer {
    display: grid;
    gap: 0.7rem;
}

.app-rejection-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-rejection-label-row .form-label {
    color: var(--rejection-modal-ink);
}

.app-rejection-label-row span {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(180, 35, 24, 0.08);
    color: #b42318;
    font-size: var(--app-font-size-11);
    font-weight: var(--app-font-weight-extrabold);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.app-rejection-editor-shell {
    position: relative;
    padding: 0.45rem;
    border: 1px solid rgba(47, 111, 237, 0.18);
    border-radius: var(--erp-control-radius);
    background: var(--theme-surface-strong);
    box-shadow: none;
}

.app-rejection-editor {
    min-height: 150px;
    padding: 0.9rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--erp-control-radius);
    background: rgba(255, 255, 255, 0.92);
    color: #152033;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.app-rejection-editor:hover {
    border-color: rgba(47, 111, 237, 0.18);
}

.app-rejection-editor:focus {
    border-color: rgba(47, 111, 237, 0.48);
    background: #ffffff;
    box-shadow: none;
}

.app-rejection-editor.is-invalid {
    border-color: #dc3545;
    box-shadow: none;
}

.app-rejection-editor:empty::before {
    content: attr(data-placeholder);
    color: #8b97ab;
}

.app-rejection-suggestions-wrap {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(47, 111, 237, 0.18);
    border-radius: var(--erp-control-radius);
    background: #ffffff;
    box-shadow: none;
}

.app-rejection-suggestions-wrap.d-none {
    display: none !important;
}

.app-rejection-suggestions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(21, 32, 51, 0.08);
    background: rgba(247, 250, 255, 0.92);
}

.app-rejection-suggestions-head span {
    color: var(--rejection-modal-ink);
    font-size: var(--app-font-size-12);
    font-weight: var(--app-font-weight-extrabold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-rejection-suggestions-head small {
    color: var(--rejection-modal-muted);
    font-size: var(--app-font-size-12);
    font-weight: var(--app-font-weight-bold);
}

.app-rejection-suggestions,
.app-rejection-suggestions-empty {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-rejection-suggestions {
    max-height: 184px;
    padding: 6px;
    overflow: auto;
}

.app-rejection-suggestions-empty {
    padding: 12px 14px;
    color: #8b97ab;
}

.app-rejection-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.72rem 0.8rem;
    border: 0;
    border-radius: var(--erp-control-radius);
    background: transparent;
    color: inherit;
    text-align: left;
    transition: background-color 0.14s ease, transform 0.14s ease;
}

.app-rejection-suggestion-item:hover,
.app-rejection-suggestion-item:focus,
.app-rejection-suggestion-item.is-active {
    background: rgba(47, 111, 237, 0.08);
}

.app-rejection-suggestion-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--theme-surface-strong);
    color: #1f4fb6;
    font-size: var(--app-font-size-12);
    font-weight: var(--app-font-weight-extrabold);
    flex: 0 0 auto;
}

.app-rejection-suggestion-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.app-rejection-suggestion-copy strong,
.app-rejection-suggestion-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-rejection-suggestion-copy strong {
    color: #152033;
    font-size: var(--app-font-size-15);
    font-weight: var(--app-font-weight-extrabold);
}

.app-rejection-suggestion-copy small {
    color: #64748b;
    font-size: var(--app-font-size-12);
}

.app-rejection-hint {
    color: var(--rejection-modal-muted);
    font-size: var(--app-font-size-13);
    line-height: 1.5;
}

.app-rejection-mention-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 0 1px;
    padding: 3px 8px 3px 10px;
    border: 1px solid var(--rejection-chip-border);
    border-radius: 999px;
    background: var(--rejection-chip-bg);
    color: var(--rejection-chip-text);
    font-weight: var(--app-font-weight-bold);
    line-height: 1.1;
    vertical-align: baseline;
    white-space: nowrap;
}

.app-rejection-mention-chip-label {
    display: inline-flex;
    align-items: center;
}

.app-rejection-mention-chip-remove {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.8;
    flex: 0 0 auto;
}

.app-rejection-mention-chip-remove::before {
    content: "x";
    display: block;
    font-size: var(--app-font-size-14);
    font-weight: var(--app-font-weight-extrabold);
    line-height: 1;
}

.app-rejection-mention-chip:hover .app-rejection-mention-chip-remove,
.app-rejection-mention-chip-remove:focus-visible {
    opacity: 1;
}

.app-rejection-mention-chip-remove:focus-visible {
    outline: 2px solid rgba(47, 111, 237, 0.35);
    outline-offset: 1px;
}

@media (max-width: 575.98px) {
    .app-rejection-modal .modal-dialog {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    .app-rejection-modal .modal-body,
    .app-rejection-modal .modal-header,
    .app-rejection-modal .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .app-rejection-editor {
        min-height: 140px;
    }

    .app-rejection-modal .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .app-rejection-modal .btn {
        width: 100%;
    }

    .app-rejection-suggestions-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}
