/* ===== TALENT BRIDGE — APPLICATION PAGE ===== */

.app-body {
    background: #eef3fa;
}

/* ---- PROGRESS BAR ---- */
.app-progress-bar {
    height: 4px;
    background: var(--tb-border);
    position: sticky;
    top: 57px;
    z-index: 100;
}

.app-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tb-navy), var(--tb-orange));
    width: 0%;
    transition: width .4s ease;
    border-radius: 0 4px 4px 0;
}

/* ---- VAGA HEADER ---- */
.app-vaga-header {
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    border-left: 5px solid var(--tb-orange);
    box-shadow: 0 2px 14px rgba(27, 61, 122, .08);
}

.app-vaga-header-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.app-vaga-header-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.app-vaga-header-intro {
    flex: 1 1 auto;
    min-width: 0;
}

.app-vaga-header-body {
    flex: 1 1 auto;
    min-width: 0;
}

.app-vaga-company-logo {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: var(--tb-navy);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.app-vaga-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-vaga-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--tb-navy);
    line-height: 1.25;
    word-break: break-word;
}

.app-vaga-empresa-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 6px;
}

.app-vaga-empresa {
    display: block;
    color: var(--tb-blue);
    font-weight: 600;
    font-size: 14px;
    word-break: break-word;
    margin-top: 4px;
}

.app-vaga-loc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--tb-muted);
    font-size: 13px;
    font-weight: 600;
}

.app-vaga-loc i {
    color: var(--tb-blue);
    font-size: 11px;
}

.app-vaga-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.app-vaga-empresa-btn {
    align-self: flex-start;
    font-size: 13px !important;
    padding: 8px 14px !important;
    min-height: 40px;
}

.app-vaga-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.app-deadline-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(244, 121, 32, .1);
    color: var(--tb-orange2);
    border: 1px solid rgba(244, 121, 32, .25);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}

/* ---- SECTIONS ---- */
.app-section {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(27, 61, 122, .06);
    transition: box-shadow .2s;
}

.app-section:focus-within {
    box-shadow: 0 4px 20px rgba(27, 61, 122, .13);
}

.app-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--tb-border);
    background: linear-gradient(to right, #f8fbff, #fff);
    cursor: pointer;
}

.app-section-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tb-navy);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-section.done .app-section-num {
    background: #27ae60;
}

.app-section-title {
    font-weight: 700;
    color: var(--tb-navy);
    font-size: 15px;
}

.app-section-sub {
    color: var(--tb-muted);
    font-size: 12px;
}

.app-section-body {
    padding: 22px;
}

/* ---- INPUTS ---- */
.app-input-icon {
    background: #eaf1fb;
    border: 1px solid var(--tb-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0 12px;
    color: var(--tb-blue);
    display: flex;
    align-items: center;
}

.app-input {
    border-color: var(--tb-border);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    transition: .18s;
}

.input-group .app-input {
    border-radius: 0 8px 8px 0;
}

.form-control.app-input:not(.input-group .app-input),
.form-select.app-input:not(.input-group .app-input) {
    border-radius: 8px;
}

.app-input:focus {
    border-color: var(--tb-orange);
    box-shadow: 0 0 0 3px rgba(244, 121, 32, .12);
}

.app-textarea {
    resize: vertical;
    min-height: 130px;
    border-radius: 8px !important;
}

/* ---- IDIOMAS ---- */
.app-idioma-card {
    border: 1.5px solid var(--tb-border);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--tb-muted);
    cursor: pointer;
    transition: .15s;
    user-select: none;
}

.app-idioma-card:hover {
    border-color: var(--tb-orange);
    color: var(--tb-orange);
}

.app-idioma-card.selected {
    border-color: var(--tb-navy);
    background: var(--tb-navy);
    color: #fff;
}

.app-idioma-card.selected i {
    color: #fff;
}

/* ---- SKILLS ---- */
.app-skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tb-light);
    border: 1.5px solid var(--tb-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-navy);
}

.app-skill-tag button {
    background: none;
    border: none;
    color: var(--tb-muted);
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    line-height: 1;
}

.app-skill-tag button:hover {
    color: #e74c3c;
}

/* ---- RADIO PILLS ---- */
.app-radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid var(--tb-border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tb-muted);
    cursor: pointer;
    transition: .15s;
    user-select: none;
}

.app-radio-pill input {
    display: none;
}

.app-radio-pill:has(input:checked) {
    border-color: var(--tb-orange);
    background: rgba(244, 121, 32, .08);
    color: var(--tb-orange2);
}

/* ---- DOCS UPLOAD ---- */
.app-docs-info {
    background: #fff8f2;
    border: 1px solid rgba(244, 121, 32, .25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--tb-text);
}

.app-doc-upload {
    border: 2px dashed var(--tb-border);
    border-radius: 10px;
    padding: 0;
    transition: .18s;
    overflow: hidden;
}

.app-doc-upload.app-doc-cv-slot {
    border-color: rgba(244, 121, 32, .55);
    box-shadow: 0 0 0 1px rgba(244, 121, 32, .12);
}

.app-doc-upload:hover {
    border-color: var(--tb-orange);
}

.app-doc-upload.uploaded {
    border-color: #27ae60;
    border-style: solid;
    background: #f0fff4;
}

.app-doc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--tb-light);
}

.app-doc-num {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--tb-orange);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-doc-upload.uploaded .app-doc-num {
    background: #27ae60;
}

.app-doc-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--tb-navy);
}

.app-doc-required {
    font-size: 11px;
    color: var(--tb-orange);
    font-weight: 600;
}

.app-doc-upload.uploaded .app-doc-required {
    color: #27ae60;
}

.app-doc-body {
    padding: 12px 16px;
}

.app-doc-dropzone {
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: .15s;
    background: #fff;
    border: 1.5px dashed var(--tb-border);
}

.app-doc-dropzone:hover {
    background: #fff8f2;
    border-color: var(--tb-orange);
}

.app-doc-preview {
    display: none;
    align-items: center;
    gap: 10px;
    background: #f0fff4;
    border: 1px solid #a8e6cf;
    border-radius: 8px;
    padding: 10px 14px;
}

.app-doc-preview.show {
    display: flex;
}

.app-doc-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: #27ae60;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-idioma-table th {
    font-size: 12px;
    color: var(--tb-muted);
    font-weight: 600;
}

.app-idioma-table td {
    vertical-align: middle;
}

.app-doc-pick-btn {
    padding: 0.65rem 0.85rem;
}

/* Experiência profissional — partilhado com painel (tb-career-panel em painel.css) */
.application-form .tb-career-panel {
    margin-top: 0.25rem;
}

.application-form .tb-exp-atual-wrap .form-check-input {
    margin-top: 0;
}

/* ---- RESUMO ---- */
.app-resumo {
    background: var(--tb-light);
    border-radius: 10px;
    padding: 16px;
}

.app-resumo-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--tb-border);
    font-size: 13px;
}

.app-resumo-row:last-child {
    border-bottom: none;
}

.app-resumo-label {
    color: var(--tb-muted);
    font-weight: 600;
    flex: 0 0 auto;
    min-width: 5.5rem;
}

.app-resumo-value {
    color: var(--tb-navy);
    font-weight: 700;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

/* ---- CHECKBOXES ---- */
.app-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--tb-light);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: .15s;
}

.app-checkbox-row:has(input:checked) {
    border-color: var(--tb-teal);
    background: #f0fbff;
}

.app-checkbox-row .form-check-input {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---- SUBMIT BTN ---- */
.app-submit-btn {
    padding: 14px;
    font-size: 16px;
    border-radius: 10px;
    letter-spacing: .3px;
}

/* ---- SIDEBAR ---- */
.app-sidebar-card {
    background: #fff;
    border: 1.5px solid var(--tb-border);
    border-radius: 12px;
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.app-sidebar-header {
    background: var(--tb-navy);
    color: #fff;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
}

.app-tips-card {
    border-color: rgba(244, 121, 32, .3);
}

.app-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--tb-text);
    padding: 6px 0;
    border-bottom: 1px solid var(--tb-border);
}

.app-tip:last-child {
    border-bottom: none;
}

.app-tip-icon {
    color: #27ae60;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---- STEPS ---- */
.app-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    position: relative;
}

.app-step::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 30px;
    width: 2px;
    height: 100%;
    background: var(--tb-border);
}

.app-step:last-child::before {
    display: none;
}

.app-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tb-border);
    color: var(--tb-muted);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-step.active .app-step-dot {
    background: var(--tb-orange);
    color: #fff;
}

.app-step.done .app-step-dot {
    background: #27ae60;
    color: #fff;
}

.app-step-text {
    font-size: 13px;
    color: var(--tb-muted);
    padding-top: 5px;
}

.app-step.active .app-step-text {
    color: var(--tb-navy);
    font-weight: 600;
}

/* ---- SUCESSO MODAL ---- */
.sucesso-icon {
    font-size: 64px;
    color: #27ae60;
    animation: popIn .4s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.app-sucesso-vaga {
    background: var(--tb-light);
    border-left: 4px solid var(--tb-orange);
    text-align: left;
    font-size: 14px;
}

/* ---- Candidaturas na página de vaga (admin / empresa) ---- */
.tb-vaga-cand-section .app-section-body {
    padding-top: 0;
}

.tb-readonly-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #fff8e6;
    border: 1px solid #ffe0a3;
    border-radius: 8px;
    color: #856404;
    font-size: 13px;
    font-weight: 500;
}

.tb-vaga-cand-table {
    table-layout: fixed;
}

.tb-vaga-cand-table thead th:nth-child(1) { width: 34%; }
.tb-vaga-cand-table thead th:nth-child(2) { width: 22%; }
.tb-vaga-cand-table thead th:nth-child(3) { width: 22%; }
.tb-vaga-cand-table thead th:nth-child(4) { width: 22%; }

.tb-vaga-cand-table tbody td {
    word-break: break-word;
}

.tb-vaga-cand-table tbody td:nth-child(2),
.tb-vaga-cand-table tbody td:nth-child(4) {
    white-space: nowrap;
}

.tb-vaga-cand-table .tb-app-ref {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.tb-vaga-cand-empty {
    text-align: center;
    padding: 28px 16px;
    color: #6c757d;
    font-size: 14px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.tb-vaga-cand-section .tb-cand-table tbody tr {
    cursor: default;
}

/* ---- CV PROCESS OVERLAY ---- */
.app-cv-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(238, 243, 250, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.app-cv-overlay.d-none {
    display: none !important;
}

.app-body.app-cv-processing #appContainer {
    filter: blur(2.5px);
    pointer-events: none;
    user-select: none;
}

.app-cv-overlay-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(27, 61, 122, 0.18);
    max-width: 360px;
    margin: 16px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .app-sidebar-card {
        position: static;
    }
}
