/* Integraciones usuario: columna estrecha (mismo ancho que n8n-cred-editor / skill-node-editor) */
.skill-user-detail-view.dxbl-fl-layout-group,
.skill-user-detail-view {
    align-items: flex-start !important;
    max-width: min(34vw, 560px);
    width: min(34vw, 560px);
    min-width: 320px;
}

.skill-user-detail-view .dxbl-fl-layout-item,
.skill-user-detail-view .dxbl-form-layout-item,
.skill-user-detail-view .xaf-layout-item {
    max-width: 100%;
    width: 100%;
}

@media (max-width: 1100px) {
    .skill-user-detail-view.dxbl-fl-layout-group,
    .skill-user-detail-view {
        width: min(60vw, 560px);
        max-width: min(60vw, 560px);
    }
}

@media (max-width: 760px) {
    .skill-user-detail-view.dxbl-fl-layout-group,
    .skill-user-detail-view {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* Skill user detail view polish */
.skill-user-detail-view .skill-user-lookup-card,
.skill-user-detail-view .dxbl-fl-layout-item:has(.dxbl-dropdown-edit),
.skill-user-detail-view .dxbl-form-layout-item:has(.dxbl-dropdown-edit),
.skill-user-detail-view .xaf-layout-item:has(.dxbl-dropdown-edit) {
    background: linear-gradient(180deg, #f7fffb 0%, #ffffff 42%);
    border: 1px solid #8fc9b2;
    border-left: 5px solid #4f9f7c;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(31, 88, 68, 0.12);
    box-sizing: border-box;
    margin: 10px 0 16px;
    padding: 18px !important;
}

.skill-user-detail-view .skill-user-lookup-card {
    display: block !important;
    min-height: auto !important;
}

.skill-user-detail-view .skill-user-lookup-card > *,
.skill-user-detail-view .skill-user-lookup-card .dxbl-fl-layout-item-content,
.skill-user-detail-view .skill-user-lookup-card .xaf-layout-item-content {
    width: 100% !important;
}

.skill-user-detail-view .skill-user-lookup-card .dxbl-fl-cpt,
.skill-user-detail-view .skill-user-lookup-card label,
.skill-user-detail-view .dxbl-fl-layout-item:has(.dxbl-dropdown-edit) .dxbl-fl-cpt,
.skill-user-detail-view .dxbl-form-layout-item:has(.dxbl-dropdown-edit) label,
.skill-user-detail-view .xaf-layout-item:has(.dxbl-dropdown-edit) label {
    color: #2f765c;
    font-size: 13px;
    font-weight: 700;
}

.skill-user-detail-view .dxbl-dropdown-edit {
    border-radius: 12px;
    border: 1px solid #d1d5db;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
    background: #ffffff;
}

.skill-user-detail-view .dxbl-dropdown-edit:hover {
    border-color: #8fc9b2;
    box-shadow: 0 4px 10px rgba(79, 159, 124, 0.10);
}

.skill-user-detail-view .dxbl-dropdown-edit.dx-state-focused,
.skill-user-detail-view .dxbl-dropdown-edit:focus-within {
    border-color: #54a786;
    box-shadow: 0 0 0 3px rgba(84, 167, 134, 0.18), 0 6px 14px rgba(84, 167, 134, 0.16);
    transform: translateY(-1px);
}

.skill-user-detail-view .dxbl-dropdown-edit .dxbl-edit-btn,
.skill-user-detail-view .dxbl-dropdown-edit .dxbl-btn {
    border-left: 1px solid #dbe6df;
    color: #3f7f68;
}

.skill-user-detail-view .dxbl-dropdown-edit .dxbl-btn:hover {
    background-color: #eef8f2;
}

/* El selector de skill ahora vive dentro de SkillNodeFormEditor; ocultar el lookup XAF residual. */
.skill-user-detail-view .dxbl-fl-layout-item:has(.dxbl-dropdown-edit),
.skill-user-detail-view .dxbl-form-layout-item:has(.dxbl-dropdown-edit),
.skill-user-detail-view .xaf-layout-item:has(.dxbl-dropdown-edit) {
    display: none !important;
}

html, body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}

.header-logo {
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url('../images/Logo.svg');
    mask: url('../images/Logo.svg');
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    width: 250px;
    height: 60px;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

.loading-image {
    width: 70%;
    height: 70%;
}

.hiddenButtons .dxbs-editor-dropdown-button ~ button {
    display: none;
}

/* Override de color corporativo - Pastel Verde Cicumba #5a9b80 */
:root {
    --bs-success: #5a9b80 !important;
    --bs-success-rgb: 90, 155, 128 !important;
    /* Danger: fondos de alerta/toast muy claros (coherente con cicumba-harmony) */
    --bs-danger-bg-subtle: #fff5f5 !important;
    --bs-danger-border-subtle: rgba(220, 180, 180, 0.4) !important;
    --bs-danger-text-emphasis: #5a4548 !important;
}

/* Override para alertas de XAF Blazor */
.xaf-alert.alert-success {
    background-color: #5a9b80 !important;
    border-color: #5a9b80 !important;
    color: #ffffff !important;
}

/* Override para alertas Bootstrap success */
.alert-success {
    background-color: #5a9b80 !important;
    border-color: #5a9b80 !important;
    color: #ffffff !important;
}

/* Override para background success */
.bg-success {
    background-color: #5a9b80 !important;
}

/* Override para texto success */
.text-success {
    color: #5a9b80 !important;
}

/* Override para botones success */
.btn-success {
    background-color: #5a9b80 !important;
    border-color: #5a9b80 !important;
}

.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: #4a8b70 !important;
    border-color: #4a8b70 !important;
}

/* Redondeo suave para acciones/botones del sistema */
.btn,
.dxbl-btn,
.dxbs-button,
.dx-button {
    border-radius: 10px !important;
}

/* Detalle de Prompt: en desktop, "Muestra de Prompt Preconfigurados" ocupa media pantalla. */
.prompt-example-half-width {
    width: 50% !important;
    max-width: 50% !important;
}

@media (max-width: 991.98px) {
    .prompt-example-half-width {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Focus hardening for Premium actions and Prompt guide chips */
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn {
    background: linear-gradient(135deg, #2d7a56 0%, #3a9b6e 50%, #2d7a56 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn {
    background: linear-gradient(135deg, #5a9b80 0%, #6bad8f 50%, #5a9b80 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn:hover,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn:focus,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn:focus-visible,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn.dxbl-focused,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn.dxbl-active,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn:hover,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn:focus,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn:focus-visible,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn.dxbl-focused,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn.dxbl-active,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn:hover,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn:focus,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn:focus-visible,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn.dxbl-focused,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn.dxbl-active,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn:hover,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn:focus,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn:focus-visible,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn.dxbl-focused,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn.dxbl-active {
    background: linear-gradient(135deg, #2d7a56 0%, #3a9b6e 50%, #2d7a56 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn:hover,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn:focus,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn:focus-visible,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn.dxbl-focused,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn.dxbl-active {
    background: linear-gradient(135deg, #5a9b80 0%, #6bad8f 50%, #5a9b80 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn .dxbl-btn-caption,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Basico"] .dxbl-toolbar-btn span,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn .dxbl-btn-caption,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Estandar"] .dxbl-toolbar-btn span,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn .dxbl-btn-caption,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Plan_Pro"] .dxbl-toolbar-btn span,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn .dxbl-btn-caption,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Chatwoot_Desplegar"] .dxbl-toolbar-btn span,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn .dxbl-btn-caption,
html body .xaf-toolbar-item[data-action-id="Int_Membresia_Stripe_Portal"] .dxbl-toolbar-btn span {
    color: #ffffff !important;
}

html body .pab-chip,
html body .pab-chip-action,
html body .pab-chip-stage {
    color: #2d5a45 !important;
}

html body .pab-chip:hover,
html body .pab-chip:focus,
html body .pab-chip:focus-visible,
html body .pab-chip.dxbl-focused,
html body .pab-chip.dxbl-active {
    background: linear-gradient(180deg, #eef8f3 0%, #def0e8 100%) !important;
    color: #2d5a45 !important;
    border-color: #5a9b80 !important;
}

html body .pab-chip.pab-chip-send-selected,
html body .pab-chip.pab-chip-send-selected:hover,
html body .pab-chip.pab-chip-send-selected:focus,
html body .pab-chip.pab-chip-send-selected:focus-visible {
    background: linear-gradient(160deg, #66ac8f 0%, #539a7d 50%, #3f7f65 130%) !important;
    color: #ffffff !important;
    border-color: rgba(50, 110, 84, 0.75) !important;
}

/* Tamaño compacto + capa de color única en iconos de toolbar (prompt suave lo sobrescribe) */
html body .xaf-action .dxbl-image,
html body .xaf-action img,
html body .xaf-toolbar-item .dxbl-image,
html body .xaf-toolbar-item img,
html body .dxbl-toolbar-btn .dxbl-image,
html body .dxbl-toolbar-btn img {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    border-radius: 6px !important;
}

/*
 * Avatar / foto de usuario: la regla anterior gana por especificidad (html body + toolbar + img)
 * y deja la imagen en 16px; con object-fit: cover en un circulo grande se ve como una franja.
 * Se anula aqui; los tamaños reales los fija groupheader.css.
 */
html body .account-container .dxbl-toolbar-btn .dxbl-image,
html body .account-container .dxbl-toolbar-btn img,
html body .account-container .dxbl-toolbar-btn .dxbl-image img,
html body .account-container .xaf-toolbar-item .dxbl-image,
html body .account-container .xaf-toolbar-item img,
html body .xaf-user-menu-popup .logo-container .dxbl-image,
html body .xaf-user-menu-popup .logo-container img,
html body .xaf-user-menu-popup .logo-container .dxbl-image img,
html body .xaf-user-menu .logo-container .dxbl-image,
html body .xaf-user-menu .logo-container img,
html body .xaf-user-menu .logo-container .dxbl-image img,
html body .dxbl-popup:has(.xaf-btn.my-details) .logo-container .dxbl-image,
html body .dxbl-popup:has(.xaf-btn.my-details) .logo-container img,
html body .dxbl-popup:has(.xaf-btn.my-details) .logo-container .dxbl-image img {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: inherit !important;
}

/* Botones rellenos (verde / primario en barra): icono blanco — excluye prompt «desde cero» (fondo claro) */
html body .dxbl-toolbar-btn:not(.dxbl-btn-outline-secondary):not(.dxbl-btn-light):not(.cicumba-nuclear-prompt-from-scratch-btn) img,
html body .dxbl-toolbar-btn:not(.dxbl-btn-outline-secondary):not(.dxbl-btn-light):not(.cicumba-nuclear-prompt-from-scratch-btn) .dxbl-image,
html body .xaf-toolbar-item .dxbl-toolbar-btn:not(.dxbl-btn-outline-secondary):not(.dxbl-btn-light):not(.cicumba-nuclear-prompt-from-scratch-btn) img,
html body .xaf-toolbar-item .dxbl-toolbar-btn:not(.dxbl-btn-outline-secondary):not(.dxbl-btn-light):not(.cicumba-nuclear-prompt-from-scratch-btn) .dxbl-image {
    filter: brightness(0) invert(1) !important;
}

/* Outline / claro sobre fondo blanco: mismo verde que el texto Cicumba */
html body .dxbl-toolbar-btn.dxbl-btn-outline-secondary img,
html body .dxbl-toolbar-btn.dxbl-btn-outline-secondary .dxbl-image,
html body .dxbl-toolbar-btn.dxbl-btn-light img,
html body .dxbl-toolbar-btn.dxbl-btn-light .dxbl-image {
    filter: brightness(0) saturate(100%) invert(42%) sepia(14%) saturate(480%) hue-rotate(98deg) !important;
    opacity: 0.95 !important;
}

html body .account-container .dxbl-toolbar-btn img,
html body .account-container .dxbl-toolbar-btn .dxbl-image,
html body .account-container .dxbl-toolbar-btn .dxbl-image img,
html body .xaf-user-menu-popup .logo-container img,
html body .xaf-user-menu-popup .logo-container .dxbl-image,
html body .xaf-user-menu-popup .logo-container .dxbl-image img,
html body .xaf-user-menu .logo-container img,
html body .xaf-user-menu .logo-container .dxbl-image,
html body .xaf-user-menu .logo-container .dxbl-image img,
html body .dxbl-popup:has(.xaf-btn.my-details) .logo-container img,
html body .dxbl-popup:has(.xaf-btn.my-details) .logo-container .dxbl-image,
html body .dxbl-popup:has(.xaf-btn.my-details) .logo-container .dxbl-image img {
    filter: none !important;
    opacity: 1 !important;
}
