:root {
  /* Identidade J7 (mesma dos sites J7 Energia Solar e J7 Carregadores) */
  --bg: #f3f6fa; --surface: #ffffff; --ink: #232a4a; --ink-2: #5d6784; --muted: #8a93ad; --line: #e2e7f0;
  --brand: #1c2240; --brand-2: #255a8a; --navy-2: #2e3558; --blue: #3a78b5; --sky: #9ec0e0;
  --grad: linear-gradient(135deg, #3a78b5 0%, #255a8a 100%);
  --accent: #3a78b5; --accent-ink: #ffffff; --sun: #f5b301;
  --danger: #d64545; --warn: #d98a00; --ok: #1fa855; --info: #255a8a;
  --radius: 18px; --shadow: 0 10px 30px rgba(46,53,88,.10);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { font-size: 15px; line-height: 1.45; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; } .grow { flex: 1; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(37,90,138,.28); transition: filter .15s, transform .15s, box-shadow .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.accent { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(37,90,138,.35); }
.btn.ghost { background: transparent; color: var(--brand-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.dark { background: var(--brand); box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: 0 8px 22px rgba(214,69,69,.25); }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 999px; }
.btn.block { width: 100%; }
.btn.sm:not(.ghost) { box-shadow: 0 4px 12px rgba(37,90,138,.2); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
.field { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--line); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: #dcf5e7; color: #12803f; } .badge.busy { background: #e3eefa; color: #255a8a; }
.badge.warn { background: #fff1d6; color: #9a6200; } .badge.bad { background: #fde2e2; color: #b42318; }
.badge.off { background: #eef1f6; color: #6b7590; }
.alert { padding: 12px 14px; border-radius: 10px; background: #fde2e2; color: #8a1c1c; font-weight: 600; }
.alert.info { background: #eef4fb; color: var(--brand-2); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 12px; z-index: 9999; font-weight: 600; max-width: 90vw; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; }
.logo .bolt { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; overflow: hidden; }
.logo img.j7 { height: 38px; width: auto; display: block; }
.logo picture { display: block; }
@media (max-width: 640px) { header .logo img.j7 { height: 40px; } }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(28,34,64,.45); }
dialog .dlg-body { padding: 20px; max-height: 80vh; overflow: auto; }
dialog .dlg-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
