.opportunity-index-page,
.opportunity-form-page {
    background: var(--surface-200);
}

.opportunity-form-page::after {
    display: block;
    flex: 0 0 32px;
    content: "";
}

.opportunity-context {
    align-items: center;
}

.opportunity-context-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin-left: auto;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.edia_oportunidad-context .opportunity-context-action span {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: normal;
    line-height: 1;
    text-transform: none;
}

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

.opportunity-card {
    display: grid;
    grid-template-rows: 64px 88px 38px;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #d9e3eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(23, 32, 46, .045);
}

.opportunity-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-height: 0;
}

.opportunity-card-heading > div {
    min-width: 0;
}

.opportunity-card-kicker {
    display: block;
    color: #7b8aa0;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.opportunity-card-statuses {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    max-width: 52%;
}

.opportunity-card h2 {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0 0;
    color: #0b253f;
    font-size: 1rem;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.opportunity-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 9px;
    background: #e8f6f8;
    color: var(--primary-700);
    font-size: .72rem;
    font-weight: 700;
}

.opportunity-process-description,
.opportunity-proposal {
    height: 88px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid #e0e7ed;
    border-radius: 14px;
    background: #f8fafc;
}

.opportunity-proposal {
    border-color: #c5e5ea;
    background: #eef9fb;
}

.opportunity-process-description strong,
.opportunity-proposal strong {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.opportunity-proposal strong {
    color: var(--primary-700);
    font-size: .8rem;
    letter-spacing: 0;
    text-transform: none;
}

.opportunity-process-description p,
.opportunity-proposal p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #1c2d42;
    font-size: .86rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.opportunity-card-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding-top: 2px;
}

.opportunity-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--primary-500);
    border-radius: 10px;
    background: var(--primary-500);
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.opportunity-button .icon--action,
.opportunity-context-action .icon--action {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.opportunity-form-card .form-actions .opportunity-form-ai-button {
    font-size: 1rem;
    font-weight: 500;
}

.opportunity-button:hover,
.opportunity-button:focus-visible {
    border-color: var(--primary-700);
    background: var(--primary-700);
    color: #fff;
}

.opportunity-button--ai,
.opportunity-context-action.opportunity-button--ai {
    border-color: #d9ccf7;
    background: #f4f0ff;
    color: #6342a6;
}

.opportunity-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f0eaff;
    color: #60409e;
    font-size: .7rem;
    font-weight: 700;
}

.opportunity-ai-badge[hidden],
.opportunity-field-ai[hidden],
.opportunity-compare-toggle[hidden] { display: none; }

.opportunity-ai-badge .icon--action,
.opportunity-field-ai .icon--action {
    width: 14px;
    height: 14px;
}

.opportunity-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.opportunity-field-ai {
    display: inline-flex;
    color: #6947aa;
}

.opportunity-ai-warning {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e2d59c;
    border-radius: 10px;
    background: #fff9df;
    color: #69530b;
}

.opportunity-original-fields {
    display: grid;
    gap: 12px;
    margin: 14px 0 22px;
    padding: 16px;
    border: 1px solid #d9e3eb;
    border-radius: 12px;
    background: #f8fafc;
}

.opportunity-original-fields[hidden] { display: none; }
.opportunity-original-fields h3,
.opportunity-original-fields p { margin: 0; }
.opportunity-original-fields p { margin-top: 4px; color: #506580; white-space: pre-wrap; }
.opportunity-compare-toggle { margin: 0; }
.opportunity-batch-status { color: #506580; font-size: .78rem; }
.opportunity-batch-status:empty { display: none; }
.opportunity-proposal--draft { border-color: #d9ccf7; background: #faf8ff; }

.opportunity-button[aria-busy="true"],
.opportunity-context-action[aria-busy="true"] { cursor: wait; opacity: .72; }

.opportunity-button--ai:hover,
.opportunity-button--ai:focus-visible,
.opportunity-context-action.opportunity-button--ai:hover,
.opportunity-context-action.opportunity-button--ai:focus-visible {
    border-color: #bba6ed;
    background: #ebe3ff;
    color: #4f318f;
}

.opportunity-button--valuation {
    border-color: #ead59a;
    background: #fff6d8;
    color: #795c08;
}

.opportunity-button--valuation:hover,
.opportunity-button--valuation:focus-visible {
    border-color: #d8bb63;
    background: #ffedb3;
    color: #654b00;
}

.opportunity-button--danger {
    border-color: #efb4bc;
    background: #fff0f1;
    color: #b42336;
}

.opportunity-button--danger:hover,
.opportunity-button--danger:focus-visible {
    border-color: #dc8692;
    background: #ffe1e5;
    color: #921b2b;
}

.opportunity-button--compare {
    border-color: #d2c3f2;
    background: #f4f0ff;
    color: #6342a6;
}

.opportunity-button--compare:hover,
.opportunity-button--compare:focus-visible {
    border-color: #bca6e8;
    background: #e9e1ff;
    color: #50328c;
}

.opportunity-empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 42px 24px;
    border: 1px dashed #bdcbd5;
    border-radius: 18px;
    background: #fff;
    color: #506580;
    text-align: center;
}

.opportunity-empty-state strong {
    color: #0b253f;
    font-size: 1.05rem;
}

.opportunity-edit-columns {
    display: grid;
    grid-template-columns: minmax(280px, .82fr) minmax(0, 1.25fr);
    gap: 20px;
    align-items: start;
}

.opportunity-edit-columns--single {
    grid-template-columns: 1fr;
}

.opportunity-process-overview {
    min-width: 0;
}

.opportunity-process-overview h2 {
    min-height: 25px;
    margin: 0 0 14px;
    color: #0b253f;
    font-size: 1.05rem;
}

.opportunity-form-section-title {
    margin: 18px 0 14px;
    color: #0b253f;
    font-size: 1.05rem;
    font-weight: 700;
}

.opportunity-form-card {
    max-width: none;
    margin: 0;
    padding: 28px;
    border-radius: 18px;
}

.opportunity-form-card--wide {
    width: 100%;
}

.opportunity-form-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.opportunity-form-toolbar--ai-only {
    justify-content: flex-end;
}

.opportunity-ai-meta {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.opportunity-action-button {
    display: flex;
    align-items: center;
}

.opportunity-action-button {
    gap: 6px;
}

.opportunity-action-button[hidden] {
    display: none;
}

.opportunity-action-button .icon--action {
    flex: 0 0 auto;
}

.opportunity-mode-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.opportunity-mode-fieldset legend,
.opportunity-existing-label {
    margin: 0 0 12px;
    color: #314053;
    font-size: .9rem;
    font-weight: 700;
}

.opportunity-radio-group {
    display: flex;
    gap: 22px;
}

.opportunity-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #314053;
    cursor: pointer;
}

.opportunity-radio-group input {
    accent-color: var(--primary-500);
}

.opportunity-fields {
    grid-template-columns: 1fr;
}

.opportunity-fields input.form-control {
    min-height: 46px;
    border-radius: 12px;
}

.opportunity-fields textarea.form-control {
    min-height: 108px;
    resize: vertical;
    border-radius: 12px;
}

.opportunity-process-list,
.opportunity-existing-list {
    display: grid;
    gap: 12px;
}

.opportunity-process-list {
    grid-template-columns: 1fr;
}

.opportunity-process-details {
    overflow: hidden;
    border: 1px solid #d9e3eb;
    border-radius: 16px;
    background: #fff;
}

.opportunity-process-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 16px 20px;
    color: #102a4c;
    list-style: none;
}

.opportunity-process-details summary::-webkit-details-marker {
    display: none;
}

.opportunity-process-details summary span {
    flex: 0 0 auto;
    color: var(--primary-500);
    font-size: .86rem;
    font-weight: 700;
}

.opportunity-process-summary-content {
    min-width: 0;
}

.opportunity-process-summary-content > strong {
    display: block;
    overflow-wrap: anywhere;
}

.opportunity-process-summary-content p {
    margin: 5px 0 0;
    color: #526379;
    font-size: .84rem;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.opportunity-process-summary-content b {
    color: #263b52;
}

.opportunity-process-details[open] summary {
    border-bottom: 1px solid #e5ebef;
    background: #f8fbfc;
}

.opportunity-process-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 18px 20px 20px;
}

.opportunity-process-details dt {
    margin-bottom: 4px;
    color: #7b8aa0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.opportunity-process-details dd {
    margin: 0;
    color: #263b52;
    font-size: .86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.opportunity-empty-message {
    margin: 0 0 22px;
    padding: 13px 14px;
    border: 1px solid #b9dfe5;
    border-radius: 11px;
    background: #eef9fb;
    color: #174b55;
    font-size: .86rem;
}

.opportunity-edit-columns > .opportunity-original-fields {
    margin: 0;
    overflow: visible;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 32, 46, .04);
}

.opportunity-existing-option {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 14px;
    border: 1px solid #d9e3eb;
    border-radius: 12px;
    background: #fff;
    color: #263b52;
    text-align: left;
}

.opportunity-existing-option:hover {
    border-color: var(--primary-500);
    background: #eef9fb;
}

.opportunity-existing-option span {
    color: #66748a;
    font-size: .82rem;
}

.opportunity-delete-page {
    padding: 24px;
}

.opportunity-delete-card {
    max-width: 620px;
}

@media (max-width: 1250px) {
    .opportunity-grid,
    .opportunity-edit-columns {
        grid-template-columns: 1fr;
    }

    .opportunity-edit-columns > .opportunity-original-fields {
        position: static;
        max-height: none;
    }

    .opportunity-context {
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .opportunity-context {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 24px;
        padding: 16px;
    }

    .opportunity-context > div {
        min-width: 0;
    }

    .opportunity-context strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .opportunity-context-action {
        grid-column: 1 / -1;
        width: 100%;
        white-space: normal;
    }

    .opportunity-card-heading {
        flex-wrap: wrap;
    }

    .opportunity-card-statuses {
        max-width: 100%;
    }

    .opportunity-card-actions {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .opportunity-card {
        grid-template-rows: auto auto auto;
    }

    .opportunity-process-description,
    .opportunity-proposal {
        height: auto;
        min-height: 88px;
    }

    .opportunity-button {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

}

@media (max-width: 600px) {
    .opportunity-form-card {
        padding: 22px;
    }

    .opportunity-process-details dl {
        grid-template-columns: 1fr;
    }

    .opportunity-form-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .opportunity-ai-meta {
        justify-content: flex-start;
    }
}
.process-filter-menu {
    min-width: min(360px, calc(100vw - 32px));
}

.process-filter-menu > .process-participant-filter {
    display: block;
    margin-bottom: 12px;
}

.process-validation-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.process-validation-label input {
    accent-color: #2457a7;
    width: 1.15rem;
    height: 1.15rem;
}

.process-annual-hours {
    padding: 10px 12px;
    border-radius: 8px;
    background: #edf3fa;
    color: #193b68;
}

.edia_oportunidad-process-page .opportunity-list-toolbar {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-bottom: 18px;
    padding: 0;
    max-height: none;
    overflow: visible;
}

.opportunity-list-toolbar .table-toolbar {
    gap: 12px;
    padding: 12px 20px;
}

.opportunity-list-toolbar .table-toolbar > .d-flex > .company-filter > .company-filter-menu {
    right: 0;
    left: auto;
}

.opportunity-card[hidden] {
    display: none;
}
