/* JM Patrimônio — CSS do Painel Mobile-First */
:root {
  --jmp-primaria: #0A2540;
  --jmp-secundaria: #00D4B2;
  --jmp-bg: #F8FAFC;
  --jmp-card-bg: #FFFFFF;
  --jmp-border: #E2E8F0;
  --jmp-text: #0F172A;
  --jmp-text-muted: #64748B;
  --jmp-radius: 12px;
  --jmp-bottom-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body.jmp-painel-body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body.jmp-painel-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--jmp-bg);
  color: var(--jmp-text);
  line-height: 1.5;
  padding-bottom: calc(var(--jmp-bottom-height) + env(safe-area-inset-bottom, 20px) + 20px);
}

/* Top Bar */
.jmp-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--jmp-primaria);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.jmp-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 1;
}

.jmp-topbar-logo {
  height: 32px;
  max-width: 90px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #FFFFFF;
  padding: 2px 4px;
  flex-shrink: 0;
}

.jmp-topbar-logo-fallback {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.jmp-topbar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jmp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.jmp-topbar-link {
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s;
}

.jmp-topbar-link:hover {
  background: rgba(255,255,255,0.25);
}

.jmp-topbar-user-link {
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s;
}

.jmp-topbar-user-link:hover {
  background: rgba(255,255,255,0.25);
}

.jmp-topbar-user {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}

.jmp-topbar-logout {
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
  transition: background 0.2s;
}

.jmp-topbar-logout:hover {
  background: rgba(255,255,255,0.25);
}

/* Conteúdo Principal */
.jmp-main-content {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.jmp-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Welcome Card */
.jmp-welcome-card {
  background: linear-gradient(135deg, var(--jmp-primaria) 0%, #1E3A8A 100%);
  color: #FFFFFF;
  border-radius: var(--jmp-radius);
  padding: 18px 20px;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.15);
}

.jmp-welcome-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}

.jmp-welcome-card p {
  font-size: 13px;
  opacity: 0.85;
}

/* Grid de KPIs */
.jmp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.jmp-kpi-card {
  background: var(--jmp-card-bg);
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.jmp-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue { background: #EFF6FF; }
.icon-green { background: #ECFDF5; }
.icon-orange { background: #FFFBEB; }
.icon-purple { background: #F5F3FF; }

.jmp-kpi-info {
  display: flex;
  flex-direction: column;
}

.jmp-kpi-val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--jmp-text);
}

.jmp-kpi-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--jmp-text-muted);
  text-transform: uppercase;
}

/* Seções e Ações Rápidas */
.jmp-section-block {
  margin-top: 8px;
}

.jmp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.jmp-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--jmp-text);
}

.jmp-link-all {
  font-size: 13px;
  color: var(--jmp-secundaria);
  text-decoration: none;
  font-weight: 600;
}

.jmp-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.jmp-action-tile {
  background: var(--jmp-card-bg);
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  text-decoration: none;
  color: var(--jmp-text);
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.1s ease;
}

.jmp-action-tile:active {
  transform: scale(0.96);
}

.jmp-tile-icon {
  width: 40px;
  height: 40px;
  background: var(--jmp-primaria);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cards de Equipamento */
.jmp-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jmp-asset-card {
  background: var(--jmp-card-bg);
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.jmp-asset-card:active {
  background: #F1F5F9;
}

.jmp-asset-avatar {
  width: 42px;
  height: 42px;
  background: #F1F5F9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jmp-asset-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.jmp-asset-code {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: #2563EB;
}

.jmp-asset-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jmp-asset-sub, .jmp-asset-meta {
  font-size: 12px;
  color: var(--jmp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges */
.jmp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.jmp-badge-ativo { background: #DCFCE7; color: #15803D; }
.jmp-badge-manutencao { background: #FEF3C7; color: #B45309; }
.jmp-badge-reserva { background: #E0E7FF; color: #4338CA; }
.jmp-badge-baixado { background: #FEE2E2; color: #B91C1C; }

/* FAB */
.jmp-fab-action {
  position: fixed;
  bottom: calc(var(--jmp-bottom-height) + 16px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 56px;
  height: 56px;
  background: var(--jmp-secundaria);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 212, 178, 0.4);
  z-index: 30;
  text-decoration: none;
}

/* Bottom Navigation */
.jmp-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--jmp-bottom-height);
  background: var(--jmp-card-bg);
  border-top: 1px solid var(--jmp-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 45;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.jmp-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--jmp-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

button.jmp-nav-item {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.jmp-nav-item.active {
  color: var(--jmp-primaria);
}

.jmp-nav-fab {
  position: relative;
  top: -12px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

.jmp-fab-circle {
  width: 48px;
  height: 48px;
  background: var(--jmp-primaria);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(10, 37, 64, 0.25);
}

/* Formulários e Inputs */
.jmp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.jmp-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--jmp-text);
}

.jmp-input, .jmp-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--jmp-border);
  border-radius: 8px;
  background: #FFFFFF;
  font-size: 15px;
  color: var(--jmp-text);
  outline: none;
}

.jmp-input:focus, .jmp-textarea:focus {
  border-color: var(--jmp-primaria);
}

.jmp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  min-height: 46px;
}

.jmp-btn-primary { background: var(--jmp-primaria); color: #FFFFFF; }
.jmp-btn-secondary { background: #E2E8F0; color: #0F172A; }
.jmp-btn-danger { background: #DC2626; color: #FFFFFF; }
.jmp-btn-block { width: 100%; }
.jmp-btn-lg { min-height: 52px; font-size: 16px; }

/* Chips Slider */
.jmp-chips-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.jmp-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: #E2E8F0;
  color: var(--jmp-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.jmp-chip.active {
  background: var(--jmp-primaria);
  color: #FFFFFF;
}

/* Scanner */
.jmp-scanner-viewport {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000000;
  border-radius: var(--jmp-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jmp-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jmp-scanner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.jmp-scanner-reticle {
  width: 210px;
  height: 210px;
  max-width: 68%;
  max-height: 68%;
  border: 2.5px solid var(--jmp-secundaria);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}

.jmp-photo-capture-box {
  border: 2px dashed var(--jmp-border);
  border-radius: var(--jmp-radius);
  padding: 24px;
  text-align: center;
  background: #FFFFFF;
  cursor: pointer;
}

.jmp-hidden-file { display: none; }

/* Bloco Dinâmico de Hardware Mobile */
.jmp-hw-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  animation: jmpFadeIn 0.25s ease-out;
}

@keyframes jmpFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.jmp-hw-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}

.jmp-form-row {
  display: flex;
  gap: 10px;
}

.jmp-col-half {
  flex: 1;
}

/* Identidade Visual Dark JM Technology para o Login */
body.jmp-login-body {
  min-height: 100vh;
  background-color: #060B19;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(0, 212, 178, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 112, 243, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #060B19 0%, #081024 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.jmp-login-wrapper {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.jmp-login-card {
  background: rgba(11, 20, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 178, 0.22);
  border-radius: 18px;
  padding: 36px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(0, 212, 178, 0.08);
}

.jmp-login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.jmp-login-logo-box {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.jmp-login-logo-img {
  max-width: 220px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0, 212, 178, 0.25));
}

.jmp-login-brand h1 {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.jmp-login-brand p {
  font-size: 13px;
  color: #94A3B8;
  font-weight: 400;
}

.jmp-login-alert {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #FCA5A5;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.jmp-btn-login {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #00D4B2 0%, #0070F3 100%);
  border: none;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 212, 178, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.jmp-btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(0, 212, 178, 0.5);
}

.jmp-btn-login:active {
  transform: translateY(1px);
  opacity: 0.9;
}

.jmp-login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #64748B;
}

.jmp-login-footer strong {
  color: #00D4B2;
}

/* ===== Ficha do Patrimônio, Foto e CRUD (v1.2.2) ===== */
.jmp-detail-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.jmp-detail-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #F1F5F9;
  margin-bottom: 14px;
}
.jmp-detail-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jmp-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.jmp-detail-tag {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  color: #2563EB;
  background: #EFF6FF;
  padding: 4px 10px;
  border-radius: 6px;
}
.jmp-detail-title { font-size: 18px; font-weight: 800; color: #0F172A; margin: 4px 0 2px; }
.jmp-detail-sub { font-size: 13px; color: #64748B; margin: 0 0 14px; }
.jmp-detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.jmp-detail-actions .jmp-btn { font-size: 13px; padding: 10px 12px; }
.jmp-info-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #F1F5F9; }
.jmp-info-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748B;
  margin: 0 0 8px;
}
.jmp-info-grid { display: flex; flex-direction: column; gap: 6px; }
.jmp-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed #F1F5F9;
}
.jmp-info-row span { color: #64748B; flex-shrink: 0; }
.jmp-info-row strong { color: #0F172A; text-align: right; word-break: break-word; }

.jmp-toast-success,
.jmp-toast-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.jmp-toast-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.jmp-toast-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.jmp-asset-avatar.has-photo { overflow: hidden; background: #E2E8F0; }
.jmp-asset-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.jmp-form-header-code {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: #2563EB;
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.jmp-photo-capture-box.has-photo { padding: 0; overflow: hidden; border-style: solid; }
.jmp-photo-capture-box .jmp-photo-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  min-height: 60px;
}
.jmp-photo-label-overlay {
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.jmp-checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #B91C1C;
  background: #FFF7F7;
  border-top: 1px solid #FEE2E2;
  cursor: pointer;
}
.jmp-checkbox-inline input { accent-color: #DC2626; }
.jmp-textarea { min-height: 84px; padding: 10px 14px; resize: vertical; line-height: 1.4; }
.jmp-form-excluir { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #E2E8F0; }
.jmp-badge-estoque, .jmp-badge-reservado { background: #E0E7FF; color: #4338CA; }
.jmp-badge-emprestado { background: #FEF9C3; color: #854D0E; }
.jmp-badge-extraviado { background: #FEE2E2; color: #B91C1C; }

/* Busca e Filtros Avançados */
.jmp-search-row {
  display: flex;
  align-items: center;
  background: var(--jmp-card-bg, #FFFFFF);
  border: 1px solid var(--jmp-border, #E2E8F0);
  border-radius: var(--jmp-radius, 10px);
  padding: 4px 8px 4px 12px;
  gap: 8px;
}
.jmp-btn-filter-toggle {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748B;
  transition: all 0.2s ease;
}
.jmp-btn-filter-toggle:hover {
  background: #F1F5F9;
  color: #2563EB;
}
.jmp-filter-drawer {
  display: none;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 8px;
}
.jmp-filter-drawer.is-open {
  display: block;
}
.jmp-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.jmp-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.jmp-filter-field label {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
}
.jmp-input-sm {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.jmp-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.jmp-btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}

/* Toolbar de Seleção e Totalizador */
.jmp-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  margin-top: 4px;
  font-size: 13px;
  color: #64748B;
}
.jmp-select-all-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}
.jmp-counter-info {
  font-size: 12px;
  color: #64748B;
}

/* Linha de Equipamento com Checkbox */
.jmp-asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.jmp-row-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.jmp-row-check-wrap input[type="checkbox"],
.jmp-select-all-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563EB;
  cursor: pointer;
}
.jmp-asset-row .jmp-asset-card {
  flex: 1;
  min-width: 0;
}

/* Barra de Ações em Lote Flutuante (Bottom Sticky Bar) */
.jmp-batch-bar {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 95vw;
}
.jmp-batch-bar.is-active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.jmp-batch-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.jmp-batch-badge {
  background: #2563EB;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.jmp-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.jmp-batch-select {
  background: #1E293B;
  color: #F8FAFC;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}
.jmp-btn-batch-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94A3B8;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.jmp-btn-batch-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* Paginação */
.jmp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px 0 32px;
  flex-wrap: wrap;
}
.jmp-page-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--jmp-card-bg, #FFFFFF);
  border: 1px solid var(--jmp-border, #E2E8F0);
  color: #334155;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.jmp-page-link:hover {
  background: #F1F5F9;
  color: #2563EB;
  border-color: #CBD5E1;
}
.jmp-page-link.is-active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
  font-weight: 800;
}
.jmp-page-numbers {
  display: flex;
  gap: 4px;
}

/* Botão Rápido + Novo */
.jmp-btn-quick-add {
  background: #EEF4FD;
  border: 1px solid rgba(30, 99, 200, 0.2);
  color: #1E63C8;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.jmp-btn-quick-add:hover {
  background: #1E63C8;
  color: #FFFFFF;
}

/* Modal Popup */
.jmp-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.jmp-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.jmp-modal-dialog {
  position: relative;
  background: #FFFFFF;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: jmpModalFadeIn 0.2s ease-out;
  z-index: 1;
}
@keyframes jmpModalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.jmp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}
.jmp-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}
.jmp-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748B;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.jmp-modal-close:hover {
  color: #0F172A;
}
.jmp-modal-body {
  padding: 20px;
  max-height: calc(85vh - 130px);
  overflow-y: auto;
}
.jmp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}

/* Bottom Sheet Moderno: Menu Rápido de Ações (+) */
.jmp-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.jmp-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.jmp-sheet-dialog {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border-radius: 24px 24px 0 0;
  padding: 12px 18px 28px;
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.2);
  animation: jmpSheetSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes jmpSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.jmp-sheet-drag-handle {
  width: 44px;
  height: 5px;
  background: #CBD5E1;
  border-radius: 3px;
  margin: 0 auto 12px;
}

.jmp-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 16px;
}

.jmp-sheet-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jmp-sheet-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  padding: 2px;
  background: #FFFFFF;
}

.jmp-sheet-logo-fallback {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--jmp-primaria, #0A2540);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jmp-sheet-titles {
  display: flex;
  flex-direction: column;
}

.jmp-sheet-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.2;
}

.jmp-sheet-subtitle {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
}

.jmp-sheet-close {
  background: #F1F5F9;
  border: none;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748B;
  transition: all 0.15s;
}

.jmp-sheet-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.jmp-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
}

.jmp-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #1E293B;
  gap: 6px;
  padding: 8px 2px;
  border-radius: 12px;
  transition: transform 0.15s, background 0.15s;
}

.jmp-sheet-item:active {
  transform: scale(0.92);
  background: #F8FAFC;
}

.jmp-sheet-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.jmp-sheet-item span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #334155;
  display: block;
}

@media (max-width: 360px) {
  .jmp-sheet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Perfil & Troca de Senha */
.jmp-profile-card {
  background: var(--jmp-card-bg);
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  padding: 20px;
  box-shadow: var(--jmp-shadow-sm);
}

.jmp-profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.jmp-profile-avatar {
  width: 60px;
  height: 60px;
  background: #EFF6FF;
  border: 2px solid #DBEAFE;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jmp-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jmp-profile-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--jmp-text-dark);
}

.jmp-profile-email {
  font-size: 13px;
  color: var(--jmp-text-muted);
}

.jmp-profile-login {
  font-size: 12px;
  color: #64748B;
  margin-top: 4px;
}

.jmp-profile-tenant {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
}

.jmp-tenant-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--jmp-text-dark);
  margin-bottom: 6px;
}

.jmp-tenant-details {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--jmp-text-muted);
}

.jmp-profile-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.jmp-profile-section-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--jmp-text-dark);
}

.jmp-profile-section-desc {
  font-size: 13px;
  color: var(--jmp-text-muted);
  margin: 0 0 16px 0;
}

.jmp-pass-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.jmp-pass-input {
  padding-right: 44px !important;
  width: 100%;
}

.jmp-btn-toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #64748B;
  transition: color 0.15s ease;
}

.jmp-btn-toggle-pass:hover {
  color: var(--jmp-primaria);
}

/* Formulário Multi-Etapas (Tabs) no Painel */
.jmp-tabs-nav {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 20px;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.jmp-tabs-nav::-webkit-scrollbar {
  height: 4px;
}

.jmp-tabs-nav::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.jmp-tab-btn {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  outline: none !important;
}

.jmp-tab-btn:hover {
  color: var(--jmp-primaria, #2563EB);
}

.jmp-tab-btn.active {
  color: var(--jmp-primaria, #2563EB);
  border-bottom-color: var(--jmp-primaria, #2563EB) !important;
  font-weight: 700;
}

.jmp-tab-pane {
  display: none;
  animation: jmpTabFade 0.2s ease-in-out;
}

.jmp-tab-pane.active {
  display: block;
}

@keyframes jmpTabFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.jmp-col-third {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .jmp-form-row {
    flex-direction: column;
    gap: 0;
  }
  .jmp-col-half,
  .jmp-col-third {
    width: 100%;
    flex: none;
  }
}

.jmp-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
  gap: 12px;
}

/* Colaboradores e Utilitários de Interface */
.jmp-no-margin { margin: 0 !important; }
.jmp-mt-3 { margin-top: 12px !important; }
.jmp-colab-link { color: #2563EB; text-decoration: none; }
.jmp-colab-link:hover { text-decoration: underline; }
.jmp-colab-card {
  background: var(--jmp-card-bg);
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jmp-colab-role {
  font-size: 13px;
  color: var(--jmp-text-muted);
  display: block;
  margin-top: 2px;
}
.jmp-colab-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
  color: #475569;
}
.jmp-colab-footer {
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.jmp-filters-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
}
.jmp-search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.jmp-search-box svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
}
.jmp-search-box input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  background: var(--jmp-card-bg);
  font-size: 14px;
  color: var(--jmp-text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.jmp-search-box input:focus {
  border-color: var(--jmp-secundaria);
}
.jmp-filter-select {
  padding: 10px 14px;
  border: 1px solid var(--jmp-border);
  border-radius: var(--jmp-radius);
  background: var(--jmp-card-bg);
  font-size: 14px;
  color: var(--jmp-text);
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}
.jmp-sheet-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

/* Responsividade Mobile-First do Painel */
@media (max-width: 768px) {
  html, body.jmp-painel-body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .jmp-topbar {
    padding: 10px 12px;
  }
  .jmp-topbar-link {
    display: none !important;
  }
  .jmp-topbar-user-link span {
    display: none !important;
  }
  .jmp-topbar-user-link {
    padding: 6px 8px;
    margin-right: 4px;
  }
  .jmp-topbar-title {
    max-width: 130px;
    font-size: 14px;
  }
  .jmp-main-content {
    padding: 12px;
    max-width: 100vw;
  }
  .jmp-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .jmp-section-header .jmp-btn {
    width: 100%;
    justify-content: center;
  }
  .jmp-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .jmp-filter-select {
    width: 100%;
  }
}

/* -------------------------------------------------------------
 * Loading Overlay & Feedback de Salvamento com Imagem
 * ------------------------------------------------------------- */
.jmp-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.jmp-loading-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.jmp-loading-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: jmpCardPop 0.25s ease-out;
}

@keyframes jmpCardPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.jmp-spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid #E2E8F0;
  border-top-color: var(--jmp-primaria, #0A2540);
  border-right-color: var(--jmp-secundaria, #00D4B2);
  border-radius: 50%;
  animation: jmpSpin 0.75s linear infinite;
  margin-bottom: 18px;
}

@keyframes jmpSpin {
  to { transform: rotate(360deg); }
}

.jmp-loading-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
}

.jmp-loading-text {
  font-size: 13px;
  color: #64748B;
  line-height: 1.4;
}

/* Estado de Loading nos Botões */
.jmp-btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.jmp-btn.is-loading .jmp-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: jmpSpin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* Botões de Ação na Ficha */
.jmp-btn-public-link {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border: 1px solid #BFDBFE !important;
}
.jmp-btn-public-link:hover {
  background: #DBEAFE !important;
}

.jmp-btn-whatsapp-share {
  background: #25D366 !important;
  color: #FFFFFF !important;
  border: 1px solid #1EBE5D !important;
}
.jmp-btn-whatsapp-share:hover {
  background: #1EBE5D !important;
}

/* Linha com Link Público e Botão de Copiar */
.jmp-info-row-link {
  align-items: center !important;
}
.jmp-inline-copy-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 65%;
  justify-content: flex-end;
}
.jmp-link-short {
  font-family: monospace;
  font-size: 12px;
  color: #2563EB;
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jmp-btn-copy-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #F1F5F9;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.jmp-btn-copy-mini:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Botão de cópia rápida na lista de ativos */
.jmp-btn-row-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #64748B;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
}
.jmp-btn-row-copy:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #2563EB;
}

/* Toast Notifier Flutuante */
.jmp-float-toast {
  position: fixed;
  bottom: calc(var(--jmp-bottom-height, 64px) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.jmp-float-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


