/* Painel Master: usa as cores e componentes do ZuZap (app.css) com um layout de página simples */
html, body { background: var(--bg); height: auto; min-height: 100%; overflow: auto; }
.m-top { background: var(--secondary); color: #fff; display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
.m-top b { font-size: 17px; }
.m-top nav { display: flex; flex-direction: row; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.m-top nav a { white-space: nowrap; flex: none; }
.m-top nav a { color: #fff; opacity: .75; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.m-top nav a.active, .m-top nav a:hover { opacity: 1; background: rgba(255, 255, 255, .14); }
.m-top button { background: none; border: 1px solid rgba(255, 255, 255, .4); color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.m-main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.m-head h2 { margin: 0; }
.m-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.m-card { background: var(--panel); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.m-card .n { font-size: 26px; font-weight: 600; }
.m-tenants { display: grid; gap: 10px; }
.m-tenant { background: var(--panel); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.m-tenant .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-tenant .top b { font-size: 16px; }
.m-tenant .stats { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.m-tenant .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel-2); }
.pill.ok { background: #e3f6ea; color: #137a3b; }
.pill.warn { background: #fff3dc; color: #8a5a00; }
.pill.bad { background: #fde4e8; color: #b00027; }
.pill.info { background: var(--primary-soft); color: var(--primary-dark); }
.m-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.m-table th, .m-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.m-table th { background: var(--panel-2); font-weight: 600; font-size: 13px; }
.m-scroll { overflow-x: auto; }
.m-modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: grid; place-items: center; padding: 16px; z-index: 50; }
.m-modal { background: var(--panel); border-radius: 14px; padding: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 12px; }
.m-modal h3 { margin: 0; }
.m-modal .acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.m-field { display: grid; gap: 4px; }
.m-field span { font-size: 13px; color: var(--muted); }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.m-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--panel-2); padding: 10px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; }
.m-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; max-width: 90vw; }
.m-toast.error { background: var(--danger); }
.m-error { color: var(--danger); min-height: 1.2em; }
@media (max-width: 700px) {
  .m-top nav { order: 3; flex-basis: 100%; }
  .m-top .small { margin-left: auto; }
  .m-cards { grid-template-columns: 1fr 1fr; }
  .m-card .n { font-size: 20px; }
  .m-head .row { width: 100%; }
  .m-head .row .input { flex: 1; max-width: none !important; }
}
