/* =============================================================
   EMPREGA — DESIGN SYSTEM (páginas públicas)
   Ficheiro partilhado por: index, login, criar_conta,
   cadastro_candidato, cadastro_empresa, listar_vagas,
   detalhe_vaga.
   Cada página mantém apenas o CSS que lhe é específico;
   tudo o que é comum (cores, tipografia, header, formulários,
   botões, alertas, cartões) vive aqui.
============================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2f6fed;
    --primary-dark: #1b3768;
    --primary-light: #eaf2fd;
    --gold: #f5a623;
    --gold-dark: #c9711b;
    --gold-light: #fdf1dd;

    --success: #16a34a;
    --success-dark: #15803d;
    --success-light: #f0fdf4;

    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;

    --text: #101828;
    --text-secondary: #475467;
    --muted: #667085;
    --placeholder: #98a2b3;

    --border: #e4e7ec;
    --border-light: #edf0f4;
    --background: #f6f8fc;
    --white: #ffffff;

    --radius-sm: 7px;
    --radius: 12px;
    --radius-lg: 16px;

    --shadow: 0 12px 40px rgba(15, 23, 42, .07);
    --shadow-sm: 0 3px 8px rgba(47, 111, 237, .18);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}


/* =============================================================
   HEADER / NAVEGAÇÃO
   Usado em: index.php, listar_vagas.php, detalhe_vaga.php
   Aceita tanto <header><div class="header-content">...</div></header>
   como classes antigas (.header-links / .btn-header) para que
   páginas já existentes herdem o mesmo aspeto sem precisar de
   reescrever o HTML.
============================================================= */

header:not(.site-header) {
    height: 70px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #e8ebf0;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-content {
    width: 100%;
    max-width: 1150px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-size: 21px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon,
.logo i {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.menu,
.header-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.menu a,
.header-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: .2s;
}

.menu a:hover,
.header-links a:hover {
    color: var(--primary);
}

.btn-login,
.btn-header {
    background: var(--primary);
    color: var(--white) !important;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.btn-login:hover,
.btn-header:hover {
    background: var(--primary-dark);
}


/* =============================================================
   CONTAINER GERAL (páginas de listagem)
============================================================= */

.container {
    width: 100%;
    max-width: 1150px;
    margin: auto;
}


/* =============================================================
   RODAPÉ DO SITE
============================================================= */

footer:not(.site-footer) {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 30px 20px 40px;
}


/* =============================================================
   BOTÕES
============================================================= */

.btn,
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 47px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .17);
    margin-top: 4px;
}

.btn:hover,
button[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .21);
}

.btn:active,
button[type="submit"]:active {
    transform: translateY(0);
}


/* =============================================================
   CARTÃO DE AUTENTICAÇÃO
   Usado em: login, criar_conta, cadastro_candidato,
   cadastro_empresa.
============================================================= */

body.auth-page {
    background:
        radial-gradient(circle at top left, #eaf2ff 0, transparent 32%),
        radial-gradient(circle at bottom right, #f1f5ff 0, transparent 30%),
        var(--background);
}

.auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 78px);
    padding: 30px 15px;
}

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.background::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .045);
    top: -180px;
    right: -120px;
}

.background::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .035);
    bottom: -140px;
    left: -100px;
}

.login-box,
.card {
    position: relative;
    z-index: 1;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: aparecer .35s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.card .logo,
.logo-wrapper .logo {
    justify-content: center;
    margin-bottom: 20px;
    font-size: 23px;
}

.title,
.card h1,
.card h2 {
    text-align: center;
    color: var(--text);
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 6px;
}

.brand {
    color: var(--primary);
    font-weight: 700;
}

.subtitle,
.subtitulo,
.descricao {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 26px;
}


/* =============================================================
   ALERTAS
============================================================= */

.erro {
    background: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid var(--danger-border);
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.4;
}

.erro i {
    margin-top: 2px;
}

.sucesso {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid #bbf7d0;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.4;
}


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

.campo {
    margin-bottom: 18px;
}

.campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #374151;
}

.obrigatorio {
    color: var(--danger);
}

.input-box,
.input-wrapper,
.senha-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--placeholder);
    font-size: 13px;
    pointer-events: none;
    transition: .2s;
}

.input-box input,
.input-wrapper input,
.input-wrapper textarea,
.senha-wrapper input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    background: var(--white);
    color: var(--text-secondary);
    padding: 0 42px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: .2s;
}

textarea {
    padding: 14px 42px;
    min-height: 90px;
    resize: vertical;
}

select {
    padding: 0 16px;
    cursor: pointer;
}

::placeholder {
    color: var(--placeholder);
}

.input-box input:focus,
.input-wrapper input:focus,
.input-wrapper textarea:focus,
.senha-wrapper input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.input-box:focus-within .input-icon,
.input-wrapper:focus-within .input-icon,
.senha-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.senha-ajuda,
.senha-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.forca-senha {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 9px;
    overflow: hidden;
}

.forca-barra {
    height: 100%;
    width: 0%;
    background: var(--danger);
    transition: width .2s ease, background .2s ease;
}

.mostrar-senha,
.toggle-senha,
.btn-senha {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--placeholder);
    cursor: pointer;
    border-radius: 6px;
    transition: .2s;
}

.mostrar-senha:hover,
.toggle-senha:hover,
.btn-senha:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.secao {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin: 28px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.secao-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}


/* =============================================================
   RODAPÉ DO CARTÃO (divisor + link de login/criar conta)
============================================================= */

.divisor,
.separador {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 23px 0 18px;
    color: var(--placeholder);
    font-size: 11px;
}

.divisor::before, .divisor::after,
.separador::before, .separador::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.footer,
.login {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.footer a,
.login a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover,
.login a:hover {
    text-decoration: underline;
}

.voltar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 17px;
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    transition: .2s;
}

.voltar:hover {
    color: var(--primary);
}


/* =============================================================
   RESPONSIVO — BASE
============================================================= */

@media (max-width: 450px) {

    .auth-shell {
        padding: 18px;
        align-items: flex-start;
    }

    .login-box,
    .card {
        margin-top: 20px;
        padding: 28px 21px;
        border-radius: 13px;
    }

    .title,
    .card h1,
    .card h2 {
        font-size: 22px;
    }
}
