/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all var(--transition-fast);
  gap: 0.5rem;
}

/* Botão "+ Novo" padronizado — mesmas dimensões do "+ Novo Ativo" */
.btn-new-item {
  height: 38px;
  min-width: 138px;
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #1E3A8A;
  color: #FFFFFF !important;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.35);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: #013e40 !important;
  box-shadow: 0 4px 14px rgba(1, 62, 64, 0.45);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #93C5FD;
  cursor: not-allowed;
  opacity: 0.65;
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-surface);
}

.btn-danger {
  background-color: #EF4444;
  color: #FFFFFF;
}

.btn-danger:hover:not(:disabled) {
  background-color: #EF4444;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Cards */
.card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Status Badges */
.badge-open { background-color: #EFF6FF; color: #3B82F6; }
.badge-in-progress { background-color: #FEF2F2; color: #EF4444; }
.badge-waiting { background-color: #FFFBEB; color: #F59E0B; }
.badge-closed { background-color: #F0FDF4; color: #10B981; }
.badge-cancelled { background-color: #F9FAFB; color: #374151; }

.badge-asset-active { background-color: #F0FDF4; color: #10B981; }
.badge-asset-inactive { background-color: #FEF2F2; color: #EF4444; }

/* Priority Badges */
.badge-priority-low { background-color: #ECFDF5; color: var(--priority-low); }
.badge-priority-medium { background-color: #FFFBEB; color: var(--priority-medium); }
.badge-priority-high { background-color: #FEF2F2; color: var(--priority-high); }
.badge-priority-critical { background-color: #F5F3FF; color: var(--priority-critical); }

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-text-primary);
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #111827;
  background-color: #FFFFFF;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
}

.form-control:focus,
.form-select:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-control::placeholder { color: #9CA3AF; }

.form-error {
  font-size: 0.75rem;
  color: var(--status-in-progress);
  margin-top: 0.25rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(17, 24, 39, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1150; /* acima do chat privado, do painel de reuniões e do menu no celular */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: #FFFFFF;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 32rem;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
  padding: 1.5rem;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 1rem;
  border-radius: 0.375rem;
  background: #FFFFFF;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-primary);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 250px;
}
.toast.success { border-left-color: var(--status-closed); }
.toast.error { border-left-color: var(--status-in-progress); }
.toast.warning { border-left-color: var(--status-waiting); }

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th, .table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  background-color: #F9FAFB;
  color: var(--color-text-secondary);
}

.table-row:hover {
  background-color: var(--color-surface);
}

/* Avatar */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1rem;
  background-color: var(--color-primary);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.625rem;
}

/* Loading Spinner */
.loading-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: var(--color-text-secondary);
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--color-border);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.file-upload:hover, .file-upload.dragover {
  border-color: var(--color-primary);
  background-color: #F9FAFB;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
}

.pagination button {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  background: #FFF;
  border-radius: 0.375rem;
}
.pagination button.active {
  background: var(--color-primary);
  color: #FFF;
  border-color: var(--color-primary);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #FFF;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 13rem;
  z-index: 50;
  padding: 0.375rem 0;
  /* display:none → nenhum elemento invisível intercepta cliques */
  display: none;
}
.dropdown.active .dropdown-menu {
  display: block;
}
.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text-primary);
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  margin: 0 0.25rem;
  transition: background 0.13s ease, color 0.13s ease;
  text-decoration: none;
}
.dropdown-item:hover {
  background-color: rgba(1, 62, 64, 0.1);
  color: #013e40;
  font-weight: 500;
}

/* Search Input */
.search-input-wrapper {
  position: relative;
}
.search-input-wrapper svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
}
.search-input {
  padding-left: 2.25rem;
}

/* Floating Action Button overrides */
.floating-action-btn {
  background: var(--gradient-brand);
}
.floating-action-btn:hover {
  background: #013e40 !important;
  box-shadow: 0 6px 20px rgba(1, 62, 64, 0.5);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #0F172A;
  border-color: #475569;
  color: #F1F5F9;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  border-color: #60A5FA;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* ── Dark Mode: Force badge colors to stay legible ── */
[data-theme="dark"] .badge-priority-low { background-color: #D1FAE5 !important; color: #065F46 !important; }
[data-theme="dark"] .badge-priority-medium { background-color: #FEF3C7 !important; color: #92400E !important; }
[data-theme="dark"] .badge-priority-high { background-color: #FED7AA !important; color: #9A3412 !important; }
[data-theme="dark"] .badge-priority-critical { background-color: #FEE2E2 !important; color: #991B1B !important; }
[data-theme="dark"] .badge-status-open { background-color: #DBEAFE !important; color: #1E40AF !important; }
[data-theme="dark"] .badge-status-in_progress { background-color: #FEE2E2 !important; color: #991B1B !important; }
[data-theme="dark"] .badge-status-waiting_validation { background-color: #FEF3C7 !important; color: #92400E !important; }
[data-theme="dark"] .badge-status-closed { background-color: #D1FAE5 !important; color: #065F46 !important; }
[data-theme="dark"] .badge-status-cancelled { background-color: #F3F4F6 !important; color: #374151 !important; }

/* ── Dark Mode: Dropdown, Pagination, Table ── */
[data-theme="dark"] .dropdown-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .dropdown-item { color: #F1F5F9; }
[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
}
[data-theme="dark"] .pagination button { background: #1e293b; border-color: #334155; color: #F1F5F9; }
[data-theme="dark"] .table th { background-color: #1e293b; }

/* ── Dark Mode: Status breakdown bars on dashboard ── */
[data-theme="dark"] .status-breakdown .status-bar-label,
[data-theme="dark"] .status-breakdown .status-bar-count {
  color: #F1F5F9 !important;
}

/* ─── Notificações: bolinha vermelha no menu + caixa à direita (js/realtime.js) ─── */
.nav-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #EF4444; margin-left: 6px; vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
  animation: jdPulse 2s ease-in-out infinite;
}
@keyframes jdPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.08); }
}
[data-sidebar="collapsed"] .sidebar-nav-item.has-unread { position: relative; }
[data-sidebar="collapsed"] .sidebar-nav-item.has-unread::after {
  content: ''; position: absolute; top: 7px; right: calc(50% - 15px);
  width: 9px; height: 9px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #0F172A;
}
.menu-toggle.has-unread { position: relative; }
.menu-toggle.has-unread::after {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 9px; height: 9px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #FFFFFF;
}

.jd-notify-stack {
  position: fixed; top: 76px; right: 20px; z-index: 9000;
  display: flex; flex-direction: column; gap: 0.6rem;
  width: 360px; max-width: calc(100vw - 32px); pointer-events: none;
}
.jd-notify {
  pointer-events: auto; display: flex; gap: 0.75rem; align-items: flex-start;
  background: #FFFFFF; color: #111827; border: 1px solid #E5E7EB; border-left: 4px solid #2563EB;
  border-radius: 0.75rem; padding: 0.85rem 0.9rem; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  animation: jdSlideIn 0.25s ease-out;
}
.jd-notify-kanban { border-left-color: #7C3AED; }
.jd-notify.clickable { cursor: pointer; }
.jd-notify.clickable:hover { box-shadow: 0 12px 34px rgba(15, 23, 42, 0.26); }
.jd-notify.clickable:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.jd-notify.leaving { animation: jdSlideOut 0.25s ease-in forwards; }
.jd-notify-icon { font-size: 1.25rem; line-height: 1; margin-top: 2px; }
.jd-notify-body { flex: 1; min-width: 0; }
.jd-notify-title {
  font-weight: 700; font-size: 0.875rem; line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.jd-notify-text {
  font-size: 0.8rem; color: #4B5563; margin-top: 0.2rem; line-height: 1.4; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word;
}
.jd-notify-time { font-size: 0.7rem; color: #9CA3AF; margin-top: 0.3rem; }
.jd-notify-close { background: none; border: none; color: #9CA3AF; cursor: pointer; font-size: 0.9rem; padding: 0 0.1rem; line-height: 1; }
.jd-notify-close:hover { color: #111827; }
[data-theme="dark"] .jd-notify { background: #1E293B; color: #F1F5F9; border-color: #334155; }
[data-theme="dark"] .jd-notify-text { color: #CBD5E1; }
[data-theme="dark"] .jd-notify-close:hover { color: #F1F5F9; }
[data-theme="dark"] .menu-toggle.has-unread::after { box-shadow: 0 0 0 2px #1E293B; }
@keyframes jdSlideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes jdSlideOut { to { opacity: 0; transform: translateX(24px); } }
@media (max-width: 640px) {
  .jd-notify-stack { top: 68px; right: 16px; left: 16px; width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dot, .jd-notify, .jd-notify.leaving { animation: none; }
}

/* rodada 18: janela "Redefinir senha" (jdPasswordDialog em js/utils.js) */
.jd-pw-dialog { background: var(--color-surface, #fff); color: var(--color-text-primary, #111827); border-radius: .875rem; width: min(440px, 92vw); padding: 1.75rem 1.75rem 1.5rem; box-shadow: 0 24px 64px rgba(0,0,0,.22); }
.jd-pw-dialog .jd-pw-icon { font-size: 2rem; text-align: center; margin-bottom: .5rem; }
.jd-pw-dialog h3 { font-size: 1.1rem; font-weight: 700; text-align: center; margin: 0 0 .25rem; }
.jd-pw-dialog .jd-pw-sub { text-align: center; color: var(--color-text-secondary, #6B7280); font-size: .88rem; margin: 0 0 1.25rem; overflow-wrap: anywhere; }
.jd-pw-field { position: relative; }
.jd-pw-field .form-control { padding-right: 2.6rem; }
.jd-pw-eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 1rem; padding: .3rem .45rem; border-radius: .4rem; opacity: .7; }
.jd-pw-eye:hover, .jd-pw-eye:focus-visible { opacity: 1; background: var(--color-bg-secondary, #F3F4F6); }
.jd-pw-hint { display: block; margin-top: .35rem; font-size: .78rem; color: var(--color-text-secondary, #6B7280); }
.jd-pw-err { color: #DC2626; font-size: .85rem; margin: 0 0 .75rem; }
.jd-pw-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .5rem; }
@media (max-width: 480px) { .jd-pw-actions { flex-direction: column-reverse; } .jd-pw-actions .btn { width: 100%; } }

/* rodada 18: centros de custo (js/cost-centers.js) */
.cc-trigger { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.cc-trigger-sum { font-size: .85rem; color: var(--color-text-secondary, #6B7280); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-overlay { z-index: 1160; }
.cc-modal { max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; }
.cc-modal h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .35rem; }
.cc-lead { color: var(--color-text-secondary, #6B7280); font-size: .88rem; margin: 0 0 1rem; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .45rem; margin-bottom: 1.1rem; }
.cc-chip { display: flex; align-items: center; gap: .5rem; padding: .5rem .65rem; border: 1px solid var(--color-border, #E5E7EB); border-radius: .6rem; cursor: pointer; font-size: .87rem; line-height: 1.25; background: var(--color-surface, #fff); transition: border-color .15s, background .15s; }
.cc-chip:hover { border-color: var(--color-primary, #377CEC); }
.cc-chip:has(input:checked) { border-color: var(--color-primary, #377CEC); background: color-mix(in srgb, var(--color-primary, #377CEC) 9%, transparent); }
.cc-chip input { width: 1rem; height: 1rem; flex: none; accent-color: var(--color-primary, #377CEC); }
.cc-add { display: flex; gap: .5rem; }
.cc-add .form-control { flex: 1; min-width: 0; }
.cc-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.cc-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .4rem .3rem .65rem; border-radius: 999px; background: var(--color-bg-secondary, #F3F4F6); font-size: .84rem; }
.cc-tag button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .25rem; border-radius: 50%; color: inherit; opacity: .65; }
.cc-tag button:hover, .cc-tag button:focus-visible { opacity: 1; }
.cc-note { font-size: .8rem; color: var(--color-text-secondary, #6B7280); margin: 1rem 0 0; }
.cc-foot { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.cc-count { margin-right: auto; font-size: .85rem; color: var(--color-text-secondary, #6B7280); }
.cc-checklist { display: flex; flex-wrap: wrap; gap: .4rem; max-height: 180px; overflow-y: auto; padding: .1rem; }
.cc-check { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .6rem; border: 1px solid var(--color-border, #E5E7EB); border-radius: 999px; font-size: .84rem; cursor: pointer; }
.cc-check:has(input:checked) { border-color: var(--color-primary, #377CEC); background: color-mix(in srgb, var(--color-primary, #377CEC) 9%, transparent); }
.cc-check input { accent-color: var(--color-primary, #377CEC); }
.cc-empty { font-size: .83rem; color: var(--color-text-secondary, #6B7280); margin: 0; }
@media (max-width: 520px) { .cc-grid { grid-template-columns: 1fr 1fr; } .cc-foot .btn { flex: 1; } .cc-count { width: 100%; } }

/* ── Rodada 19: modal de usuário largo e baixo (foto no topo à esquerda, rodapé sempre visível) ── */
.modal.um-modal { max-width: 980px; width: calc(100vw - 2rem); padding: 0; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; overflow: hidden; }
.um-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.um-body { display: grid; grid-template-columns: 230px 1fr; min-height: 0; overflow-y: auto; flex: 1; }
.um-side { padding: 1.5rem 1.25rem; background: linear-gradient(170deg, #0f172a 0%, #013e40 100%); color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.um-kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: #93C5FD; }
.um-name { margin: 0 0 .5rem; font-size: 1.25rem; font-weight: 800; line-height: 1.25; word-break: break-word; color: #fff; }
.um-avatar { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #8761f6, #377cec, #40c891); font-size: 2.4rem; font-weight: 800; color: #fff; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.um-avatar img { width: 100%; height: 100%; object-fit: cover; }
.um-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.um-photo-btn { cursor: pointer; background: rgba(255,255,255,.12) !important; color: #fff !important; border-color: rgba(255,255,255,.3) !important; }
.um-photo-btn:focus-within { outline: 2px solid #93C5FD; outline-offset: 2px; }
.um-photo-remove { background: none; border: 0; color: #FCA5A5; text-decoration: underline; cursor: pointer; font-size: .8rem; padding: .25rem 0; }
.um-photo-hint { color: rgba(255,255,255,.65); font-size: .72rem; }
.um-status { width: 100%; margin-top: auto; padding-top: 1rem; }
.um-status .form-label { color: #E2E8F0; }
.um-main { padding: 1.25rem 1.5rem .5rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.um-sec { border: 0; padding: 0; margin: 0 0 .5rem; min-width: 0; }
.um-sec legend { font-size: .78rem; font-weight: 800; color: #1E3A8A; margin-bottom: .5rem; padding: 0; }
.um-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.um-grid .form-group { margin-bottom: .85rem; }
.um-span { grid-column: 1 / -1; }
.um-cc { max-height: 120px; }
.um-foot { display: flex; justify-content: flex-end; gap: .75rem; padding: .9rem 1.5rem; border-top: 1px solid #E5E7EB; background: #F9FAFB; flex-shrink: 0; }
@media (max-width: 760px) {
  .um-body { grid-template-columns: 1fr; }
  .um-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 1rem 1.25rem; }
  .um-kicker, .um-name { width: 100%; }
  .um-avatar { width: 76px; height: 76px; font-size: 1.6rem; }
  .um-status { width: auto; margin-top: 0; padding-top: 0; flex: 1; min-width: 140px; }
  .um-grid { grid-template-columns: 1fr; }
  .um-main { padding: 1rem 1.25rem .25rem; }
}
[data-theme="dark"] .um-sec legend { color: #93C5FD; }
[data-theme="dark"] .um-foot { background: #0F172A; border-color: #334155; }

/* ── Rodada 19: regras da senha forte (lista que vai marcando enquanto digita) ── */
.jd-pw-rules { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .5rem; font-size: .75rem; }
.jd-pw-rules li { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px; background: #F1F5F9; color: #64748B; }
.jd-pw-rules li::before { content: '○'; font-weight: 700; }
.jd-pw-rules li.ok { background: #DCFCE7; color: #166534; }
.jd-pw-rules li.ok::before { content: '✓'; }
[data-theme="dark"] .jd-pw-rules li { background: #1E293B; color: #94A3B8; }
[data-theme="dark"] .jd-pw-rules li.ok { background: rgba(22,163,74,.25); color: #86EFAC; }
.um-name.um-name-empty { color: rgba(255,255,255,.55); font-weight: 600; }
.um-avatar img[hidden], .um-avatar span[hidden] { display: none !important; }

/* rodada 21: paginação padrão (jdPager em js/utils.js) */
.jd-pager { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin: 1.75rem 0 0.5rem; }
.jd-pager[hidden] { display: none; }
.jd-pg-info { margin: 0; font-size: 0.8125rem; color: var(--color-text-secondary, #6B7280); }
.jd-pg-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.3rem; }
.jd-pg-btn { min-width: 2.25rem; height: 2.25rem; padding: 0 0.6rem; border: 1px solid var(--color-border, #E5E7EB); background: #fff;
  color: var(--color-text, #111827); border-radius: 0.5rem; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; }
.jd-pg-btn:hover:not([disabled]):not(.is-current) { border-color: var(--color-primary, #6366F1); color: var(--color-primary, #6366F1); }
.jd-pg-btn:focus-visible { outline: 2px solid var(--color-primary, #6366F1); outline-offset: 2px; }
.jd-pg-btn.is-current { background: var(--gradient-brand, var(--color-primary, #6366F1)); border-color: transparent; color: #fff; cursor: default; }
.jd-pg-btn[disabled] { opacity: .4; cursor: default; }
.jd-pg-gap { padding: 0 0.15rem; color: var(--color-text-secondary, #9CA3AF); }
[data-theme="dark"] .jd-pg-btn:not(.is-current) { background: #1e293b; border-color: #334155; color: #F1F5F9; }
@media (max-width: 480px) { .jd-pg-btn { min-width: 2rem; height: 2rem; padding: 0 0.45rem; } }
/* rodada 21: usuário/empresa conectada por código */
.jd-linked-pill { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  background: #E0F2FE; color: #0369A1; vertical-align: middle; white-space: nowrap; }
[data-theme="dark"] .jd-linked-pill { background: rgba(14,165,233,.18); color: #7DD3FC; }

/* rodada 21: "Filtrar por empresas" nos relatórios */
.jd-cpick { position: relative; }
.jd-cpick-btn { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .5rem .85rem; border: 1px solid var(--color-border, #E5E7EB);
  border-radius: .5rem; background: var(--color-card-bg, #fff); color: inherit; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.jd-cpick-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.jd-cpick-btn:hover { border-color: var(--color-primary, #377CEC); }
.jd-cpick-btn:focus-visible { outline: 2px solid var(--color-primary, #377CEC); outline-offset: 2px; }
.jd-cpick-panel { position: absolute; z-index: 1160; top: calc(100% + 6px); left: 0; width: min(340px, 86vw); padding: .6rem; border: 1px solid var(--color-border, #E5E7EB);
  border-radius: .75rem; background: var(--color-card-bg, #fff); box-shadow: 0 18px 40px rgba(15, 23, 42, .16); }
.jd-cpick-search { margin-bottom: .4rem; }
.jd-cpick-list { max-height: 240px; overflow-y: auto; }
.jd-cpick-opt { display: flex; align-items: center; gap: .5rem; padding: .35rem .4rem; border-radius: .4rem; font-size: .85rem; cursor: pointer; }
.jd-cpick-opt:hover { background: rgba(55,124,236,.07); }
.jd-cpick-opt input { width: 16px; height: 16px; accent-color: var(--color-primary, #377CEC); flex-shrink: 0; }
.jd-cpick-opt.is-main span { font-weight: 700; }
.jd-cpick-all { border-bottom: 1px solid var(--color-border, #E5E7EB); border-radius: .4rem .4rem 0 0; margin-bottom: .2rem; }
.jd-cpick-empty { margin: .25rem; font-size: .85rem; color: var(--color-text-secondary, #6B7280); }
#userCompanyPick .jd-cpick-panel { left: auto; right: 0; }
[data-theme="dark"] .jd-cpick-btn, [data-theme="dark"] .jd-cpick-panel { background: #1e293b; border-color: #334155; }
