/* ==========================================================================
   Coda AI — Criação de processo de importação
   Identidade Coda: roxo #3E02C6 / gradiente rosa
   ========================================================================== */

/* ---------- Card da fila na lista de processos ---------- */
.coda-fila-card {
    background: #fff;
    border: 1px solid #e4d9ff;
    border-left: 4px solid #3E02C6;
    border-radius: 4px;
    padding: 12px 16px;
}

.coda-fila-header {
    color: #3E02C6;
    font-size: 14px;
    margin-bottom: 8px;
}

.coda-fila-icone,
.coda-upload-icone {
    height: 22px;
    margin-right: 6px;
    vertical-align: middle;
}

.coda-fila-linha {
    border-top: 1px solid #f0ecfa;
    padding: 10px 6px;
}

.coda-fila-linha-erro { background-color: #fdf7f7; }
.coda-fila-linha-ok { background-color: #f6fbf6; }
.coda-fila-info { margin-bottom: 4px; }
.coda-fila-docs { font-weight: 600; margin-right: 10px; }
.coda-fila-meta { color: #888; font-size: 12px; }

.coda-fila-progress {
    height: 8px;
    margin: 6px 0 4px 0;
    background-color: #efe9fb;
}

.coda-fila-progress-bar {
    background-color: #3E02C6;
    transition: width .6s ease;
}

.coda-fila-mensagem { color: #555; font-size: 12px; }
.coda-fila-mensagem-erro { color: #C46A69; font-size: 13px; }
.coda-fila-mensagem-ok { color: #3c763d; font-size: 13px; }
.coda-fila-acoes { margin-top: 6px; }
.coda-fila-acoes .btn { margin-right: 6px; }
.coda-fila-dispensar { color: #999; margin-left: 8px; }
.coda-fila-dispensar:hover { color: #C46A69; }

/* ==========================================================================
   Modal de escolha "Novo Processo" (Coda AI x Manual)
   windowClass: modal-coda-escolha
   ========================================================================== */
.modal-coda-escolha .modal-dialog {
    width: 680px;
    max-width: 94%;
    margin: 40px auto;
}

.modal-coda-escolha .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(30, 8, 80, 0.35);
}

.coda-esc { background: #f7f6fb; }

/* Header com gradiente e brilho */
.coda-esc-header {
    position: relative;
    padding: 26px 30px;
    background: linear-gradient(120deg, #3E02C6 0%, #6a1bd1 55%, #b3138f 130%);
    overflow: hidden;
}

.coda-esc-header-glow {
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 92, 205, 0.55) 0%, rgba(255, 92, 205, 0) 70%);
    pointer-events: none;
}

.coda-esc-header-content {
    position: relative;
    display: flex;
    align-items: center;
}

.coda-esc-header-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex: 0 0 auto;
}

.coda-esc-header-icon img { height: 26px; }

.coda-esc-title {
    margin: 0;
    color: #fff;
    font-size: 21px;
    font-weight: 700;
}

.coda-esc-subtitle {
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

/* Corpo com os cards */
.coda-esc-body { padding: 22px 26px 6px 26px; }

.coda-esc-card {
    position: relative;
    background: #fff;
    border: 2px solid #e7e2f2;
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.coda-esc-card:hover {
    border-color: #c9b8f2;
    box-shadow: 0 6px 20px rgba(62, 2, 198, 0.10);
}

.coda-esc-card-sel {
    border-color: #3E02C6;
    box-shadow: 0 8px 26px rgba(62, 2, 198, 0.18);
}

.coda-esc-card-ia { background: linear-gradient(180deg, #fbf9ff 0%, #ffffff 60%); }

.coda-esc-badge {
    position: absolute;
    top: -11px;
    left: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
}

.coda-esc-badge-ia { background: linear-gradient(90deg, #3E02C6, #b3138f); }
.coda-esc-badge-ia .fa { margin-right: 3px; }

.coda-esc-card-top {
    display: flex;
    align-items: flex-start;
}

.coda-esc-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex: 0 0 auto;
}

.coda-esc-card-icon-ia {
    background: linear-gradient(135deg, #f3e9ff, #ffe6f5);
}
.coda-esc-card-icon-ia img { height: 30px; }

.coda-esc-card-icon-manual {
    background: #eef1f5;
    color: #5b6b7f;
    font-size: 22px;
}

.coda-esc-card-head { flex: 1 1 auto; }

.coda-esc-card-head h4 {
    margin: 2px 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f1147;
}

.coda-esc-card-head p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b6580;
}

.coda-esc-brand {
    background: linear-gradient(90deg, #3E02C6, #b3138f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Radio custom */
.coda-esc-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cdc6e0;
    flex: 0 0 auto;
    margin-left: 12px;
    margin-top: 4px;
    position: relative;
    transition: border-color .15s ease;
}

.coda-esc-card-sel .coda-esc-radio { border-color: #3E02C6; }

.coda-esc-card-sel .coda-esc-radio:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3E02C6, #b3138f);
}

/* Lista de vantagens */
.coda-esc-list {
    list-style: none;
    margin: 14px 0 2px 0;
    padding: 0;
}

.coda-esc-list li {
    font-size: 13px;
    color: #4a4560;
    padding: 3px 0 3px 26px;
    position: relative;
    line-height: 1.45;
}

.coda-esc-list li .fa {
    position: absolute;
    left: 2px;
    top: 5px;
    color: #2fa76a;
    font-size: 13px;
}

.coda-esc-list li.coda-esc-info { color: #9a7b18; }
.coda-esc-list li.coda-esc-info .fa { color: #e0a92b; }

/* Divisor OU */
.coda-esc-ou {
    text-align: center;
    position: relative;
    margin: 16px 0;
}

.coda-esc-ou:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e4dff0;
}

.coda-esc-ou span {
    position: relative;
    background: #f7f6fb;
    padding: 0 14px;
    color: #9a94ab;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Footer */
.coda-esc-footer {
    padding: 16px 26px 22px 26px;
    text-align: right;
}

.coda-esc-footer .btn-default {
    border-radius: 10px;
    padding: 9px 18px;
}

.coda-esc-continuar {
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    margin-left: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #3E02C6, #7b2ff7);
    box-shadow: 0 6px 16px rgba(62, 2, 198, 0.28);
    transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}

.coda-esc-continuar:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(62, 2, 198, 0.34); }
.coda-esc-continuar[disabled] { opacity: .5; box-shadow: none; cursor: not-allowed; }
.coda-esc-continuar .fa { margin-left: 6px; }

/* ==========================================================================
   Modal de upload dos documentos (windowClass: modal-coda-upload)
   ========================================================================== */
.modal-coda-upload .modal-dialog { width: 640px; max-width: 94%; }
.modal-coda-upload .modal-content { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px rgba(30, 8, 80, 0.30); }

.coda-upload-header {
    background: linear-gradient(120deg, #3E02C6 0%, #6a1bd1 60%, #b3138f 130%);
    padding: 18px 24px;
    border: none;
}
.coda-upload-header .modal-title { color: #fff; font-weight: 700; display: flex; align-items: center; }

.coda-upload-instrucao { color: #666; margin: 4px 0 12px 0; }

/* Drop-zone — visual claro e consistente (bom contraste em normal e hover) */
.coda-upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    border: 2px dashed #cbbcee;
    border-radius: 14px;
    background: #faf8ff;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.coda-upload-drop:hover,
.coda-upload-drop.dragover {
    border-color: #7b2ff7;
    background: #f2ecff;
    box-shadow: inset 0 0 0 3px rgba(123, 47, 247, 0.06);
}
.coda-upload-drop .fa {
    font-size: 30px;
    color: #7b2ff7;
    margin-bottom: 10px;
}
.coda-upload-drop-titulo {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #3a2f5c;
}
.coda-upload-drop-sub {
    margin: 3px 0 0 0;
    font-size: 12.5px;
    color: #8a83a0;
}

.coda-upload-lista { list-style: none; padding: 0; margin: 14px 0 0 0; }
.coda-upload-item { padding: 8px 10px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 6px; display: flex; align-items: center; }
.coda-upload-item .fa { color: #7b2ff7; }
.coda-upload-item-nome { margin: 0 10px; flex: 1 1 auto; color: #3a2f5c; }
.coda-upload-item-remover { color: #C46A69; }

.coda-upload-footer { padding: 14px 24px 20px 24px; text-align: right; }
.coda-upload-footer .btn { margin-left: 8px; border-radius: 10px; padding: 9px 18px; }

/* Botão primário do upload — largura automática (nunca "estoura" o texto) */
.coda-upload-iniciar {
    display: inline-block;
    white-space: nowrap;
    width: auto;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    margin-left: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #3E02C6, #7b2ff7);
    box-shadow: 0 6px 16px rgba(62, 2, 198, 0.26);
    transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}
.coda-upload-iniciar:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(62, 2, 198, 0.32); }
.coda-upload-iniciar .fa { margin-right: 5px; }
.coda-upload-iniciar[disabled] { opacity: .5; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- Barra compacta da fila (v2): 1 linha acima das abas, expande no clique ---------- */
.coda-bar {
    background: #fff;
    border: 1px solid #e4d9ff;
    border-left: 4px solid #3E02C6;
    border-radius: 4px;
}
.coda-bar-com-erro { border-left-color: #C46A69; }
.coda-bar-linha {
    display: flex;
    align-items: center;
    padding: 7px 14px;
    cursor: pointer;
}
.coda-bar-titulo { color: #3E02C6; margin-right: 10px; }
.coda-bar-resumo {
    flex: 1;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.coda-bar-msg { color: #888; }
.coda-bar-ok { color: #3c763d; }
.coda-bar-erro-txt { color: #C46A69; }
.coda-bar-caret { color: #999; margin-left: 10px; }
.coda-bar-detalhe { border-top: 1px solid #f0ecfa; padding: 0 14px 6px; }
.coda-bar-detalhe .coda-fila-linha:first-child { border-top: none; }
.coda-bar-rodape { text-align: right; padding-top: 6px; }
.coda-bar-rodape a { font-size: 12px; color: #3E02C6; }
.coda-fila-countdown { color: #999; font-size: 12px; margin-left: 10px; }
.coda-historico-docs { word-break: break-word; font-size: 12px; }
.coda-historico-data { white-space: nowrap; }
