/* ==========================================================================
   Sistema UP — Soluções em Crédito
   Estilos da versão web (Fase 1)
   ========================================================================== */

@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-display: swap; src: url('fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --brand: #e07020;
  --brand-strong: #c95f12;
  --brand-soft: rgba(224, 112, 32, .14);

  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --surface-3: #262b36;
  --border: #2a2f3b;
  --border-strong: #394050;
  --text: #e8eaef;
  --text-dim: #a7adbb;
  --text-muted: #737b8c;

  --green: #2fb36d;  --green-soft: rgba(47,179,109,.14);
  --red: #e5484d;    --red-soft: rgba(229,72,77,.14);
  --amber: #e8a33d;  --amber-soft: rgba(232,163,61,.15);
  --blue: #4c8df6;   --blue-soft: rgba(76,141,246,.15);
  --purple: #9b6cf0; --purple-soft: rgba(155,108,240,.15);
  --gray-soft: rgba(167,173,187,.13);

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --sidebar-w: 236px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceef2;
  --border: #e2e5eb;
  --border-strong: #cfd4dd;
  --text: #1b1f27;
  --text-dim: #4d5565;
  --text-muted: #7c8495;
  --brand-soft: rgba(224, 112, 32, .11);
  --shadow: 0 10px 30px rgba(20,25,40,.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- Tela de carregamento / login ---------- */
.boot {
  min-height: 100vh; display: grid; place-items: center; color: var(--text-muted);
}
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(224,112,32,.18), transparent 60%),
    radial-gradient(700px 400px at 110% 110%, rgba(224,112,32,.10), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 17px; letter-spacing: -.5px;
}
img.logo-mark { display: block; object-fit: cover; background: var(--brand); }
.login-brand-img { justify-content: center; }
.login-brand-img img { width: 150px; height: 150px; border-radius: 22px; display: block; }
.login-brand h1 { font-size: 18px; margin: 0; letter-spacing: -.2px; }
.login-brand p { margin: 1px 0 0; color: var(--text-muted); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.login-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.login-card .sub { color: var(--text-muted); margin: 0 0 20px; font-size: 13px; }
.login-foot { margin-top: 16px; display: flex; justify-content: space-between; font-size: 13px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px; z-index: 30;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side-brand .logo-mark { width: 34px; height: 34px; font-size: 15px; border-radius: 9px; }
.side-brand b { display: block; font-size: 14.5px; letter-spacing: -.2px; }
.side-brand small { display: block; color: var(--text-muted); font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; }
.nav-sec { color: var(--text-muted); font-size: 10.5px; letter-spacing: .9px; text-transform: uppercase; padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-dim);
  cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.nav-item .ic { opacity: .9; }
.side-foot { margin-top: auto; padding: 10px 8px 0; color: var(--text-muted); font-size: 11px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: -.2px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid;
  place-items: center; font-weight: 600; font-size: 12px; flex: none;
}
.user-chip small { color: var(--text-muted); display: block; font-size: 11px; line-height: 1.1; }
.loja-select { max-width: 240px; }
.content { padding: 22px 24px 48px; max-width: 1400px; width: 100%; }

/* ---------- Componentes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-danger { background: var(--red-soft); border-color: transparent; color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-ghost { background: none; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 34px; padding: 0; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.field label .req { color: var(--brand); }
.input, select.input, textarea.input {
  height: 38px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  outline: none; width: 100%; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input[readonly] { color: var(--text-dim); }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-icon .input { padding-left: 36px; }
.hint { font-size: 12px; color: var(--text-muted); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-body { padding: 16px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar select.input { width: auto; min-width: 150px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi .lbl { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.kpi .lbl .dot { width: 8px; height: 8px; border-radius: 50%; }
.kpi .val { font-size: 22px; font-weight: 600; margin-top: 6px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* Tabela */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--text-muted); font-size: 12px; padding: 10px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .acts { text-align: right; white-space: nowrap; width: 1%; }
.cell-main { font-weight: 500; }
.cell-sub { color: var(--text-muted); font-size: 12px; }
.empty { text-align: center; padding: 44px 16px; color: var(--text-muted); }
.empty .ic { width: 34px; height: 34px; opacity: .5; display: block; margin: 0 auto 8px; }
.pager > span:last-child { display: flex; gap: 6px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12.5px; }

/* Selos (badges) */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; letter-spacing: .2px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-purple { background: var(--purple-soft); color: var(--purple); }
.b-gray { background: var(--gray-soft); color: var(--text-dim); }
.b-brand { background: var(--brand-soft); color: var(--brand); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-dim); font-size: 11.5px; font-weight: 500; }

/* Resumo por situação */
.resumo { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.resumo .item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.resumo .item.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.resumo .item .n { font-size: 18px; font-weight: 600; }
.resumo .item .v { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Painel lateral (gaveta) e modal */
.overlay { position: fixed; inset: 0; background: rgba(5,7,12,.55); z-index: 60; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--surface);
  border-left: 1px solid var(--border); z-index: 61; display: flex; flex-direction: column;
  animation: slidein .18s ease; box-shadow: var(--shadow);
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-head .sub { color: var(--text-muted); font-size: 12.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.drawer-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.drawer-foot .spacer { flex: 1; }
.tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  border: 0; background: none; padding: 11px 12px; color: var(--text-dim); cursor: pointer; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.sec-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; margin: 20px 0 10px; }
.sec-title:first-child { margin-top: 0; }

.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(460px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; z-index: 71; box-shadow: var(--shadow);
  animation: pop .15s ease;
}
.modal.wide { width: min(620px, calc(100vw - 32px)); }
@keyframes pop { from { transform: translate(-50%,-48%); opacity: 0; } }
.modal-head { padding: 16px 18px 0; }
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-body { padding: 12px 18px 18px; color: var(--text-dim); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 18px 16px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.modal { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-body { overflow-y: auto; }
.modal-head, .modal-foot { flex-shrink: 0; }
.modal.xwide { width: min(1100px, calc(100vw - 32px)); }
.modal-foot { align-items: center; }
/* Sininho de alertas */
.sino-btn { position: relative; }
.sino-badge { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; pointer-events: none; }
.sino-painel { position: fixed; z-index: 60; width: min(360px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; animation: pop .12s ease; }
.sino-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.sino-head .ic { color: #e5484d; }
.sino-corpo { max-height: 60vh; overflow-y: auto; }
.sino-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.sino-item:last-child { border-bottom: 0; }
.sino-item:hover { background: var(--surface-2); }
.sino-av { width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.sino-txt { flex: 1; min-width: 0; }
.sino-txt b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sino-txt small { color: var(--text-muted); font-size: 12px; }
.sino-n { min-width: 24px; padding: 2px 7px; border-radius: 10px; background: rgba(229,72,77,.15); color: #e5484d; font-size: 12px; font-weight: 700; text-align: center; }
.overlay.top { z-index: 70; }

/* Avisos */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert-info { background: var(--blue-soft); color: var(--blue); }
.alert-ok { background: var(--green-soft); color: var(--green); }
.alert-warn { background: var(--amber-soft); color: var(--amber); }
.alert-err { background: var(--red-soft); color: var(--red); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 11px 14px; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: pop2 .18s ease; font-size: 13.5px;
}
.toast.ok .ic { color: var(--green); }
.toast.err .ic { color: var(--red); }
@keyframes pop2 { from { transform: translateY(8px); opacity: 0; } }

/* Linha do tempo (histórico) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 8.5px; top: 17px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--text-muted); font-size: 12px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }

.list-rows .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--surface-2); }
.list-rows .row .grow { flex: 1; min-width: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .resumo { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .table-wrap .tbl { min-width: 760px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .content { padding: 16px 16px 40px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .user-chip .who { display: none; }
  .loja-select { max-width: 160px; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4, .kpis { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .resumo { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kv { grid-template-columns: 1fr; }
}

/* ===== Contratos no formato do Ecorban (cards) ===== */
.ec-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; }
.ec-filtros { border-color: var(--blue); color: var(--blue); }
.ec-per { font-size: 12px; opacity: .85; }
.ec-ib.on { border-color: var(--brand); color: var(--brand); }
.ec-card { margin-bottom: 12px; overflow: hidden; }
.ec-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ec-mais { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--text-muted); display: grid; place-items: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.ec-mais:hover { color: var(--brand); border-color: var(--brand); }
.ec-nome { font-size: 15px; cursor: pointer; }
.ec-nome:hover { color: var(--brand); }
.ec-banco { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 700; }
.ec-valor { font-size: 14.5px; }
.ec-acao { width: 30px; height: 30px; color: var(--blue); }
.ec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px 14px; padding: 12px 14px; }
.ec-rot { font-size: 11.5px; color: var(--text-muted); }
.ec-val { font-size: 13.5px; word-break: break-word; }
.ec-rodape { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 14px; background: var(--surface-2); font-size: 12px; }
.ec-rodape .ic { vertical-align: -2px; }
.ec-det { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; padding: 14px; background: var(--surface-2); border-top: 1px solid var(--border); }
.ec-ftit { font-size: 11px; letter-spacing: .6px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ec-lin { font-size: 13px; margin-bottom: 3px; }
.ec-menu { position: fixed; z-index: 65; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 0; animation: pop .12s ease; }
.ec-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px; background: none; border: 0; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.ec-menu button:hover { background: var(--surface-2); }
.ec-menu button.perigo { color: var(--red); }
.ec-sep { height: 1px; background: var(--border); margin: 4px 0; }
.ec-pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 6px 0 18px; font-size: 13px; }
.ec-tots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ec-tot { border: 1px solid var(--border); border-left: 3px solid; border-radius: 10px; padding: 10px 12px; }
.ec-fbloco { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.ec-modo.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
@media (max-width: 860px) { .ec-det { grid-template-columns: 1fr; } .ec-det > div[style] { grid-column: auto !important; } .ec-tots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
