/* Eve Diárias — visual das telas de extras por diária.
   Mesmo design system do Eve Gestão: azul #3D76E7, Poppins na interface, Inter nos números. */

:root {
    --bg: #F6F4EF;
    --surface: #FFFFFF;
    --sand: #ECE6D8;
    --line: #E3DED2;
    --ink: #16181D;
    --muted: #5F6675;
    --blue: #3D76E7;
    --blue-ink: #2B5FD0;
    --blue-soft: #E8EFFD;
    --good: #1F7A4D;
    --good-soft: #E3F2EA;
    --warn: #8A5A00;
    --warn-soft: #FFF3D6;
    --bad: #B42318;
    --bad-soft: #FDECEA;
    --neutral-soft: #EEF0F3;
    --star: #E8A317;
    --radius: 12px;
    --radius-sm: 8px;
    --font-ui: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-data: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.dia {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--font-ui); font-size: 15px; line-height: 1.5;
}
body.dia h1, body.dia h2, body.dia h3 { margin: 0; font-weight: 600; line-height: 1.25; }
body.dia a { color: var(--blue-ink); }
.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- topo ---------- */
.topo { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topo-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; min-height: 64px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink) !important; flex: none; }
.logo img { height: 34px; width: auto; display: block; }
.logo span { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.menu { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.menu a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.menu a:hover { background: var(--bg); color: var(--ink); }
.menu a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-ink); }
.menu a.cta { background: var(--blue); color: #fff; }
.menu a.cta:hover { background: var(--blue-ink); }
.menu-btn { display: none; margin-left: auto; }
@media (max-width: 760px) {
    .menu-btn { display: inline-flex; }
    .menu { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
    .menu.aberto { display: flex; }
    .menu a { padding: 12px; }
    .logo span { display: none; }
}

.pagina { max-width: 1180px; margin: 0 auto; padding: 28px 16px 72px; }
.pagina.estreita { max-width: 760px; }
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cabeca h1 { font-size: clamp(22px, 3vw, 30px); }
.cabeca p { margin: 4px 0 0; color: var(--muted); }

/* ---------- botões e campos ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font: 600 14px/1 var(--font-ui); cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff !important; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-quiet { background: var(--surface); color: var(--ink) !important; border-color: var(--line); }
.btn-quiet:hover { background: var(--bg); }
.btn-good { background: var(--good); color: #fff !important; }
.btn-good:hover { background: #17603C; }
.btn-danger { background: var(--surface); color: var(--bad) !important; border-color: #F0C4BF; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-wa { background: #1F8F4E; color: #fff !important; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, select.input, textarea.input {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #CFC9BA; border-radius: var(--radius-sm);
    background: #fff; color: var(--ink); font: 400 15px/1.4 var(--font-data);
}
textarea.input { min-height: 96px; resize: vertical; }
.input:hover { border-color: #B5AE9D; }
.input:focus-visible { outline: 3px solid rgba(61, 118, 231, .35); outline-offset: 0; border-color: var(--blue); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-erro { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bad-soft); color: var(--bad); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 17px; margin-bottom: 4px; }
.panel .sub { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- busca ---------- */
.hero-busca { background: var(--blue); color: #fff; border-radius: 16px; padding: clamp(22px, 4vw, 36px); margin-bottom: 22px; }
.hero-busca h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.01em; }
.hero-busca p { margin: 6px 0 18px; opacity: .92; max-width: 640px; }
.filtros { display: grid; grid-template-columns: 1.1fr 1.3fr .9fr auto; gap: 10px; align-items: end; }
.filtros .field > label { color: #fff; }
.filtros .btn { background: var(--ink); color: #fff; }
.filtros .btn:hover { background: #000; }
@media (max-width: 860px) { .filtros { grid-template-columns: 1fr 1fr; } .filtros .btn { grid-column: 1 / -1; } }
@media (max-width: 520px) { .filtros { grid-template-columns: 1fr; } }
.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; }
.hero-cta a { color: #fff; font-weight: 600; }

.barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.barra p { margin: 0; color: var(--muted); font-size: 14px; }
.barra select { width: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; color: var(--ink) !important; transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: #CFC9BA; box-shadow: 0 6px 20px rgba(22, 24, 29, .06); }
.card-top { display: flex; gap: 14px; padding: 16px 16px 0; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--sand); flex: none; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 22px; color: var(--muted); }
.avatar.g { width: 120px; height: 120px; font-size: 40px; }
.card h3 { font-size: 16px; }
.card .local { font-size: 13px; color: var(--muted); }
.card-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body p { margin: 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--neutral-soft); font-size: 12.5px; color: #3B4252; }
.tag.azul { background: var(--blue-soft); color: var(--blue-ink); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.preco { font: 600 17px/1 var(--font-data); }
.preco small { font: 400 12px var(--font-ui); color: var(--muted); }
.estrelas { color: var(--star); letter-spacing: 1px; font-size: 14px; white-space: nowrap; }
.estrelas .vazia { color: #D9D3C4; }
.nota { font-size: 13px; color: var(--muted); }
.nota b { color: var(--ink); font-family: var(--font-data); }
.novo { font-size: 12px; background: var(--good-soft); color: var(--good); padding: 2px 8px; border-radius: 999px; }

.vazio { text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed #CFC9BA; border-radius: var(--radius); color: var(--muted); }
.vazio b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.carregando { padding: 40px; text-align: center; color: var(--muted); }
.paginacao { display: flex; gap: 6px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ---------- perfil público ---------- */
.perfil { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .perfil { grid-template-columns: 1fr; } }
.perfil-cab { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.perfil-cab h1 { font-size: clamp(22px, 3vw, 28px); }
.perfil-cab .linha { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; color: var(--muted); font-size: 14px; }
.funcoes-lista { list-style: none; margin: 0; padding: 0; }
.funcoes-lista li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.funcoes-lista li:first-child { border-top: 0; }
.agenda { width: 100%; border-collapse: collapse; font-size: 13px; }
.agenda th, .agenda td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.agenda th:first-child, .agenda td:first-child { text-align: left; }
.agenda .sim { color: var(--good); font-weight: 600; }
.agenda .nao { color: #C9C2B2; }
.texto-livre { white-space: pre-line; margin: 0; }
.avaliacao { padding: 14px 0; border-top: 1px solid var(--line); }
.avaliacao:first-child { border-top: 0; padding-top: 0; }
.avaliacao .quem { font-size: 13px; color: var(--muted); }
.avaliacao p { margin: 6px 0 0; }
.lateral { position: sticky; top: 84px; }
.resumo-valores { margin: 0; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: 14px; }
.resumo-valores div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.resumo-valores .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 600; font-size: 16px; }

/* ---------- cadastro em etapas ---------- */
.etapas { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: etapa; }
.etapas li { flex: 1; height: 6px; border-radius: 999px; background: var(--sand); }
.etapas li.feita { background: var(--blue); }
.etapa-titulo { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.opcoes-funcao { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.opcao-funcao { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.opcao-funcao.ativa { border-color: var(--blue); background: var(--blue-soft); }
.opcao-funcao .valor { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.opcao-funcao .valor .input { min-height: 38px; padding: 6px 10px; }
.grade-disp { width: 100%; border-collapse: separate; border-spacing: 4px; }
.grade-disp th { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.grade-disp th:first-child { text-align: left; }
.grade-disp td:first-child { font-size: 14px; }
.grade-disp label { display: flex; align-items: center; justify-content: center; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.grade-disp input { position: absolute; opacity: 0; pointer-events: none; }
.grade-disp input:checked + span { color: #fff; }
.grade-disp label:has(input:checked) { background: var(--blue); border-color: var(--blue); }
.grade-disp label span { font-size: 18px; color: transparent; }
.grade-disp input:checked + span::before { content: "✓"; color: #fff; font-size: 16px; }
.grade-disp input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 4px; }
.atalhos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.foto-campo { display: flex; gap: 16px; align-items: center; }
.acoes-etapa { display: flex; gap: 10px; justify-content: space-between; margin-top: 20px; }

/* ---------- propostas ---------- */
.abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.aba { border: 0; background: none; padding: 10px 14px; font: 500 14px var(--font-ui); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.aba[aria-selected="true"] { color: var(--blue-ink); border-bottom-color: var(--blue); }
.aba .cont { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.lista-propostas { display: flex; flex-direction: column; gap: 12px; }
.proposta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px 18px; align-items: start; }
@media (max-width: 680px) { .proposta { grid-template-columns: 1fr; } }
.data-box { width: 64px; text-align: center; border-radius: var(--radius-sm); background: var(--bg); padding: 8px 4px; }
.data-box b { display: block; font: 700 24px/1 var(--font-data); }
.data-box span { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.proposta h3 { font-size: 16px; }
.proposta .det { font-size: 14px; color: var(--muted); margin-top: 2px; }
.proposta .desc { font-size: 14px; margin: 8px 0 0; white-space: pre-line; }
.proposta .lado { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; text-align: right; }
@media (max-width: 680px) { .proposta .lado { align-items: stretch; text-align: left; } }
.proposta .valor-grande { font: 600 20px/1.1 var(--font-data); }
.proposta .valor-grande small { display: block; font: 400 12px var(--font-ui); color: var(--muted); }
.contato { margin-top: 10px; padding: 12px; border-radius: var(--radius-sm); background: var(--good-soft); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aviso { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.aviso.azul { background: var(--blue-soft); color: var(--blue-ink); }
.aviso.verde { background: var(--good-soft); color: var(--good); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font: 500 12.5px/1.5 var(--font-ui); white-space: nowrap; background: var(--neutral-soft); color: #3B4252; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.enviada { background: var(--warn-soft); color: var(--warn); }
.badge.aceita { background: var(--blue-soft); color: var(--blue-ink); }
.badge.paga, .badge.concluida { background: var(--good-soft); color: var(--good); }
.badge.recusada, .badge.cancelada { background: var(--bad-soft); color: var(--bad); }

/* ---------- painel do extra ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k-label { font-size: 13px; color: var(--muted); }
.kpi .k-value { font: 600 24px/1.2 var(--font-data); margin-top: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { width: 44px; height: 24px; appearance: none; background: #CFC9BA; border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(20px); }

/* ---------- janelas ---------- */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.modal::backdrop { background: rgba(22, 24, 29, .5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 10px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 4px 20px 8px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 20px; }
.estrelas-input { display: flex; gap: 4px; }
.estrelas-input button { border: 0; background: none; font-size: 34px; line-height: 1; color: #D9D3C4; cursor: pointer; padding: 2px; }
.estrelas-input button.on { color: var(--star); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }

/* ---------- tabela admin ---------- */
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--muted); }
.tbl .right { text-align: right; }

/* ---------- ajustes de prioridade (links do topo e menu do celular) ---------- */
body.dia .menu a { color: var(--muted); }
body.dia .menu a:hover { color: var(--ink); }
body.dia .menu a[aria-current="page"] { color: var(--blue-ink); }
body.dia .menu a.cta { color: #fff; }
body.dia .hero-cta a { color: #fff; }
.topo .menu-btn { display: none; }
@media (max-width: 760px) { .topo .menu-btn { display: inline-flex; } }
.opcoes-funcao { align-items: start; }
.grade-disp td:first-child, .grade-disp th:first-child { width: 96px; }
.card-foot .preco small { white-space: nowrap; }
.card-foot > .nota { text-align: right; font-size: 12.5px; max-width: 50%; }
