/* =========================================================
   PS Irrigação — UI v2
   Base visual do sistema interno: tokens, layout e componentes.
   ========================================================= */

:root {
    /* marca */
    --brand: #367b93;      /* azul do site, escurecido p/ contraste com texto branco */
    --brand-600: #2b6377;
    --accent: #66acc5;      /* azul claro do site (destaques) */
    --brand-50: #eef6f9;
    --brand-100: #d9ecf3;

    /* neutros */
    --ink: #132228;
    --ink-2: #374b56;
    --muted: #5d7480;
    --line: #dce7eb;
    --line-2: #b4c4cb;
    --bg: #f2f8f9;
    --surface: #ffffff;

    /* menu lateral */
    --nav: #2a3a44;
    --nav-2: #374b56;
    --nav-text: #d5e2e8;
    --nav-muted: #8ea4af;

    /* estados */
    --ok: #15803d;      --ok-bg: #dcfce7;
    --warn: #b45309;    --warn-bg: #fef3c7;
    --bad: #b91c1c;     --bad-bg: #fee2e2;
    --info: #2b6377;    --info-bg: #dcedf3;
    --devol: #6d28d9;   --devol-bg: #ede9fe;
    --neutral: #475f6b; --neutral-bg: #e3ecef;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, .08);
    --sidebar-w: 264px;
    --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); }
p { margin: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ícones (SVG inline, sprite) */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--nav); color: var(--nav-text);
    display: flex; flex-direction: column;
    padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 42px; height: 42px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.brand-logo img { width: 34px; height: auto; display: block; }
.brand-nome { font-weight: 700; font-size: 16px; line-height: 1.1; }
.brand-nome small { display: block; margin-top: 3px; font-weight: 500; font-size: 11px; color: var(--nav-muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { flex: 1; }
.nav-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--nav-muted); }
.nav a, .nav summary {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; margin: 2px 0;
    border-radius: 9px; color: var(--nav-text);
    font-size: 14.5px; font-weight: 500; text-decoration: none;
    cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover { background: var(--nav-2); color: #fff; text-decoration: none; }
.nav a.ativo { background: var(--accent); color: var(--ink); }
.nav details[open] > summary { color: #fff; }
.nav summary .chev { margin-left: auto; transition: transform .2s ease; }
.nav details[open] > summary .chev { transform: rotate(180deg); }
.nav .sub { margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1px solid var(--nav-2); }
.nav .sub a { padding: 7px 10px; font-size: 14px; color: #9fb4be; }
.nav .sub a.ativo { background: transparent; color: #fff; font-weight: 600; }
.nav .sub a.ativo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-left: -3px; }

.sidebar-rodape { padding: 12px 10px 4px; font-size: 12px; color: var(--nav-muted); border-top: 1px solid var(--nav-2); margin-top: 10px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--topbar-h); padding: 0 28px;
    display: flex; align-items: center; gap: 14px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar-titulo { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.topbar-titulo span { color: var(--muted); font-weight: 500; }
.topbar-espaco { flex: 1; }
.icon-btn.btn-menu { display: none; }

.usuario { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border-radius: 999px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.usuario-info { line-height: 1.2; }
.usuario-info strong { display: block; font-size: 13.5px; }
.usuario-info span { font-size: 12px; color: var(--muted); }

.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-header h1 { font-size: 24px; letter-spacing: -.01em; }
.page-header p { margin-top: 4px; color: var(--muted); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: 10px;
    border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(54, 123, 147, .35); }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }
.btn-devol { background: var(--devol); color: #fff; }
.btn-devol:hover { background: #5b21b6; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid rgba(102, 172, 197, .5); outline-offset: 1px;
}

.icon-btn {
    width: 34px; height: 34px; display: inline-grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    cursor: pointer; text-decoration: none; position: relative;
}
.icon-btn:hover { background: var(--bg); text-decoration: none; }
.icon-btn.perigo:hover { background: var(--bad-bg); color: var(--bad); border-color: #fecaca; }
.icon-btn.aviso:hover { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-header h2 { font-size: 16px; }
.card-body { padding: 20px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpis-5 .kpi { padding: 16px 16px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
a.kpi:hover { text-decoration: none; box-shadow: var(--shadow-md); border-color: var(--line-2); }
.kpi-topo { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.kpi-icone { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.kpi-valor { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.kpi-nota { font-size: 12.5px; color: var(--muted); }
.tom-brand { background: var(--brand-100); color: var(--brand-600); }
.tom-ok { background: var(--ok-bg); color: var(--ok); }
.tom-devol { background: var(--devol-bg); color: var(--devol); }
.tom-warn { background: var(--warn-bg); color: var(--warn); }

.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.progress.ok > span { background: #16a34a; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }

.lista-itens { list-style: none; margin: 0; padding: 0; }
.lista-itens li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.lista-itens li:last-child { border-bottom: none; }
.lista-itens .li-icone { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.lista-itens .li-texto { flex: 1; min-width: 0; }
.lista-itens .li-texto strong { display: block; font-size: 14.5px; }
.lista-itens .li-texto span { font-size: 13px; color: var(--muted); }
.lista-itens a.li-link { color: inherit; display: contents; }

.acesso-rapido { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.acesso { display: flex; gap: 14px; padding: 16px; text-decoration: none; color: inherit; align-items: flex-start; }
.acesso:hover { text-decoration: none; box-shadow: var(--shadow-md); border-color: var(--line-2); }
.acesso .kpi-icone { flex: none; }
.acesso strong { display: block; font-size: 14.5px; }
.acesso span { font-size: 13px; color: var(--muted); }

.secao-titulo { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.devol { background: var(--devol-bg); color: var(--devol); }
.badge.neutral { background: var(--neutral-bg); color: var(--neutral); }

/* ---------- tabs / toolbar / formulários ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; }
.tab { padding: 14px 14px 12px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.ativa { color: var(--brand); border-bottom-color: var(--brand); }
.tab .contagem { padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; }
.tab.ativa .contagem { background: var(--brand-100); color: var(--brand-600); }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; }
.campo-busca { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.campo-busca .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, .select {
    width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px;
    background: var(--surface); font: inherit; font-size: 14px; color: var(--ink);
}
.campo-busca .input { padding-left: 38px; }
.select { width: auto; min-width: 160px; }
.input::placeholder { color: #8fa5af; }

/* ---------- tabela ---------- */
.table-wrap { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; padding: 11px 20px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #f6fafb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela tbody tr:hover { background: #f6fafb; }
.tabela td.num, .tabela th.num { text-align: right; }
.celula-principal strong { display: block; font-weight: 600; }
.celula-principal span { font-size: 13px; color: var(--muted); }
.acoes { display: flex; gap: 6px; justify-content: flex-end; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; background: var(--bg); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.chip .avatar { width: 22px; height: 22px; font-size: 10px; }

.rodape-tabela { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; font-size: 13.5px; color: var(--muted); }
.paginacao { display: flex; gap: 6px; }
.paginacao a, .paginacao span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: var(--surface); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.paginacao a:hover { background: var(--bg); text-decoration: none; }
.paginacao .atual { background: var(--brand); border-color: var(--brand); color: #fff; }



.overlay-menu { display: none; }

/* ---------- tela inicial por ícones (técnico e usuário, uso no celular) ---------- */
.appbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.appbar-in { max-width: 640px; margin: 0 auto; height: var(--topbar-h); padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.appbar .brand-logo { background: var(--bg); border: 1px solid var(--line); }
.appbar-nome { font-weight: 700; font-size: 16px; }
.appbar-espaco { flex: 1; }
.inicio-celular { max-width: 640px; margin: 0 auto; padding: 20px 16px 36px; }
.inicio-celular h1 { font-size: 22px; letter-spacing: -.01em; }
.inicio-celular .sub { margin: 4px 0 18px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 144px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .1s ease; }
.tile:hover { text-decoration: none; box-shadow: var(--shadow-md); }
.tile:active { transform: scale(.98); }
.tile .kpi-icone { width: 52px; height: 52px; border-radius: 14px; }
.tile .kpi-icone .i { width: 26px; height: 26px; }
.tile strong { display: block; font-size: 16px; line-height: 1.2; }
.tile span.desc { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.3; }
.tile-badge { position: absolute; top: 12px; right: 12px; min-width: 26px; height: 26px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--devol); color: #fff; font-size: 13px; font-weight: 700; }
.tile.destaque { grid-column: 1 / -1; min-height: 120px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; }
.tile.destaque .kpi-icone { flex: none; }
.tile.larga { grid-column: 1 / -1; min-height: 96px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; }
.tile.larga .kpi-icone { flex: none; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile.destaque { grid-column: 1 / -1; } }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 288px; z-index: 60; transform: translateX(-102%); transition: transform .25s ease; box-shadow: none; }
    body.menu-aberto .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    .overlay-menu { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 50; }
    body.menu-aberto .overlay-menu { display: block; }
    body.menu-aberto { overflow: hidden; }
    .icon-btn.btn-menu { display: inline-grid; }
    .topbar { padding: 0 16px; }
    .content { padding: 18px 16px 28px; }
    .usuario-info { display: none; }
}
@media (max-width: 720px) {
    .page-header h1 { font-size: 21px; }
    .kpis { gap: 12px; }
    .kpi-valor { font-size: 26px; }

    .tabela-cartoes thead { display: none; }
    .tabela-cartoes, .tabela-cartoes tbody, .tabela-cartoes tr, .tabela-cartoes td { display: block; width: 100%; }
    .tabela-cartoes tr { padding: 14px 16px; border-bottom: 8px solid var(--bg); }
    .tabela-cartoes td { padding: 5px 0; border: none; display: flex; justify-content: space-between; gap: 14px; text-align: right; }
    .tabela-cartoes td::before { content: attr(data-label); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; padding-top: 2px; flex: none; }
    .tabela-cartoes td.celula-principal { display: block; text-align: left; padding-bottom: 8px; }
    .tabela-cartoes td.celula-principal::before { display: none; }
    .tabela-cartoes td.col-acoes { justify-content: flex-end; padding-top: 10px; }
    .tabela-cartoes td.col-acoes::before { display: none; }
    .tabela-cartoes tbody tr:hover { background: transparent; }
    .toolbar { padding: 12px 16px; }
    .campo-busca { max-width: none; }
    .select { flex: 1; }
    .rodape-tabela { padding: 12px 16px; }
}
@media (max-width: 480px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 14px; gap: 8px; }
    .kpi-topo { font-size: 12.5px; align-items: flex-start; gap: 6px; }
    .kpi-icone { width: 30px; height: 30px; border-radius: 8px; }
    .kpi-icone .i { width: 17px; height: 17px; }
    .kpi-valor { font-size: 24px; }
    .kpi-nota { font-size: 12px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ---------- formulários (base) ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.campo label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.btn-bloco { width: 100%; height: 44px; }

/* ---------- formulários das telas internas (UI v2) ---------- */
.card-form { max-width: 720px; }
.card-form.larga { max-width: 960px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .campo.inteira { grid-column: 1 / -1; }
.form-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.campo .dica { font-size: 12.5px; color: var(--muted); }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input[type="file"].input { height: auto; padding: 8px 12px; }
.select.cheio { width: 100%; }
.input:focus, .select:focus { outline: 3px solid rgba(102, 172, 197, .35); outline-offset: 0; border-color: var(--brand); }

.lista-checkbox { max-height: 260px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 14px; background: var(--surface); }
.item-checkbox { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; font-weight: 400; color: var(--ink); border-bottom: 1px solid var(--line); cursor: pointer; }
.item-checkbox:last-child { border-bottom: none; }
.item-checkbox input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }

/* ---------- avisos ---------- */
.alerta { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alerta .i { margin-top: 2px; }
.alerta.erro { background: var(--bad-bg); color: var(--bad); border-color: #fecaca; }
.alerta.ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.alerta.aviso { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.alerta.info { background: var(--info-bg); color: var(--info); border-color: #bcdce8; }

/* ---------- botões extras ---------- */
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #166534; }
form.inline { display: inline; margin: 0; }
.vazio { padding: 40px 20px; text-align: center; color: var(--muted); }
.voltar-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.voltar-link .i { transform: rotate(90deg); }
.voltar-link:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 720px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-acoes .btn { flex: 1; }
}

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 30%) minmax(0, 1fr); }
.login-marca { background: linear-gradient(160deg, #132228 0%, #2a3a44 55%, #35738a 100%); color: #fff; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-marca .brand { padding: 0; }
.login-marca .brand-logo { width: 52px; height: 52px; }
.login-marca .brand-logo img { width: 42px; }
.login-marca h2 { color: #fff; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; max-width: 430px; }
.login-marca p { color: #d5e2e8; max-width: 430px; margin-top: 14px; font-size: 15px; }
.login-marca small { color: #9fb4be; }
.login-form-wrap { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: 32px; }
.login-card h1 { font-size: 22px; letter-spacing: -.01em; }
.login-card .sub { color: var(--muted); margin: 6px 0 24px; }
.login-voltar { display: block; text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) {
    .login-wrap { grid-template-columns: minmax(0, 1fr); }
    .login-marca { padding: 22px 20px; gap: 0; }
    .login-marca h2 { font-size: 20px; margin-top: 0; }
    .login-marca p, .login-marca small { display: none; }
    .login-form-wrap { align-items: start; padding-top: 28px; }
    .login-card { padding: 24px 20px; }
}
/* ---------- solicitações e listas em cartões ---------- */
.linha-peca { display: grid; grid-template-columns: minmax(0, 1fr) 110px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.linha-peca .icon-btn { width: 40px; height: 40px; }
.item-lista { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.item-lista:last-child { border-bottom: none; }
.item-lista h3 { font-size: 15.5px; }
.item-lista .meta { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.item-lista .bloco { margin-top: 12px; font-size: 14px; }
.item-lista .bloco strong { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.item-lista ul { margin: 0; padding-left: 18px; }
.filtros { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filtros .campo { margin-bottom: 0; }
.item-holerite { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.item-holerite:last-child { border-bottom: none; }
.item-holerite .texto { flex: 1; min-width: 0; }
.item-holerite .texto strong { display: block; }
.item-holerite .texto span { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.item-holerite .acoes { flex: none; }
/* ---------- catálogo (admin) ---------- */
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: block; }
.grid-2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-prod { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: start; }
.preview-img { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px; display: grid; place-items: center; min-height: 240px; background: var(--surface); }
.preview-img img { max-width: 100%; max-height: 280px; border-radius: 10px; border: 1px solid var(--line); }
.linha-checks { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.check-caixa { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer; background: var(--surface); }
.check-caixa input { width: 18px; height: 18px; accent-color: var(--brand); }
@media (max-width: 960px) { .grid-2e, .grid-prod { grid-template-columns: minmax(0, 1fr); } }
/* ---------- conteúdo largo para técnico/usuário (celular e desktop) ---------- */
.conteudo-interno { max-width: 1100px; margin: 0 auto; padding: 20px 16px 36px; }
.conteudo-interno .page-header h1 { font-size: 22px; }
/* ---------- listagens de materiais: avisos, filtros e comparação de versões ---------- */
.aviso-versao { background: var(--info-bg); border: 1px solid #bcdce8; color: #1f4b5c; border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; line-height: 1.6; }
.filtros-alteracao { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.filtro-pill { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; user-select: none; background: var(--neutral-bg); color: var(--neutral); }
.filtro-pill:hover { filter: brightness(.96); }
.filtro-pill.ativo { outline: 2px solid var(--ink); outline-offset: 1px; }
.filtro-pill.f-devol { background: var(--devol-bg); color: var(--devol); }
.filtro-pill.f-novo { background: var(--ok-bg); color: var(--ok); }
.filtro-pill.f-removido { background: var(--bad-bg); color: var(--bad); }
.filtro-pill.f-aumentou { background: var(--info-bg); color: var(--info); }
.filtro-pill.f-diminuiu { background: var(--warn-bg); color: var(--warn); }
.tabela tr[hidden] { display: none; }
.lista-simples { margin: 6px 0 0; padding-left: 18px; }
.acoes-esq { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
/* ---------- visualização / conferência de listagem: grade de itens ---------- */
.filtro-pill.f-brand { background: var(--brand-100); color: var(--brand-600); }
.filtro-pill.f-ok { background: var(--ok-bg); color: var(--ok); }
.filtro-pill.f-warn { background: var(--warn-bg); color: var(--warn); }
.filtro-pill.f-bad { background: var(--bad-bg); color: var(--bad); }
.filtro-pill.f-info { background: var(--info-bg); color: var(--info); }
.status-contagem { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.resumo-cabecalho { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 2px 36px; margin: 0 0 20px; padding: 6px 2px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.resumo-cabecalho div { padding: 4px 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.resumo-cabecalho strong { display: inline; margin: 0 6px 0 0; font-size: inherit; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.resumo-cabecalho strong::after { content: ':'; }
.versoes-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; font-size: 14px; }
.versao-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; background: var(--surface); text-decoration: none; }
.versao-chip:hover { background: var(--bg); text-decoration: none; }
.versao-chip.atual { background: var(--brand); color: #fff; border-color: var(--brand); }
.guia-contagem { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--devol); color: #fff; font-size: 12px; text-align: center; }
.grupo-itens { margin-bottom: 16px; overflow: hidden; }
.grupo-cab { background: var(--nav); color: #fff; padding: 12px 20px; font-weight: 600; font-size: 14.5px; }
.grade-itens { padding: 0 20px; }
.item-linha { display: grid; grid-template-columns: 144px minmax(0, 1fr) 110px 70px 80px 130px 90px 120px 100px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
/* códigos longos quebram dentro da própria coluna em vez de passar por cima da descrição */
.item-linha > span { min-width: 0; overflow-wrap: anywhere; }
.item-linha-cabecalho { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.item-linha[hidden], .item-nota[hidden] { display: none; }
.item-nota { font-size: 12.5px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.item-nota + .item-nota { border-top: none; }
.item-alteracao { font-weight: 600; color: var(--info); }
.item-alteracao.devolver { color: var(--devol); }
.item-alteracao.devolvido { color: var(--ok); }
.item-observacao { font-style: italic; color: var(--muted); }
.acao-devolver { color: var(--devol); font-weight: 700; }
.acao-adicionar { color: var(--ok); font-weight: 700; }
.acao-devolvido { color: var(--ok); }
@media (max-width: 960px) {
    .item-linha { display: block; padding: 12px 0; }
    .item-linha-cabecalho { display: none; }
    .item-linha > span { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; text-align: right; }
    .item-linha > span::before { content: attr(data-label); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; padding-top: 2px; }
    .grade-itens { padding: 0 16px; }
}
/* Telas médias (notebook com o menu lateral aberto): sem espaço para 9 colunas fixas, então cada item vira
   um bloco compacto: código + descrição na 1ª linha e os demais campos, com o nome em cima, nas seguintes. */
@media (min-width: 961px) and (max-width: 1560px) {
    .item-linha-cabecalho { display: none; }
    .item-linha { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; align-items: start; padding: 12px 0; }
    .item-linha > span:nth-child(2) { grid-column: span 3; font-weight: 600; }
    .item-linha > span::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
    .item-linha > span:nth-child(2)::before { content: none; }
}/* ---------- impressão: some o menu e o topo, o conteúdo ocupa a folha ---------- */
@media print {
    .sidebar, .topbar, .appbar, .overlay-menu { display: none !important; }
    .app { display: block !important; }
    .content, .conteudo-interno, .inicio-celular { max-width: none !important; padding: 0 !important; margin: 0 !important; }
    body { background: #fff !important; }
}
/* ---------- sanfona (accordion) e conferência de materiais ---------- */
.accordion { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.accordion-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font-weight: 600; background: var(--surface); user-select: none; }
.accordion-header.active { background: var(--brand); color: #fff; }
.accordion-header .accordion-icon { font-size: 12px; transition: transform .2s ease; }
.accordion-header.active .accordion-icon { transform: rotate(180deg); }
.accordion-content { display: none; padding: 4px 18px 16px; }
.accordion-content.active { display: block; }
.accordion-header.conf-devolver-header, .accordion-header.active.conf-devolver-header { background: var(--devol); color: #fff; }

.grupo-titulo-count { font-size: 12.5px; font-weight: 500; opacity: .85; }
.conf-item-form { margin: 0; }
.conf-item { border-bottom: 1px solid var(--line); padding: 12px 0; transition: opacity .2s ease; }
.conf-item:last-child { border-bottom: none; }
.conf-item-topo { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.conf-item-desc { font-weight: 600; flex: 1; min-width: 140px; }
.conf-item-meta { font-size: 12.5px; color: var(--muted); margin-left: 32px; }
.conf-item-campos { display: flex; gap: 8px; margin-top: 8px; margin-left: 32px; flex-wrap: wrap; align-items: center; }
.conf-item-campos label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin: 0; }
.conf-item-campos input[type="text"] { width: 110px; }
.conf-item-campos input[type="text"].obs { width: 100%; max-width: 280px; }
.conf-status-badge { padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ok-checkbox { width: 28px; height: 28px; flex-shrink: 0; cursor: pointer; accent-color: #16a34a; }
.conf-secao-titulo { margin: 24px 0 12px; font-size: 16px; }
.conf-tudo-ok { padding: 16px; background: var(--ok-bg); border-radius: 10px; font-weight: 600; color: var(--ok); }
.conf-paginacao { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.conf-paginacao span { color: var(--muted); }
.conf-paginacao .btn:disabled { opacity: .4; cursor: default; }
.conf-busca-wrap { margin-bottom: 16px; }
.conf-item-alteracao { margin-top: 6px; margin-left: 32px; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--info-bg); color: var(--info); }
.conf-alt-diminuiu { background: var(--warn-bg); color: var(--warn); }
.conf-alt-novo { background: var(--ok-bg); color: var(--ok); }
.conf-devolver-aviso { font-size: 13px; color: var(--muted); margin: 8px 0; }
.conf-item form button[disabled] { opacity: .5; }
@media (max-width: 480px) {
    .conf-item { padding: 10px 0; }
    .conf-item-meta, .conf-item-campos, .conf-item-alteracao { margin-left: 0; }
    .conf-item-campos label { order: 1; }
    .conf-item-campos .btn-mini-salvar { order: 2; }
    .conf-item-campos input[type="text"].obs { order: 3; flex-basis: 100%; max-width: none; }
}
/* ---------- relatórios de atividades ---------- */
.info-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.info-box h4 { font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.info-item { margin: 8px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.info-item strong { min-width: 150px; }
.secao-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.secao-box h4 { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.fotos-grid img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.preview-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 10px; }
.preview-fotos img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.preview-fotos .foto-item { position: relative; }
.preview-fotos .foto-item button { position: absolute; top: 4px; right: 4px; background: var(--bad); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 12px; padding: 0; }
.secao-atividade { background: var(--surface); padding: 16px 20px; margin: 0 0 14px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--brand); }
.secao-atividade h4 { margin: 0 0 10px; color: var(--brand-600); }
.campo-grupo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; align-items: center; }
.campo-grupo.full { grid-template-columns: 1fr; }
.atividade-item { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.atividade-item label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.atividade-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); }
@media (max-width: 720px) { .form-row, .campo-grupo { grid-template-columns: minmax(0, 1fr); } }
@media print { .nao-imprimir { display: none !important; } }
/* ---------- logo da marca (menu lateral, barra do celular e login) ---------- */
.brand { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 4px 8px 16px; }
.brand-img { width: 150px; max-width: 100%; height: auto; display: block; margin: 0 auto; }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--nav-muted); padding-left: .14em; text-align: center; }
.appbar-logo { display: inline-flex; align-items: center; text-decoration: none; }
.appbar-logo img { height: 44px; width: auto; display: block; }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.login-logo { width: 190px; max-width: 70%; height: auto; display: block; margin: 0 auto; }
.login-brand .brand-sub { color: #9fb4be; }
@media (max-width: 860px) { .login-logo { width: 120px; } }

/* ---------- anexo único da listagem (conferência e devolução) ---------- */
.anexos-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; align-items: start; }
.anexo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
.anexo-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.anexo-cab strong { font-size: 15px; }
.anexo-ajuda { font-size: 12.5px; color: var(--muted); }
.anexo-corpo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.anexo-previa { width: 84px; height: 84px; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg); cursor: zoom-in; display: grid; place-items: center; color: var(--brand); text-decoration: none; }
.anexo-previa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anexo-previa.pdf { cursor: pointer; align-content: center; gap: 2px; font-size: 12px; font-weight: 700; }
.anexo-previa:focus-visible, .anexo-vazio:focus-within, .anexo-trocar:focus-within { outline: 3px solid rgba(102, 172, 197, .6); outline-offset: 2px; }
.anexo-info { min-width: 0; display: grid; gap: 2px; }
.anexo-info strong { font-size: 14px; overflow-wrap: anywhere; }
.anexo-info span { font-size: 12.5px; color: var(--muted); }
.anexo-acoes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.anexo-trocar { position: relative; cursor: pointer; }
.anexo-trocar input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.anexo-nota { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.anexo-vazio { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg); color: var(--brand); font-weight: 600; font-size: 14.5px; cursor: pointer; text-align: center; }
.anexo-vazio:hover { background: var(--brand-50); }
.anexo-vazio input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.anexo-nenhum { font-size: 13.5px; color: var(--muted); }
.anexo.enviando .anexo-vazio, .anexo.enviando .anexo-acoes { opacity: .55; pointer-events: none; }
.anexo-msg { font-size: 12.5px; color: var(--muted); min-height: 1em; }
.anexo-msg.erro { color: var(--bad); font-weight: 600; }
.foto-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(19, 34, 40, .92); display: grid; place-items: center; padding: 20px; }
.foto-lightbox[hidden] { display: none; }
.foto-lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 8px; background: #fff; }
.foto-lightbox .lb-fechar { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.foto-lightbox .lb-fechar:hover { background: rgba(255, 255, 255, .28); }
@media (max-width: 820px) { .anexos-grid { grid-template-columns: minmax(0, 1fr); } }
@media print { .anexo, .anexos-grid { display: none !important; } }
/* ---------- visualização da listagem: pesquisa e diferença recebido x listado ---------- */
.busca-itens { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.busca-itens .campo-busca { flex: 1; min-width: 240px; max-width: 560px; }
.dif { font-weight: 700; margin-left: 2px; }
.dif.mais { color: var(--warn); }
.dif.menos { color: var(--bad); }
@media print { .busca-itens { display: none; } }
/* ---------- filtros enxutos e etiquetas curtas da listagem ---------- */
.filtros-simples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.filtro-seg { display: inline-flex; align-items: baseline; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; align-items: center; }
.filtro-seg b { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.filtro-seg:hover { background: var(--bg); }
.filtro-seg.ativo { background: var(--ink); border-color: var(--ink); color: #fff; }
.filtro-seg.ativo b { color: rgba(255, 255, 255, .75); }
.filtro-seg:focus-visible { outline: 3px solid rgba(102, 172, 197, .6); outline-offset: 2px; }
.filtros-simples .select { height: 36px; min-width: 190px; border-radius: 999px; font-size: 14px; }
.item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag-item { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.6; background: var(--neutral-bg); color: var(--neutral); }
.tag-item.ok { background: var(--ok-bg); color: var(--ok); }
.tag-item.warn { background: var(--warn-bg); color: var(--warn); }
.tag-item.bad { background: var(--bad-bg); color: var(--bad); }
.tag-item.info { background: var(--info-bg); color: var(--info); }
.filtro-seg.com-mais b { color: var(--warn); }
.filtro-seg.com-menos b { color: var(--bad); }
.filtro-seg.ativo.com-mais b, .filtro-seg.ativo.com-menos b { color: #fff; }
/* ---------- receber o que faltava (item a menos) ---------- */
.conf-falta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0 32px; padding: 8px 10px; border-radius: 10px; background: var(--bad-bg); }
.conf-falta-txt { font-size: 13.5px; color: var(--bad); font-weight: 600; }
.conf-falta-qtd { width: 90px; background: var(--surface); }
.conf-item-historico { margin: 6px 0 0 32px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 480px) { .conf-falta, .conf-item-historico { margin-left: 0; } }
/* ---------- solicitações: busca, filtros e cartões ---------- */
.sol-busca { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sol-busca .campo-busca { max-width: none; }
.sol-busca .input { height: 44px; background: var(--surface); }
.sol-busca .btn { height: 44px; padding: 0 22px; }
.sol-filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.sol-filtro { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.sol-filtro:hover { background: var(--brand-50); text-decoration: none; }
.sol-filtro span { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; text-align: center; }
.sol-filtro.ativa { background: var(--brand); border-color: var(--brand); color: #fff; }
.sol-filtro.ativa span { background: rgba(255, 255, 255, .22); color: #fff; }
.sol-lista { display: grid; gap: 14px; }
.sol-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #f59e0b; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 22px; }
.sol-card.separada { border-left-color: #22c55e; }
.sol-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sol-cab h3 { font-size: 17px; line-height: 1.3; }
.sol-data { font-size: 13px; color: var(--muted); }
.sol-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.sol-info dt, .sol-rotulo { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sol-info dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.sol-just { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: 14px; color: var(--ink-2); }
.sol-pecas { margin-top: 14px; }
.sol-tabela { width: 100%; max-width: 560px; margin-top: 6px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14.5px; }
.sol-tabela th { padding: 8px 14px; background: var(--brand-50); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line); }
.sol-tabela td { padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.sol-tabela tbody tr:last-child td { border-bottom: none; }
.sol-tabela tbody tr:nth-child(even) td { background: #fafcfd; }
.sol-tabela .qtd { width: 90px; text-align: center; }
.sol-tabela td.qtd { font-weight: 700; font-size: 16px; color: var(--brand-600); }
.sol-sem { font-size: 14px; color: var(--muted); }
.sol-separado { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 13.5px; }
.sol-acoes { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn-excluir-sol { color: var(--bad); }
.btn-excluir-sol:hover { background: var(--bad-bg); border-color: #fecaca; }
@media (max-width: 600px) {
    .sol-busca { flex-wrap: wrap; }
    .sol-busca .campo-busca { flex-basis: 100%; }
    .sol-busca .btn { flex: 1; }
    .sol-card { padding: 16px; }
    .sol-acoes { justify-content: stretch; }
    .sol-acoes form, .sol-acoes .btn { flex: 1; width: 100%; }
}

/* ---------- permissões de acesso ---------- */
.perm-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.perm-usuarios { padding: 12px; position: sticky; top: 16px; max-height: calc(100vh - 100px); overflow: auto; }
.perm-busca { max-width: none; margin-bottom: 10px; }
.perm-filtro-loja { margin-bottom: 10px; }
.perm-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.perm-lista li[hidden] { display: none; }
.perm-usuario { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.perm-usuario:hover { background: var(--bg); text-decoration: none; }
.perm-usuario.ativo { background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-100); }
.perm-usuario-txt { display: grid; min-width: 0; }
.perm-usuario-txt strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perm-usuario-txt span { font-size: 12.5px; color: var(--muted); }
.perm-painel { display: grid; gap: 14px; min-width: 0; }
.perm-painel form { display: grid; gap: 14px; }
.perm-cab { padding: 18px 20px; }
.perm-cab-info { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.perm-cab-info h2 { font-size: 18px; }
.perm-cab-info .badge { margin-left: auto; }
.avatar-lg { width: 46px; height: 46px; font-size: 16px; }
.perm-ajuda { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.perm-grupo { overflow: hidden; }
.perm-grupo-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; background: var(--brand-50); border-bottom: 1px solid var(--line); }
.perm-grupo-cab h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-600); }
.perm-linha { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.perm-linha:last-child { border-bottom: none; }
.perm-linha:hover { background: #fafcfd; }
.perm-linha.alterada { background: #fffbeb; box-shadow: inset 3px 0 0 #f59e0b; }
.perm-texto { flex: 1; min-width: 0; }
.perm-texto strong { display: block; font-size: 14.5px; }
.perm-texto span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.perm-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.perm-tag-padrao { padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.perm-tag-alterada { display: none; padding: 2px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 11.5px; font-weight: 700; }
.perm-linha.alterada .perm-tag-alterada { display: inline-block; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-trilho { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s ease; pointer-events: none; }
.switch-trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.switch input:checked + .switch-trilho { background: var(--ok); }
.switch input:checked + .switch-trilho::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-trilho { outline: 3px solid rgba(102, 172, 197, .45); outline-offset: 2px; }
.perm-nota { margin: 0; font-size: 13px; }
.perm-rodape { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 2; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 900px) {
    .perm-layout { grid-template-columns: 1fr; }
    .perm-usuarios { position: static; max-height: 260px; }
}
@media (max-width: 600px) {
    .perm-linha { flex-wrap: wrap; }
    .perm-tags { order: 3; flex-basis: 100%; justify-content: flex-start; }
    .perm-rodape .btn { flex: 1; }
}

.perm-perfil-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.perm-perfil-form label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.perm-perfil-form .select { min-width: 220px; }

/* ---------- formulário de usuário (cadastro e edição) ---------- */
.form-usuario { display: grid; gap: 16px; max-width: 820px; }
.form-secao { overflow: hidden; }
.form-secao-cab { display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: var(--brand-50); border-bottom: 1px solid var(--line); }
.form-secao-cab h2 { font-size: 16px; }
.form-secao-cab p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.form-secao-num { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; }
.form-secao-corpo { padding: 20px 22px 8px; }
.form-secao-corpo .campo:last-child { margin-bottom: 16px; }
.senha-wrap { display: flex; align-items: center; gap: 6px; }
.senha-wrap .input { flex: 1; min-width: 0; }
.tipo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tipo-card { position: relative; display: block; cursor: pointer; }
.tipo-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tipo-card-corpo { display: block; height: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); transition: border-color .12s ease, background .12s ease; position: relative; }
.tipo-card-corpo::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.tipo-card-corpo strong { display: block; font-size: 14.5px; }
.tipo-card-corpo span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.tipo-card:hover .tipo-card-corpo { border-color: var(--accent); }
.tipo-card input:checked + .tipo-card-corpo { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }
.tipo-card input:checked + .tipo-card-corpo::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 4px, #fff 5px); }
.tipo-card input:focus-visible + .tipo-card-corpo { outline: 3px solid rgba(102, 172, 197, .45); outline-offset: 2px; }
.caixa-tecnico { margin-bottom: 16px; padding: 14px 16px 2px; border: 1px dashed var(--accent); border-radius: 12px; background: #f7fbfd; }
.caixa-tecnico[hidden] { display: none; }
.caixa-tecnico > strong { display: block; margin-bottom: 10px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-600); }
.caixa-tecnico .dica { display: block; margin-bottom: 12px; }
.form-usuario-acoes { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) {
    .form-usuario .form-grid { grid-template-columns: 1fr; }
    .form-secao-cab, .form-secao-corpo { padding-left: 16px; padding-right: 16px; }
    .form-usuario-acoes .btn { flex: 1; }
}

.filtros-usuarios { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafcfd; }
.filtros-usuarios .campo-busca { flex: 1 1 240px; max-width: 360px; }
.filtros-usuarios .select { min-width: 170px; height: 38px; }
.filtros-usuarios .input { height: 38px; }
.filtros-total { margin-left: auto; font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .filtros-usuarios .campo-busca { max-width: none; flex-basis: 100%; } .filtros-usuarios .select { flex: 1 1 140px; } .filtros-total { margin-left: 0; } }

/* ---------- vários anexos por tipo ---------- */
.anexo-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.anexo-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafcfd; }
.anexo-item .anexo-previa { width: 72px; height: 72px; }
.anexo-vazio.anexo-mais { min-height: 46px; }

/* ---------- clipe de anexos na lista de listagens ---------- */
.anexo-clip { position: relative; color: var(--brand); }
.anexo-clip .clip-qtd { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; }
.clip-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(19, 34, 40, .55); }
.clip-modal[hidden] { display: none; }
.clip-card { width: min(560px, 100%); max-height: 86vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); border-radius: 16px; box-shadow: 0 20px 50px rgba(15, 23, 42, .35); overflow: hidden; }
.clip-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--brand-50); }
.clip-cab h2 { font-size: 17px; }
.clip-cab p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.clip-cab .icon-btn { font-size: 22px; line-height: 1; }
.clip-corpo { overflow-y: auto; padding: 6px 20px 14px; }
.clip-secao h3 { margin: 14px 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.clip-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.clip-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.clip-previa { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--brand); font-size: 12px; font-weight: 700; text-decoration: none; }
.clip-previa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-info { min-width: 0; display: grid; }
.clip-info strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-info span { font-size: 12.5px; color: var(--muted); }
.clip-rodape { display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); background: #fafcfd; }
@media (max-width: 520px) { .clip-rodape .btn { width: 100%; } }
@media print { .clip-modal { display: none !important; } }

/* clipe na linha dos filtros da tela "Ver" e clipe apagado (sem anexos) */
.filtro-clip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--brand); border-radius: 999px; background: var(--brand-50); color: var(--brand-600); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.filtro-clip b { font-weight: 700; font-size: 12.5px; }
.filtro-clip:hover { background: var(--brand-100); }
.filtro-clip.sem-anexos { border-color: var(--line-2); background: transparent; color: var(--muted); cursor: default; opacity: .75; }
.filtro-clip.sem-anexos:hover { background: transparent; }
.anexo-clip-vazio { opacity: .35; cursor: default; }

/* ---------- conferência: item sai da lista ao tocar no ✓, com aviso para desfazer ---------- */
.conf-item-form { scroll-margin-top: 84px; }
.conf-item-form.conf-saindo { overflow: hidden; opacity: 0; transform: translateX(36px); transition: max-height .35s ease, opacity .3s ease .05s, transform .3s ease .05s; }
.conf-item-form.conf-saindo .conf-item { background: #dcfce7; border-radius: 10px; }
.conf-toast-area { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 160; display: grid; gap: 8px; justify-items: center; padding: 0 12px; pointer-events: none; }
.conf-toast { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; max-width: 520px; width: 100%; padding: 12px 14px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-size: 14px; pointer-events: auto; animation: toast-entra .2s ease; }
.conf-toast span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.conf-toast button { flex: none; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.conf-toast button:hover { background: rgba(255, 255, 255, .15); }
.conf-toast i { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: left; animation: toast-barra linear forwards; }
@keyframes toast-barra { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toast-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* adicionar anexos dentro da janelinha do clipe */
.clip-add { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; margin-bottom: 10px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg); color: var(--brand); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.clip-add:hover { background: var(--brand-50); }
.clip-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.clip-add.enviando { opacity: .55; pointer-events: none; }
.clip-nota { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.clip-msg { margin: 8px 0 0; min-height: 1em; font-size: 12.5px; color: var(--muted); }
.clip-msg.erro { color: var(--bad); font-weight: 600; }

/* ---------- lista de adição / guia de devolução: cada item vira um cartão no celular ---------- */
.so-celular { display: none; }
@media screen and (max-width: 700px) {
    .so-celular.resumo-celular { display: block; margin: 0; padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--brand-50); border-bottom: 1px solid var(--line); }
    .tabela-alteracoes thead, .tabela-alteracoes tfoot { display: none; }
    .tabela-alteracoes, .tabela-alteracoes tbody { display: block; width: 100%; }
    .tabela-alteracoes tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 14px 16px; border-bottom: 8px solid var(--bg); }
    .tabela-alteracoes tbody tr:hover { background: transparent; }
    .tabela-alteracoes td { display: block; padding: 0; border: none; text-align: left; min-width: 0; overflow-wrap: anywhere; }
    .tabela-alteracoes td.c-desc { grid-column: 1 / -1; order: -3; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
    .tabela-alteracoes td.c-cod, .tabela-alteracoes td.c-forn { order: -2; font-size: 12.5px; color: var(--muted); }
    .tabela-alteracoes td.c-cod::before { content: "Cód. "; font-weight: 600; }
    .tabela-alteracoes td.num { text-align: left; font-size: 16px; font-weight: 700; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
    .tabela-alteracoes td.num::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
    .tabela-alteracoes td.num.destaque { background: var(--devol-bg); color: var(--devol); }
    .tabela-alteracoes td.num.destaque::before { color: var(--devol); }
    .tabela-alteracoes td.c-conf, .tabela-alteracoes td.c-sit, .tabela-alteracoes td.c-rec { grid-column: 1 / -1; font-size: 13px; }
    .tabela-alteracoes td.c-conf::before, .tabela-alteracoes td.c-sit::before, .tabela-alteracoes td.c-rec::before { content: attr(data-label) ": "; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
    .tabela-alteracoes td.c-acao { grid-column: 1 / -1; padding-top: 2px; }
    .tabela-alteracoes td.c-acao .btn, .tabela-alteracoes td.c-rec .btn { width: 100%; justify-content: center; height: 42px; }
    .tabela-alteracoes td.c-acao form, .tabela-alteracoes td.c-rec form { width: 100%; }
}

/* iPhone/iPad: o Safari dá zoom automático ao tocar num campo com letra menor que 16px (a tela "se perde").
   No celular e no tablet os campos usam 16px, então não há zoom. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 1024px) {
    .input, .select, input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="email"], textarea, select { font-size: 16px; }
}

/* ---------- app (PWA): aviso de conexão e convite para instalar ---------- */
.pwa-barra { position: fixed; top: 0; left: 0; right: 0; z-index: 300; padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 4px; background: #92400e; color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; }
body.pwa-offline { padding-top: calc(28px + env(safe-area-inset-top, 0px)); }
body.pwa-offline .appbar, body.pwa-offline .topbar { top: calc(28px + env(safe-area-inset-top, 0px)); }
.pwa-instalar { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--brand-100); border-radius: 14px; background: var(--brand-50); font-size: 14px; color: var(--ink-2); }
.pwa-instalar[hidden] { display: none; }
.pwa-instalar strong { display: block; margin-bottom: 2px; color: var(--brand-600); }
.pwa-instalar-acoes { display: flex; gap: 8px; margin-top: 10px; }
.pwa-baixadas { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.pwa-baixadas[hidden] { display: none; }
.pwa-baixadas::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.pwa-baixadas.baixando::before { background: var(--warn); }

/* ---------- fila de envio offline: indicador de alterações aguardando ---------- */
.pwa-fila { position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; margin-right: 8px; border: 0; border-radius: 50%; background: #92400e; color: #fff; cursor: pointer; }
.pwa-fila:active { transform: scale(.94); }
.pwa-fila-qtd { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: #fff; color: #92400e; border: 2px solid #92400e; font-size: 11px; font-weight: 800; line-height: 1; }
.pwa-fila.enviando svg { animation: fila-gira 1.2s linear infinite; }
.pwa-fila.erro { background: var(--bad); }
.pwa-fila.erro .pwa-fila-qtd { color: var(--bad); border-color: var(--bad); }
@keyframes fila-gira { to { transform: translateY(-2px); opacity: .45; } }
/* sem barra no topo para ancorar: flutua no canto inferior direito */
.pwa-fila.flutuante { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 170; width: 52px; height: 52px; margin: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .32); }
body.tem-fila .conf-toast-area { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }.conf-aguardando { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 11.5px; font-weight: 700; }
.conf-aguardando::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }

/* anexo guardado no aparelho, esperando sinal para subir */
.anexo-item.anexo-pendente { border-style: dashed; border-color: #f59e0b; background: #fffbeb; }
.anexo-pendente .anexo-previa { cursor: default; }
.clip-item .conf-aguardando { font-style: normal; }
/* Guia de Devolução / Adição na tela do computador: cabe sem rolar de lado e o botão de confirmar fica sempre à vista */
@media screen and (min-width: 961px) {
    .tabela-alteracoes th { padding: 10px 12px; white-space: normal; letter-spacing: .03em; line-height: 1.25; vertical-align: bottom; }
    .tabela-alteracoes td { padding: 11px 10px; font-size: 13px; }
    .tabela-alteracoes th { padding-left: 10px; padding-right: 10px; }
    .tabela-alteracoes td.c-cod { white-space: nowrap; }
    .tabela-alteracoes td.c-desc { min-width: 170px; }
    .tabela-alteracoes td.c-forn { max-width: 120px; overflow-wrap: anywhere; }
    .tabela-alteracoes td.c-conf { min-width: 120px; }
    .tabela-alteracoes td.c-sit { min-width: 100px; }
    .tabela-alteracoes td.num.destaque { font-size: 14px; }
    .tabela-alteracoes th.col-acao, .tabela-alteracoes td.col-acao { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px rgba(15, 23, 42, .18); }
    .tabela-alteracoes th.col-acao { background: #f6fafb; }
}
/* ---------- Check-in de visita (vendedores) ---------- */
.vis-andamento { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid #fde68a; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.vis-andamento[hidden] { display: none; }
.vis-novo { margin-bottom: 20px; }
.vis-novo-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.vis-novo-sem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.vis-novo-sem[hidden] { display: none; }
.vis-novo-sem p { flex-basis: 100%; margin: 0; }
.vis-msg { font-size: 13.5px; color: var(--muted); }
.vis-msg.erro { color: var(--bad); }
.vis-lista { display: grid; gap: 10px; }
.vis-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vis-card-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.vis-card-link { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.vis-card-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.vis-card-motivo { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.vis-card-end { margin-top: 8px; font-size: 13px; }
.vis-mapa { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--brand-600); text-decoration: none; font-size: 13px; overflow-wrap: anywhere; }
.vis-mapa:hover { text-decoration: underline; }
.vis-mapa .i { flex: none; margin-top: 2px; }
.vis-semlocal { font-size: 13px; color: var(--warn); }
.vis-card .conf-aguardando { display: inline-block; margin-top: 8px; }

.vis-status { text-align: right; }
.vis-tempo { margin-top: 6px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.vis-pontos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-bottom: 16px; }
.vis-ponto { padding: 14px 18px; font-size: 14px; display: grid; gap: 4px; align-content: start; }
.vis-ponto-out { border-left: 1px solid var(--line); }
.vis-ponto-tit { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vis-ponto-hora { font-size: 16px; font-weight: 700; }
.vis-ponto-prec { font-size: 12px; color: var(--muted); }
.vis-pontos { position: relative; }
.vis-ponto { align-content: start; grid-template-rows: auto auto auto auto 1fr; }
.vis-ponto-in { border-top: 3px solid var(--ok); }
.vis-ponto-out { border-top: 3px solid var(--warn); }
.vis-ponto-tit { display: flex; align-items: center; gap: 7px; }
.vis-ponto-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.vis-ponto-in .vis-ponto-tit { color: var(--ok); }
.vis-ponto-out .vis-ponto-tit { color: var(--warn); }
.vis-mapa-box { align-self: end; margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--line); aspect-ratio: 16 / 10; }
.vis-mapa-box iframe { display: block; width: 100%; height: 100%; border: 0; }
.vis-simnao { display: flex; gap: 8px; }
.vis-sn { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.vis-sn.ativo { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-600); }
.vis-sn:disabled { opacity: .6; cursor: default; }
.vis-fotos { margin-top: 16px; }
.vis-fotos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.vis-fotos-lista:empty { display: none; }
.vis-foto { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); min-height: 90px; display: flex; flex-direction: column; justify-content: flex-end; }
.vis-foto img { display: block; width: 100%; height: 110px; object-fit: cover; }
.vis-foto.pend { border-style: dashed; border-color: #f5c26b; }
.vis-foto .conf-aguardando { padding: 4px 6px; font-size: 11.5px; }
.vis-foto-off { display: grid; place-items: center; height: 110px; font-size: 12px; color: var(--muted); }
.vis-foto-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(17, 24, 39, .72); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.vis-rodape { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 8px; }
.vis-salvo { font-size: 13px; color: var(--muted); }
.vis-dados { margin: 0; padding: 4px 20px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.vis-dados dt { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vis-dados dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.vis-dados .largo { grid-column: 1 / -1; }
.vis-filtros { padding: 14px 16px; margin-bottom: 16px; }
.vis-filtros-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; }
.vis-filtros-grade label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.vis-filtros-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.vis-paginas { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; }
.tabela-visitas .vis-col-local { min-width: 180px; }

/* Visitas dos vendedores: resumo, abas e cartões por dia */
.vl-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.vl-num { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.vl-num-v { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.vl-num-v.moeda { font-size: 20px; white-space: nowrap; padding: 3px 0; }
.vl-num-l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.vl-num-s { font-size: 12px; color: var(--muted); }
.vl-abas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.vl-aba { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.vl-aba:hover { border-color: var(--brand-600); }
.vl-aba.ativa { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.vl-abas-qtd { margin-left: auto; font-size: 13px; }
.vl-dia { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 18px 2px 8px; }
.vl-lista { display: grid; gap: 10px; }
/* Caixinhas para excluir vários atendimentos de uma vez (só o administrador) */
.vl-lote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 16px; margin: 0 0 10px; }
.vl-lote-todos { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.vl-lote-qtd { font-size: 13px; margin-right: auto; }
.vl-lote input[type="checkbox"], .vl-sel input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-600); cursor: pointer; }
.vl-sel { flex: 0 0 auto; display: grid; place-items: center; padding: 6px; margin: -6px 0 -6px -6px; cursor: pointer; }
.vl-card.vl-selecionado { border-color: var(--brand-600); background: var(--brand-50); }
.vl-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; padding: 16px 18px; }
.vl-main { display: grid; gap: 12px; min-width: 0; }
.vl-topo { display: flex; align-items: center; gap: 12px; }
.vl-avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font-size: 14px; font-weight: 700; }
.vl-quem { min-width: 0; }
.vl-cliente { display: block; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.vl-cliente:hover { color: var(--brand-600); }
.vl-vend { font-size: 13px; color: var(--muted); }
.vl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vl-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.vl-chip.forte { background: var(--brand-50); border-color: transparent; color: var(--brand-600); font-weight: 600; }
.vl-chip.link { color: var(--brand-600); }
.vl-trajeto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.vl-pt { display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 8px 0 0; border-top: 2px solid var(--line); }
.vl-pt.vl-in { border-top-color: var(--ok); }
.vl-pt.vl-out { border-top-color: var(--warn); }
.vl-pt-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--line); }
.vl-in .vl-pt-dot { background: var(--ok); }
.vl-out .vl-pt-dot { background: var(--warn); }
.vl-pt-corpo { min-width: 0; }
.vl-pt-hora { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vl-pt-end { font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.vl-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }
.vl-tempo { font-size: 22px; font-weight: 800; text-align: right; line-height: 1.1; }
.vl-tempo small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.vl-acoes { display: flex; align-items: center; gap: 6px; }
.vl-chip.atencao { background: var(--warn-bg); border-color: transparent; color: var(--warn); font-weight: 600; }

/* Campo obrigatório: * vermelho no rótulo (marcado por ui/obrigatorio.js em todo campo com "required") */
label.obrig::after { content: " *"; color: var(--bad); font-weight: 700; }

/* Atualização automática da página: contagem regressiva na barra de cima */
.auto-atualiza { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; margin-right: 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; }
.auto-atualiza:hover { color: var(--brand-600); border-color: var(--brand-600); }
.auto-atualiza .i { width: 15px; height: 15px; }
@media (max-width: 480px) { .auto-atualiza { padding: 0 9px; margin-right: 6px; } }

/* Casinha para voltar ao Início (barra de cima de todas as telas, menos a própria página inicial) */
.icon-btn.btn-casa { color: var(--brand-600); text-decoration: none; }
.icon-btn.btn-casa:hover { background: var(--brand-50); color: var(--brand-600); }

/* Início do vendedor interno: minha meta (planejado x realizado) */
.vm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 16px 20px 14px; margin-bottom: 16px; }
.vm-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.vm-cab h2 { font-size: 16px; }
.vm-corpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; }
.vm-gauge { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; }
.vm-trilho { fill: var(--line); }
.vm-fill { fill: var(--accent); }
.vm-plan { stroke: #dc2626; stroke-width: 3; stroke-linecap: round; }
.vm-plan-tx { fill: var(--ink); font-size: 21px; font-weight: 700; }
.vm-plan-rot { fill: #dc2626; font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.vm-rot { fill: var(--ink-2); font-size: 16px; font-weight: 700; letter-spacing: .03em; }
.vm-valor { fill: var(--ink); font-size: 54px; font-weight: 800; }
.vm-ext { fill: var(--ink); font-size: 19px; font-weight: 700; }
.vm-valores { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.vm-valores dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.vm-valores dd { margin: 0; font-size: 14.5px; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.vm-valores dd.forte { color: var(--brand-600); }
.vm-nota { margin-top: 8px; font-size: 12px; color: var(--muted); }
.vm-duplo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.vm-item { min-width: 0; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.vm-item-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.vm-valores.vm-valores-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .vm-duplo { grid-template-columns: minmax(0, 1fr); } }
.vm-sem { display: grid; gap: 6px; padding: 8px 0 4px; }
.vm-sem-valor { display: grid; }
.vm-sem-valor strong { font-size: 28px; }
@media (min-width: 1200px) {
    .vm-corpo { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; }
    .vm-valores { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 0; border-top: none; }
    .vm-valores dd { font-size: 17px; }
    .vm-valores dd.forte { font-size: 20px; }
}
@media (max-width: 640px) {
    .vm-valores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Vendas: novo atendimento em passos */
.vd-novo { max-width: 760px; }
.vd-passo { margin-bottom: 14px; }
.vd-passo-cab { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.vd-passo-cab h2 { font-size: 16px; }
.vd-passo-cab p { font-size: 13px; color: var(--muted); }
.vd-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-600); color: #fff; font-size: 14px; font-weight: 700; }
.vd-passo-corpo { padding: 18px 20px 6px; }
.vd-grande { font-size: 17px; padding-top: 12px; padding-bottom: 12px; }
.vd-rot { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.vd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-chip { position: relative; cursor: pointer; }
.vd-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vd-chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: background .12s, border-color .12s; }
.vd-chip:hover span { border-color: var(--brand-600); }
.vd-chip input:checked + span { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 600; }
.vd-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.vd-decisao .vd-chips { margin-bottom: 14px; }
.vd-chip.vd-ok input:checked + span { background: var(--ok); border-color: var(--ok); }
.vd-chip.vd-ruim input:checked + span { background: var(--bad); border-color: var(--bad); }
.vd-decisao .vd-form { padding: 0; }
.vd-rapido { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vd-atalho { min-height: 38px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.vd-atalho:hover { border-color: var(--brand-600); color: var(--brand-600); }
.vd-atalho.ativo, .vd-atalho.ativo:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 600; }
.vd-rapido .dp-caixa { width: 170px; }
.vd-ou { font-size: 13px; margin-left: 4px; }
.vd-link { border: none; background: transparent; padding: 4px 0 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand-600); cursor: pointer; }
.vd-switch { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; cursor: pointer; font-size: 15px; font-weight: 600; }
.vd-switch input { position: absolute; opacity: 0; pointer-events: none; }
.vd-trilho { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.vd-trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.vd-switch input:checked + .vd-trilho { background: var(--brand-600); }
.vd-switch input:checked + .vd-trilho::after { transform: translateX(20px); }
.vd-switch input:focus-visible + .vd-trilho { outline: 3px solid var(--accent); outline-offset: 2px; }
.vo-linha.lj-linha { grid-template-columns: minmax(0, 1fr) 130px auto auto auto; }
.vo-linha.lj-linha .input { grid-column: auto; }
.vo-linha.lj-linha .select { width: 100%; min-width: 0; }
.vo-linha.lj-linha.vo-nova { grid-template-columns: minmax(0, 1fr) 130px auto; }
.vo-linha.lj-linha.vo-nova span { display: none; }
.lj-qtd { font-size: 13px; white-space: nowrap; min-width: 80px; text-align: right; }
.lj-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.lj-check { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.lj-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.lj-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft, var(--surface)); }
@media (max-width: 640px) {
    .vo-linha.lj-linha { grid-template-columns: minmax(0, 1fr) auto; }
    .vo-linha.lj-linha .input { grid-column: 1 / -1; }
}
.vd-pedido-cli { font-weight: 500; color: var(--ink-2); }
.vd-corrige-ped { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.vd-corrige-ped label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.vd-corrige-ped .input { flex: 0 1 220px; }
.vo-linha.vo-com-exige { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.vo-linha.vo-com-exige .input { grid-column: auto; }
.vo-linha.vo-com-exige.vo-nova { grid-template-columns: minmax(0, 1fr) auto auto; }
@media (max-width: 640px) {
    .vo-linha.vo-com-exige { grid-template-columns: minmax(0, 1fr) auto; }
    .vo-linha.vo-com-exige .input { grid-column: 1 / -1; }
}
.vo-exige { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.vd-passo.inativo .vd-passo-corpo { opacity: .45; pointer-events: none; }
.vd-passo.inativo .vd-obrig { background: var(--neutral-bg); color: var(--neutral); }
.vd-obrig { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 11.5px; font-weight: 700; vertical-align: middle; }
.vd-orc-resp { margin-bottom: 12px; }
.vd-moeda { position: relative; }
.vd-moeda > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); pointer-events: none; }
.vd-moeda .input { padding-left: 40px; }
.vd-barra { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 6px -4px 24px; padding: 12px 4px; background: linear-gradient(to top, var(--bg) 70%, rgba(242, 248, 249, 0)); }
.vd-salvar { min-height: 46px; padding-left: 22px; padding-right: 22px; font-size: 15px; }
@media (max-width: 640px) {
    .vd-barra .btn-primary { flex: 1; }
    .vd-passo-cab, .vd-passo-corpo { padding-left: 16px; padding-right: 16px; }
    .vd-rapido .dp-caixa { width: 100%; }
}

/* Vendas: formulário, orçamentos (revisões) e fechamento */
.vd-sec { margin: 22px 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vd-sec:first-child { margin-top: 0; }
.vd-sub { margin: 0 0 4px; font-size: 15.5px; }
.vd-dica { margin: 0 0 12px; font-size: 13px; }
.vd-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vd-orcs { list-style: none; margin: 0; padding: 0; }
.vd-orc { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.vd-orc.vigente { background: var(--brand-50); }
.vd-rev { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--brand-600); }
.vd-orc-corpo { flex: 1; min-width: 0; }
.vd-orc-corpo strong { display: block; font-size: 14.5px; }
.vd-orc-corpo span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.vd-orc-valor { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vd-orc.revisado .vd-orc-valor { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.vd-novo-orc { background: var(--bg); }
.vd-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vl-numeros.vd-tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vd-fat-barra { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.vd-fat-barra span { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.vd-fat-grande { height: 12px; margin: -4px 0 18px; }
.vd-loja-aviso { margin: 0 0 10px; font-size: 13.5px; }
.vd-mes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vd-mes-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.vd-mes-form .dp-caixa { width: 150px; }
.vd-mes-nome { margin-left: 6px; font-size: 16px; }
.vd-meta-input { max-width: 150px; text-align: right; margin-left: auto; }
.vv-de { font-size: 15px; font-weight: 600; color: var(--muted); }
.vd-meta-input.vv-meta { max-width: 90px; }
.vd-pct { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.vd-pct .vd-fat-barra { flex: 1; }
.vd-pct strong { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
/* Painel de vendas (dashboard) */
.vp-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 18px; }
.vp-presets, .vp-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vp-custom .dp-caixa { width: 150px; }
.vp-vend + .vp-vend { margin-left: 0; }
.vd-mes-form label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.vp-vend { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.vp-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 26px 28px; margin-bottom: 14px; }
.vp-hero-rot, .vp-tile-rot { font-size: 13px; font-weight: 600; color: var(--muted); }
.vp-hero-valor { font-size: 52px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); margin: 4px 0 6px; white-space: nowrap; }
.vp-hero-sub, .vp-tile-nota, .vp-nota { font-size: 13px; color: var(--muted); }
.vp-meter-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 15px; }
.vp-meter { height: 12px; border-radius: 999px; background: var(--brand-100); overflow: hidden; margin-bottom: 8px; }
.vp-meter span { display: block; height: 100%; border-radius: 999px; background: var(--brand-600); }
.vp-meter.fino { height: 6px; margin: 2px 0 0; }
.vp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.vp-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vp-tile-valor { font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--ink); white-space: nowrap; }
.vp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.vp-card { margin-bottom: 14px; }
.vp-grid2 .vp-card { margin-bottom: 0; }
.vp-vazio { padding: 18px 0; text-align: center; }
.vp-nota { margin: 14px 0 0; }
.vp-rodape { font-size: 12.5px; margin: 6px 2px 24px; }
.vp-rank th, .vp-rank td.num { white-space: nowrap; }
.vp-rank td.celula-principal { min-width: 150px; }
.vp-det { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.vp-det summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-600); }
.vp-det .table-wrap { margin-top: 8px; }
/* colunas */
.vp-area { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); height: 200px; margin-top: 22px; }
.vp-yax { position: relative; height: 180px; }
.vp-yax span { position: absolute; right: 8px; transform: translateY(50%); font-size: 11.5px; color: var(--muted); }
.vp-plot { position: relative; }
.vp-grid { position: absolute; left: 0; right: 0; top: 0; height: 180px; }
.vp-grid i { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.vp-cols { position: relative; display: flex; gap: 2px; height: 180px; }
.vp-col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.vp-bar { display: block; width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--brand-600); }
.vp-col:hover .vp-bar, .vp-col:focus-visible .vp-bar { background: var(--accent); }
.vp-val { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink); pointer-events: none; }
.vp-xax { display: flex; gap: 2px; margin-top: 6px; }
.vp-xax span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: visible; }
.vp-cwrap { padding-bottom: 6px; }
/* barras horizontais */
.vp-hlist { display: grid; gap: 14px; }
.vp-hrow { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 12px; align-items: center; outline: none; }
.vp-hrot { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.vp-hrot small { display: block; font-size: 12px; color: var(--muted); }
.vp-htrack { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vp-hbar { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--brand-600); min-width: 2px; }
.vp-hrow:hover .vp-hbar, .vp-hrow:focus-visible .vp-hbar { background: var(--accent); }
.vp-hval { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* barra dividida */
.vp-seg { display: flex; gap: 2px; height: 28px; margin: 8px 0 14px; }
.vp-seg-p { display: flex; align-items: center; padding-left: 10px; border-radius: 4px; min-width: 6px; outline: none; }
.vp-seg-p b { font-size: 13px; color: #fff; }
.vp-seg-p.p1, .vp-sw.p1 { background: var(--brand-600); }
.vp-seg-p.p2, .vp-sw.p2 { background: var(--accent); }
.vp-seg-p.p2 b { color: var(--ink); }
.vp-leg { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.vp-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
/* linha */
.vp-lwrap { margin-top: 4px; }
.vp-svg { display: block; width: 100%; height: auto; }
.vp-gl { stroke: var(--line); stroke-width: 1; }
.vp-tx { fill: var(--muted); font-size: 12px; }
.vp-tx-meta { fill: var(--ink-2); font-weight: 700; }
.vp-line { fill: none; stroke: var(--brand-600); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vp-area-fill { fill: var(--brand-600); fill-opacity: .1; stroke: none; }
.vp-meta { stroke: var(--ink-2); stroke-width: 1.5; }
.vp-dot { fill: var(--brand-600); stroke: var(--surface); stroke-width: 2; }
.vp-cross { stroke: var(--line-2); stroke-width: 1; }
.vp-hit { fill: transparent; outline: none; }
/* tooltip */
.vp-tip { position: fixed; z-index: 1300; pointer-events: none; display: grid; gap: 1px; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow-md); font-size: 12.5px; max-width: 260px; }
.vp-tip strong { font-size: 15px; font-weight: 700; }
.vp-tip span { color: rgba(255, 255, 255, .85); }
.vp-tip small { color: rgba(255, 255, 255, .7); font-size: 12px; }
@media (max-width: 1180px) {
    .vp-grid2 { grid-template-columns: minmax(0, 1fr); }
    .vp-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 24px; }
    .vp-hero-valor { font-size: 44px; }
}
@media (max-width: 860px) {
    .vp-hero-valor { font-size: 38px; }
    .vp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vp-grid2 { grid-template-columns: minmax(0, 1fr); }
    .vp-vend { margin-left: 0; }
}
@media (max-width: 520px) {
    .vp-tiles { grid-template-columns: minmax(0, 1fr); }
    .vp-hrow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.vd-fechar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vd-fechar .vd-form { padding: 20px; }
.vd-fechar .vd-form + .vd-form { border-left: 1px solid var(--line); }
@media (max-width: 760px) {
    .vd-grid3, .vd-grid4 { grid-template-columns: minmax(0, 1fr); }
    .vl-numeros.vd-tres { grid-template-columns: minmax(0, 1fr); }
    .vd-fechar { grid-template-columns: minmax(0, 1fr); }
    .vd-fechar .vd-form + .vd-form { border-left: none; border-top: 1px solid var(--line); }
    .vd-orc { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 16px; }
    .vd-rev { grid-row: 1 / span 2; align-self: start; }
    .vd-orc-corpo { grid-column: 2 / -1; }
    .vd-orc-valor { grid-column: 2; }
    .vd-orc .badge { grid-column: 3; justify-self: end; }
}
.vl-acoes form { margin: 0; }
@media (max-width: 860px) {
    .vl-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .vl-card { grid-template-columns: minmax(0, 1fr); }
    .vl-trajeto { grid-template-columns: minmax(0, 1fr); }
    .vl-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
    .vl-tempo { order: 2; margin-left: auto; margin-right: 8px; }
    .vl-tempo small { display: inline; margin-left: 4px; }
    .vl-acoes { order: 3; }
}
@media (max-width: 640px) {
    .vis-pontos { grid-template-columns: minmax(0, 1fr); }
    .vis-ponto-out { border-left: none; }
    .vis-dados { grid-template-columns: minmax(0, 1fr); }
    .vis-rodape { position: sticky; bottom: 0; padding: 10px 0; background: var(--bg); }
    .vis-rodape .btn { flex: 1; justify-content: center; height: 46px; }
}
@media screen and (min-width: 961px) {
    .tabela-visitas th { padding: 10px; white-space: normal; letter-spacing: .03em; line-height: 1.25; vertical-align: bottom; }
    .tabela-visitas td { padding: 10px; font-size: 13px; }
    .tabela-visitas .vis-col-local { min-width: 150px; }
    .tabela-visitas td.celula-principal strong { font-size: 13px; }
}
/* ---------- Opções do formulário de visita (admin) ---------- */
.vo-grupo { margin-bottom: 14px; }
.vo-grupo-nome { display: flex; gap: 8px; align-items: center; width: 100%; max-width: 560px; }
.vo-grupo-nome .input { font-weight: 700; }
.vo-lista { display: grid; gap: 8px; }
.vo-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin: 0; }
.vo-linha.inativa .input { opacity: .55; text-decoration: line-through; }
.vo-nova { padding-top: 8px; border-top: 1px dashed var(--line); grid-template-columns: minmax(0, 1fr) auto; }
.vo-dupla { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; border-top: none; padding-top: 0; }
@media (max-width: 640px) {
    .vo-linha, .vo-dupla { grid-template-columns: minmax(0, 1fr) auto; }
    .vo-linha .input { grid-column: 1 / -1; }
    .vo-nova { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- Seletor de data (ui/datepicker.js) ---------- */
.dp-caixa { position: relative; display: block; }
.dp-caixa .dp-campo { width: 100%; padding-right: 44px; }
.dp-icone { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.dp-icone:hover { background: var(--brand-50); color: var(--brand-600); }
.dp-icone:disabled { opacity: .5; cursor: default; }
.dp-icone .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dp-pop { position: absolute; z-index: 1200; width: 300px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.dp-topo { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.dp-titulo { display: flex; gap: 4px; }
.dp-sel { padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.dp-seta { width: 34px; height: 34px; border: none; border-radius: 10px; background: transparent; font-size: 22px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.dp-seta:hover { background: var(--brand-50); color: var(--brand-600); }
.dp-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dia-sem { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.dp-dia { height: 38px; border: none; border-radius: 10px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.dp-dia:hover { background: var(--brand-50); }
.dp-dia.fora { color: #b6c0c8; }
.dp-dia.hoje { box-shadow: inset 0 0 0 1.5px var(--brand-600); font-weight: 700; }
.dp-dia.sel { background: var(--brand-600); color: #fff; font-weight: 700; }
.dp-meses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dp-mes { height: 46px; border: none; border-radius: 10px; background: transparent; font: inherit; font-size: 15px; text-transform: capitalize; color: var(--ink); cursor: pointer; }
.dp-mes:hover { background: var(--brand-50); }
.dp-mes.hoje { box-shadow: inset 0 0 0 1.5px var(--brand-600); font-weight: 700; }
.dp-mes.sel { background: var(--brand-600); color: #fff; font-weight: 700; }
.dp-rodape { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-link { border: none; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand-600); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.dp-link:hover { background: var(--brand-50); }
@media (max-width: 640px) {
    .dp-pop.dp-celular { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; padding: 14px; border-radius: 20px; }
    .dp-dia { height: 44px; }
}
/* ---------- Retornos agendados (nova visita combinada) ---------- */
.vis-retornos { margin-bottom: 16px; }
.vis-retornos[hidden] { display: none; }
.vis-ret-lista { list-style: none; margin: 0; padding: 4px 16px 8px; }
.vis-ret { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vis-ret:last-child { border-bottom: none; }
.vis-ret-info { display: grid; gap: 4px; min-width: 0; }
.vis-ret-info strong { overflow-wrap: anywhere; }
.vis-ret-info > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.vis-ret-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
/* ---------- Visitas no celular (iPhone e Android): acabamento ---------- */
.vis-form, .vis-sec, .vis-card, .vis-ret { -webkit-tap-highlight-color: transparent; }
.vis-form button, .vis-sn, .vis-ret button, .vis-novo button, .vis-rodape button { touch-action: manipulation; }

.vis-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 4px 0 14px; padding: 18px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand) 100%); box-shadow: 0 8px 22px rgba(43, 99, 119, .28); }
.vis-hero-nome { min-width: 0; }
.vis-hero-rot { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.vis-hero h1 { margin: 2px 0 2px; font-size: 22px; line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
.vis-hero p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .85); }
.vis-hero .vis-status { text-align: right; flex: none; }
.vis-hero .vis-tempo { margin-top: 8px; font-size: 26px; color: #fff; }

.vis-sec { margin-bottom: 14px; overflow: hidden; }
.vis-sec-tit { margin: 0; padding: 16px 18px 0; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vis-sec-qtd { margin-left: 6px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.vis-sec .card-body { padding-top: 12px; }
.vis-sec .campo:last-child { margin-bottom: 0; }

.vis-form .input, .vis-form .select, .vis-novo .input { min-height: 50px; border-radius: 14px; font-size: 16px; }
.vis-form textarea.input { min-height: 140px; line-height: 1.45; padding-top: 12px; }
.vis-form select.select, .vis-form select { -webkit-appearance: none; appearance: none; padding-right: 42px; background-color: var(--surface); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d7480' 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 14px center; background-size: 18px; }
.vis-sn { min-height: 50px; border-radius: 14px; font-size: 16px; transition: background .15s, border-color .15s, color .15s; }
.vis-sn.ativo { border-width: 2px; }
.vis-foto-add { width: 100%; justify-content: center; min-height: 50px; border-radius: 14px; border-style: dashed; }
.vis-fotos-lista { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.vis-foto { border-radius: 14px; }

.vis-novo { text-align: center; }
.vis-novo .campo { text-align: left; }
.vis-novo-icone { width: 64px; height: 64px; margin: 4px auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); }
.vis-novo-icone .i { width: 30px; height: 30px; }
.vis-novo-tit { margin: 0 0 4px; font-size: 20px; }
.vis-novo-txt { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.vis-novo-acoes { display: grid; gap: 8px; }
.vis-novo-acoes .btn { width: 100%; justify-content: center; min-height: 54px; border-radius: 16px; font-size: 17px; }
.vis-novo-sem { justify-content: center; }

.vis-card { position: relative; padding-left: 20px; border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.vis-card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line-2, #b4c4cb); }
.vis-card.andamento::before { background: #f59e0b; }
.vis-card.fim::before { background: #22a35a; }
.vis-card-link { display: block; flex: 1; min-width: 0; padding: 2px 0; }
.vis-ret { border-radius: 14px; }
.vis-ret-acoes .btn { min-height: 42px; }
.vis-andamento { border-radius: 16px; }

@media (max-width: 640px) {
    .vis-hero h1 { font-size: 20px; }
    .vis-rodape { position: sticky; bottom: 0; z-index: 30; margin: 6px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); gap: 12px; background: rgba(244, 248, 250, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
    .vis-rodape .vis-salvo { flex: 1; min-width: 0; font-size: 12.5px; }
    .vis-rodape .btn { flex: none; min-width: 160px; height: 50px; border-radius: 16px; font-size: 16px; }
    .vis-card-topo { align-items: center; }
}
.vis-ret-lista { padding: 8px 12px 12px; display: grid; gap: 8px; }
.vis-ret { padding: 12px 14px; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); }
.vis-ret:last-child { border-bottom: 1px solid var(--line); }
.vis-ret.ret-bad { border-left-color: #e5484d; }
.vis-ret.ret-warn { border-left-color: #f59e0b; }
.vis-ret.ret-info { border-left-color: #3b82f6; }
/* Relógio da visita repetido acima do botão Finalizar */
.vis-rodape { display: grid; gap: 8px; justify-content: stretch; align-items: stretch; }
.vis-rodape-tempo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600; }
.vis-rodape-tempo strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); }
.vis-rodape-acao { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 640px) {
    .vis-rodape-acao .btn { flex: none; }
}
/* ---------- Visitas realizadas (início do vendedor) ---------- */
.vis-resumo-inicio { display: block; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.vis-resumo-tit { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.vis-resumo-num { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vis-resumo-num > div { padding: 10px 8px; border-radius: 14px; background: var(--brand-50); text-align: center; }
.vis-resumo-num strong { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--brand-600); }
.vis-resumo-num span { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
/* Confirmação ao finalizar a visita */
.vis-fim { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vis-fim[hidden] { display: none; }
.vis-fim-card { width: 100%; max-width: 380px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px; background: var(--surface); text-align: center; box-shadow: 0 20px 50px rgba(15, 23, 42, .35); display: grid; gap: 10px; }
.vis-fim-ok { width: 72px; height: 72px; margin: 0 auto 4px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.vis-fim-ok .i { width: 38px; height: 38px; }
.vis-fim-card h2 { margin: 0; font-size: 22px; }
.vis-fim-card p { margin: 0 0 6px; font-size: 14.5px; color: var(--muted); }
.vis-fim-card .btn { width: 100%; justify-content: center; min-height: 52px; border-radius: 16px; font-size: 16px; }
/* Resumo da visita finalizada */
.vis-resumo .card-body { padding-top: 6px; }
.vis-res-lin { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.vis-res-lin span, .vis-res-desc span { flex: none; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vis-res-lin strong { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.vis-res-desc { padding: 12px 0 4px; }
.vis-res-desc p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.vis-rodape-fim { display: flex; }
.vis-rodape-fim .btn { width: 100%; justify-content: center; }
.vis-rodape-fim[hidden] { display: none; }
.vis-card { cursor: pointer; }
/* Cabeçalho da visita: nome e tempo nunca se espremem */
.vis-hero { flex-wrap: wrap; align-items: flex-end; }
.vis-hero-nome { flex: 1 1 180px; min-width: 0; }
.vis-hero .vis-status { flex: 0 0 auto; }
.vis-tempo-leg { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.vis-hero .vis-status { margin-left: auto; }

/* Deslocamento das visitas (saída -> chegada -> visita) */
.dl-card .dl-relogio { margin: 0 0 14px; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); text-align: center; }
.dl-card .vis-novo-icone.dl-andando { background: var(--warn-bg); color: var(--warn); }
.dl-card .vis-novo-icone.dl-ok { background: var(--ok-bg); color: var(--ok); }
.dl-hoje { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line-2); text-align: left; }
.dl-hoje-tit { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dl-hoje-lin { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 4px 0; font-size: 13.5px; }
.dl-hoje-lin span { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2, var(--ink)); }
.dl-hoje-lin strong { font-variant-numeric: tabular-nums; }
.vl-chip.desloc { background: var(--brand-50); color: var(--brand-600); }

/* Linha do dia (deslocamentos + visitas) */
.tl-filtros { margin-bottom: 12px; }
.tl-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tl-jornada { margin: -4px 0 16px; font-size: 13.5px; }
.tl { list-style: none; margin: 0 0 24px; padding: 0 0 0 22px; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); border-radius: 2px; }
.tl-item { position: relative; margin: 0 0 12px; }
.tl-dot { position: absolute; left: -22px; top: 16px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--surface); background: var(--muted); box-shadow: 0 0 0 1px var(--line-2); }
.tl-desloc .tl-dot { background: var(--accent, #66acc5); }
.tl-visita .tl-dot { background: var(--ok); }
.tl-gap .tl-dot { top: 8px; width: 10px; height: 10px; left: -19px; background: var(--line-2); box-shadow: none; }
.tl-corpo { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.tl-gap .tl-corpo { padding: 4px 8px; border: 0; background: transparent; }
.tl-gap-txt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tl-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 4px; }
.tl-hora { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.tl-tit { font-size: 16px; font-weight: 700; }
.tl-tit a { color: inherit; }
.tl-meta { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.tl-meta strong { color: var(--ink); }
.tl-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; }
