/* A10N Manutenção — identidade A10N Brasil (azul profundo, areia, Playfair Display + Inter). */

/* ---------- Marca: tokens ---------- */
:root {
  --bg: #F8F6F2; --surface: #FFFFFF; --surface-2: #F1ECE4; --ink: #0B2F3C; --muted: #515B61; --faint: #667077; --line: #DDD5C8;
  --primary: #0F4C5C; --on-primary: #F8F6F2; --primary-soft: #E3ECEE;
  --deep: #092E39; --accent: #2DAFC7; --accent-ink: #1A7186; --accent-soft: #DFF1F5; --water: #79D7E3;
  --sand: #E8D9C5; --wood: #B98B5E; --wood-ink: #815A34; --wood-soft: #F3E8DB;
  --forest: #6F8F72; --forest-ink: #456049; --forest-soft: #E5EDE4;
  --danger: #B91C1C; --danger-ink: #B91C1C; --danger-soft: #F8E4E2;
  --side: linear-gradient(180deg, #092E39 0%, #0F4C5C 45%, #092E39 100%);
  --linha-marca: linear-gradient(90deg, #0F4C5C, #2DAFC7, #79D7E3);
  --shadow: 0 1px 2px rgba(11,47,60,.04), 0 8px 24px -12px rgba(11,47,60,.12);
  --shadow-lg: 0 1px 2px rgba(11,47,60,.06), 0 24px 48px -24px rgba(11,47,60,.25);
  --r-card: 16px; --r-btn: 14px; --r-input: 12px;
  --display: "Playfair Display", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-tema="escuro"] {
  --bg: #071C23; --surface: #0C2A34; --surface-2: #11323D; --ink: #F2EFE9; --muted: #A9BCC2; --faint: #93A6AC; --line: #1D424E;
  --primary: #2DAFC7; --on-primary: #06222A; --primary-soft: #123A47;
  --accent-ink: #79D7E3; --accent-soft: #123A47; --wood-ink: #D9B08A; --wood-soft: #352A1F;
  --forest-ink: #A8C5AB; --forest-soft: #1C3028; --danger: #C93A33; --danger-ink: #F29B94; --danger-soft: #3B1D1F;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-tema="auto"] {
    --bg: #071C23; --surface: #0C2A34; --surface-2: #11323D; --ink: #F2EFE9; --muted: #A9BCC2; --faint: #93A6AC; --line: #1D424E;
    --primary: #2DAFC7; --on-primary: #06222A; --primary-soft: #123A47;
    --accent-ink: #79D7E3; --accent-soft: #123A47; --wood-ink: #D9B08A; --wood-soft: #352A1F;
    --forest-ink: #A8C5AB; --forest-soft: #1C3028; --danger: #C93A33; --danger-ink: #F29B94; --danger-soft: #3B1D1F;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--body); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
h1, h2, .display { font-family: var(--display); font-weight: 500; letter-spacing: -.015em; font-variant-numeric: lining-nums; }
.oculto { display: none !important; }
.oculta-acessivel { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.logo { display: block; height: 24px; width: auto; flex: none; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
h3 { display: flex; align-items: center; gap: 10px; margin: 26px 2px 12px; font: 600 11px/1.4 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
h3::before { content: ""; width: 24px; height: 1px; background: var(--accent); }

/* ---------- Estrutura (celular primeiro) ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.lateral { display: none; }
.topo-m { background: var(--deep); color: #F8F6F2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
.topo-m .marca-m { display: flex; align-items: center; min-height: 40px; }
.topo-m svg.logo { height: 22px; }
.topo-acoes { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topo-m .prop-pill { background: rgba(248,246,242,.08); border-color: rgba(248,246,242,.18); color: #F8F6F2; }
.topo-m .icone-btn { background: rgba(248,246,242,.08); border-color: rgba(248,246,242,.18); color: #F8F6F2; }
.area { padding: 16px 16px 128px; max-width: 1180px; margin: 0 auto; }
.area.estreita { max-width: 760px; }
.area.larga { max-width: 1400px; }

.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.cab-texto { min-width: 0; }
.cabecalho h1 { font-size: 27px; line-height: 1.18; margin-top: 6px; }
.cabecalho p { margin: 4px 0 0; color: var(--muted); }
.cab-acoes { display: none; align-items: center; gap: 10px; flex: none; }
.voltar { display: flex; width: fit-content; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; font-size: 14px; margin-bottom: 8px; padding: 4px 0; }
.voltar:hover { color: var(--ink); }

.prop-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px; font-size: 13px; font-weight: 500; position: relative; min-width: 0; max-width: 220px; }
.prop-pill .nome-prop { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-pill select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.prop-pill select option { color: #0B2F3C; }
.prop-pill:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.prop-pill .ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.passos { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.qr { display: block; margin: 0 auto 10px; background: #fff; padding: 10px; border-radius: var(--r-input); border: 1px solid var(--line); }
.chave { word-break: break-all; user-select: all; }
.login-form .ajuda a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; }
.prop-duas { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.prop-duas button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 11px; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.prop-duas button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.topo-m .prop-duas { background: rgba(248,246,242,.08); border-color: rgba(248,246,242,.18); }
.topo-m .prop-duas button { color: rgba(248,246,242,.8); }
.topo-m .prop-duas button[aria-pressed="true"] { background: #F8F6F2; color: #0B2F3C; }
@media (max-width: 360px) { .prop-duas button { padding: 7px 7px; font-size: 12px; } .topo-m { gap: 8px; } }
.icone-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; }
.icone-btn b { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--water); border: 2px solid var(--deep); }
.cab-acoes .icone-btn b { background: var(--danger); border-color: var(--surface); }

/* ---------- Navegação inferior (celular) ---------- */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; width: min(420px, calc(100% - 20px));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 22px; padding: 6px; box-shadow: var(--shadow-lg); }
.nav a:not(.mais) { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--faint); padding: 7px 2px; border-radius: 16px; }
.nav a.ativa { color: var(--primary); background: var(--primary-soft); }
.nav a.mais { justify-self: center; width: 52px; height: 52px; border-radius: 18px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: 0 12px 28px -12px rgba(45,175,199,.7); }
.nav a.mais svg { width: 26px; height: 26px; stroke-width: 2; }
.nav a:active { transform: scale(.95); }

/* ---------- Resumo e filtros ---------- */
.resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.resumo button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-card); padding: 12px 14px 11px; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s; }
.resumo button:active { transform: scale(.97); }
.resumo b { display: block; font: 500 30px/1.05 var(--display); font-variant-numeric: lining-nums; }
.resumo span { font-size: 12px; color: var(--muted); font-weight: 500; }
.resumo .urg { background: var(--danger); border-color: var(--danger); color: #fff; } .resumo .urg span { color: rgba(255,255,255,.88); }
.resumo .sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.filtros { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtros button { flex: none; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 12px; font-weight: 500; font-size: 13.5px; cursor: pointer; }
.filtros button.ativa { background: var(--primary); color: var(--on-primary); }
.filtros button span { opacity: .78; margin-left: 6px; }

/* ---------- Cartões de chamado ---------- */
.lista { display: grid; gap: 10px; align-content: start; }
.card { display: block; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; box-shadow: var(--shadow);
  animation: sobe .4s both; transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s, border-color .2s; }
.card:active { transform: scale(.99); }
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
.card.sel { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary), var(--shadow-lg); }
@keyframes sobe { from { opacity: 0; transform: translateY(8px); } }
.card .meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.card .meta > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta .num { margin-left: auto; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; color: var(--faint); letter-spacing: .04em; }
.local-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); flex: none; }
.card .tit { font: 500 17.5px/1.32 var(--display); letter-spacing: -.01em; margin: 9px 0 10px; font-variant-numeric: lining-nums; }
.card .rodape { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--sand); color: #0F4C5C; flex: none; letter-spacing: .02em; }
.avatar.ext { background: var(--forest-soft); color: var(--forest-ink); } .avatar.sem { background: transparent; color: var(--faint); border: 1px dashed var(--line); }
.avatar.gr { width: 44px; height: 44px; font-size: 14px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.tag.P1 { background: var(--danger); color: #fff; } .tag.P2 { background: var(--wood-soft); color: var(--wood-ink); }
.tag.P3 { background: var(--accent-soft); color: var(--accent-ink); } .tag.P4, .tag.PREV, .tag.ESP { background: var(--forest-soft); color: var(--forest-ink); }
.tag.bloq { background: var(--ink); color: var(--bg); } .tag.hosp { background: var(--sand); color: #6A4825; }
.status { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.aberto { color: var(--accent-ink); } .status.aceito, .status.em_execucao { color: var(--primary); } .status.aguardando { color: var(--wood-ink); }
.status.resolvido, .status.encerrado { color: var(--forest-ink); } .status.cancelado { color: var(--faint); }
.prazo { margin-top: 12px; }
.prazo .trilho { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.prazo .trilho i { display: block; height: 100%; border-radius: 4px; background: var(--forest); transition: width .6s; }
.prazo.amarelo .trilho i { background: var(--wood); } .prazo.vermelho .trilho i { background: var(--danger); } .prazo.cinza .trilho i { background: var(--faint); }
.prazo .txt { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.prazo .txt span:last-child { text-align: right; }
.prazo:not(.cinza) .txt span:last-child { white-space: nowrap; }
.prazo .txt b { color: var(--ink); font-weight: 600; }
.prazo.vermelho .txt b { color: var(--danger-ink); } .prazo.amarelo .txt b { color: var(--wood-ink); }
.vazio { text-align: center; color: var(--muted); padding: 48px 20px; grid-column: 1 / -1; }
.vazio svg.i { width: 40px; height: 40px; stroke: var(--accent); stroke-width: 1.2; margin-bottom: 8px; }

/* ---------- Detalhe ---------- */
.det { min-width: 0; }
.hero { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 20px 20px; box-shadow: var(--shadow); overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--linha-marca); }
.hero .tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero .tags .status { margin-left: auto; }
.hero h2 { font-size: 26px; line-height: 1.2; margin: 14px 0 8px; }
.hero .onde { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.hero .desc, .hero .solucao { margin: 14px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-input); }
.hero .solucao { background: var(--forest-soft); }
.contagem { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.contagem b { font: 500 38px/1 var(--display); font-variant-numeric: lining-nums; }
.contagem.vermelho b { color: var(--danger-ink); } .contagem.amarelo b { color: var(--wood-ink); }
.dados { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-input); overflow: hidden; margin-top: 16px; }
.dados div { background: var(--surface); padding: 10px 12px; }
.dados small { display: block; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.dados span { font-weight: 500; font-size: 14px; }
.fotos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fotos img { width: 92px; height: 92px; object-fit: cover; border-radius: var(--r-input); display: block; }
.acoes { display: grid; gap: 8px; margin-top: 12px; }
.acoes .linha2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; margin-top: 12px; }
.atalhos button, .atalhos label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); cursor: pointer; transition: border-color .2s; }
.atalhos button:hover, .atalhos label:hover { border-color: var(--accent); }
.atalhos label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.atalhos svg.i { color: var(--primary); }
.tempo { list-style: none; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 16px; }
.tempo li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 9px 0; position: relative; }
.tempo li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 40px; bottom: -8px; width: 1px; background: var(--line); }
.tempo .bola { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); }
.tempo .bola svg.i { width: 14px; height: 14px; }
.tempo .t { font-size: 14px; } .tempo .t b { font-weight: 600; } .tempo .q { color: var(--faint); font-size: 12px; }

/* ---------- Formulários ---------- */
.form-grid, .form-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.secao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.secao > .rot { display: flex; align-items: center; gap: 12px; font: 500 19px/1.3 var(--display); margin-bottom: 14px; }
.secao > .rot .n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 12px var(--body); flex: none; }
label.campo { display: block; margin: 14px 0 6px; font-weight: 500; font-size: 13.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.prop-pill select, .prop-pill select:focus { border: 0; box-shadow: none; padding: 0; }
textarea { min-height: 90px; resize: vertical; }
.ajuda { font-size: 13px; color: var(--muted); }
.busca { position: relative; } .busca svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.busca input[type=text] { padding-left: 40px; }
.locais { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 250px; overflow: auto; padding: 3px; }
.locais .grupo { width: 100%; font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .16em; margin-top: 8px; }
.locais button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.locais button:hover { border-color: var(--accent); }
.locais button.sel { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.toggles { display: grid; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-btn); cursor: pointer; transition: border-color .2s, background .2s; }
.toggle input, .sla-op input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle, .sla-op { position: relative; }
.toggle:focus-within, .sla-op:focus-within, .foto-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); flex: none; }
.toggle b { display: block; font-size: 14.5px; font-weight: 600; } .toggle small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.toggle .chk { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.toggle:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.toggle:has(input:checked) .chk { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.toggle.risco:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.toggle.risco:has(input:checked) .ic, .toggle.risco:has(input:checked) .chk { background: var(--danger); border-color: var(--danger); color: #fff; }
.slas { display: grid; gap: 8px; }
.sla-op { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 12px 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.sla-op b { font-weight: 600; }
.sla-op .tempos { margin-left: auto; flex: none; text-align: right; font-size: 12px; color: var(--muted); line-height: 1.45; font-variant-numeric: tabular-nums; }
.sla-op .tempos b { color: var(--ink); white-space: nowrap; }
.sla-op.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.sug { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--surface); padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.foto-btn { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed var(--wood); border-radius: var(--r-btn); padding: 18px; color: var(--muted); font-weight: 500; cursor: pointer; background: color-mix(in srgb, var(--sand) 18%, transparent); position: relative; }
.foto-prev { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--r-input); margin-top: 10px; display: block; }

/* ---------- Botões ---------- */
.botoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-btn); padding: 12px 18px;
  font-weight: 600; font-size: 14.5px; cursor: pointer; background: var(--primary); color: var(--on-primary); transition: transform .15s, opacity .2s, box-shadow .3s; }
@media (hover: hover) { .btn:hover { box-shadow: 0 12px 28px -14px rgba(45,175,199,.65); } }
.btn:active { transform: scale(.98); }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.alerta { background: var(--danger); color: #fff; }
.btn.largo { width: 100%; font-size: 15.5px; padding: 15px 18px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Painel ---------- */
.grade { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi b { display: block; font: 500 30px/1.15 var(--display); font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
.kpi > span { font-size: 12.5px; color: var(--muted); }
.kpi.alerta b { color: var(--danger-ink); }
.kpi.destaque { background: var(--side); color: #F8F6F2; border-color: transparent; } .kpi.destaque > span { color: var(--water); }
.duas { display: grid; gap: 0 16px; }
.duas > * { min-width: 0; }
.bloco { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; box-shadow: var(--shadow); }
.bloco > p { margin: 0 0 12px; } .bloco > p:last-child { margin: 0; }
.barra-h { display: grid; grid-template-columns: minmax(0, 44%) 1fr 28px; align-items: center; gap: 10px; font-size: 13.5px; margin: 8px 0; }
.barra-h .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-h .trilho { background: var(--surface-2); border-radius: 6px; height: 8px; overflow: hidden; }
.barra-h .trilho i { display: block; height: 100%; border-radius: 6px; background: var(--linha-marca); }
.barra-h b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Itens (avisos, cadastros, equipe) ---------- */
.grade-itens { display: grid; gap: 8px; align-content: start; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn);
  padding: 12px 14px; cursor: pointer; animation: sobe .35s both; transition: border-color .2s, box-shadow .3s; }
@media (hover: hover) { .item:hover { border-color: var(--accent); box-shadow: var(--shadow); } }
.item.fixo { cursor: default; }
.item .tx { flex: 1; min-width: 0; } .item .tx b { display: block; font-weight: 600; font-size: 14.5px; } .item .tx small { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.item .seta { color: var(--faint); } .item.inativo { opacity: .5; }
.item .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); flex: none; }
.aviso-novo { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.nota { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-btn); background: color-mix(in srgb, var(--sand) 45%, transparent); margin: 8px 0 12px; font-size: 13.5px; align-items: flex-start; }
.nota a { font-weight: 600; text-decoration: underline; }
.incluir { width: 100%; margin-bottom: 14px; }
.grade-conta { display: grid; gap: 12px; align-items: start; }
.grade-conta > * { min-width: 0; }
.grade-conta h3 { margin-top: 12px; }
.segmentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface-2); border-radius: var(--r-btn); padding: 4px; }
.segmentos button { border: 0; background: transparent; border-radius: 11px; padding: 9px 6px; font-weight: 500; font-size: 13px; cursor: pointer; color: var(--muted); }
.segmentos button.ativa { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Janelas e avisos flutuantes ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(9,46,57,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); animation: folha .3s cubic-bezier(.22,1,.36,1) both; }
.modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 16px; }
.modal h3 { display: block; font: 500 23px/1.25 var(--display); letter-spacing: -.015em; text-transform: none; color: var(--ink); margin: 0 0 8px; }
.modal h3::before { display: none; }
@keyframes folha { from { transform: translateY(32px); opacity: 0; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top)); z-index: 60; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: var(--r-btn); font-size: 14px; font-weight: 500; width: max-content; max-width: min(92vw, 460px); box-shadow: var(--shadow-lg); animation: toast .35s cubic-bezier(.22,1,.36,1) both; }
@keyframes toast { from { transform: translate(-50%, -12px); opacity: 0; } }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 100dvh; }
.login-capa { position: relative; overflow: hidden; background: var(--side); color: #F8F6F2; padding: calc(28px + env(safe-area-inset-top)) 24px 72px; display: flex; flex-direction: column; gap: 32px; }
.login-capa svg.logo { height: 34px; align-self: flex-start; }
.login-capa .eyebrow { color: var(--water); }
.login-capa h1 { font-size: 31px; line-height: 1.16; margin: 14px 0 10px; max-width: 14em; }
.login-capa p { margin: 0; color: rgba(248,246,242,.76); max-width: 34em; }
.login-capa .capa-pe { display: none; position: relative; z-index: 1; font-size: 12px; letter-spacing: .06em; color: rgba(248,246,242,.6); }
.login-capa .capa-texto { position: relative; z-index: 1; }
.mar { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; pointer-events: none; fill: none; stroke: #79D7E3; stroke-width: 1; }
.login-form { padding: 24px 22px 48px; width: 100%; max-width: 460px; margin: 0 auto; }
.login-form h2 { font-size: 26px; margin-bottom: 4px; }
.pessoas { display: grid; gap: 8px; }
.pessoa { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); cursor: pointer; text-align: left; min-width: 0; }
.pessoa:hover { border-color: var(--accent); }
.pessoa .avatar { width: 36px; height: 36px; font-size: 12.5px; }
.pessoa b { display: block; font-weight: 600; font-size: 14px; } .pessoa small { display: block; color: var(--muted); font-size: 12px; }
.erro-login { color: var(--danger-ink); font-weight: 600; font-size: 14px; margin: 10px 0 0; }

.fila-offline { background: var(--wood); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 7px; }
.demo-barra { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 7px 12px; font-size: 12px; background: #2F3437; color: #F8F6F2; }
.demo-barra b { letter-spacing: .14em; font-size: 10px; background: var(--wood); color: #fff; padding: 2px 8px; border-radius: 999px; }
.demo-barra button { display: inline-flex; align-items: center; gap: 4px; background: rgba(248,246,242,.12); color: #F8F6F2; border: 0; border-radius: 8px; padding: 5px 9px; font-size: 11.5px; font-weight: 500; cursor: pointer; }
.demo-barra svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ================= TABLET (720px ou mais) ================= */
@media (min-width: 600px) {
  .modal-fundo { align-items: center; padding: 24px; }
  .modal { border-radius: 20px; padding-bottom: 24px; }
  .modal::before { display: none; }
  .modal { padding-top: 24px; }
  .pessoas { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 719px) {
  .area.home > .cabecalho { background: var(--deep); color: #F8F6F2; margin: -16px -16px 0; padding: 6px 20px 56px; }
  .area.home > .cabecalho .eyebrow { color: var(--water); }
  .area.home > .cabecalho p { color: rgba(248,246,242,.74); }
  .area.home .bloco-lista > .resumo { margin-top: -40px; position: relative; }
  .area.home .resumo button:not(.urg) { background: var(--surface); }
}
@media (min-width: 720px) {
  .shell { display: grid; grid-template-columns: 92px minmax(0, 1fr); }
  .coluna { min-width: 0; }
  .topo-m, .nav { display: none; }
  .lateral { display: flex; flex-direction: column; align-items: center; gap: 14px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
    background: var(--side); color: #F8F6F2; padding: calc(22px + env(safe-area-inset-top)) 10px calc(18px + env(safe-area-inset-bottom)); }
  .lateral .marca { display: grid; justify-items: center; gap: 6px; padding-bottom: 8px; }
  .lateral .marca svg.logo { height: 20px; stroke-width: 1.8; }
  .lateral .marca span { display: none; }
  .lateral .novo-lateral { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-btn); background: var(--accent); color: #062A33; flex: none; }
  .lateral .novo-lateral span { display: none; }
  .lateral .novo-lateral svg.i { width: 24px; height: 24px; stroke-width: 2; }
  .lateral nav { display: grid; gap: 4px; width: 100%; }
  .lateral nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 14px; font-size: 10.5px; font-weight: 500; color: rgba(248,246,242,.66); transition: background .2s, color .2s; }
  .lateral nav a:hover { color: #F8F6F2; background: rgba(248,246,242,.06); }
  .lateral nav a.ativa { color: #F8F6F2; background: rgba(121,215,227,.16); }
  .lateral nav a.ativa svg.i { color: var(--water); }
  .lateral .ponto-novo { position: absolute; top: 8px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--water); }
  .lateral .quem { margin-top: auto; display: flex; align-items: center; gap: 10px; }
  .lateral .quem > span:last-child { display: none; }
  .area { padding: 30px 28px 56px; }
  .cabecalho { margin-bottom: 22px; }
  .cabecalho h1 { font-size: 34px; }
  .cab-acoes { display: flex; }
  .lista, .grade-itens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estreita .grade-itens { grid-template-columns: minmax(0, 1fr); }
  .resumo { gap: 14px; }
  .resumo button { padding: 16px 20px; }
  .grade { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .dados { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 28px; }
  .hero h2 { font-size: 30px; }
  .incluir { width: auto; min-width: 220px; }
  .grade-conta { grid-template-columns: 1fr 1fr; gap: 20px; }
  /* Barra da demonstração vira um quadro flutuante */
  .demo-barra { position: fixed; right: 16px; bottom: 16px; z-index: 40; border-radius: var(--r-btn); box-shadow: var(--shadow-lg); }
  .demo-barra span { display: none; }
}
@media (min-width: 960px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .duas { grid-template-columns: 1fr 1fr; }
  .login { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-content: stretch; }
  .login-capa { justify-content: space-between; padding: 56px 56px 120px; }
  .login-capa svg.logo { height: 46px; }
  .login-capa h1 { font-size: 46px; }
  .login-capa p { font-size: 17px; }
  .login-capa .capa-pe { display: block; position: absolute; left: 56px; bottom: 34px; }
  .mar { height: 200px; opacity: .8; }
  .login-form { align-self: center; padding: 40px; }
}

/* ================= DESKTOP (1100px ou mais) ================= */
@media (min-width: 1100px) {
  .shell { grid-template-columns: 252px minmax(0, 1fr); }
  .lateral { align-items: stretch; padding: 30px 18px 20px; gap: 18px; }
  .lateral .marca { justify-items: start; padding: 0 10px 12px; gap: 12px; }
  .lateral .marca svg.logo { height: 32px; stroke-width: 1.4; }
  .lateral .marca span { display: inline-flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--water); }
  .lateral .marca span::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
  .lateral .novo-lateral { display: flex; justify-content: center; gap: 8px; width: 100%; height: 48px; font-weight: 600; }
  .lateral .novo-lateral span { display: inline; }
  .lateral .novo-lateral svg.i { width: 20px; height: 20px; }
  .lateral nav a { flex-direction: row; gap: 12px; padding: 11px 14px; font-size: 14px; }
  .lateral .ponto-novo { top: 50%; margin-top: -4px; right: 14px; }
  .lateral .quem { padding: 14px 8px 0; border-top: 1px solid rgba(248,246,242,.14); }
  .lateral .quem > span:last-child { display: block; min-width: 0; }
  .lateral .quem b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lateral .quem small { display: block; font-size: 11.5px; color: rgba(248,246,242,.62); }
  .area { padding: 34px 40px 64px; }
  .area > .grade-itens, .grade-itens.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .area.estreita > .grade-itens { grid-template-columns: minmax(0, 1fr); }
  /* Lista à esquerda, chamado aberto à direita */
  .split { display: grid; grid-template-columns: minmax(370px, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .col-lista { position: sticky; top: 16px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 3px 8px 24px 3px; scrollbar-width: thin; min-width: 0; }
  .col-lista .lista { grid-template-columns: minmax(0, 1fr); }
  .col-lista .resumo { gap: 8px; }
  .col-lista .resumo button { padding: 11px 12px; }
  .col-lista .filtros { gap: 2px; }
  .col-lista .filtros button { padding: 7px 9px; font-size: 12.5px; }
  .col-lista .filtros button span { margin-left: 4px; }
  .locais { max-height: 360px; }
  .col-detalhe { min-width: 0; max-width: 820px; }
  .col-detalhe .dados { grid-template-columns: repeat(2, 1fr); }
  .col-detalhe > .vazio { border: 1px dashed var(--line); border-radius: var(--r-card); }
}
@media (min-width: 1500px) { .col-detalhe .dados { grid-template-columns: repeat(4, 1fr); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
