/* ── CSS VARIABLES ──
   Fonte unica em todo o sistema: IBM Plex Sans (carregada no base.html).
   Escolhida por ter numeros de largura fixa, que mantem as colunas de valor
   alinhadas nas tabelas de proposta. O PDF continua em Arial: o fpdf 1.7.2
   so aceita as fontes nativas do formato. */
:root {
    --gold: #FFD500;
    --dark-bg: #2b2b2d;
    --dark-bg2: #3f3f41;
    --dark-bg3: #4a4a4c;
    --text-dark: #3f3f41;
    --border: #e4e4e4;
    --body-font: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    --heading-font: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--body-font);
    background: #f7f7f7;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* ── LOGIN ──────────────────────────────────────────────────────────
   Modelo claro: faixa dourada no topo, logo no canto, formulario numa
   coluna estreita ao centro. Campos com linha inferior em vez de caixa,
   para reduzir peso visual. */
body.login-page {
    background: #ffffff;
    min-height: 100vh;
    margin: 0;
    display: block;
}

/* Faixa dourada do topo */
.login-faixa {
    height: 10px;
    background: var(--gold);
    width: 100%;
}

.login-topo {
    padding: 1.6rem 2.2rem 0;
}

.login-topo img {
    height: 38px;
    width: auto;
    display: block;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    padding: 3.2rem 1.5rem 4rem;
}

.login-card {
    width: 100%;
    max-width: 350px;
}

/* Titulo com marca-texto dourado */
.login-card-title {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.15;
    color: #1f1f21;
    margin: 0 0 0.5rem;
}

.login-card-sub {
    font-size: 0.86rem;
    color: #6b6b6d;
    margin: 0.9rem 0 2.2rem;
    line-height: 1.5;
}

/* Campos com linha inferior */
.login-campo {
    margin-bottom: 1.6rem;
}

.login-campo-topo {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.login-campo label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    /* #86868a media 3,18:1 sobre o fundo claro, abaixo dos 4,5:1 exigidos. */
    color: #67676b;
}

.login-campo input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #8a8a8e;
    background: transparent;
    padding: 0.45rem 0 0.5rem;
    font-family: var(--body-font);
    font-size: 0.95rem;
    color: #1f1f21;
    border-radius: 0;
    transition: border-color 0.15s ease;
}

.login-campo input:focus {
    outline: none;
    border-bottom: 2px solid var(--gold);
    padding-bottom: calc(0.5rem - 1px);
}

.login-campo input::placeholder { color: #67676b; opacity: 1; }

/* "MOSTRAR" da senha */
.login-mostrar {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--body-font);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b6b6d;
    cursor: pointer;
}

.login-mostrar:hover { color: #1f1f21; }

.login-mostrar:focus-visible {
    outline: 2px solid #1f1f21;
    outline-offset: 2px;
}

.login-btn {
    width: 100%;
    background: var(--gold);
    color: #1f1f21;
    border: none;
    border-radius: 2px;
    padding: 0.95rem 1rem;
    font-family: var(--heading-font);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 0.6rem;
    transition: background 0.15s ease;
    min-height: 48px;
}

.login-btn:hover { background: #f0c800; }

.login-btn:focus-visible {
    outline: 3px solid #1f1f21;
    outline-offset: 2px;
}

.login-forgot {
    display: block;
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.83rem;
    color: #5f5f61;
    text-decoration: none;
}

.login-forgot:hover { text-decoration: underline; color: #1f1f21; }

@media (max-width: 480px) {
    .login-topo { padding: 1.2rem 1.2rem 0; }
    .login-wrapper { padding-top: 2.2rem; }
    .login-card-title { font-size: 1.6rem; }
}
/* ── HEADER ── */
.bk-header {
    background: linear-gradient(135deg, #2b2b2d 0%, #3f3f41 60%, #4a4a4c 100%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 2rem;
    height: 68px;
    border-radius: 0;
    margin: 0 -1rem;
    box-shadow: 0 2px 0 #FFD500, 0 4px 20px rgba(0,0,0,0.35);
}

.bk-header img {
    height: 36px;
    filter: brightness(0) invert(1);
}

.bk-hd {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.25);
    margin: 0 4px;
}

.bk-header-name {
    font-family: var(--heading-font);
    font-weight: 800;
    font-size: 1.15rem;
    color: #FFD500;
    letter-spacing: 0.08em;
}

.bk-header-sub {
    font-size: 0.62rem;
    color: #b0b0b2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 3px;
}

.bk-header-user {
    margin-left: auto;
    font-size: 0.78rem;
    color: #cccccc;
}

/* ── NAVBAR ── */
.bk-navbar {
    background: #ffffff;
    border: 1px solid #e4e4e4;
    border-top: 3px solid #FFD500;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 1.5rem;
    height: 48px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 0 -1rem 1.8rem;
}

.bk-nav-link {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: #6b6b6d;
    padding: 6px 18px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
    border: none;
    background: none;
    cursor: pointer;
}

.bk-nav-link:hover {
    background: #f0f0f0;
    color: var(--text-dark);
}

.bk-nav-link.active {
    background: #3f3f41;
    color: #FFD500;
}

/* ── MAIN LAYOUT ── */
.bk-container {
    width: 100%;
    padding: 0 1rem 2rem;
}

/* ── SECTION TITLES ── */
.bk-title {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 0.95rem;
    color: #3f3f41;
    border-bottom: 2px solid #FFD500;
    padding-bottom: 0.45rem;
    margin: 1.2rem 0 0.8rem 0;
}

/* ── FORM STYLES ── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.3rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    font-family: var(--body-font);
    border: 1.5px solid #d0d0d2;
    border-radius: 7px;
    background: #fff;
    color: var(--text-dark);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.form-control:focus {
    border-color: #FFD500;
    box-shadow: 0 0 0 3px rgba(255,213,0,0.25);
}

/* ── CAMPOS OBRIGATÓRIOS (vermelho) ── */
.form-control:required {
    border-color: #e53935;
    background: #fff6f6;
}

.form-control:required:focus {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229,57,53,0.18);
}

/* Inputs/textarea: voltam ao normal quando preenchidos */
input.form-control:required:valid,
textarea.form-control:required:valid {
    border-color: #d0d0d2;
    background: #fff;
}

/* Selects obrigatórios: mantêm a borda vermelha (sempre têm valor) */
select.form-control:required {
    border-color: #e53935;
    background: #fff6f6;
}

/* Asterisco de obrigatório em vermelho */
.req-star {
    color: #e53935;
    font-weight: 700;
}

.form-control:disabled,
.form-control[readonly] {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

select.form-control {
    appearance: auto;
}

/* ── CUSTOM MULTI-SELECT DROPDOWN ── */
.custom-multiselect {
    position: relative;
    max-width: 480px;
}

.multiselect-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 2px solid #d0d0d2;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #3f3f41;
    font-family: var(--body-font);
    text-align: left;
    transition: border-color 0.2s;
}

.multiselect-toggle:hover,
.multiselect-toggle:focus {
    border-color: #FFD500;
    outline: none;
}

.multiselect-arrow {
    font-size: 0.75rem;
    color: #888;
    transition: transform 0.2s;
}

.multiselect-toggle.open .multiselect-arrow {
    transform: rotate(180deg);
}

.multiselect-panel {
    position: absolute;
    z-index: 9999;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #FFD500;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: #3f3f41;
    transition: background 0.12s;
    margin: 0;
    font-weight: 400;
}

.multiselect-option:hover {
    background: #fffbe6;
}

.multiselect-option input[type=checkbox] {
    accent-color: #FFD500;
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.multiselect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #FFD500;
    color: #2b2b2d;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--body-font);
}

.ms-tag-x {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.ms-tag-x:hover { opacity: 1; }

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ── GRID ── */
.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.col-1 { flex: 1; min-width: 120px; }
.col-2 { flex: 2; min-width: 200px; }
.col-3 { flex: 3; min-width: 250px; }
.col-4 { flex: 4; min-width: 300px; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    min-height: 38px;
    transition: all 0.18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3f3f41 0%, #555557 100%);
    color: #FFD500;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a2a2c 0%, #3f3f41 100%);
    box-shadow: 0 5px 18px rgba(0,0,0,0.3);
    transform: translateY(-1px);
    color: #FFD500;
    text-decoration: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #3f3f41;
    border: 1.5px solid #d0d0d2;
}

.btn-secondary:hover {
    background: #3f3f41;
    color: #FFD500;
    border-color: #3f3f41;
}

.btn-danger {
    background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(198,40,40,0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #8d0000 0%, #c62828 100%);
    transform: translateY(-1px);
}

.btn-gold {
    background: linear-gradient(135deg, #FFD500 0%, #e6bf00 100%);
    color: #1a1a2e;
    box-shadow: 0 3px 12px rgba(255,213,0,0.3);
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(255,213,0,0.45);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    min-height: 30px;
}

.btn-block { width: 100%; }

/* ── ALERTS ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

.alert-danger {
    background: #fce4ec;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.alert-warning {
    background: #fff8e1;
    color: #f57f17;
    border-left: 4px solid #FFD500;
}

.alert-info {
    background: #fff8e1;
    color: #5c4a00;
    border-left: 4px solid #FFD500;
}

/* ── CARD / FORM CONTAINER ── */
.bk-card {
    background: #fafafa;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── TABLE ── */
.bk-table-wrap {
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    overflow: auto;
    max-height: 500px;
}

.bk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.bk-table th {
    background: #3f3f41;
    color: #FFD500;
    padding: 9px 10px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.76rem;
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: var(--heading-font);
}

.bk-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ebebeb;
    color: #3f3f41;
    white-space: nowrap;
    vertical-align: top;
}

/* Colunas de texto livre (departamentos, razao social) podem quebrar em
   varias linhas. Sem isto, uma proposta com sete departamentos esticava a
   tabela inteira e a pagina ganhava rolagem horizontal — que a orientacao de
   UX classifica como problema de severidade alta. Vale mais crescer a altura
   da linha do que empurrar a largura. */
.bk-table td.col-quebravel {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 11rem;
    max-width: 22rem;
    line-height: 1.35;
}

/* A tabela deixa de ser forcada a caber e passa a distribuir a largura. */
.bk-table {
    table-layout: auto;
}

.bk-table tr:hover td { background: #fafafa; }

/* ── CHECKBOX ITEM ── */
.pkg-item {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr 1fr;
    gap: 0.5rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.pkg-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #3f3f41;
}

.pkg-checks { display: flex; flex-direction: column; gap: 0.2rem; }

.pkg-checks label {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.82rem;
    cursor: pointer;
}

.pkg-checks input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #FFD500;
    width: 14px;
    height: 14px;
}

/* ── EXPANDER / DETAILS ── */
details {
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

details summary {
    padding: 0.7rem 1rem;
    background: #fafafa;
    cursor: pointer;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.88rem;
    color: #3f3f41;
    border-bottom: 1px solid #e4e4e4;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

details summary::-webkit-details-marker { display: none; }

details[open] summary {
    background: #3f3f41;
    color: #FFD500;
}

details .pkg-content {
    padding: 1rem;
}

/* ── DEPARTMENT EXPANDER HEADER ── */
.pkg-header {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr 1fr;
    gap: 0.5rem;
    padding: 0.4rem 0 0.6rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: #888;
    border-bottom: 2px solid #e4e4e4;
    margin-bottom: 0.4rem;
}

/* ── TOTAL DISPLAY ── */
.total-box {
    background: #3f3f41;
    color: #FFD500;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--heading-font);
    font-weight: 700;
    margin-top: 1rem;
}

.total-box .total-label { font-size: 0.9rem; }
.total-box .total-value { font-size: 1.2rem; }
.total-box .total-extenso { font-size: 0.78rem; color: #ccc; margin-top: 4px; }

/* ── APPROVAL PAGE ── */
.aprv-card {
    max-width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
}

.aprv-header {
    background: linear-gradient(135deg, #2b2b2d 0%, #3f3f41 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aprv-header img {
    height: 50px;
    filter: brightness(0) invert(1);
}

.aprv-header h1 {
    color: #FFD500;
    font-family: var(--heading-font);
    font-size: 1.2rem;
    margin: 0;
}

.aprv-body { padding: 2rem; }

.aprv-status {
    padding: 1.2rem 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 1rem 0;
}

.aprv-status.aprovado {
    background: #e8f5e9;
    border-left: 5px solid #2e7d32;
    color: #2e7d32;
}

.aprv-status.reprovado {
    background: #fce4ec;
    border-left: 5px solid #c62828;
    color: #c62828;
}

/* ── PASSWORD CHANGE PAGE ── */
.chpwd-card {
    max-width: 480px;
    margin: 4rem auto;
    background: #fff;
    border-top: 5px solid #FFD500;
    border-radius: 8px;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* ── DIVIDER ── */
hr.bk-divider {
    border: none;
    border-top: 1px solid #e4e4e4;
    margin: 1.5rem 0;
}

/* ── BADGE ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-master { background: #FFD500; color: #1a1a2e; }
.badge-user   { background: #e4e4e4; color: #555; }
.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #fce4ec; color: #c62828; }

/* ── MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-box h3 {
    font-family: var(--heading-font);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ── SUMMARY TABLE ── */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.summary-table th {
    background: #f0f0f0;
    padding: 6px 10px;
    text-align: left;
    font-weight: 700;
    color: #555;
}

.summary-table td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; }

/* ── APPROVAL STATUS DOTS ── */
.apr-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}
.apr-dot.pendente { background: #f57f17; }
.apr-dot.aprovado { background: #2e7d32; }
.apr-dot.reprovado { background: #c62828; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .bk-header { padding: 0 1rem; }
    .bk-navbar { padding: 0 0.5rem; }
    .bk-container { padding: 0 0.8rem 2rem; }
    .row { flex-direction: column; }
    .pkg-item { grid-template-columns: 1fr; }
    .pkg-header { display: none; }
}

/* ── TABLE SORT ── */
th.sortable:hover { background: #3a3a3c; }
.sort-icon { font-size: 0.7rem; opacity: 0.6; margin-left: 0.2rem; }

/* ── ICON-ONLY ACTION BUTTONS ── */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.1s, opacity 0.15s;
    padding: 0;
    line-height: 1;
}
.btn-icon:hover {
    transform: scale(1.2);
    opacity: 0.75;
    text-decoration: none !important;
}
.btn-icon-primary {
    background: transparent;
}

/* ── CENTRAL DE DOCUMENTOS DA PROPOSTA ── */
.bk-docs-barra {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

/* Mesma largura minima dos cartoes abaixo, para a barra alinhar com a grade. */
.bk-docs-busca {
    width: 235px;
    flex: 0 0 235px;
}

/* Proposta em foco: sem o seletor visivel, e o que diz de quem sao os
   documentos mostrados. */
.bk-docs-atual {
    font-family: var(--heading-font);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 26rem;
}

.bk-docs-barra label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b6b6d;
    white-space: nowrap;
}

.bk-docs-contador {
    margin-left: auto;
    font-size: 0.78rem;
    color: #6b6b6d;
    white-space: nowrap;
}

.bk-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 0.7rem;
}

/* Cartao de documento — o <a> vira o alvo de clique inteiro (44px+). */
.bk-doc {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    min-height: 62px;
    background: #fff;
    /* Mesmo cinza dos botoes secundarios do sistema. A borda nao chega aos
       3:1 do WCAG 1.4.11, mas o cartao nao depende dela para ser percebido:
       o texto esta em 10,5:1 e o alvo tem 62px de altura. O que precisa
       mesmo ser visivel e o foco do teclado, tratado abaixo. */
    border: 1.5px solid #d0d0d2;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bk-doc-icone {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.bk-doc-texto {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.bk-doc-nome {
    display: block;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.25;
    /* Sem nowrap: "Matriz de Responsabilidade" nao cabe em uma linha e era
       cortado no meio. Deixa quebrar naturalmente. */
    overflow-wrap: anywhere;
}

.bk-doc-estado {
    display: block;
    font-size: 0.72rem;
    color: #6b6b6d;
    margin-top: 0.15rem;
}

/* Disponivel */
.bk-doc--ok:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Foco pelo teclado: contorno proprio, nunca so a mudanca de borda. */
.bk-doc--ok:focus-visible {
    outline: 3px solid #2b2b2d;
    outline-offset: 2px;
    border-color: var(--gold);
}

.bk-doc--ok .bk-doc-estado { color: #2e7d32; font-weight: 600; }

/* Ausente — nao e link: sem cursor de mao e sem hover. */
.bk-doc--vazio {
    background: #f7f7f7;
    border-style: dashed;
    cursor: not-allowed;
}

.bk-doc--vazio .bk-doc-icone { opacity: 0.35; }
.bk-doc--vazio .bk-doc-nome  { color: #6b6b6d; font-weight: 500; }
.bk-doc--vazio .bk-doc-estado { color: #6b6b6d; }

/* Estado vazio do painel inteiro */
.bk-docs-vazio {
    padding: 1.4rem;
    text-align: center;
    color: #6b6b6d;
    font-size: 0.85rem;
    background: #fafafa;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

/* Painel de propostas sem nenhuma linha. Nao e o vazio de uma busca — aqui
   nao houve busca alguma, a pessoa simplesmente ainda nao criou nada. Por
   isso o texto afirma isso e oferece o proximo passo, em vez de so informar
   que a lista esta vazia. */
.bk-painel-vazio {
    padding: 2.4rem 1.4rem;
    text-align: center;
    background: #fafafa;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

.bk-painel-vazio-titulo {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.bk-painel-vazio-texto {
    margin: 0 0 1.2rem;
    font-size: 0.86rem;
    color: #6b6b6d;
}

@media (prefers-reduced-motion: reduce) {
    .bk-doc { transition: none; }
    .bk-doc--ok:hover { transform: none; }
}

/* ── CAMPO DE VALOR (custo dos pacotes) ── */
/* Prefixo "R$" desenhado ao lado do campo, e nao dentro do valor: assim o
   que vai para o servidor continua sendo so o numero. */
.bk-campo-moeda {
    position: relative;
    display: block;
}

.bk-campo-moeda::before {
    content: "R$";
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b6b6d;
    pointer-events: none;
}

.bk-campo-moeda .input-custo {
    padding-left: 2.1rem;
    font-variant-numeric: tabular-nums;
}

/* Campo preenchido ganha destaque discreto */
.input-custo.tem-valor {
    border-color: #b5b5b7;
    font-weight: 600;
}

/* ── NUMEROS ALINHADOS ──
   A IBM Plex Sans tem numeros de largura fixa; ativar tabular-nums faz as
   colunas de valor alinharem na virgula, em vez de dancarem conforme os
   digitos. E o motivo principal de ter escolhido essa fonte. */
table td, table th,
.input-custo,
#total-value,
.bk-doc-estado {
    font-variant-numeric: tabular-nums;
}

/* ── PLACEHOLDER ──
   O cinza padrao do navegador fica em 3,16:1 sobre o campo claro, abaixo dos
   4,5:1 exigidos para texto. Esta cor mede 5,26:1 e continua distinguindo o
   texto de exemplo do valor digitado (#3f3f41, em 9,64:1). */
.form-control::placeholder {
    color: #666668;
    opacity: 1;   /* Firefox aplica opacidade propria por padrao */
}

/* Lista do que falta preencher no formulario */
.bk-lista-erros {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    line-height: 1.6;
}

.bk-lista-erros li { margin-bottom: 0.15rem; }

/* ── ENTRAR COM A MICROSOFT ── */
.login-ou {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.4rem 0 1.1rem;
    color: #67676b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.login-ou::before,
.login-ou::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d8d8da;
}

.login-btn-ms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1.5px solid #8a8a8e;
    border-radius: 2px;
    color: #1f1f21;
    font-family: var(--body-font);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.login-btn-ms:hover {
    background: #f4f4f5;
    border-color: #1f1f21;
}

.login-btn-ms:focus-visible {
    outline: 3px solid #1f1f21;
    outline-offset: 2px;
}

/* Orientacao no lugar do antigo "Esqueci minha senha" */
.login-ajuda {
    margin-top: 1.4rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #5f5f61;
    text-align: center;
}
