:root {
    --ink: #10233f;
    --texto: #44546a;
    --muted: #6b7a90;
    --line: #e3eaf3;
    --soft: #f2f6fb;
    --paper: #f4f7fb;
    --navy: #0b1b33;
    --marca: #10294d;
    --verde: #2fb64e;
    --destaque: #f08a24;
    --ok: #0f7b5f;
    --sombra: 0 1px 2px rgba(11, 27, 51, .04), 0 16px 40px rgba(11, 27, 51, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--texto);
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--marca); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, strong { color: var(--ink); }
.ico { flex: 0 0 auto; }

.topo {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    height: 68px;
    margin-left: 252px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topo-secao { margin: 0; color: var(--ink); font-weight: 800; letter-spacing: -.03em; }
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -0.03em; font-size: 1.05rem; }
.marca:hover { text-decoration: none; }
.marca b { color: var(--verde); }
.marca span { color: var(--destaque); }
.marca-selo, .login-selo {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--marca);
    color: white !important;
}
.quem, .quem form { display: flex; align-items: center; gap: 10px; margin: 0; }
.quem a.atalho {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--texto);
    font-weight: 600;
}
.quem a.atalho:hover { background: var(--soft); text-decoration: none; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--ink); font-weight: 700; font-size: .85rem; }
.quem-nome { font-weight: 600; color: var(--ink); }
.quem button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--texto);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.quem button .ico { width: 16px; height: 16px; }

.menu-master {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 252px;
    padding: 22px 14px;
    background:
        radial-gradient(380px 220px at 0 0, rgba(47, 182, 78, .28), transparent 70%),
        linear-gradient(180deg, #0b1b33 0%, #10294d 100%);
}
.menu-marca { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 2px 8px 8px; color: white; font-weight: 800; letter-spacing: -.04em; }
.menu-marca:hover { text-decoration: none; }
.menu-marca img { display: block; height: 36px; width: auto; }
.menu-marca small { display: block; margin: 0 0 0 2px; color: #ffc58a; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.menu-rotulo { margin: 18px 12px 8px; color: #8ea2c0; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.menu-master a:not(.menu-marca) { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: #d5e2f4; font-weight: 700; }
.menu-master a:not(.menu-marca) .ico { width: 18px; height: 18px; color: #8ee0a8; }
.menu-master a:not(.menu-marca):hover { background: rgba(255, 255, 255, .08); color: white; text-decoration: none; }
.menu-master a.ativo { background: rgba(255, 255, 255, .14); color: white; }
.miolo { max-width: none; margin: 0 0 0 252px; padding: 28px 32px 72px; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.filtros a { padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; font-size: .86rem; }
.filtros a:hover { text-decoration: none; filter: saturate(1.15) brightness(.97); }
.filtros a.f-todos { background: #fff; color: #10294d; border-color: #d5deea; }
.filtros a.f-teste, .filtros a.f-pteste { background: #ece7ff; color: #5b3cc4; }
.filtros a.f-ativo { background: #e3f6d8; color: #1c7a32; }
.filtros a.f-pendente { background: #fff3c4; color: #8a6a00; }
.filtros a.f-bloqueado { background: #ffe1e4; color: #c23545; }
.filtros a.f-amigo { background: #e3efff; color: #1d4f9a; }
.filtros a.f-arquivado { background: #eef1f5; color: #64748b; }
.filtros a.f-todos.ativo { background: #0b1b33; color: #fff; border-color: #0b1b33; }
.filtros a.f-teste.ativo, .filtros a.f-pteste.ativo { background: #5b3cc4; color: #fff; }
.filtros a.f-ativo.ativo { background: #1f9a3c; color: #fff; }
.filtros a.f-pendente.ativo { background: #d4a017; color: #fff; }
.filtros a.f-bloqueado.ativo { background: #d34555; color: #fff; }
.filtros a.f-amigo.ativo { background: #2563eb; color: #fff; }
.filtros a.f-arquivado.ativo { background: #64748b; color: #fff; }
.estreito { max-width: 880px; }

.cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 4px; }
.cabeca p { max-width: 62ch; }
h1 { margin: 0 0 6px; font-size: 1.85rem; letter-spacing: -.045em; font-weight: 800; }
.cabeca p, .ajuda, .url { color: var(--muted); margin: 0; }
.url { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-family: ui-monospace, monospace; font-size: .85rem; }

.botao, .ficha button[type="submit"], .login button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--verde);
    color: white;
    font: inherit;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(47, 182, 78, .28);
}
.botao:hover, .ficha button[type="submit"]:hover, .login button:hover { filter: brightness(1.12); }
.botao .ico { width: 18px; height: 18px; }

.cartoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.cartao { position: relative; padding: 18px 18px 18px 72px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sombra); }
.cartao i { position: absolute; left: 18px; top: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #e9f8ee; color: #1f9a3c; }
.cartao span { display: block; color: var(--muted); font-size: .84rem; font-weight: 600; }
.cartao strong { display: block; font-size: 1.55rem; letter-spacing: -0.03em; }

.tabela-wrap { margin-top: 18px; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: auto; box-shadow: var(--sombra); }
td button { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; box-shadow: none; }
td button:hover { background: var(--soft); }
td form { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }
th { background: #fafbfd; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
td span, td strong { display: block; }
td span { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.empresa { display: flex; align-items: center; gap: 12px; }
.empresa strong { white-space: nowrap; }
td.codigo { color: var(--ink); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.acoes { display: flex; gap: 4px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.acoes form { margin: 0; }
.acoes a, .acoes button {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--texto);
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.acoes a:hover, .acoes button:hover { background: var(--soft); text-decoration: none; }
.acoes button.entrar { background: var(--verde); border-color: var(--verde); color: white; }
.acoes button.entrar:hover { background: var(--verde); filter: brightness(1.08); }
.perigo { color: #c2410c !important; }

.selo { display: inline-flex !important; padding: 3px 10px; border-radius: 999px; font-size: .78rem !important; font-weight: 700; margin: 0 !important; }
.selo.sim { background: #e8f6f0; color: #0b5c47 !important; }
.selo.nao { background: #fff1ec; color: #9a3412 !important; }
.selo.espera { background: #fff6e8; color: #9a5b00 !important; }
.selo.conta-teste, .selo.conta-pendente_teste { background: #ece7ff; color: #5b3cc4 !important; }
.selo.conta-ativo { background: #e3f6d8; color: #1c7a32 !important; }
.selo.conta-ativo_pendente { background: #fff3c4; color: #8a6a00 !important; }
.selo.conta-bloqueado { background: #ffe1e4; color: #c23545 !important; }
.selo.conta-ativo_amigo { background: #e3efff; color: #1d4f9a !important; }
.selo.conta-arquivado { background: #eef1f5; color: #64748b !important; }
.acoes select { height: 32px; max-width: 158px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font: inherit; font-size: .82rem; font-weight: 700; }
.cabeca-botoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cabeca-botoes button { height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.cabeca-botoes .botao { border: 0; }
.financeiro-conta { margin-top: 14px; }
.cartao.pago strong { color: #1c7a32; }
.cartao.receber strong { color: #9a6a00; }
.cartao.receber i { background: #fff6e8; color: #9a6a00; }
.cartao.vencida strong { color: #c23545; }
.cartao.vencida i { background: #ffe1e4; color: #c23545; }
.caixa-filtros { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 18px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sombra); }
.caixa-filtros label { min-width: 180px; flex: 1; }
.caixa-filtros select,
.caixa-filtros input {
    width: 100%;
    height: 44px;
    border: 1px solid #d9e0ea;
    border-radius: 11px;
    padding: 0 12px;
    font: inherit;
    font-weight: 500;
    color: var(--ink);
    background: white;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.caixa-filtros select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}
.caixa-filtros input::placeholder { color: #9aa5b4; font-weight: 500; }
.caixa-filtros select:focus,
.caixa-filtros input:focus { outline: 0; border-color: var(--verde); box-shadow: 0 0 0 4px rgba(47, 182, 78, .16); }
.caixa-filtros .botao { height: 44px; box-shadow: none; }
.caixa-filtros .limpo { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; color: var(--muted); font-weight: 700; }
.data-vencida { color: #c23545; font-weight: 800; }

.plano-master { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: #e8f6f0; border: 1px solid #c9eadc; }
.plano-master.ligada { background: #fff7ed; border-color: #fed7aa; }
.plano-master strong { color: #0f1b2d; }
.plano-master p { margin: 4px 0 0; color: #3a4658; font-weight: 600; }
.plano-master form { margin: 0; flex: 0 0 auto; }
.plano-master button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: #12315c; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.plano-master.ligada button { background: #9a3412; }

.ok, .alerta, .vazio { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.ok { background: #e8f6f0; color: #0b5c47; border: 1px solid #c9eadc; }
.alerta { background: #fff1ec; color: #9a3412; border: 1px solid #fcd9cb; }
.vazio { background: white; border: 1px dashed #d5dce6; color: var(--muted); text-align: center; padding: 28px; }

.voltar { display: inline-block; margin-bottom: 10px; color: var(--muted); }

.ficha section {
    display: grid;
    gap: 14px;
    margin: 16px 0;
    padding: 24px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--sombra);
}
.ficha h2 { margin: 0; font-size: 1.05rem; }
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--ink); font-size: .86rem; font-weight: 600; }
input, .ficha select {
    width: 100%;
    height: 44px;
    border: 1px solid #d9e0ea;
    border-radius: 11px;
    padding: 0 12px;
    font: inherit;
    color: var(--ink);
    background: white;
}
input:focus, .ficha select:focus { outline: 0; border-color: var(--verde); box-shadow: 0 0 0 4px rgba(47, 182, 78, .16); }
input[type="color"] { padding: 4px; cursor: pointer; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; padding: 14px 16px; background: white; border: 1px solid var(--line); border-radius: 14px; font-weight: 600; color: var(--texto); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--marca); flex: 0 0 auto; }
.check span { flex: 1; min-width: 0; line-height: 1.4; }
.botoes { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.botoes a { color: var(--muted); }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(700px 360px at 80% 0%, rgba(47, 182, 78, .22), transparent 60%),
        radial-gradient(600px 320px at 0% 100%, rgba(240, 138, 36, .16), transparent 60%),
        linear-gradient(160deg, #0b1b33, #10294d 70%);
}
.login {
    display: grid;
    gap: 8px;
    width: min(440px, 100%);
    padding: 32px 28px 24px;
    background: white;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.login-logo { display: block; height: 48px; width: auto; }
.login .marca { margin: 8px 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.login h1 { margin: 0; font-size: 1.6rem; }
.login .ajuda { margin-bottom: 8px; }
.login label { margin-top: 6px; }
.login button { width: 100%; margin-top: 14px; height: 48px; }
.login-outro { margin: 4px 0 0; text-align: center; font-size: .9rem; font-weight: 700; }
.login-outro a { color: var(--marca, #12315c); }
.login-rodape { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
.login-rodape .ico { width: 15px; height: 15px; }

@media (max-width: 800px) {
    .plano-master { flex-direction: column; align-items: stretch; }
    .plano-master button { width: 100%; }
    .menu-master { position: sticky; top: 0; width: auto; height: auto; flex-direction: row; align-items: center; overflow: auto; padding: 10px; }
    .menu-rotulo, .menu-marca small { display: none; }
    .menu-marca { margin: 0 8px 0 4px; }
    .menu-master a:not(.menu-marca) { white-space: nowrap; }
    .topo, .miolo { margin-left: 0; }
    .topo { height: auto; padding: 12px 16px; }
    .quem-nome, .quem button span { display: none; }
    .miolo { padding: 22px 16px 48px; }
    .cabeca { flex-direction: column; align-items: stretch; }
    .grade, .cartoes { grid-template-columns: 1fr; }
    .caixa-filtros label { min-width: 100%; }
    .acoes { flex-wrap: wrap; justify-content: flex-start; }
}
.paginacao { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: .88rem; }
.paginacao p { margin: 0; }
.paginacao nav { display: flex; flex-wrap: wrap; gap: 8px; }
.paginacao a { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: white; color: var(--texto); font-weight: 600; text-decoration: none; }
.paginacao a:hover { background: var(--soft); }
.paginacao a.ativo { background: var(--navy); border-color: var(--navy); color: #fff; }
