:root {
  --bg: #0a1120;
  --bg-2: #0d1628;
  --panel: #111c31;
  --panel-2: #15223b;
  --panel-3: #1a2a47;
  --line: rgba(148, 178, 220, 0.11);
  --line-2: rgba(148, 178, 220, 0.2);
  --text: #e7eef8;
  --muted: #93a6c2;
  --dim: #63779a;
  --accent: #4da3ff;
  --accent-2: #2b7de0;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.12);
  --violet: #a78bfa;
  --radius: 14px;
  --font: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.ti { line-height: 1; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #0f1a2f 0%, #0b1324 100%);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 16px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: 0.3px; }
.brand-sub { font-size: 11px; color: var(--dim); }

.company-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 20px; }
.company-box label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--dim); font-weight: 700; display: block; margin-bottom: 6px; }
.company-box .company-name { font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.company-box select { width: 100%; }

.nav-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--dim); font-weight: 700; padding: 0 10px; margin: 6px 0 8px; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-bottom: 18px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13.5px;
  transition: background .15s, color .15s;
}
.nav a .ti { font-size: 19px; }
.nav a:hover { background: rgba(148, 178, 220, 0.06); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.nav a .count { margin-left: auto; font-size: 11px; background: var(--panel-3); color: var(--muted); padding: 1px 8px; border-radius: 20px; }

.user-box { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, var(--accent)); color: #fff; font-weight: 700; font-size: 13px;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 32px;
  background: rgba(10, 17, 32, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.2px; }
.topbar .sub { font-size: 12.5px; color: var(--dim); }
.topbar .spacer { flex: 1; }
.sync { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.sync .dot.loading { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); animation: pulse 1s infinite; }
.sync .dot.error { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
@keyframes pulse { 50% { opacity: .4; } }
.btn.menu-btn { display: none; }
.content { padding: 28px 32px 48px; max-width: 1500px; width: 100%; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--panel-3); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn:active { transform: scale(0.98); }
.btn .ti { font-size: 17px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(148, 178, 220, 0.07); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 38px; padding: 0; justify-content: center; }
.btn.spin .ti { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, select.input, textarea.input {
  height: 38px; padding: 0 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 12px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { cursor: pointer; padding-right: 28px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .ti { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 17px; }
.search .input { padding-left: 38px; }

/* ---------- cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi {
  position: relative; overflow: hidden; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.kpi:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: var(--glow, var(--accent-soft)); }
.kpi .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--glow, var(--accent-soft)); color: var(--c, var(--accent)); margin-bottom: 14px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin: 2px 0; }
.kpi .hint { font-size: 12px; color: var(--dim); }
.kpi.ok { --c: var(--ok); --glow: var(--ok-soft); }
.kpi.warn { --c: var(--warn); --glow: var(--warn-soft); }
.kpi.violet { --c: var(--violet); --glow: rgba(167, 139, 250, 0.12); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-head .ti { color: var(--accent); font-size: 19px; }
.panel-head .right { margin-left: auto; }

/* barras */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 44px; gap: 12px; align-items: center; cursor: pointer; }
.bar-row:hover .bar-fill { filter: brightness(1.15); }
.bar-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label .ti { font-size: 17px; color: var(--accent); }
.bar-track { height: 10px; background: var(--bg-2); border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .6s ease; }
.bar-val { text-align: right; font-weight: 700; font-size: 13px; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--panel); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; }
.donut-center b { font-size: 26px; font-weight: 800; display: block; line-height: 1; }
.donut-center span { font-size: 11px; color: var(--dim); }
.legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.legend div { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend b { margin-left: auto; color: var(--text); }

/* lista */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: rgba(148, 178, 220, 0.05); }
.list-item .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item span { font-size: 12px; color: var(--dim); }

/* tabs de tipo */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s;
}
.chip .ti { font-size: 17px; }
.chip em { font-style: normal; font-size: 11.5px; background: var(--panel-3); padding: 0 8px; border-radius: 20px; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.chip.active em { background: color-mix(in srgb, var(--accent) 20%, transparent); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar select.input { width: auto; min-width: 170px; }

/* tabela */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--dim); font-weight: 700;
  padding: 13px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; cursor: pointer; user-select: none; white-space: nowrap;
}
.table th .ti { font-size: 13px; vertical-align: -2px; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.cell-main { display: flex; align-items: center; gap: 12px; }
.cell-main .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.cell-main b { color: var(--text); font-size: 13.5px; display: block; }
.cell-main span { font-size: 11.5px; color: var(--dim); }
.mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 12px; }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--panel-3); color: var(--muted); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.badge.plain::before { display: none; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(3, 8, 18, 0.72); backdrop-filter: blur(6px); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto;
}
.overlay.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 1080px; background: linear-gradient(180deg, #13203a, #0f192d); border: 1px solid var(--line-2);
  border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); animation: rise .25s ease; overflow: hidden;
}
.modal.small { max-width: 520px; }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; gap: 16px; padding: 24px 28px 18px; }
.modal-head .big-ico {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 35%, transparent);
}
.modal-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.modal-head .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; color: var(--dim); font-size: 12.5px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 0 28px 28px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px; border-top: 1px solid var(--line); }

.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.spec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.spec .ti { font-size: 22px; color: var(--accent); flex-shrink: 0; }
.spec small { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.spec b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec > div { min-width: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 7px; align-items: center; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab .ti { font-size: 16px; }
.tab em { font-style: normal; font-size: 11px; background: var(--panel-3); padding: 0 7px; border-radius: 20px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade .2s ease; }

.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.field { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; min-width: 0; }
.field small { display: block; font-size: 11px; color: var(--dim); font-weight: 600; margin-bottom: 2px; }
.field b { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.field.wide { grid-column: 1 / -1; }
.section-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--dim); font-weight: 700; margin: 18px 0 10px; display: flex; gap: 8px; align-items: center; }
.section-label:first-child { margin-top: 0; }

.dev-group { margin-bottom: 14px; }
.dev { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.dev .ti { font-size: 22px; color: var(--accent); }
.dev .grow { flex: 1; min-width: 0; }
.dev b { display: block; font-size: 13.5px; }
.dev span { font-size: 12px; color: var(--dim); }

.usage { height: 8px; background: var(--bg-2); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.usage div { height: 100%; border-radius: 8px; background: var(--accent); }
.usage div.warn { background: var(--warn); }
.usage div.bad { background: var(--bad); }

.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th { text-align: left; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table td b { color: var(--text); font-weight: 600; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item b { font-size: 13px; }
.tl-item span { display: block; font-size: 12px; color: var(--dim); }

pre.raw { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12px; overflow: auto; max-height: 460px; color: #bcd0ea; }

.empty { text-align: center; padding: 40px 20px; color: var(--dim); }
.empty .ti { font-size: 38px; display: block; margin-bottom: 8px; color: var(--line-2); }
.loader { display: grid; place-items: center; padding: 60px; color: var(--muted); gap: 12px; }
.loader .ti { font-size: 30px; color: var(--accent); animation: spin .9s linear infinite; }
.error-box { background: var(--bad-soft); border: 1px solid rgba(248, 113, 113, 0.35); color: #fecaca; padding: 14px 16px; border-radius: 12px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-field .help { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.form-error { color: var(--bad); font-size: 13px; margin-top: 12px; min-height: 18px; }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 200; background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text);
  padding: 12px 16px; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); display: flex; gap: 10px; align-items: center;
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: all .25s;
}
.toast.show { transform: none; opacity: 1; }
.toast .ti { color: var(--ok); font-size: 19px; }
.toast.error .ti { color: var(--bad); }

.demo-flag { white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 3px 9px; border-radius: 999px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #22324f; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2d4268; }

@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .fields { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5); }
  .sidebar.open { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .ico { width: 36px; height: 36px; font-size: 19px; margin-bottom: 10px; }
  .kpi .value { font-size: 26px; }
  .kpi .hint { font-size: 11px; }
  .topbar h1 { font-size: 18px; }
  .topbar { padding: 12px 16px; }
  .topbar .sync span, .topbar .hide-sm { display: none; }
  .content { padding: 18px 16px 40px; }
  .bar-row { grid-template-columns: 110px 1fr 36px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .specs, .fields, .form-grid { grid-template-columns: 1fr; }
  .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
  .overlay { padding: 12px; }
}

/* ---------- marca / logos ---------- */
.brand.with-logo { flex-direction: column; align-items: stretch; gap: 10px; }
.logo-tile { display: flex; align-items: center; justify-content: center; border-radius: 12px; padding: 10px 14px; height: 64px; overflow: hidden; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-tile.light { background: #fff; }
.logo-tile.dark { background: #0b1220; border: 1px solid var(--line); }
.logo-tile.none { background: transparent; padding: 0; }
.logo-tile.sm { height: 44px; width: 100px; padding: 5px 8px; border-radius: 9px; flex-shrink: 0; }
.logo-tile.lg { height: 96px; }
.brand-company { font-weight: 700; font-size: 14px; text-align: center; }
.brand-company small { display: block; font-weight: 500; font-size: 11px; color: var(--dim); }
.credit { font-size: 11.5px; color: var(--dim); text-align: center; padding: 10px 6px 0; }
.credit a { color: var(--muted); font-weight: 600; }
.credit a:hover { color: var(--accent); }
.page-foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--dim); }
.page-foot a { color: var(--muted); font-weight: 600; }

/* ---------- configurações ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.upload { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.upload .logo-tile { width: 180px; flex-shrink: 0; }
.upload .placeholder { width: 180px; height: 64px; border: 1px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; color: var(--dim); font-size: 12px; flex-shrink: 0; }
.upload .actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.upload .actions .btn { cursor: pointer; }
.color-row { display: flex; gap: 10px; align-items: center; }
input[type=color] { width: 46px; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); padding: 3px; cursor: pointer; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { white-space: nowrap; border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.steps li { list-style: none; counter-increment: s; display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }
.steps b { color: var(--text); }
.status-box { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-top: 14px; }
.status-box.ok { background: var(--ok-soft); color: #a7f3d0; }
.status-box.bad { background: var(--bad-soft); color: #fecaca; }
.status-box .ti { font-size: 19px; }
.check-list { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.check-list label { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.check-list label:last-child { border-bottom: 0; }
.check-list label:hover { background: rgba(148, 178, 220, 0.05); }
.check-list input { width: 17px; height: 17px; accent-color: var(--accent); }
.check-list small { color: var(--dim); display: block; font-size: 11.5px; }
@media (max-width: 1100px) { .settings-grid { grid-template-columns: 1fr; } }
