/* ==========================================================================
   Emprega Indústria SENAI/RR — tema das páginas públicas
   ========================================================================== */
:root {
    --brand: #164194;
    --brand-dark: #0e2c66;
    --brand-light: #e8eefa;
    --accent: #f39200;
    --accent-dark: #d47f00;
    --bg: #f3f5f9;
    --surface: #ffffff;
    --text: #1d2939;
    --muted: #667085;
    --border: #e4e7ec;
    --success: #12b76a;
    --danger: #d92d20;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow: 0 12px 32px -12px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4, h5 { color: var(--text); font-weight: 700; letter-spacing: -.01em; }

/* ---------- Topo ---------- */
.site-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-topbar .navbar { padding: .6rem 0; }
.site-topbar .brand-logo { height: 34px; width: auto; }
.site-topbar .brand-divider {
    width: 1px; height: 28px; background: var(--border); margin: 0 .9rem;
}
.site-topbar .brand-name {
    font-weight: 700; font-size: .95rem; color: var(--text); line-height: 1.2;
}
.site-topbar .brand-name small {
    display: block; font-weight: 500; font-size: .75rem; color: var(--muted);
}
.site-topbar .nav-link {
    color: var(--muted);
    font-weight: 500;
    padding: .45rem .9rem !important;
    border-radius: 8px;
}
.site-topbar .nav-link:hover { color: var(--brand); background: var(--brand-light); }
.site-topbar .nav-link.active { color: var(--brand); background: var(--brand-light); }

/* ---------- Faixa de título ---------- */
.page-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(243, 146, 0, .25), transparent 40%),
        linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    padding: 2.75rem 0 5.5rem;
}
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .4rem; }
.page-hero p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 640px; }
.page-hero .hero-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: .25rem .8rem;
    font-size: .8rem; font-weight: 600;
    margin-bottom: 1rem;
}

.page-body { margin-top: -3.75rem; padding-bottom: 3rem; flex: 1; }
.page-body > .container { max-width: 880px; }

/* ---------- Formulário em cartões ---------- */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}
.form-card-header {
    display: flex; align-items: center; gap: .9rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.form-card-header .step {
    flex: 0 0 36px; height: 36px;
    border-radius: 10px;
    background: var(--brand-light);
    color: var(--brand);
    display: grid; place-items: center;
    font-weight: 700;
}
.form-card-header h2 { font-size: 1.05rem; margin: 0; }
.form-card-header p { margin: 0; font-size: .85rem; color: var(--muted); }
.form-card-body { padding: 1.5rem; }

.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; display: block; }
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control, .form-select {
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: .65rem .85rem;
    font-size: .95rem;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(22, 65, 148, .12);
}
.form-control::placeholder { color: #98a2b3; }
.form-text { color: var(--muted); font-size: .8rem; }

.input-icon { position: relative; }
.input-icon > i {
    position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
    color: #98a2b3; pointer-events: none;
}
.input-icon > .form-control, .input-icon > .form-select { padding-left: 2.4rem; }

/* Listas com pesquisa (Tom Select) */
.ts-wrapper .ts-control {
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: .55rem .85rem;
    min-height: 46px;
    font-size: .95rem;
    box-shadow: var(--shadow-sm);
    align-items: center;
}
.ts-wrapper.single .ts-control { padding-right: 2.25rem; }
.ts-wrapper.focus .ts-control {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(22, 65, 148, .12);
}
.ts-wrapper.is-invalid .ts-control { border-color: var(--danger); }
.ts-wrapper .ts-control input::placeholder { color: #98a2b3; }
.ts-wrapper.multi .ts-control > .item {
    background: var(--brand-light);
    color: var(--brand-dark);
    border: 1px solid #c9d6f0;
    border-radius: 6px;
    padding: .15rem .35rem .15rem .55rem;
    font-size: .85rem;
    font-weight: 500;
}
.ts-wrapper.plugin-remove_button .item .remove { border-left-color: #c9d6f0 !important; color: var(--brand); }
.ts-wrapper.plugin-remove_button .item .remove:hover { background: #d6e1f6; }
.ts-dropdown {
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 6px;
    overflow: hidden;
    font-size: .92rem;
}
.ts-dropdown .ts-dropdown-content { max-height: 280px; }
.ts-dropdown .optgroup-header {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); background: #f9fafb; padding: .45rem .85rem;
}
.ts-dropdown .option, .ts-dropdown .create, .ts-dropdown .no-results { padding: .5rem .85rem; }
.ts-dropdown .active { background: var(--brand-light); color: var(--brand-dark); }
.ts-dropdown .create strong { color: var(--brand); }

/* Opções (rádio) em formato de botão */
.choice-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice {
    position: relative;
    flex: 1 1 140px;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
    display: flex; align-items: center; gap: .55rem;
    padding: .7rem .9rem;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    background: var(--surface);
    transition: all .15s;
    margin: 0;
}
.choice label::before {
    content: '';
    width: 18px; height: 18px; flex: 0 0 18px;
    border-radius: 50%;
    border: 2px solid #d0d5dd;
    transition: all .15s;
}
.choice label:hover { border-color: var(--brand); }
.choice input:checked + label {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand-dark);
}
.choice input:checked + label::before {
    border-color: var(--brand);
    border-width: 5px;
}
.choice input:focus-visible + label { box-shadow: 0 0 0 4px rgba(22, 65, 148, .15); }
.choice-group.is-invalid .choice label { border-color: var(--danger); }

/* Caixa LGPD */
.lgpd-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    font-size: .9rem;
    color: #344054;
    margin-bottom: 1rem;
}
.lgpd-box p:last-child { margin-bottom: 0; }

/* Barra de envio */
.form-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}
.form-actions small { color: var(--muted); }

/* ---------- Botões ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .6rem 1.2rem; }
.btn-lg { padding: .8rem 1.8rem; font-size: 1rem; }
.btn-primary {
    background: var(--brand); border-color: var(--brand);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--brand-dark) !important; border-color: var(--brand-dark) !important;
}
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-light-outline {
    background: var(--surface); border: 1px solid #d0d5dd; color: var(--text);
}
.btn-light-outline:hover { background: #f9fafb; border-color: #98a2b3; color: var(--text); }

/* ---------- Validação ---------- */
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, .12); }
.input-icon:has(.is-invalid) + .invalid-feedback { display: block; }
.form-error { border-radius: 10px; margin-bottom: 1.25rem; }

/* ---------- Cartão genérico (confirmação, termos) ---------- */
.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.25rem;
}
.content-card h3 { font-size: 1.05rem; margin-top: 1.75rem; color: var(--brand-dark); }

.success-icon {
    width: 84px; height: 84px; border-radius: 50%;
    display: grid; place-items: center;
    margin: 0 auto 1.25rem;
    background: #ecfdf3; color: var(--success);
    font-size: 2.6rem;
    box-shadow: 0 0 0 10px #f6fef9;
}
.next-steps {
    text-align: left;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}
.next-steps h3 { margin-top: 0; font-size: 1rem; }
.next-steps ol { margin: 0; padding-left: 1.2rem; }
.next-steps li { margin-bottom: .35rem; color: #344054; }

/* Compatibilidade com páginas antigas (termos LGPD) */
.page-body .container > .container { padding: 0; }
.termos-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.25rem;
}
.termos-content h3 { font-size: 1.05rem; margin-top: 1.75rem; color: var(--brand-dark); }
.page-body .container > .container > h1 { display: none; }

/* ---------- Rodapé ---------- */
.site-footer {
    background: #0b1730;
    color: rgba(255, 255, 255, .7);
    padding: 2.5rem 0 1.25rem;
    font-size: .88rem;
}
.site-footer h6 {
    color: #fff; font-weight: 600; font-size: .85rem;
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; display: flex; gap: .55rem; }
.site-footer li i { color: var(--accent); }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 1.75rem; padding-top: 1.1rem;
    font-size: .8rem; color: rgba(255, 255, 255, .5);
}

/* ---------- Responsivo ---------- */
@media (max-width: 767.98px) {
    .page-hero { padding: 2rem 0 4.75rem; }
    .form-card-header, .form-card-body { padding: 1.1rem; }
    .content-card, .termos-content { padding: 1.4rem; }
    .form-actions { padding: 1rem; }
    .form-actions .btn { width: 100%; }
    .site-topbar .brand-divider, .site-topbar .brand-name { display: none; }
}
