/* Administração / Área do Inquilino — no estilo da Intranet CD (barra lateral, cartões, tabelas compactas) */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --line: #e3e8ef; --line-2: #eef2f6;
  --text: #16212e; --text-2: #4a5768; --muted: #7b8796;
  --brand: #14365c; --brand-2: #1e4e82; --brand-ink: #ffffff; --accent: #0e8a7e;
  --side: #102a47; --side-2: #173a60; --side-text: #c9d6e6;
  --good: #137a4b; --good-bg: #e5f5ec; --warn: #9a5b00; --warn-bg: #fdf1dc; --bad: #b42323; --bad-bg: #fbe7e7;
  --info: #1e4e82; --info-bg: #e6eef8; --mute-bg: #eef1f5;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,42,71,.06), 0 2px 8px rgba(16,42,71,.04);
  /* nomes antigos usados nas páginas */
  --ink: var(--text); --chip: var(--mute-bg); --ok: var(--good); --erro: var(--bad); --safira: var(--brand); --safira-2: var(--brand-2); --ocre: #c4862a; --band: var(--side);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1520; --surface: #131e2b; --surface-2: #172434; --line: #243446; --line-2: #1d2b3b;
    --text: #e6edf5; --text-2: #b4c1d0; --muted: #8494a6; --brand: #3d7bc4; --brand-2: #5b93d6; --accent: #2fb5a6;
    --side: #0a121c; --side-2: #142233; --side-text: #b3c3d6;
    --good: #57c98f; --good-bg: #13301f; --warn: #f0b456; --warn-bg: #352610; --bad: #f07a7a; --bad-bg: #3a1717;
    --info: #8bb8ec; --info-bg: #15283f; --mute-bg: #1c2938; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1520; --surface: #131e2b; --surface-2: #172434; --line: #243446; --line-2: #1d2b3b;
  --text: #e6edf5; --text-2: #b4c1d0; --muted: #8494a6; --brand: #3d7bc4; --brand-2: #5b93d6; --accent: #2fb5a6;
  --side: #0a121c; --side-2: #142233; --side-text: #b3c3d6;
  --good: #57c98f; --good-bg: #13301f; --warn: #f0b456; --warn-bg: #352610; --bad: #f07a7a; --bad-bg: #3a1717;
  --info: #8bb8ec; --info-bg: #15283f; --mute-bg: #1c2938; --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sub { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }

/* ---------- Estrutura ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex: 0 0 auto; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); text-decoration: none !important; }
.brand .logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2a6cb3, var(--accent)); display: grid; place-items: center; flex: none; }
.brand .logo svg { width: 24px; height: 24px; }
.brand b { display: block; font-size: 15px; font-weight: 650; }
.brand small { display: block; font-size: 12px; opacity: .65; }
.side nav { padding: 12px; flex: 1; overflow-y: auto; }
.nav { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--side-text); margin-bottom: 2px; text-decoration: none !important; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav:hover { background: var(--side-2); color: #fff; }
.nav.on { background: var(--side-2); color: #fff; font-weight: 600; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 16px 12px 6px; }
.me { display: flex; gap: 10px; align-items: center; padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--side-2); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.me-txt { flex: 1; min-width: 0; }
.me-txt b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt small { font-size: 12px; opacity: .7; }
.side .icon-btn { color: var(--side-text); }
.side .icon-btn:hover { background: var(--side-2); color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 20px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; padding-right: 12px; border-right: 1px solid var(--line); }
.today svg { width: 15px; height: 15px; }

.content { padding: 24px 28px; flex: 1; max-width: 1480px; width: 100%; display: grid; gap: 18px; align-content: start; }
.foot { padding: 14px 28px 20px; color: var(--muted); font-size: 12px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--mute-bg); }
.icon-btn.menu-btn { display: none; }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .shell.menu-aberto .side { transform: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .top { padding: 12px 16px; }
  .today { display: none; }
  .content { padding: 16px; }
}

/* ---------- Cabeçalho de página ---------- */
.titulo-pg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.content > .titulo-pg h1 { display: none; }
.titulo-pg h2 { font-size: 15px; }
.titulo-pg p { margin: 0; color: var(--muted); font-size: 13px; }
.crumbs { font-size: 13px; color: var(--muted); }

/* ---------- Cartões ---------- */
.cartao, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.cartao h2, .card-h h2 { font-size: 15px; margin-bottom: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2 { margin: 0; }
.colunas { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .colunas { grid-template-columns: 1fr; } }
.resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.resumo > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; }
.resumo b { display: block; font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.resumo span { color: var(--muted); font-size: 12.5px; }
.vazio { text-align: center; padding: 30px 10px; color: var(--muted); }

/* ---------- Botões ---------- */
.btn { display: inline-flex; gap: 6px; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; }
.btn.sec, .btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.sec:hover, .btn.ghost:hover { background: var(--mute-bg); filter: none; }
.btn.perigo { background: transparent; border-color: var(--line); color: var(--bad); }
.btn.perigo:hover { background: var(--bad-bg); filter: none; }
.btn.peq, .btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acoes form { margin: 0; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 6px; }
.form label, .fld > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-top: 6px; }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea,
.fld input, .fld select, .fld textarea,
.inline input, .inline select, .tab-energia input, .tab-energia select, .filters input, .filters select {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; padding: 0 10px;
}
.form textarea, .fld textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; }
.form select[multiple], .fld select[multiple] { height: auto; padding: 6px; }
.form input[type=file], .fld input[type=file] { font: inherit; font-size: 13px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; width: 100%; background: var(--surface-2); color: var(--text-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2) !important; box-shadow: 0 0 0 3px var(--info-bg); }
.form .btn { margin-top: 12px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input, .inline select { width: auto; height: 34px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2 > div { display: grid; gap: 6px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.grid-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.form-sec { grid-column: 1 / -1; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.form-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { margin: 0; }
.fld.wide { grid-column: span 2; }
.fld.full { grid-column: 1 / -1; }
.fld small { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
@media (max-width: 980px) { .grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-form { grid-template-columns: 1fr; } .fld.wide { grid-column: auto; } }
.form-card { max-width: 1040px; }

.aviso { margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--info-bg); color: var(--info); font-weight: 500; }
.aviso.ok { background: var(--good-bg); color: var(--good); }
.aviso.erro { background: var(--bad-bg); color: var(--bad); }

/* ---------- Filtros, abas, segmentos ---------- */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters .spacer { flex: 1; }
.search { display: flex; align-items: center; position: relative; flex: 1 1 260px; max-width: 380px; }
.search svg { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); }
.search input { height: 36px; padding-left: 34px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.tab .badge { margin-left: 4px; }
.filtros { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; align-items: center; }
.filtros a { padding: 5px 12px; border-radius: 6px; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none !important; }
.filtros a.ativo { background: var(--brand); color: var(--brand-ink); }
.filtros form { margin-left: 6px; }

/* ---------- Tabelas ---------- */
.tabela-wrap, .tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td.acts { white-space: nowrap; text-align: right; width: 1%; }
.link-nome { font-weight: 600; color: var(--brand-2); }

/* ---------- Selos ---------- */
.tag, .badge { display: inline-flex; gap: 4px; align-items: baseline; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mute-bg); color: var(--text-2); white-space: nowrap; }
.tag.ok, .badge.good { background: var(--good-bg); color: var(--good); }
.tag.off, .badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.mute { background: var(--mute-bg); color: var(--muted); }

/* ---------- Listas de documentos ---------- */
.docs { list-style: none; margin: 0; padding: 0; display: grid; }
.doc { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.doc:first-child { border-top: 0; }
.doc .ico { width: 38px; height: 44px; border-radius: 6px; background: var(--info-bg); display: grid; place-items: center; font: 700 10.5px/1 inherit; letter-spacing: .04em; color: var(--info); text-transform: uppercase; }
.doc b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.doc small { color: var(--muted); font-size: 12px; }
.doc .novo { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.doc .acoes { justify-content: flex-end; }
.grupo-doc { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 2px; }
.grupo-doc:first-of-type { margin-top: 0; }
@media (max-width: 600px) { .doc { grid-template-columns: 38px minmax(0, 1fr); } .doc > .btn, .doc .acoes { grid-column: 2; justify-content: flex-start; } }
.dados { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.dados dt { color: var(--muted); font-size: 12.5px; }
.dados dd { margin: 0; font-weight: 600; }

/* ---------- Energia ---------- */
.tab-energia input, .tab-energia select { width: auto; height: 32px; padding: 0 8px; }
.tab-energia tr.erro td { background: var(--bad-bg); }
.inline input[type=month], .inline input[type=date] { width: auto; }

/* ---------- Login ---------- */
.tela-login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); background-color: var(--side); background-size: cover; background-position: center; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: grid; gap: 12px; }
.login-card .marca { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--text); }
.login-card .marca svg { width: 34px; height: 34px; }
.login-card .marca b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.login-card .marca small { display: block; font-size: 12px; color: var(--muted); }
.login-card h1 { font-size: 20px; margin-top: 8px; }
.login-card .sub { color: var(--muted); margin: 0; font-size: 13px; }
.login-card .rodape { font-size: 12.5px; color: var(--muted); }
.login-card .btn { width: 100%; }

/* Lembretes por e-mail */
.alerta-tiles > a, .alerta-tiles > div { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 18px; border-left: 3px solid var(--brand-2); color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.alerta-tiles > a:hover { border-color: var(--brand); filter: brightness(1.02); }
.alerta-tiles > a.warn { border-left-color: var(--warn); }
.alerta-tiles > a.warn b { color: var(--warn); }
.alerta-tiles > a.off { border-left-color: var(--line); }
.alerta-tiles > a.off b { color: var(--muted); }
.alerta-tiles .t { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--text-2) !important; font-size: 13px !important; }
.alerta-tiles .t svg { width: 16px; height: 16px; }
details.regra { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
details.regra > summary { cursor: pointer; font-weight: 600; color: var(--brand-2); list-style: revert; }
.fld.check > span { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.fld.check input { width: auto; height: auto; }

/* Área de arrastar e soltar arquivos */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2, var(--bg)); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--brand-2); }
.dropzone.sobre { border-color: var(--accent); background: var(--good-bg); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; bottom: 8px; left: 50%; }
.dropzone .dz-ico svg { width: 26px; height: 26px; color: var(--brand-2); }
.dropzone b { font-size: 14px; color: var(--text); }
.dropzone small { color: var(--muted); font-size: 12.5px; }
.dz-lista { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.dz-lista:empty { display: none; }
.dz-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.dz-lista li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-lista li.erro { border-color: var(--bad); }
.dz-lista li.erro small { color: var(--bad); }
.dz-lista button { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.dz-lista button:hover { color: var(--bad); }

/* Inquilinos e contratos: linhas ativas (verde) e inativas (laranja) */
:root { --orange: #e8790c; --orange-bg: #fff1e3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --orange: #ff9d3d; --orange-bg: #3a250f; } }
:root[data-theme="dark"] { --orange: #ff9d3d; --orange-bg: #3a250f; }
.tab-contratos tr.linha-ativa td, .tab-unidades tr.linha-ativa td { background: var(--good-bg); }
.tab-contratos tr.linha-ativa td:first-child, .tab-unidades tr.linha-ativa td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.tab-contratos tr.linha-inativa td { background: transparent; padding-top: 8px; padding-bottom: 8px; }
.tab-contratos tr.linha-inativa td:first-child, .tab-unidades tr.linha-inativa td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.un-inativa { display: inline-block; min-width: 54px; text-align: center; padding: 4px 12px; border-radius: 6px; background: var(--orange); color: #fff !important; font-weight: 700; text-decoration: none !important; letter-spacing: .02em; }
.un-inativa:hover { filter: brightness(1.08); }
.legenda { margin: 12px 0 0; font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legenda .lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-left: 6px; }
.legenda .lg.verde { background: var(--good-bg); box-shadow: inset 3px 0 0 var(--good); }
.legenda .lg.laranja { background: var(--orange); }
.painel-contratos { margin-bottom: 4px; }
.painel-contratos > a, .painel-contratos > div { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 18px; border-left: 4px solid var(--brand-2); color: inherit; text-decoration: none !important; display: flex; flex-direction: column; gap: 2px; }
.painel-contratos .t { font-weight: 600; color: var(--text-2) !important; font-size: 13px !important; }
.painel-contratos > .ok { border-left-color: var(--good); }
.painel-contratos > .ok b { color: var(--good); }
.painel-contratos > .alerta { border-left-color: var(--orange); }
.painel-contratos > .alerta b { color: var(--orange); }
.painel-contratos > a:hover { filter: brightness(1.03); }

.tab-unidades td { vertical-align: middle; }
.un-ativa { display: inline-block; min-width: 54px; text-align: center; padding: 4px 12px; border-radius: 6px; background: var(--good); color: #fff; font-weight: 700; }
.seg-ativo { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg-ativo label { margin: 0; cursor: pointer; }
.seg-ativo input { position: absolute; opacity: 0; pointer-events: none; }
.seg-ativo span { display: block; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg-ativo label + label span { border-left: 1px solid var(--line); }
.seg-ativo input:checked + span { color: #fff; background: var(--good); }
.seg-ativo label + label input:checked + span { background: var(--orange); }
.seg-ativo input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.painel-contratos > div.ok { border-left-color: var(--good); } .painel-contratos > div.ok b { color: var(--good); }
.painel-contratos > div.alerta { border-left-color: var(--orange); } .painel-contratos > div.alerta b { color: var(--orange); }

/* Energia: conta da concessionária e totais */
.conta-anexa { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; }
.conta-anexa .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--info-bg); color: var(--info); font-weight: 700; font-size: 12px; }
.dz-compacta { padding: 14px 16px; }
.totais-conta { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 0 14px; padding: 12px 14px; background: var(--mute-bg); border-radius: 8px; }
.foto-up { display: inline; }
.foto-up label { cursor: pointer; }
.totais-conta .tc-tit { grid-column: 1 / -1; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.totais-conta .fld > span select, .totais-conta .desc-inline { height: 26px; padding: 0 6px; font-size: 12.5px; width: auto; display: inline-block; }
.totais-conta .desc-inline { width: 190px; }
.conta-obrig input[type=file] { border: 2px dashed var(--warn); background: var(--warn-bg); padding: 8px; border-radius: 8px; }
.totais-conta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.totais-conta .full-row { grid-column: 1 / -1; }
@media (max-width: 900px) { .totais-conta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foto-cel > label, .foto-cel > a { display: inline-flex; vertical-align: middle; margin-right: 4px; }
.foto-cel label { cursor: pointer; }
.foto-min img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); display: block; }
#f-leituras .tab-energia th, #f-leituras .tab-energia td { padding: 7px 5px; font-size: 12.5px; }
#f-leituras .tab-energia th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
#f-leituras .tab-energia input[inputmode] { width: 82px; min-width: 0; padding: 0 7px; height: 32px; }
#f-leituras .tab-energia .btn.peq { padding: 0 8px; height: 28px; font-size: 12px; }
#f-leituras .tab-energia .btn.peq svg { width: 13px; height: 13px; }
.boleto-cel { min-width: 250px; }
.boleto-cel > form.foto-up, .boleto-cel > a { display: inline-flex; vertical-align: middle; margin: 0 4px 4px 0; }
.linha-dig { display: flex; gap: 4px; }
.linha-dig input { height: 28px; font-size: 12px; padding: 0 6px; flex: 1; min-width: 150px; }
.energia-painel .card-h h2 { display: flex; gap: 8px; align-items: center; }
.energia-painel .card-h h2 svg { width: 18px; height: 18px; color: var(--warn); }
.energia-painel .acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.en-resumo > div { box-shadow: none; background: var(--mute-bg); border: 0; border-left: 3px solid var(--brand-2); }
.en-resumo > div.ok { border-left-color: var(--good); } .en-resumo > div.ok b { color: var(--good); }
.en-resumo > div.alerta { border-left-color: var(--orange, #e8790c); } .en-resumo > div.alerta b { color: var(--orange, #e8790c); }
.en-resumo { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (min-width: 1100px) { .en-resumo { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
