/* ============================================================
   VARIÁVEIS
============================================================ */

:root {
    --cor-fundo: #f4f4f0;
    --cor-card: #ffffff;
    --cor-texto: #111111;
    --cor-secundaria: #676767;
    --cor-borda: rgba(17, 17, 17, .08);
    --cor-primary: #111111;
    --cor-primary-hover: #292929;
    --cor-verde-bg: #e4f8e8;
    --cor-verde: #126b2a;
    --radius-card: 24px;
    --radius-small: 14px;
}


/* ============================================================
   BASE
============================================================ */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--cor-texto);
    background: var(--cor-fundo);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font-family: inherit;
}


/* ============================================================
   NAVBAR
============================================================ */

.navbar {
    min-height: 72px;
    background: rgba(255, 255, 255, .94) !important;
    border-bottom: 1px solid var(--cor-borda) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.navbar .container {
    max-width: 1320px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--cor-texto) !important;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.navbar-brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #111;
    color: #fff;
    font-size: 18px;
}

.navbar .nav-link {
    padding: 9px 13px !important;
    border-radius: 10px;
    color: #555;
    font-size: .88rem;
    font-weight: 500;
    transition: .18s ease;
}

.navbar .nav-link:hover {
    color: #111;
    background: #f5f5f2;
}

.navbar .nav-link.active {
    color: #111;
    font-weight: 700;
}

.navbar-toggler {
    border: 0;
    box-shadow: none !important;
}


/* ============================================================
   PÁGINA
============================================================ */

.pagina {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 38px 20px 80px;
}


/* ============================================================
   CABEÇALHO
============================================================ */

.cabecalho {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 0 42px;
    text-align: center;
}

.marca {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #111;
    color: #fff;
    font-size: 30px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .12);
}

.cabecalho h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.03;
    font-weight: 800;
    letter-spacing: -.05em;
}

.cabecalho p {
    max-width: 560px;
    margin: 15px auto 0;
    color: var(--cor-secundaria);
    font-size: 1rem;
    line-height: 1.65;
}


/* ============================================================
   STATUS
============================================================ */

.linha-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.linha-status-titulo {
    color: var(--cor-secundaria);
    font-size: .86rem;
    font-weight: 600;
}

.contador-vagas {
    min-width: 34px;
    padding: 6px 10px;
    text-align: center;
    border: 1px solid var(--cor-borda);
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    font-size: .75rem;
    font-weight: 700;
}


/* ============================================================
   GRID DAS VAGAS
============================================================ */

#listaVagas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}


/* ============================================================
   CARD
============================================================ */

.vaga-card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--cor-borda);
    border-radius: var(--radius-card);
    background: var(--cor-card);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .025);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.vaga-card:hover {
    transform: translateY(-4px);
    border-color: rgba(17, 17, 17, .15);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .08);
}

.vaga-card:active {
    transform: scale(.995);
}

.vaga-card:focus-visible {
    outline: 3px solid rgba(17, 17, 17, .15);
    outline-offset: 3px;
}


/* ============================================================
   CONTEÚDO CARD
============================================================ */

.vaga-card-conteudo {
    flex: 1;
    padding: 20px;
}


/* ============================================================
   CABEÇALHO CARD
============================================================ */

.vaga-cabecalho {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* ============================================================
   LOGO
============================================================ */

.vaga-logo-box {
    width: 62px;
    height: 62px;
    min-width: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--cor-borda);
    border-radius: 18px;
    background: #f6f6f4;
}

.vaga-logo {
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}


/* ============================================================
   IDENTIFICAÇÃO DA VAGA
============================================================ */

.vaga-identificacao {
    flex: 1;
    min-width: 0;
}

.vaga-titulo {
    margin: 0 0 4px;
    color: var(--cor-texto);
    font-size: 1.02rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.02em;
}

.vaga-loja {
    overflow: hidden;
    color: var(--cor-secundaria);
    font-size: .82rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ============================================================
   BADGE DISPONÍVEL
============================================================ */

.badge-disponivel {
    align-self: flex-start;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--cor-verde-bg);
    color: var(--cor-verde);
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}


/* ============================================================
   DESCRIÇÃO
============================================================ */

.vaga-descricao {
    margin: 16px 0 0;
    color: var(--cor-secundaria);
    font-size: .87rem;
    line-height: 1.55;
}


/* ============================================================
   DATA / HORÁRIO
============================================================ */

.vaga-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.vaga-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f6f6f4;
    color: #404040;
    font-size: .76rem;
    font-weight: 500;
}

.vaga-meta-item i {
    font-size: .82rem;
}


/* ============================================================
   VALOR
============================================================ */

.vaga-rodape {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-top: 19px;
}

.vaga-label {
    display: block;
    margin-bottom: 2px;
    color: var(--cor-secundaria);
    font-size: .68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.vaga-valor {
    color: var(--cor-texto);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.vaga-seta {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 16px;
    transition: transform .18s ease;
}

.vaga-card:hover .vaga-seta {
    transform: rotate(45deg);
}


/* ============================================================
   BARRA DETALHES
============================================================ */

.vaga-detalhes-barra {
    width: 100%;
    padding: 12px 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--cor-borda);
    background: #fbfbfa;
    color: var(--cor-secundaria);
    font-size: .73rem;
    font-weight: 500;
}


/* ============================================================
   LOADING
============================================================ */

.loading-box {
    grid-column: 1 / -1;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: var(--cor-secundaria);
}

.loading-box .spinner-border {
    width: 1.7rem;
    height: 1.7rem;
    border-width: .15em;
}


/* ============================================================
   ESTADO VAZIO
============================================================ */

.estado-vazio {
    grid-column: 1 / -1;
    padding: 50px 25px;
    text-align: center;
    border: 1px solid var(--cor-borda);
    border-radius: var(--radius-card);
    background: #fff;
}

.estado-vazio-icone {
    width: 62px;
    height: 62px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #f3f3f0;
    font-size: 25px;
}


/* ============================================================
   ERRO
============================================================ */

.erro-api {
    grid-column: 1 / -1;
    padding: 22px;
    border-radius: 20px;
    background: #fff1f1;
    color: #9a1c1c;
    font-size: .86rem;
}


/* ============================================================
   OFFCANVAS / BOTTOM SHEET
============================================================ */

.offcanvas-sheet {
    left: 50% !important;
    right: auto !important;
    width: calc(100% - 20px) !important;
    max-width: 620px;
    height: auto !important;
    max-height: 88vh;
    overflow: hidden;
    border: 0 !important;
    border-radius: 30px 30px 0 0;
    background: #fff;
    box-shadow: 0 -15px 60px rgba(0, 0, 0, .18);
    transform: translateX(-50%) translateY(100%) !important;
}

.offcanvas-sheet.show,
.offcanvas-sheet.showing {
    transform: translateX(-50%) translateY(0) !important;
}

.offcanvas-sheet.hiding {
    transform: translateX(-50%) translateY(100%) !important;
}

.offcanvas-sheet .offcanvas-body {
    overflow-y: auto;
    padding: 8px 22px 28px;
}

.offcanvas-backdrop.show {
    opacity: .52;
}


/* ============================================================
   PUXADOR
============================================================ */

.sheet-handle-container,
.offcanvas-puxador-container {
    display: flex;
    justify-content: center;
    padding: 10px 0 5px;
}

.sheet-handle,
.offcanvas-puxador {
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: #d1d1cd;
}


/* ============================================================
   DETALHES DA VAGA
============================================================ */

.detalhe-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
}

.detalhe-header .vaga-logo-box {
    width: 72px;
    height: 72px;
    min-width: 72px;
}

.detalhe-titulo {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.detalhe-loja {
    color: var(--cor-secundaria);
    font-size: .88rem;
}

.detalhe-secao {
    margin-bottom: 22px;
}

.detalhe-secao-titulo {
    margin-bottom: 8px;
    font-size: .82rem;
    font-weight: 700;
}

.detalhe-descricao {
    margin: 0;
    color: var(--cor-secundaria);
    font-size: .9rem;
    line-height: 1.65;
}


/* ============================================================
   GRID DETALHES
============================================================ */

.detalhes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-bottom: 25px;
}

.detalhe-card {
    min-width: 0;
    padding: 14px;
    border-radius: 18px;
    background: #f5f5f2;
}

.detalhe-card i {
    display: block;
    margin-bottom: 13px;
    font-size: 18px;
}

.detalhe-card-label {
    display: block;
    margin-bottom: 3px;
    color: var(--cor-secundaria);
    font-size: .68rem;
}

.detalhe-card-valor {
    display: block;
    overflow: hidden;
    font-size: .82rem;
    font-weight: 700;
    text-overflow: ellipsis;
}


/* ============================================================
   BOTÃO PRINCIPAL
============================================================ */

.btn-principal {
    min-height: 56px;
    padding: 0 22px;
    border: 0;
    border-radius: 18px;
    background: var(--cor-primary);
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    transition: background .18s ease, transform .18s ease;
}

.btn-principal:hover,
.btn-principal:focus {
    background: var(--cor-primary-hover);
    color: #fff;
}

.btn-principal:active {
    transform: scale(.99);
}


/* ============================================================
   LOGIN
============================================================ */

.login-header {
    padding: 4px 16px 18px;
    text-align: center;
}

.login-icone {
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 19px;
    background: #111;
    color: #fff;
    font-size: 24px;
}

.login-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.03em;
}

.login-header p {
    max-width: 360px;
    margin: 7px auto 0;
    color: var(--cor-secundaria);
    font-size: .84rem;
    line-height: 1.5;
}


/* ============================================================
   FORMULÁRIOS
============================================================ */

.form-label {
    margin-bottom: 7px;
    font-size: .76rem;
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #dadad6;
    border-radius: 16px;
    background-color: #f8f8f6;
    font-size: .92rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #111;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
}

.form-control::placeholder {
    color: #aaa;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 991px) {

    #listaVagas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pagina {
        padding-top: 28px;
    }

    .cabecalho {
        padding-bottom: 32px;
    }

    .navbar-collapse {
        padding: 12px 0 8px;
    }

    .navbar .nav-link {
        padding: 11px 5px !important;
    }
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 575px) {

    .navbar {
        min-height: 64px;
    }

    .pagina {
        padding: 20px 14px 65px;
    }

    .cabecalho {
        padding: 12px 5px 28px;
    }

    .marca {
        width: 60px;
        height: 60px;
        border-radius: 19px;
        font-size: 26px;
    }

    .cabecalho h1 {
        font-size: 2rem;
    }

    .cabecalho p {
        font-size: .9rem;
    }

    #listaVagas {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .vaga-card-conteudo {
        padding: 17px;
    }

    .vaga-logo-box {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 16px;
    }

    .vaga-detalhes-barra {
        padding: 11px 17px;
    }

    .badge-disponivel {
        font-size: .62rem;
    }

    .offcanvas-sheet {
        width: calc(100% - 10px) !important;
        max-height: 91vh;
        border-radius: 26px 26px 0 0;
    }

    .offcanvas-sheet .offcanvas-body {
        padding: 8px 18px 24px;
    }

    .detalhe-header .vaga-logo-box {
        width: 64px;
        height: 64px;
        min-width: 64px;
    }

    .detalhe-titulo {
        font-size: 1.2rem;
    }

    .detalhes-grid {
        grid-template-columns: 1fr;
    }

    .detalhe-card {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .detalhe-card i {
        width: 28px;
        margin: 0;
        text-align: center;
    }
}
