/* ============================================================
   TALENT BRIDGE — Ajustes de responsividade (mobile / tablet)
   ============================================================ */

@media (max-width: 991.98px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    /* Navbar */
    .tb-navbar .navbar-brand img,
    .tb-navbar .tb-brand-logo {
        max-height: 30px !important;
        max-width: 98px !important;
        width: auto !important;
    }

    .tb-navbar .btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Hero homepage */
    .tb-hero {
        padding: 28px 0 !important;
    }

    .tb-hero-title {
        font-size: 1.55rem !important;
        line-height: 1.25;
    }

    .tb-hero-sub {
        font-size: 14px;
    }

    .tb-stats-row {
        gap: 8px !important;
        font-size: 13px;
    }

    /* Filtros — chips com scroll horizontal */
    .tb-filters-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .tb-filters-types {
        width: 100%;
    }

    .tb-chips-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        mask-image: linear-gradient(to right, #000 85%, transparent);
    }

    .tb-chips-scroll::-webkit-scrollbar {
        display: none;
    }

    .tb-chip {
        font-size: 11px;
        padding: 5px 12px;
    }

    .tb-filters-sort {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .tb-filters-sort .tb-sort {
        width: auto;
        min-width: 140px;
        max-width: 55%;
    }

    /* Cards de vaga — coluna secundária sob o conteúdo */
    .tb-job-card {
        padding: 14px 14px;
    }

    .tb-job-card-top {
        flex-wrap: wrap;
    }

    .tb-job-card-aside {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding-top: 2px;
    }

    .tb-company-logo {
        width: 42px;
        height: 42px;
        font-size: 12px;
        border-radius: 9px;
    }

    .tb-job-title {
        font-size: 14px;
    }

    /* Painéis */
    .tb-panel-hero {
        padding: 20px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .tb-panel-title {
        font-size: 22px;
    }

    .tb-panel-hero-stats {
        width: 100%;
        justify-content: stretch;
    }

    .tb-stat-pill {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 12px;
    }

    /* Tabs com scroll horizontal */
    .tb-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tb-tabs::-webkit-scrollbar {
        display: none;
    }

    .tb-tabs .nav-link {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 14px;
    }

    /* Tabelas */
    .tb-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
        padding: 0 4px;
    }

    .tb-cand-table {
        min-width: 580px;
    }

    /* Cards de vaga no painel empresa */
    .tb-vaga-icon-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    /* Espaço para o widget de IA flutuante */
    .tb-page-with-footer,
    .app-body {
        padding-bottom: 72px;
    }
}

@media (max-width: 767.98px) {

    /* Application / publish / vaga detail */
    .app-vaga-header {
        padding: 14px;
    }

    .app-vaga-header-layout {
        gap: 12px;
    }

    .app-vaga-header-top {
        gap: 12px;
    }

    .app-vaga-company-logo {
        width: 46px;
        height: 46px;
        font-size: 14px;
        border-radius: 10px;
    }

    .app-vaga-title {
        font-size: 17px;
        line-height: 1.3;
    }

    .app-vaga-empresa {
        font-size: 13px;
    }

    .app-vaga-header-meta {
        gap: 6px;
    }

    .app-vaga-empresa-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 10px 14px !important;
        font-size: 14px !important;
    }

    .app-section-header {
        padding: 14px 16px;
        gap: 10px;
    }

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

    .app-section-num {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .app-sidebar-card {
        position: static;
        margin-top: 8px;
    }

    /* Manter label | valor na mesma linha (mais compacto) */
    .app-resumo-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    .app-resumo-label {
        min-width: 4.75rem;
        font-size: 12px;
    }

    .app-resumo-value {
        max-width: none;
        text-align: right;
        word-break: break-word;
        font-size: 13px;
    }

    .app-doc-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-doc-preview {
        flex-wrap: wrap;
    }

    .app-doc-preview-name {
        white-space: normal;
        word-break: break-all;
    }

    .app-radio-pill {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Input groups — ícone mais compacto */
    .app-input-icon {
        padding: 0 8px !important;
    }

    .input-group > .form-control,
    .input-group > .form-select {
        min-width: 0;
    }

    /* Botões full-width em acções principais */
    .app-submit-btn,
    .vaga-actions-stack .btn {
        width: 100%;
    }

    .vaga-actions-stack {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    /* Modais */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .tb-modal-header .modal-title {
        font-size: 16px;
    }

    /* Timeline candidatura */
    .tb-timeline {
        flex-direction: column;
    }

    .tb-timeline-step {
        border-right: none !important;
        border-bottom: 1px solid #e0e4ea;
        border-radius: 0 !important;
    }

    .tb-timeline-step:last-child {
        border-bottom: none;
    }

    /* Documentos nos painéis */
    .tb-doc-row {
        flex-wrap: wrap;
    }

    .tb-doc-row .btn {
        flex: 1 1 auto;
    }

    /* Painel stats empilhadas */
    .tb-panel-hero-stats {
        flex-direction: column;
    }

    .tb-stat-pill {
        width: 100%;
    }

    /* Skills / inputs com botão ao lado */
    .tb-skill-input-row {
        flex-direction: column !important;
    }

    .tb-skill-input-row .btn {
        width: 100%;
    }

    /* Lista de anexos da vaga */
    #vagaAnexos li {
        align-items: stretch !important;
    }

    #vagaAnexos .btn {
        width: 100%;
        min-height: 40px;
    }
}

@media (max-width: 575.98px) {
    .tb-search-box .row > [class*="col-"] {
        margin-bottom: 4px;
    }

    .tb-job-card-aside .tb-deadline {
        font-size: 11px;
    }

    .app-idioma-card {
        font-size: 12px;
        padding: 8px 10px;
    }

    .d-flex.gap-2.justify-content-center {
        flex-direction: column;
        align-items: stretch !important;
    }

    .d-flex.gap-2.justify-content-center .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .tb-footer-main {
        padding: 32px 0 24px;
        text-align: center;
    }

    .tb-footer-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .tb-footer-social {
        justify-content: center;
    }

    .tb-footer-heading {
        margin-top: 8px;
    }

    .tb-footer-contact li {
        justify-content: center;
        text-align: left;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .tb-footer-newsletter {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .tb-footer-legal {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 0;
    }

    .tb-footer-sep {
        display: none;
    }

    .tb-footer-legal a {
        display: inline-block;
        padding: 2px 8px;
    }

    .tb-auth-page .auth-bg {
        min-height: 100vh;
        padding-bottom: 24px;
    }
}
