/* =========================================================================
   docs-execucoes.css: estilos só da página /Docs/execucoes-e-gatilhos (Curator 3.2.3).
   Prefixo dex-. Paleta do site (navy #0D2142, ciano #00B5CC / #26C6DA, azul #1976D2);
   a paleta do app (fundo #090f1f, verde-limão #5cf542) aparece só dentro de .dex-app,
   a réplica da "Lista de Execuções".
     .dex-lead, .dex-label, .dex-mini, .dex-cap   textos de apoio
     .dex-goals     atalhos "comece pelo que você quer fazer"
     .dex-crop      recorte do topo de um print (execucoes.webp)
     .dex-app       réplica da "Lista de Execuções" (vira cartões no celular)
     .dex-kinds     os dois tipos de gatilho (sobre .docs-compare)
     .dex-chain     Dispatcher → fila → Performer
     .dex-check     lista de conferência "Antes de criar"
     .dex-curador   destaque do Curador
     .dex-list, .dex-summary, .dex-portal
   Carregado no <head> por templates/docs/execucoes-e-gatilhos.html, depois do docs-core.css.
   ========================================================================= */

/* ---------- Textos de apoio ---------- */
.docs-body p.dex-lead {
    color: #4f5d73;
    font-size: 18.5px;
    line-height: 1.7;
}
.docs-body p.dex-lead strong {
    color: #0D2142;
}
.docs-body p.dex-label {
    margin: 26px 0 0;
    color: #00B5CC;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.docs-body .dex-mini {
    display: inline-block;
    margin-top: 6px;
    color: #0D2142;
    font-size: 17px;
    font-weight: 800;
}
.docs-body p.dex-cap {
    margin: 10px auto 26px;
    max-width: 760px;
    color: #5d6a7d;
    font-size: 14.5px;
    line-height: 1.6;
    text-align: center;
}

/* ---------- Atalhos: comece pelo que você quer fazer ---------- */
.docs-body .dex-goals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 8px;
    padding: 0;
    list-style: none;
}
.docs-body .dex-goals li {
    margin: 0;
    padding: 0;
}
.docs-body .dex-goals a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    height: 100%;
    padding: 14px 16px;
    border: 1px solid #e3ecf4;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(13, 33, 66, 0.05);
    color: #0D2142;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.docs-body .dex-goals a:hover,
.docs-body .dex-goals a:focus-visible {
    border-color: #26C6DA;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 33, 66, 0.09);
}
.docs-body .dex-goals .dex-goals__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e8f7fa;
    color: #00B5CC;
    font-size: 20px;
}
.docs-body .dex-goals .dex-goals__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.docs-body .dex-goals .dex-goals__text strong {
    color: #0D2142;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}
.docs-body .dex-goals .dex-goals__text span {
    color: #6b7a90;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
}

/* ---------- Recorte do topo de um print ---------- */
/* Janela sobre o print 2000x1250: --cx/--cy = canto do recorte, --cw/--ch = tamanho (px do arquivo).
   No computador mostra a faixa de cima inteira; no celular, só o canto esquerdo, ampliado,
   para as abas e o filtro ficarem legíveis (o print inteiro abre ao tocar). */
figure.docs-shot.dex-crop .dex-crop__win {
    --cx: 0; --cy: 0; --cw: 2000; --ch: 480;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #0a0f1c;
    aspect-ratio: var(--cw) / var(--ch);
}
figure.docs-shot.dex-crop .dex-crop__win img {
    position: absolute;
    left: calc(var(--cx) / var(--cw) * -100%);
    top: calc(var(--cy) / var(--ch) * -100%);
    width: calc(2000 / var(--cw) * 100%);
    max-width: none;
    height: auto;
    margin: 0;
    border-radius: 0;
}

/* ---------- Listas simples ---------- */
.docs-body ul.dex-list {
    margin: 10px 0 16px;
    padding-left: 20px;
}
.docs-body ul.dex-list li {
    margin-bottom: 8px;
    color: #6b6b84;
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.7;
}
.docs-body ul.dex-list li:last-child {
    margin-bottom: 0;
}
.docs-body ul.dex-list li strong {
    color: #0D2142;
}
.docs-body .warning-box ul.dex-list,
.docs-body .tip-box ul.dex-list {
    margin-bottom: 4px;
}
.docs-body .warning-box ul.dex-list li,
.docs-body .tip-box ul.dex-list li {
    font-size: 16px;
}
.docs-body ol.dex-summary {
    padding-left: 22px;
}
.docs-body ol.dex-summary li {
    margin-bottom: 8px;
    color: #6b6b84;
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.7;
}

/* ---------- Réplica da "Lista de Execuções" (paleta do app) ---------- */
.dex-app {
    margin: 18px 0 0;
    padding: 14px 14px 12px;
    background: #090f1f;
    border: 1px solid rgba(38, 198, 218, 0.28);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(13, 33, 66, 0.16);
    color: #e6ebf2;
    font-family: "Nunito", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: default;
    user-select: none;
}
.dex-app .dex-app__tabs {
    display: flex;
    gap: 22px;
    padding: 0 4px;
    margin-bottom: 12px;
}
.dex-app .dex-app__tab {
    padding: 2px 0 7px;
    color: #aeb8c8;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.dex-app .dex-app__tab.is-on {
    color: #ffffff;
    font-weight: 700;
    border-bottom-color: #5cf542;
}
.dex-app .dex-app__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #141a29;
    border: 1px solid #232b3d;
    border-radius: 10px;
}
.dex-app .dex-app__field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.dex-app .dex-app__field--grow {
    flex: 1 1 180px;
}
.dex-app .dex-app__lbl {
    color: #9aa5b8;
    white-space: nowrap;
}
.dex-app .dex-app__select,
.dex-app .dex-app__input {
    display: inline-block;
    min-width: 0;
    padding: 6px 10px;
    background: #0d1322;
    border: 1px solid #2a3346;
    border-radius: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dex-app .dex-app__select {
    padding-right: 26px;
    position: relative;
    color: #ffffff;
}
.dex-app .dex-app__select::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -5px;
    border-right: 2px solid #c9d1de;
    border-bottom: 2px solid #c9d1de;
    transform: rotate(45deg);
}
.dex-app .dex-app__input {
    flex: 1 1 auto;
    color: #7f8aa0;
}
.dex-app .dex-app__tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.dex-app .dex-app__total {
    color: #9aa5b8;
    white-space: nowrap;
}
.dex-app .dex-app__btn {
    padding: 6px 11px;
    background: #0d1322;
    border: 1px solid #2a3346;
    border-radius: 7px;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}
.dex-app .dex-app__table {
    background: #141a29;
    border: 1px solid #232b3d;
    border-radius: 10px;
    overflow: hidden;
}
.dex-app .dex-app__row {
    display: grid;
    grid-template-columns: 1.15fr 1.9fr 0.8fr 0.8fr 0.65fr 1.25fr 0.85fr 0.5fr;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid #232b3d;
}
.dex-app .dex-app__row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.dex-app .dex-app__row--head {
    border-top: 0;
    color: #c9d1de;
    font-weight: 800;
}
.dex-app .dex-app__row--head > span:nth-child(n+3) {
    text-align: center;
}
.dex-app .dex-app__row:not(.dex-app__row--head) > span:nth-child(n+3) {
    text-align: center;
}
.dex-app .dex-app__row:not(.dex-app__row--head) > span:nth-child(5),
.dex-app .dex-app__row:not(.dex-app__row--head) > span:nth-child(7) {
    color: #7f8aa0;
}
.dex-app .dex-app__info {
    color: #6aa0ff;
}
.dex-app .dex-app__fail {
    color: #ff7b7b;
}
.dex-app .dex-app__dots {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 1px;
}
.dex-app .dex-app__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 10px 4px 0;
}
.dex-app .dex-app__showing {
    color: #9aa5b8;
}
.dex-app .dex-app__pager {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.dex-app .dex-app__pager span {
    padding: 4px 9px;
    background: #0d1322;
    border: 1px solid #232b3d;
    border-radius: 6px;
    color: #7f8aa0;
    white-space: nowrap;
}
.dex-app .dex-app__pager b {
    padding: 0 4px;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

/* ---------- Os dois tipos de gatilho ---------- */
.docs-compare.dex-kinds article h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0D2142;
    font-size: 17px;
    font-weight: 800;
}
.docs-compare.dex-kinds article h4 i {
    color: #00B5CC;
    font-size: 21px;
}
.docs-compare.dex-kinds article p {
    font-size: 15.5px;
    line-height: 1.6;
}
.docs-compare.dex-kinds article a {
    color: #00B5CC;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
}
.docs-compare.dex-kinds article a:hover {
    color: #1976D2;
}

/* ---------- Dispatcher → fila → Performer ---------- */
.dex-chain {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
    align-items: stretch;
    margin: 20px 0 0;
}
.dex-chain .dex-chain__step {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 16px 16px 14px;
    background: #ffffff;
    border: 1px solid #e3ecf4;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(13, 33, 66, 0.05);
}
.dex-chain .dex-chain__step--queue {
    background: #f4f8fb;
    border-style: dashed;
    border-color: rgba(0, 181, 204, 0.45);
}
.dex-chain .dex-chain__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    margin-bottom: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e8f7fa;
    color: #0D2142;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.35;
}
.dex-chain .dex-chain__tag i {
    color: #00B5CC;
    font-size: 15px;
}
.dex-chain .dex-chain__step > strong {
    color: #0D2142;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}
.dex-chain .dex-chain__step > span:last-child {
    color: #5d6a7d;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.55;
}
.dex-chain .dex-chain__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00B5CC;
    font-size: 26px;
}

/* ---------- Conferência antes de criar ---------- */
.docs-body ul.dex-check {
    margin: 12px 0 28px;
    padding: 0;
    list-style: none;
}
.docs-body ul.dex-check li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 10px;
    padding: 12px 14px;
    background: #f6fafc;
    border: 1px solid #e3ecf4;
    border-radius: 12px;
}
.docs-body ul.dex-check li > i {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    border-radius: 50%;
    background: linear-gradient(135deg, #26C6DA 0%, #1976D2 100%);
    color: #ffffff;
    font-size: 18px;
}
.docs-body ul.dex-check li > span {
    min-width: 0;
    color: #5d6a7d;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
}

/* ---------- Destaque do Curador ---------- */
.dex-curador {
    position: relative;
    margin: 34px 0 0;
    padding: 24px 24px 20px;
    background: linear-gradient(180deg, #f2fbfd 0%, #ffffff 70%);
    border: 1px solid rgba(0, 181, 204, 0.55);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(0, 181, 204, 0.14);
    overflow: hidden;
    scroll-margin-top: 110px;
}
.dex-curador::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #26C6DA 0%, #1976D2 100%);
}
.dex-curador .dex-curador__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 8px;
}
.dex-curador .dex-curador__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #26C6DA 0%, #1976D2 100%);
    color: #ffffff;
    font-size: 24px;
}
.docs-section .dex-curador h4 {
    margin: 4px 0 6px;
    color: #0D2142;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}
.dex-curador .dex-curador__head p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}
.dex-curador .dex-curador__head p strong {
    color: #0D2142;
}
.dex-curador ol.docs-steps {
    margin: 18px 0 18px;
}
.dex-curador p.dex-curador__motor {
    margin: 0;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e3ecf4;
    border-radius: 12px;
    font-size: 15.5px;
    line-height: 1.65;
}
.dex-curador p.dex-curador__motor strong {
    color: #0D2142;
}

/* ---------- Portal ---------- */
.docs-ficha.dex-portal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.docs-ficha.dex-portal .docs-ficha__cell strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}
.docs-ficha.dex-portal .docs-ficha__cell strong i {
    color: #00B5CC;
    font-size: 18px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1199px) {
    .docs-body .dex-goals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .docs-ficha.dex-portal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dex-app {
        font-size: 12.5px;
    }
}
@media (max-width: 767px) {
    .docs-body p.dex-lead {
        font-size: 17px;
    }
    .docs-ficha.dex-portal {
        grid-template-columns: 1fr;
    }
    /* Corrente vira vertical */
    .dex-chain {
        grid-template-columns: 1fr;
    }
    .dex-chain .dex-chain__arrow {
        height: 30px;
        transform: rotate(90deg);
    }
    /* Réplica: cada execução vira um cartão com rótulo e valor */
    .dex-app {
        padding: 12px 10px 10px;
    }
    .dex-app .dex-app__bar {
        padding: 10px;
    }
    .dex-app .dex-app__field--grow {
        flex-basis: 100%;
    }
    .dex-app .dex-app__tools {
        margin-left: 0;
        flex-wrap: wrap;
    }
    .dex-app .dex-app__table {
        background: transparent;
        border: 0;
        border-radius: 0;
        display: grid;
        gap: 8px;
    }
    .dex-app .dex-app__row--head {
        display: none;
    }
    .dex-app .dex-app__row {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 4px 10px;
        padding: 10px 12px;
        background: #141a29;
        border: 1px solid #232b3d;
        border-radius: 10px;
    }
    .dex-app .dex-app__row > span {
        display: contents;
    }
    .dex-app .dex-app__row > span::before {
        content: attr(data-k);
        color: #9aa5b8;
        font-weight: 700;
    }
    .dex-app .dex-app__row:not(.dex-app__row--head) > span:nth-child(n+3) {
        text-align: left;
    }
    .dex-app .dex-app__foot {
        justify-content: center;
    }
    .dex-app .dex-app__showing {
        flex-basis: 100%;
        text-align: center;
    }
}
@media (max-width: 575px) {
    /* Recorte: abas, sub-abas e filtro "Projeto:" (canto esquerdo do print) */
    figure.docs-shot.dex-crop .dex-crop__win {
        --cx: 0; --cy: 74; --cw: 545; --ch: 240;
        border-radius: 8px;
    }
    .docs-body .dex-goals {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .docs-body .dex-goals a {
        padding: 12px 14px;
    }
    .dex-curador {
        padding: 20px 16px 16px;
    }
    .dex-curador .dex-curador__head {
        flex-direction: column;
        gap: 10px;
    }
    .dex-app .dex-app__pager span:nth-child(1),
    .dex-app .dex-app__pager span:nth-child(5) {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .docs-body .dex-goals a {
        transition: none;
    }
}
