*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:#0f172a;color:#e2e8f0;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));min-height:100vh;font-size:15px;line-height:1.4}
header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
h1{font-size:20px;font-weight:700}
h2{font-size:17px;margin-bottom:8px}
.badge{font-size:12px;padding:4px 10px;border-radius:999px;font-weight:600;background:#334155;color:#94a3b8}
.badge.ok{background:#064e3b;color:#4ade80}
.badge.warn{background:#78350f;color:#fbbf24}
.badge.err{background:#7f1d1d;color:#f87171}
.tela{display:flex;flex-direction:column;gap:10px}
.oculto{display:none!important}
.card{background:#1e293b;border-radius:14px;padding:18px;margin-bottom:12px}
label{display:block;font-size:13px;color:#94a3b8;margin-bottom:6px;margin-top:12px;font-weight:500}
label:first-child{margin-top:0}
input{padding:14px;border-radius:10px;border:1px solid #334155;background:#0f172a;color:#e2e8f0;font-size:16px;width:100%;outline:none;transition:border-color .15s}
input:focus{border-color:#0d6efd}
button{padding:14px;border-radius:10px;border:none;background:#0d6efd;color:#fff;font-size:16px;font-weight:600;cursor:pointer;transition:background .15s,transform .05s;width:100%;margin-top:12px;font-family:inherit}
button:active{transform:scale(.98)}
button:disabled{opacity:.5;cursor:not-allowed}
button.primary{background:#0d6efd}
button.primary:active{background:#0b5ed7}
button.danger{background:#dc3545}
button.danger:active{background:#bb2d3b}
button.ghost{background:transparent;border:1px solid #dc3545;color:#dc3545}
.linha{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid #334155;font-size:14px;gap:12px}
.linha:last-child{border:none}
.linha span{color:#94a3b8;flex-shrink:0}
.linha strong{text-align:right;word-break:break-all;font-weight:600}
.linha strong.ok{color:#4ade80}
.linha strong.warn{color:#fbbf24}
.linha strong.err{color:#f87171}
.msg{font-size:13px;min-height:18px;margin-top:10px;text-align:center}
.msg.ok{color:#4ade80}
.msg.err{color:#f87171}
.msg.warn{color:#fbbf24}
.muted{color:#64748b;font-size:13px}
.hint{font-size:12px;color:#64748b;text-align:center;margin-top:12px;line-height:1.5}
#lista-empresas button{margin-top:8px}
#log{margin-top:20px;background:#020617;padding:12px;border-radius:10px;font-family:ui-monospace,"SF Mono",Menlo,monospace;font-size:11px;max-height:35vh;overflow-y:auto;line-height:1.5}
#log div{padding:3px 0;border-bottom:1px solid #0f172a;word-break:break-word}
#log div:last-child{border:none}
#log .ok{color:#4ade80}
#log .err{color:#f87171}
#log .warn{color:#fbbf24}
#log .info{color:#94a3b8}
#log::-webkit-scrollbar{width:6px}
#log::-webkit-scrollbar-thumb{background:#334155;border-radius:3px}