/* Admin NM sobre Tabler — v1.4.0 */
:root {
  --tblr-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tblr-primary: #168930;
  --tblr-primary-rgb: 22, 137, 48;
  --tblr-link-color: #168930;
  --tblr-link-hover-color: #0f6b24;
  --tblr-border-radius: 4px;
  --tblr-border-radius-sm: 3px;
  --tblr-border-radius-lg: 5px;
  --nm-green: #168930;
  --nm-green-2: #42AC2C;
  --nm-graphite: #1B2B37;
  --nm-graphite-2: #33434D;
  --nm-gray: #617079;
}
.btn-primary { --tblr-btn-bg: #168930; --tblr-btn-border-color: #168930; --tblr-btn-hover-bg: #0f6b24; --tblr-btn-hover-border-color: #0f6b24; --tblr-btn-active-bg: #0f6b24; --tblr-btn-active-border-color: #0f6b24; }
.card, .btn, .form-control, .form-select, .alert, .badge, .nav-link { border-radius: 4px !important; }
.offcanvas { border-radius: 0 !important; }
body { font-feature-settings: 'cv03', 'cv04'; }

/* Sidebar */
.nm-sidebar { background: var(--nm-graphite) !important; }
.nm-sidebar .nav-link { border-radius: 4px !important; margin: 1px 8px; padding: 8px 12px; display: flex; align-items: center; color: rgba(255, 255, 255, .78); }
.nm-sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nm-sidebar .nav-link-icon { display: inline-flex; margin-right: 10px; }
.nm-sidebar .nav-item.active .nav-link { background: rgba(66, 172, 44, .18); color: #fff; }
.nm-sidebar .nav-item.active .nav-link .nav-link-icon { color: var(--nm-green-2); }
.nm-brand { display: flex; align-items: center; }
.nm-brand-full { height: 30px; }
.nm-brand-mini { height: 30px; display: none; }
.nm-sidebar-fim { padding: 8px 0 12px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; }
.nm-sidebar-fim .nav-link { font-size: .85rem; }
.nm-btn-mini { background: none; border: 0; width: calc(100% - 16px); text-align: left; cursor: pointer; }

/* Sidebar recolhida (desktop) */
@media (min-width: 992px) {
  .nm-mini .nm-sidebar { width: 4.5rem; }
  .nm-mini .page-wrapper { margin-left: 4.5rem; }
  .nm-mini .nm-sidebar .nav-link-title, .nm-mini .nm-brand-full { display: none; }
  .nm-mini .nm-brand-mini { display: block; margin: 0 auto; }
  .nm-mini .nm-sidebar .nav-link { justify-content: center; margin: 1px 6px; }
  .nm-mini .nm-sidebar .nav-link-icon { margin: 0; }
}

/* Kanban */
.nm-kanban { display: flex; flex-wrap: nowrap; gap: 12px; align-items: flex-start; overflow-x: auto;
  border: 1px solid #dde3e6; border-radius: 8px; background: #f8fafb; padding: 12px; scrollbar-width: thin; }
.nm-col { background: #eef1f3; border-radius: 5px; padding: 8px; flex: 0 0 250px; width: 250px; display: flex; flex-direction: column; }
.nm-col-cab { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 600; color: var(--nm-graphite-2); padding: 4px 6px 8px; text-transform: uppercase; letter-spacing: .03em; }
.nm-col-cab .badge { background: #fff; color: var(--nm-gray); }
.nm-lista { display: grid; gap: 8px; min-height: 48px; border-radius: 4px; align-content: start;
  overflow-y: auto; max-height: calc(100vh - 300px); scrollbar-width: thin; padding-right: 2px; }
.nm-card { background: #fff; border: 1px solid #e3e7e9; border-radius: 4px; padding: 10px 12px; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.nm-card:hover { border-color: var(--nm-green-2); box-shadow: 0 2px 10px rgba(27, 43, 55, .08); }
.nm-card.sortable-ghost { opacity: .4; }
.nm-card.sortable-chosen { cursor: grabbing; box-shadow: 0 6px 18px rgba(27, 43, 55, .16); }
.nm-card-nome { font-weight: 600; color: var(--nm-graphite); font-size: .9rem; }
.nm-card-meta { display: grid; gap: 2px; margin-top: 6px; font-size: .78rem; color: var(--nm-gray); }
.nm-card-meta a { color: var(--nm-gray); }
.nm-card-rodape { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 6px; }
.nm-fu { font-size: .72rem; border-radius: 3px; padding: 2px 7px; background: #eef1f3; color: var(--nm-gray); display: inline-flex; gap: 4px; align-items: center; }
.nm-fu.hoje { background: rgba(66, 172, 44, .14); color: #0f6b24; font-weight: 600; }
.nm-fu.atrasado { background: rgba(214, 57, 57, .12); color: #b02a2a; font-weight: 600; }
.nm-resp { font-size: .72rem; color: var(--nm-gray); background: #eef1f3; border-radius: 3px; padding: 2px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }

/* Painel lateral do lead */
.offcanvas.nm-painel { width: 480px; max-width: 96vw; }
.nm-painel .offcanvas-body { padding-top: 8px; }
.nm-obs { border-top: 1px solid #e9ecef; padding: 8px 0; }
.nm-obs p { margin: 0; font-size: .875rem; }
.nm-obs span { font-size: .75rem; color: var(--nm-gray); }
.nm-fu-linha { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-top: 1px solid #e9ecef; padding: 7px 0; font-size: .85rem; }
.nm-fu-linha.feito { color: var(--nm-gray); text-decoration: line-through; }

/* Lista do pipeline */
.nm-visao-botoes .btn.active { background: var(--nm-graphite); color: #fff; border-color: var(--nm-graphite); }
#pipe-lista .form-select { min-width: 150px; }

/* Login */
.nm-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f4f6f7; padding: 16px; }
.nm-auth .card { width: 380px; max-width: 100%; }
.nm-auth img { height: 40px; display: block; margin: 0 auto 6px; }

/* Parceiros */
.nm-parc svg { color: #168930; vertical-align: -3px; }

/* Dialog motivo da perda */
dialog#nm-motivo { border: 0; border-radius: 8px; padding: 20px; min-width: 300px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog#nm-motivo::backdrop { background: rgba(27,43,55,.5); }

/* Relatórios: barras horizontais */
.rel-linha { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.rel-rotulo { font-size: 13px; color: var(--tblr-secondary, #617079); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-trilho { background: #EEF1F2; border-radius: 4px; height: 10px; }
.rel-barra { background: #168930; border-radius: 4px; height: 10px; min-width: 4px; transition: width .3s; }
.rel-valor { font-size: 13px; font-weight: 600; white-space: nowrap; }
