/* Login, configuração inicial, diálogo de senha e botão de sair (Central MP) */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: var(--bg); color: var(--ink); }
.auth-card { width: min(420px, 100%); display: grid; gap: 12px; padding: 26px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.auth-logo { width: min(210px, 70%); height: auto; justify-self: center; margin-bottom: 4px; }
.auth-card h1 { margin: 0; font-size: 21px; line-height: 1.25; }
.auth-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-help code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); }
.auth-card form { display: grid; gap: 8px; margin-top: 4px; }
.auth-card label { color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-card input, .auth-dialog input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 16px; }
.auth-card input:focus, .auth-dialog input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.auth-submit { min-height: 46px; margin-top: 8px; font-size: 14px; }
.auth-error { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--red) 55%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--red) 12%, var(--surface)); color: var(--ink); font-size: 13px; }
.auth-foot { color: var(--muted); font-size: 11px; text-align: center; }
.logout-form { margin: 0; }
.logout-form .theme-toggle { width: 100%; }
.auth-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.auth-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.auth-dialog form { display: grid; gap: 12px; padding: 18px; }
.auth-dialog p { margin: 0; font-size: 14px; line-height: 1.45; }
.auth-dialog .auth-actions { display: flex; gap: 10px; justify-content: flex-end; }
.auth-dialog .button { min-height: 44px; padding: 0 16px; }
@media (max-width: 480px) { .auth-card { padding: 22px 16px; border-radius: 14px; } .auth-dialog .auth-actions { flex-direction: column-reverse; } .auth-dialog .button { width: 100%; } }
.logout-button { width: 100%; justify-content: center; min-height: 40px; gap: 8px; }
.logout-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-menu { position: relative; }
.user-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.user-menu-list[hidden] { display: none; }
.user-menu-head { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu-head small { color: var(--muted); }
.user-menu-list a, .user-menu-list button { display: block; width: 100%; min-height: 44px; padding: 12px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.user-menu-list a:hover, .user-menu-list button:hover { background: var(--surface-2); }
.user-menu-list form { margin: 0; }
@media (max-width: 560px) { .user-name { display: none; } .local-badge { display: none; } }
.panel-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 16px; }
.panel-card h2 { margin: 0 0 12px; font-size: 16px; }
.form-grid { display: grid; gap: 10px; max-width: 460px; }
.form-grid label { color: var(--muted); font-size: 12px; font-weight: 700; }
.form-grid input, .form-grid select, .auth-dialog select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 16px; }
.table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th, .users-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.users-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid var(--line); }
.badge.ok { color: var(--green, #2ecc71); }
.badge.off { color: var(--red); }
.badge.role { color: var(--teal); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions .button { min-height: 40px; padding: 0 12px; font-size: 12px; }
.msg { min-height: 20px; font-size: 13px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green, #2ecc71); }
@media (max-width: 720px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { margin-bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
  .users-table td { border: 0; padding: 4px 0; }
  .users-table td::before { content: attr(data-label) ": "; color: var(--muted); font-size: 11px; }
}
