*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f4f7fb;color:#111827}body{--accent:#2563eb;--secondary:#111827}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:270px;background:#0d1423;color:#e5e7eb;padding:22px 16px;display:flex;flex-direction:column;z-index:20;box-shadow:10px 0 30px rgba(15,23,42,.08)}.sidebar-brand,.auth-brand{display:flex;align-items:center;gap:12px}.sidebar-brand{padding:0 8px 22px}.sidebar-brand strong,.auth-brand strong{display:block;font-size:17px}.sidebar-brand span,.auth-brand span{display:block;font-size:12px;color:#94a3b8;margin-top:2px}.brand-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent),#7c3aed);color:#fff;font-weight:800;letter-spacing:-1px}.nav{display:flex;flex-direction:column;gap:4px}.nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:10px;color:#aeb8c8;font-size:14px;position:relative}.nav a:hover,.nav a.active{background:rgba(255,255,255,.08);color:#fff}.nav a.active{box-shadow:inset 3px 0 0 var(--accent)}.nav-icon{width:24px;text-align:center}.nav-badge{margin-left:auto;background:#f59e0b;color:#111827;border-radius:999px;min-width:20px;height:20px;display:grid;place-items:center;font-size:10px;font-weight:900}.sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding:16px 10px 0;display:grid;gap:4px}.sidebar-bottom span{font-size:11px;color:#718096}.sidebar-bottom strong{font-size:13px}.logout-link{font-size:12px;color:#fca5a5;margin-top:6px}.main{margin-left:270px;padding:30px;min-height:100vh}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.topbar h1{margin:3px 0 0;font-size:28px;letter-spacing:-.7px}.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:800;color:#8491a4}.topbar-actions{display:flex;gap:10px}.btn{border:0;border-radius:10px;padding:11px 15px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.primary{background:var(--accent);color:#fff;box-shadow:0 8px 20px rgba(37,99,235,.18)}.btn.soft{background:#eef2ff;color:#3730a3}.btn.ghost{background:#fff;border:1px solid #e5e7eb;color:#374151}.btn.warning{background:#f59e0b;color:#111827}.btn.small{padding:7px 10px;font-size:12px}.fullbtn{width:100%;margin-top:10px}.menu-btn{display:none;border:0;background:#fff;border-radius:10px;padding:10px}.hero{background:linear-gradient(135deg,var(--secondary),#1d293f);border-radius:22px;color:#fff;padding:30px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 18px 50px rgba(15,23,42,.15)}.hero h2{font-size:30px;max-width:680px;margin:7px 0 10px;letter-spacing:-.8px}.hero p{color:#b9c3d2;max-width:680px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.stat-card,.panel,.app-card,.price-card{background:#fff;border:1px solid #e8edf4;border-radius:16px;box-shadow:0 8px 30px rgba(15,23,42,.035)}.stat-card{padding:20px}.stat-card span{font-size:12px;color:#64748b}.stat-card strong{display:block;font-size:28px;margin:5px 0}.stat-card small{color:#94a3b8}.two-cols{display:grid;grid-template-columns:1.55fr 1fr;gap:16px;margin:16px 0}.panel{padding:20px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.panel-head h3{margin:3px 0 0}.panel-head a{font-size:12px;color:var(--accent);font-weight:700}.company-list{display:grid;gap:4px}.company-row{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid #eef2f7}.company-row:last-child{border-bottom:0}.avatar{width:38px;height:38px;border-radius:11px;background:#eef2ff;color:#3730a3;display:grid;place-items:center;font-weight:800}.grow{flex:1;min-width:0}.company-row strong,.company-row span{display:block}.company-row .grow span{font-size:12px;color:#7c8798;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}.badge.ativa,.badge.active{background:#dcfce7;color:#166534}.badge.teste{background:#fff7d6;color:#854d0e}.badge.suspensa{background:#fee2e2;color:#991b1b}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid .full{grid-column:1/-1}.stack{display:grid;gap:14px}label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#475569}input,select,textarea{width:100%;border:1px solid #dce3ec;border-radius:10px;background:#fff;padding:11px 12px;color:#111827;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.08)}.check{display:flex;align-items:center;gap:9px}.check input{width:auto}.mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mini-stats>div,.version-box{background:#f7f9fc;border-radius:12px;padding:18px}.mini-stats span,.version-box span{display:block;font-size:11px;color:#64748b}.mini-stats strong,.version-box strong{font-size:20px}.version-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf1f5;font-size:12px}th{font-size:10px;color:#7c8798;text-transform:uppercase;letter-spacing:.7px}.apps-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.app-card{padding:18px;display:grid;gap:12px}.app-card h3{margin:0}.app-card p{margin:5px 0 0;font-size:12px;color:#6b7280}.app-icon{width:44px;height:44px;border-radius:12px;background:#eef2ff;color:#3730a3;display:grid;place-items:center;font-weight:900}.pricing-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.price-card{padding:22px}.price-card h3{font-size:20px;margin:6px 0}.price{font-size:24px;font-weight:900;margin:15px 0}.price small{font-size:12px;color:#7c8798}.price-card ul{list-style:none;padding:0;margin:18px 0;display:grid;gap:10px;color:#475569;font-size:12px}.muted{color:#718096;font-size:13px;line-height:1.6}.empty-state{text-align:center;padding:60px 20px}.big-icon{font-size:40px;color:var(--accent)}.empty-state h3{margin-bottom:6px}.empty-state p{color:#718096}.alert{padding:12px 14px;border-radius:11px;margin-bottom:16px;font-size:13px}.alert.success{background:#dcfce7;color:#166534}.alert.danger{background:#fee2e2;color:#991b1b}.alert.warning{background:#fff7d6;color:#854d0e}footer{text-align:center;color:#94a3b8;font-size:11px;padding:28px 0 10px}.auth-body{display:grid;place-items:center;background:radial-gradient(circle at top left,#e0e7ff,transparent 35%),#f7f9fc;min-height:100vh;padding:20px}.auth-shell{width:min(430px,100%)}.auth-brand{justify-content:center;margin-bottom:18px}.auth-card{background:#fff;border:1px solid #e5eaf1;border-radius:20px;padding:28px;box-shadow:0 24px 60px rgba(15,23,42,.10)}.auth-card h1{margin:8px 0 8px;font-size:26px}.auth-card>p{color:#718096;line-height:1.6;margin-bottom:22px}@media(max-width:1100px){.stats-grid,.apps-grid,.pricing-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:820px){.sidebar{transform:translateX(-105%);transition:.25s}.sidebar.open{transform:translateX(0)}.main{margin-left:0;padding:18px}.menu-btn{display:inline-flex}.topbar{gap:10px}.topbar h1{font-size:22px}.topbar-actions .btn.primary{display:none}.two-cols{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}.apps-grid,.pricing-grid{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}.hero h2{font-size:25px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.version-grid{grid-template-columns:1fr}}@media(max-width:480px){.stats-grid{grid-template-columns:1fr}.main{padding:14px}.panel,.stat-card{border-radius:14px}.hero{padding:22px}.auth-card{padding:22px}}code{background:#eef2f7;padding:2px 6px;border-radius:6px;font-size:.92em}.badge.teste{background:#fff7d6;color:#854d0e}

/* SweetAlert local fallback */
.swal-local-root{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;opacity:0;transition:opacity .12s ease}.swal-local-root.swal-local-open{opacity:1}.swal-local-root.swal-local-closing{opacity:0}.swal-local-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(3px)}.swal-local-popup{position:relative;width:min(92vw,440px);background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 24px 80px rgba(15,23,42,.24);padding:28px;text-align:center}.swal-local-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;font-size:2rem;font-weight:900;border:3px solid currentColor}.swal-local-icon-success{color:#16a34a}.swal-local-icon-error{color:#dc2626}.swal-local-icon-warning{color:#d97706}.swal-local-icon-info{color:#2563eb}.swal-local-icon-question{color:#7c3aed}.swal-local-title{margin:0 0 9px;font-size:1.28rem}.swal-local-text{color:#64748b;line-height:1.55}.swal-local-actions{display:flex;justify-content:center;gap:10px;margin-top:22px}.swal-local-loader{width:46px;height:46px;border-radius:50%;border:4px solid #dbeafe;border-top-color:var(--accent);margin:0 auto 18px;animation:hm-spin .75s linear infinite}@keyframes hm-spin{to{transform:rotate(360deg)}}

/* v0.0.5 - Atualização do banco dentro do painel */
.hm-db-update-box{display:grid;gap:10px;text-align:left;margin-top:10px}.hm-db-update-status{font-weight:800;color:#111827}.hm-db-update-version,.hm-db-update-time{font-size:12px;color:#64748b}.hm-db-update-track{width:100%;height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}.hm-db-update-bar{height:100%;background:var(--accent,#2563eb);border-radius:999px;transition:width .25s ease}.hm-db-update-box small{color:#94a3b8;line-height:1.45}


/* v0.0.6 - Central da Empresa / Cliente SaaS */
.company-central-body{background:#f4f7fb;min-height:100vh}
.company-central-shell{width:min(1280px,calc(100% - 32px));margin:0 auto;padding:22px 0 30px}
.company-central-top{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#fff;border:1px solid #e8edf4;border-radius:18px;padding:16px 18px;box-shadow:0 8px 30px rgba(15,23,42,.04);margin-bottom:18px}
.company-central-brand{display:flex;align-items:center;gap:12px}.company-central-brand strong{display:block;font-size:17px}.company-central-brand span{display:block;color:#7c8798;font-size:12px;margin-top:2px}
.company-central-user{display:flex;align-items:center;gap:14px;text-align:right}.company-central-user strong,.company-central-user span{display:block}.company-central-user span{font-size:11px;color:#7c8798;margin-top:2px}
.impersonation-banner{padding:12px 16px;background:#fff7d6;border:1px solid #fde68a;color:#854d0e;border-radius:12px;margin-bottom:18px;font-size:13px}
.central-welcome{background:linear-gradient(135deg,#0f172a,#263650);color:#fff;border-radius:22px;padding:30px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 18px 50px rgba(15,23,42,.15)}
.central-welcome h1{margin:7px 0 8px;font-size:31px;letter-spacing:-.8px}.central-welcome p{margin:0;color:#c7d0de;max-width:720px;line-height:1.55}
.central-company-status{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.central-company-status small{color:#c7d0de}
.central-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:18px 0}.central-stats article{background:#fff;border:1px solid #e8edf4;border-radius:16px;padding:20px;box-shadow:0 8px 30px rgba(15,23,42,.035)}
.central-stats span{font-size:12px;color:#64748b}.central-stats strong{display:block;font-size:23px;margin:5px 0}.central-stats small{color:#94a3b8}
.central-section{background:#fff;border:1px solid #e8edf4;border-radius:18px;padding:22px;box-shadow:0 8px 30px rgba(15,23,42,.035);margin-top:18px}
.central-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.central-section-head h2{margin:4px 0 0;font-size:20px}
.central-app-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}
.central-app-card{border:1px solid #e5eaf1;border-radius:16px;padding:18px;display:flex;flex-direction:column;min-height:245px;background:linear-gradient(180deg,#fff,#fbfcff)}
.central-app-card.disabled{opacity:.72;background:#f8fafc}.central-app-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.central-app-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:#eef2ff;color:#3730a3;font-weight:900;font-size:15px}
.central-app-content{flex:1}.central-app-content h3{margin:16px 0 6px;font-size:18px}.central-app-content p{color:#64748b;font-size:13px;line-height:1.55;margin:0}.central-app-meta{display:flex;gap:7px;flex-wrap:wrap;color:#94a3b8;font-size:11px;margin-top:12px}
.central-app-open{width:100%;margin-top:18px}.central-empty{text-align:center;padding:44px 20px;color:#64748b}.central-empty h3{color:#111827;margin-bottom:4px}
.central-account-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;background:transparent;border:0;padding:0;box-shadow:none}.central-info-list{display:grid;gap:0}.central-info-list>div{padding:11px 0;border-bottom:1px solid #eef2f7}.central-info-list>div:last-child{border-bottom:0}.central-info-list span{display:block;color:#94a3b8;font-size:10px;text-transform:uppercase;letter-spacing:.6px}.central-info-list strong{display:block;margin-top:4px;font-size:13px}
.central-password-first{min-height:calc(100vh - 160px);display:grid;place-items:center}.central-password-card{width:min(460px,100%);background:#fff;border:1px solid #e5eaf1;border-radius:20px;padding:28px;box-shadow:0 24px 60px rgba(15,23,42,.10)}.central-password-card h1{margin:7px 0}.central-password-card p{color:#64748b;line-height:1.55;margin-bottom:20px}
.central-blocked{min-height:calc(100vh - 170px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#fff;border:1px solid #e8edf4;border-radius:20px;padding:30px}.central-blocked-icon{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:#fee2e2;color:#991b1b;font-size:28px;font-weight:900;margin-bottom:14px}.central-blocked h1{margin:8px 0}.central-blocked p{color:#64748b;max-width:600px;line-height:1.55}
@media(max-width:980px){.central-app-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.company-central-shell{width:min(100% - 20px,1280px);padding-top:10px}.company-central-top,.central-welcome{align-items:flex-start;flex-direction:column}.company-central-user{width:100%;justify-content:space-between;text-align:left}.central-company-status{align-items:flex-start}.central-stats,.central-account-grid{grid-template-columns:1fr}.central-app-grid{grid-template-columns:1fr}.central-welcome h1{font-size:25px}}

/* v0.0.7 - PWA Central e notificações hierárquicas */
.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}.feature-grid>div{background:#f8fafc;border:1px solid #edf1f5;border-radius:12px;padding:14px}.feature-grid b{color:var(--accent);font-size:11px}.feature-grid h4{margin:7px 0 4px}.feature-grid p{margin:0;color:#64748b;font-size:12px;line-height:1.5}.hm-notification-count{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 9px;border-radius:999px;background:#fff7d6;color:#854d0e;font-size:12px;font-weight:900}.hm-notification-list{display:grid;gap:8px}.hm-notification-item{display:flex;align-items:flex-start;gap:12px;padding:13px;border:1px solid #edf1f5;border-radius:13px;background:#fff}.hm-notification-item.unread{background:#eff6ff;border-color:#bfdbfe}.hm-notification-item .grow span{white-space:normal;line-height:1.45}.hm-notification-item small{display:block;color:#94a3b8;font-size:10px;margin-top:6px}.hm-inner-panel{box-shadow:none;margin:0}.hm-company-notify-grid{grid-template-columns:1.2fr .8fr}.company-central-user{flex-wrap:wrap}.company-central-user .btn{white-space:nowrap}.hm-pwa-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hm-notif-features{grid-template-columns:1fr}
@media(min-width:1100px){.hm-notif-features{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.feature-grid,.hm-company-notify-grid{grid-template-columns:1fr}.company-central-user{align-items:flex-start}.company-central-user .btn{padding:9px 10px;font-size:11px}}
