:root {
    --navy: #071829;
    --navy-2: #0c2d4a;
    --teal: #2ee6c8;
    --teal-dark: #12b89e;
    --paper: #f4f7fa;
    --ink: #122033;
    --muted: #5a6b7c;
    --line: rgba(12, 45, 74, 0.12);
    --white: #fff;
    --danger: #b42318;
    --radius: 16px;
}

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

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 80% 0%, rgba(46, 230, 200, 0.2), transparent 36%),
        var(--navy);
}

.login-wrap {
    width: min(440px, calc(100% - 28px));
    margin: 24px auto;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.login-card h1,
.top h1 {
    margin: 4px 0 8px;
    font-size: 1.45rem;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--teal-dark);
}

.muted {
    color: var(--muted);
    margin: 0 0 14px;
}

.aviso {
    background: #fde8e6;
    color: var(--danger);
    padding: 10px 12px;
    border-radius: 10px;
}

label {
    display: block;
    font-weight: 600;
    margin: 12px 0 6px;
}

input,
select,
button {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid #c5d0da;
    padding: 0 12px;
    font: inherit;
}

button {
    margin-top: 16px;
    border: 0;
    background: var(--teal);
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
}

.voltar,
.trocar {
    text-align: center;
    margin: 14px 0 0;
}

.voltar a,
.linkish,
.sair {
    color: var(--navy-2);
    background: none;
    border: 0;
    padding: 0;
    min-height: 0;
    width: auto;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.login-card .linkish,
.login-card .voltar a {
    color: var(--navy-2);
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 16px 8px;
}

.top .sair {
    margin-top: 8px;
}

.resumo .sync {
    grid-column: 1 / -1;
    margin: 0;
    border-left: 4px solid #12b89e;
}

.resumo .sync .sync-nota {
    margin: 6px 0 0;
}

.resumo .sync-atencao {
    border-left-color: #d97706;
}

.resumo .sync-alerta {
    border-left-color: #b42318;
}

.filtros {
    margin: 8px 16px 16px;
    display: grid;
    gap: 10px;
}

.filtros button {
    margin-top: 8px;
}

.resumo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 16px 16px;
}

.resumo p,
.grafico-card .muted {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.resumo strong {
    font-size: 1.05rem;
}

.grafico-card,
.lista {
    margin: 0 16px 20px;
}

.leitura-resumo {
    grid-template-columns: 1fr;
    width: auto;
    margin: 0 0 8px;
}

.semana {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.semana li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 3px 0;
    font-size: 0.92rem;
}

.semana li.pico {
    font-weight: 700;
    color: #0b5c4e;
}

.lista h2,
.grafico-card h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.vazio {
    margin: 8px 0 0;
}

.mov {
    margin-bottom: 10px;
}

.mov-topo {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mov-topo .valor {
    margin-left: auto;
    font-weight: 800;
}

.tag {
    background: #e7f8f4;
    color: #0b5c4e;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.formas {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.formas li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border-top: 1px solid var(--line);
}

.detalhe {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.88rem;
    color: var(--muted);
    margin: 10px 0 0;
}

.mov-extra {
    border-radius: 8px;
    padding: 4px 8px;
    background: #f3f5f4;
}

.mov-extra.sangria.tem {
    background: #fde8e8;
    color: #9b1c1c;
    font-weight: 700;
}

.mov-extra.suprimento.tem {
    background: #e7f8f4;
    color: #0b5c4e;
    font-weight: 700;
}

.mov-extra.caixa-inicial.tem {
    background: #e8f1fb;
    color: #0c3d6e;
    font-weight: 700;
}

.mov-extra.especie.tem {
    background: #fff4d6;
    color: #6b4a00;
    font-weight: 700;
}

.mesas-foto {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.mesas-foto h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
}

.mesas-foto .quando {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: var(--muted);
}

.mesas-foto.passado {
    background: #f7f8fa;
    border-radius: 12px;
    padding: 12px;
    border-top: 0;
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mesas-grid div {
    background: #f4f7fa;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.mesas-grid span {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

.mesas-grid b {
    display: block;
    font-size: 1.25rem;
}

@media (min-width: 560px) {
    .mesas-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ck-detalhe {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.ck-detalhe[hidden] {
    display: none !important;
}

.ck-detalhe input {
    width: auto;
    min-height: 0;
}

.ck-detalhe small {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--muted);
}

.extra-rest {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.extra-bloco h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

@media (min-width: 760px) {
    .filtros {
        grid-template-columns: repeat(3, 1fr) auto;
        align-items: end;
    }

    .filtros button {
        width: auto;
        min-width: 120px;
    }

    .resumo {
        grid-template-columns: repeat(4, 1fr);
        width: min(1100px, calc(100% - 32px));
        margin-left: auto;
        margin-right: auto;
    }

    .lista .leitura-resumo {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .filtros,
    .grafico-card,
    .lista,
    .top {
        width: min(1100px, calc(100% - 32px));
        margin-left: auto;
        margin-right: auto;
    }
}
