/**
 * Montec - Padrao visual global
 * Fundo cinza claro, cards brancos, formularios e modais padronizados.
 */

/* ========== Variaveis ========== */
:root {
  --moncell-bg: #f8f9fa;
  --moncell-card-bg: #ffffff;
  --moncell-card-border: rgba(0, 0, 0, 0.08);
  --moncell-card-radius: 0.5rem;
  --moncell-sidebar-bg: #94b8c8;
  --moncell-sidebar-text: #1e3a4d;
  --moncell-sidebar-hover: #7ea8bc;
  --moncell-focus: #0d6efd;
  --moncell-focus-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  --moncell-modal-info: #0d6efd;
  --moncell-modal-success: #198754;
  --moncell-modal-warning: #ffc107;
  --moncell-modal-danger: #dc3545;
  --moncell-label-weight: 600;
  --moncell-label-size: 0.875rem;
  --moncell-table-font-size: 0.8125rem;
  --moncell-table-header-size: 0.8rem;
  /* Mongestor brand - botões personalizados */
  --mg-primary: #22c55e;
  --mg-primary-hover: #1da750;
  --mg-primary-shadow: rgba(34, 197, 94, 0.35);
  --mg-dark: #37474f;
  --mg-dark-hover: #2c3a40;
}

/* ========== Dark mode ========== */
[data-theme="dark"] {
  --moncell-bg: #1a1d21;
  --moncell-card-bg: #25282c;
  --moncell-card-border: rgba(255, 255, 255, 0.08);
  --moncell-sidebar-bg: #2d3238;
  --moncell-sidebar-text: #e4e6eb;
  --moncell-sidebar-hover: #3d4248;
}
[data-theme="dark"] body.moncell-dashboard {
  background: var(--moncell-bg);
  color: #e4e6eb;
}
[data-theme="dark"] .moncell-sidebar {
  background: var(--moncell-sidebar-bg) !important;
}
[data-theme="dark"] .moncell-sidebar .nav-link,
[data-theme="dark"] .moncell-sidebar button.nav-link {
  color: var(--moncell-sidebar-text) !important;
}
[data-theme="dark"] .moncell-sidebar .nav-link:hover,
[data-theme="dark"] .moncell-sidebar button.nav-link:hover {
  background: var(--moncell-sidebar-hover);
  color: #fff !important;
}
[data-theme="dark"] .moncell-card,
[data-theme="dark"] .card,
html[data-theme="dark"] .moncell-card,
html[data-theme="dark"] .card {
  background: var(--moncell-card-bg) !important;
  border-color: var(--moncell-card-border) !important;
  color: #e4e6eb !important;
}
[data-theme="dark"] .moncell-card .card-header,
[data-theme="dark"] .card .card-header,
html[data-theme="dark"] .card .card-header {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: var(--moncell-card-border) !important;
  color: #e4e6eb !important;
}
html[data-theme="dark"] .card-body {
  background-color: var(--moncell-card-bg) !important;
  color: #e4e6eb !important;
}
[data-theme="dark"] .moncell-table-wrap,
[data-theme="dark"] .table {
  --bs-table-bg: var(--moncell-card-bg);
  --bs-table-color: #e4e6eb;
  --bs-table-border-color: var(--moncell-card-border);
}
[data-theme="dark"] .moncell-table thead th {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #b0b3b8 !important;
  border-color: var(--moncell-card-border) !important;
}
[data-theme="dark"] .moncell-table tbody td {
  color: #e4e6eb;
  border-color: var(--moncell-card-border);
}
[data-theme="dark"] .moncell-table tbody tr:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .moncell-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.1);
}
/* thead com table-light em várias telas: escuro no modo escuro */
[data-theme="dark"] .table thead.table-light,
[data-theme="dark"] .table thead th,
[data-theme="dark"] .table-light {
  background: rgba(0, 0, 0, 0.35) !important;
  color: #e4e6eb !important;
  border-color: var(--moncell-card-border) !important;
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background: transparent;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: #1a1d21 !important;
  border-color: #3d4248 !important;
  color: #e4e6eb !important;
}
[data-theme="dark"] .form-control::placeholder {
  color: #6c757d;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: #25282c !important;
  border-color: var(--moncell-focus);
  color: #e4e6eb !important;
}
[data-theme="dark"] .text-muted {
  color: #b0b3b8 !important;
}
[data-theme="dark"] .bg-light {
  background: #25282c !important;
}
[data-theme="dark"] .list-group-item-light {
  background: #25282c !important;
  color: #e4e6eb !important;
  border-color: var(--moncell-card-border) !important;
}

/* Formulários e tabelas: regras com html para vencer Bootstrap e inline */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] input.form-control,
html[data-theme="dark"] select.form-select,
html[data-theme="dark"] textarea.form-control {
  background-color: #1a1d21 !important;
  border-color: #3d4248 !important;
  color: #e4e6eb !important;
}
html[data-theme="dark"] .form-control::placeholder {
  color: #6c757d !important;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: #25282c !important;
  border-color: var(--moncell-focus) !important;
  color: #e4e6eb !important;
}
html[data-theme="dark"] .input-group-text {
  background-color: #25282c !important;
  border-color: #3d4248 !important;
  color: #e4e6eb !important;
}
html[data-theme="dark"] .form-label,
html[data-theme="dark"] label,
html[data-theme="dark"] .form-check-label {
  color: #e4e6eb !important;
}
html[data-theme="dark"] .card-body {
  background-color: var(--moncell-card-bg) !important;
  color: #e4e6eb;
}
html[data-theme="dark"] .modal-content {
  background-color: var(--moncell-card-bg) !important;
  border-color: var(--moncell-card-border);
  color: #e4e6eb;
}
html[data-theme="dark"] .modal-body {
  background-color: var(--moncell-bg) !important;
  color: #e4e6eb;
}
/* Tabelas: qualquer .table no sistema */
html[data-theme="dark"] .table,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  background-color: var(--moncell-card-bg) !important;
  border-color: var(--moncell-card-border) !important;
  color: #e4e6eb !important;
}
html[data-theme="dark"] .table thead th {
  background-color: rgba(0, 0, 0, 0.35) !important;
  color: #b0b3b8 !important;
}
html[data-theme="dark"] .table tbody tr:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="dark"] .table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Seções de formulário (Dados básicos, Endereço, etc.): fundo escuro */
html[data-theme="dark"] .moncell-form-section {
  background: var(--moncell-card-bg) !important;
  border-color: var(--moncell-card-border) !important;
  color: #e4e6eb !important;
}
html[data-theme="dark"] .moncell-form-section-title {
  color: #e4e6eb !important;
  border-bottom-color: var(--moncell-card-border) !important;
}
html[data-theme="dark"] .moncell-form-section-title i {
  color: #b0b3b8 !important;
}
html[data-theme="dark"] .moncell-form-footer {
  border-top-color: var(--moncell-card-border) !important;
}

/* Movimentação do Caixa e painéis: modo escuro */
[data-theme="dark"] .movimentacao-destaque-card {
  background: var(--moncell-card-bg) !important;
  border-color: var(--moncell-card-border);
  color: #e4e6eb;
}
[data-theme="dark"] .movimentacao-destaque-saldo {
  background: rgba(34, 197, 94, 0.12) !important;
  border-left-color: #22c55e;
}
[data-theme="dark"] .movimentacao-destaque-dinheiro {
  background: rgba(13, 110, 253, 0.12) !important;
  border-left-color: #0d6efd;
}
[data-theme="dark"] .movimentacao-destaque-quebra {
  background: rgba(108, 117, 125, 0.15) !important;
  border-left-color: #6c757d;
}
[data-theme="dark"] .movimentacao-destaque-titulo {
  color: #b0b3b8;
}
[data-theme="dark"] .movimentacao-saldo-linha-label,
[data-theme="dark"] .movimentacao-saldo-linha-dica {
  color: #b0b3b8 !important;
}
[data-theme="dark"] .movimentacao-saldo-linha.movimentacao-saldo-diferenca {
  border-top-color: var(--moncell-card-border);
}
[data-theme="dark"] .movimentacao-card-tabela td {
  color: #e4e6eb;
  border-color: transparent;
}
[data-theme="dark"] .movimentacao-composicao-bloco-titulo {
  color: #b0b3b8;
  border-bottom-color: var(--moncell-card-border);
}
[data-theme="dark"] .movimentacao-coluna {
  background: var(--moncell-card-bg) !important;
  border-color: var(--moncell-card-border);
  color: #e4e6eb;
}
[data-theme="dark"] .movimentacao-coluna-entradas {
  background: rgba(34, 197, 94, 0.1) !important;
  border-left-color: #22c55e;
}
[data-theme="dark"] .movimentacao-coluna-saidas {
  background: rgba(220, 53, 69, 0.1) !important;
  border-left-color: #dc3545;
}
[data-theme="dark"] .movimentacao-coluna-vendas {
  background: rgba(13, 110, 253, 0.1) !important;
  border-left-color: #0d6efd;
}
[data-theme="dark"] .movimentacao-coluna-titulo {
  color: #b0b3b8;
  border-bottom-color: var(--moncell-card-border);
}
[data-theme="dark"] .movimentacao-coluna-label {
  color: #b0b3b8;
}
[data-theme="dark"] .movimentacao-coluna-lista li.movimentacao-coluna-total {
  border-top-color: var(--moncell-card-border);
}

/* ========== Base e layout ========== */
body.moncell-dashboard {
  min-height: 100vh;
  background: var(--moncell-bg);
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Top header (estilo GestaoClick) */
.moncell-top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #37474f;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1040;
  display: flex;
  align-items: center;
}

.moncell-top-header .navbar-brand,
.moncell-top-header .btn-link {
  color: #eceff1 !important;
}

.moncell-top-header .btn-link:hover {
  color: #fff !important;
}

.moncell-top-header .btn-outline-light {
  color: #eceff1;
  border-color: rgba(255, 255, 255, 0.3);
}

.moncell-top-header .btn-outline-light:hover {
  color: #37474f;
  background: #fff;
  border-color: #fff;
}

.moncell-dashboard-wrap {
  padding-top: 56px;
  min-height: 100vh;
}

.moncell-avatar {
  width: 36px;
  height: 36px;
  background: #1976d2;
  font-size: 0.75rem;
  text-transform: uppercase;
}

@media (max-width: 991.98px) {
  .moncell-sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
  }
  .moncell-sidebar.show {
    transform: translateX(0);
  }
  .moncell-dashboard-wrap:not(.sidebar-collapsed) .moncell-sidebar {
    transform: translateX(-100%);
  }
  .moncell-dashboard-wrap:not(.sidebar-collapsed) .moncell-sidebar.show {
    transform: translateX(0);
  }
  .moncell-dashboard-wrap .moncell-content-wrap {
    margin-left: 0 !important;
  }
}

.moncell-main {
  flex: 1;
  min-height: calc(100vh - 56px);
  background: var(--moncell-bg);
  padding: 1.5rem;
}

/* ========== Sidebar fixa ========== */
.moncell-sidebar {
  background: var(--moncell-sidebar-bg);
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  width: 260px;
  color: var(--moncell-sidebar-text);
  position: fixed;
  top: 56px;
  left: 0;
  z-index: 1030;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.2s ease;
}

.moncell-sidebar .nav-link,
.moncell-sidebar button.nav-link {
  color: #0d0d0d;
  font-weight: 700;
  border-radius: 0.5rem;
  margin: 0.2rem 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.moncell-sidebar button.nav-link:hover {
  background: var(--moncell-sidebar-hover);
  color: #0d0d0d;
}

.moncell-sidebar .nav-link:hover {
  background: var(--moncell-sidebar-hover);
  color: #0d0d0d;
}

.moncell-sidebar .nav-link.active {
  background: var(--moncell-sidebar-hover);
  color: #0d0d0d;
  font-weight: 700;
}

.moncell-sidebar .nav-link.ps-4 {
  font-weight: 600;
  color: #1a1a1a;
}

.moncell-sidebar .dropdown-toggle::after {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.moncell-sidebar .dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.moncell-sidebar hr {
  border-color: rgba(30, 58, 77, 0.2);
}

/* Logo na sidebar */
.sidebar-logo {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.moncell-sidebar-logo {
  max-height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.moncell-content-wrap {
  margin-left: 260px;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

@media (min-width: 992px) {
  .moncell-dashboard-wrap.sidebar-collapsed .moncell-content-wrap {
    margin-left: 0;
  }
  .moncell-dashboard-wrap.sidebar-collapsed .moncell-sidebar {
    transform: translateX(-100%);
  }
}

/* ========== Cards ========== */
.moncell-card {
  background: var(--moncell-card-bg);
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.moncell-card .card-body {
  padding: 1.5rem 1.75rem;
}

.moncell-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--moncell-card-border);
  font-weight: 600;
  padding: 0.75rem 1rem;
}

/* ========== Formularios (estilo profissional) ========== */
.moncell-form .form-label,
.moncell-form label.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #37474f;
  margin-bottom: 0.4rem;
  display: block;
  letter-spacing: 0.01em;
}

.moncell-form .form-control,
.moncell-form .form-select {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.6rem 0.875rem;
  font-size: 0.9375rem;
  min-height: 42px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.moncell-form .form-control::placeholder {
  color: #94a3b8;
}

.moncell-form .form-control:hover,
.moncell-form .form-select:hover {
  border-color: #cbd5e1;
}

.moncell-form .form-control:focus,
.moncell-form .form-select:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
  outline: 0;
}

.moncell-form .form-control.is-invalid,
.moncell-form .form-select.is-invalid {
  border-color: #dc3545;
  background-image: none;
}

.moncell-form .form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.moncell-form .invalid-feedback {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  color: #dc3545;
}

.moncell-form .text-muted.small {
  font-size: 0.75rem;
  margin-top: 0.35rem;
  display: block;
}

/* Textarea */
.moncell-form textarea.form-control {
  min-height: 100px;
  padding: 0.75rem;
  resize: vertical;
}

/* Select */
.moncell-form .form-select {
  cursor: pointer;
  padding-right: 2.25rem;
}

/* Input groups */
.moncell-form .input-group {
  border-radius: 0.5rem;
  overflow: hidden;
}

.moncell-form .input-group .form-control {
  border-radius: 0;
}

.moncell-form .input-group-text {
  border-radius: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  min-width: 42px;
  justify-content: center;
}

.moncell-form .input-group .input-group-text + .form-control {
  border-left: none;
}

.moncell-form .input-group .form-control + .btn {
  border-left: none;
}

.moncell-form .input-group .btn-outline-secondary {
  border-color: #e2e8f0;
  color: #64748b;
}

.moncell-form .input-group .btn-outline-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.moncell-form .input-group:focus-within .input-group-text,
.moncell-form .input-group:focus-within .form-control,
.moncell-form .input-group:focus-within .btn-outline-secondary {
  border-color: #1976d2;
}

/* Secoes do formulario */
.moncell-form-section {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: #fafbfc;
  border-radius: 0.625rem;
  border: 1px solid #eef1f4;
}

.moncell-form-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
  letter-spacing: 0.02em;
}

.moncell-form-section-title i {
  color: #64748b;
  margin-right: 0.35rem;
}

/* Rodape de acoes do formulario */
.moncell-form-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.moncell-form-footer .btn-primary {
  order: -1;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  border-radius: 0.5rem;
  min-height: 42px;
}

.moncell-form-footer .btn-success {
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  border-radius: 0.5rem;
  min-height: 42px;
}

.moncell-form-footer .btn-outline-secondary {
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  min-height: 42px;
}

/* Checkbox e radio */
.moncell-form .form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  border: 2px solid #cbd5e1;
}

.moncell-form .form-check-input:checked {
  background-color: #1976d2;
  border-color: #1976d2;
}

.moncell-form .form-check-label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Tabs em formularios */
.moncell-form .nav-tabs {
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.moncell-form .nav-tabs .nav-link {
  border: none;
  color: #64748b;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem 0.5rem 0 0;
  margin-bottom: -2px;
}

.moncell-form .nav-tabs .nav-link:hover {
  color: #1976d2;
}

.moncell-form .nav-tabs .nav-link.active {
  color: #1976d2;
  background: transparent;
  border-bottom: 2px solid #1976d2;
}

/* ========== Tabelas de listagem ========== */
.moncell-table-wrap {
  background: var(--moncell-card-bg);
  border: 1px solid var(--moncell-card-border);
  border-radius: var(--moncell-card-radius);
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.moncell-table {
  margin-bottom: 0;
}

.moncell-table thead th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: var(--moncell-table-header-size);
  color: #495057;
  border-bottom: 1px solid var(--moncell-card-border);
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.moncell-table tbody tr {
  transition: background 0.15s ease;
}

.moncell-table tbody tr:nth-of-type(even) {
  background: rgba(0, 0, 0, 0.02);
}

.moncell-table tbody tr:hover {
  background: rgba(13, 110, 253, 0.06);
}

.moncell-table tbody td {
  font-size: var(--moncell-table-font-size);
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}

/* Coluna de descricao: truncar com ellipsis e mostrar texto completo no hover */
.moncell-table .descricao-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moncell-table .acoes-cell {
  white-space: nowrap;
}

/* Menu de ações (dropdown) - estilo profissional */
.table-actions-dropdown {
  display: inline-block;
  margin: 0 2px;
}
.table-actions-dropdown .btn-actions-trigger {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.table-actions-dropdown .btn-actions-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #374151;
}
.table-actions-dropdown .btn-actions-trigger:focus {
  box-shadow: none;
}
.table-actions-dropdown .table-actions-menu {
  min-width: 160px;
  max-height: min(70vh, 320px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  -webkit-overflow-scrolling: touch;
}
/* Barra de rolagem só quando necessário (menus com poucos itens ficam sem scroll) */
.table-actions-dropdown .table-actions-menu::-webkit-scrollbar {
  width: 6px;
}
.table-actions-dropdown .table-actions-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 3px;
}
.table-actions-dropdown .table-actions-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.table-actions-dropdown .table-actions-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
.table-actions-dropdown .table-actions-menu .dropdown-item {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.table-actions-dropdown .table-actions-menu .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.06);
}
.table-actions-dropdown .table-actions-menu .dropdown-item.text-danger:hover {
  background: rgba(220, 53, 69, 0.08);
}
.table-actions-dropdown .table-actions-menu .dropdown-divider {
  margin: 0.35rem 0;
}

/* Botões de ação na tabela (legado): sempre btn btn-sm btn-acao + btn-acao-editar | btn-acao-excluir | btn-acao-visualizar */
.moncell-table .btn-acao {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  margin: 0 2px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.moncell-table .btn-acao.btn-acao-editar {
  color: var(--moncell-focus);
}

.moncell-table .btn-acao.btn-acao-editar:hover {
  background: rgba(13, 110, 253, 0.1);
  color: #0a58ca;
  border-color: rgba(13, 110, 253, 0.3);
}

.moncell-table .btn-acao.btn-acao-excluir,
.moncell-table .btn-acao.text-danger {
  color: var(--moncell-modal-danger);
}

.moncell-table .btn-acao.btn-acao-excluir:hover,
.moncell-table .btn-acao.text-danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #b02a37;
  border-color: rgba(220, 53, 69, 0.3);
}

.moncell-table .btn-acao.btn-acao-visualizar {
  color: #6c757d;
}

.moncell-table .btn-acao.btn-acao-visualizar:hover {
  background: rgba(108, 117, 125, 0.1);
  color: #495057;
  border-color: rgba(108, 117, 125, 0.3);
}

/* Padrão de botões nas páginas de listagem:
   - Cabeçalho: btn btn-sm btn-primary (ação principal) | btn-outline-primary (secundária) | btn-outline-secondary (filtros inativos) | btn-outline-danger (filtro ativo destaque) | btn-outline-warning (filtro ativo alternativo)
   - Ações em lote: btn btn-sm btn-outline-success (ativar) | btn-outline-danger (desativar/excluir) | btn-outline-primary (exportar/neutro)
   - Ícone: sempre antes do texto com me-1 */

/* ========== Botões Mongestor (design moderno e personalizado) ========== */
.btn-mg {
  font-weight: 600;
  border-radius: 8px;
  padding: 0.4rem 1rem;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
}
.btn-mg.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
}
.btn-mg:hover {
  transform: translateY(-1px);
}
.btn-mg:active {
  transform: translateY(0);
}
/* Primário - verde Mongestor */
.btn-mg-primary {
  background: linear-gradient(135deg, var(--mg-primary) 0%, var(--mg-primary-hover) 100%);
  color: #fff !important;
  box-shadow: 0 2px 8px var(--mg-primary-shadow);
}
.btn-mg-primary:hover {
  background: linear-gradient(135deg, var(--mg-primary-hover) 0%, #189e47 100%);
  box-shadow: 0 4px 12px var(--mg-primary-shadow);
}
.btn-mg-primary:active {
  box-shadow: 0 1px 4px var(--mg-primary-shadow);
}
/* Outline secundário */
.btn-mg-outline {
  background: #fff;
  color: var(--mg-dark);
  border: 1.5px solid #e2e8f0;
}
.btn-mg-outline:hover {
  background: #f8fafc;
  border-color: var(--mg-primary);
  color: var(--mg-primary);
}
/* Em falta / filtro ativo */
.btn-mg-outline-danger {
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}
.btn-mg-outline-danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
  color: #b91c1c;
}
/* Ação em lote: Ativar */
.btn-mg-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}
.btn-mg-success:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}
/* Ação em lote: Desativar */
.btn-mg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}
.btn-mg-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}
/* Ação em lote: Exportar */
.btn-mg-export {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}
.btn-mg-export:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
}
/* Filtro ativo (ex: Ocultar inativos) */
.btn-mg-outline-warning {
  background: #fff;
  color: #d97706;
  border: 1.5px solid #fde68a;
}
.btn-mg-outline-warning:hover {
  background: #fffbeb;
  border-color: #d97706;
  color: #b45309;
}
/* Voltar */
.btn-mg-back {
  background: #fff;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
}
.btn-mg-back:hover {
  background: #f8fafc;
  color: var(--mg-dark);
  border-color: #cbd5e1;
}
/* Form select e filtros - estilo mais moderno */
.produto-list-card .form-select {
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.produto-list-table-wrap .form-select:focus {
  border-color: var(--mg-primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Dark mode - botões Mongestor */
[data-theme="dark"] .btn-mg-outline,
[data-theme="dark"] .btn-mg-back {
  background: #25282c;
  border-color: #3d4248;
  color: #e4e6eb;
}
[data-theme="dark"] .btn-mg-outline:hover,
[data-theme="dark"] .btn-mg-back:hover {
  background: #2d3238;
  border-color: var(--mg-primary);
  color: var(--mg-primary);
}
[data-theme="dark"] .btn-mg-outline-danger {
  background: #25282c;
  border-color: #4b3737;
  color: #f87171;
}
[data-theme="dark"] .btn-mg-outline-danger:hover {
  background: #3d1f1f;
  border-color: #dc2626;
  color: #fca5a5;
}
[data-theme="dark"] .btn-mg-outline-warning {
  background: #25282c;
  border-color: #5c4a1a;
  color: #fbbf24;
}
[data-theme="dark"] .btn-mg-outline-warning:hover {
  background: #3d3510;
  border-color: #d97706;
  color: #fcd34d;
}

/* ========== Tabelas responsivas (mobile) ========== */
.moncell-table-wrap .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1px;
}
.moncell-table-wrap .table-responsive::-webkit-scrollbar {
  height: 6px;
}
.moncell-table-wrap .table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
/* Garantir que tabelas largas tenham scroll horizontal em mobile */
@media (max-width: 991.98px) {
  .moncell-table-wrap .table-responsive {
    max-width: 100%;
  }
  .moncell-table .descricao-cell {
    max-width: 180px;
  }
}
@media (max-width: 767.98px) {
  .moncell-table-wrap {
    border-radius: 0.375rem;
  }
  .moncell-table thead th,
  .moncell-table tbody td {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }
  .moncell-table .descricao-cell {
    max-width: 140px;
  }
  .moncell-table .btn-acao {
    width: 28px;
    height: 28px;
    margin: 0 1px;
  }
}
@media (max-width: 575.98px) {
  .moncell-table thead th,
  .moncell-table tbody td {
    padding: 0.35rem 0.4rem;
    font-size: 0.7rem;
  }
  .moncell-table .descricao-cell {
    max-width: 100px;
  }
}

/* ========== Modais ========== */
.moncell-modal .modal-content {
  border: none;
  border-radius: var(--moncell-card-radius);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.moncell-modal .modal-header {
  border-bottom: none;
  padding: 1rem 1.25rem;
  color: #fff;
}

.moncell-modal .modal-header .modal-title {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.moncell-modal .modal-header .btn-close {
  filter: invert(1) brightness(2);
  opacity: 0.9;
}

.moncell-modal .modal-body {
  padding: 1.25rem;
}

.moncell-modal .modal-footer {
  border-top: 1px solid var(--moncell-card-border);
  padding: 1rem 1.25rem;
  gap: 0.5rem;
}

/* Variantes de cabecalho do modal */
.moncell-modal.modal-info .modal-header {
  background: var(--moncell-modal-info);
}

.moncell-modal.modal-success .modal-header {
  background: var(--moncell-modal-success);
}

.moncell-modal.modal-warning .modal-header {
  background: var(--moncell-modal-warning);
  color: #212529;
}

.moncell-modal.modal-warning .modal-header .btn-close {
  filter: none;
  opacity: 0.7;
}

.moncell-modal.modal-danger .modal-header {
  background: var(--moncell-modal-danger);
}

/* Animacao suave */
.moncell-modal .modal-dialog {
  transition: transform 0.2s ease-out;
}

/* ========== Cards indicadores (dashboard) ========== */
.card-indicator {
  border-left: 4px solid;
  background: var(--moncell-card-bg);
  border: 1px solid var(--moncell-card-border);
  border-radius: var(--moncell-card-radius);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.moncell-card-indicator:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.card-indicator.primary { border-left-color: #1976d2; }
.card-indicator.success { border-left-color: #388e3c; }
.card-indicator.warning { border-left-color: #f57c00; }
.card-indicator.info { border-left-color: #0288d1; }

/* ========== Breadcrumb ========== */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.breadcrumb-item a {
  color: #64748b;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: #1976d2;
}

.breadcrumb-item.active {
  color: #1e293b;
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #cbd5e1;
  content: "\203A";
  font-size: 1.1em;
}

/* ========== Utilitarios ========== */
.moncell-page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.moncell-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0;
}

/* ========== Dashboard (painel) — layout moderno ========== */
.dash-hero {
  padding: 1rem 1.25rem;
  border: 1px solid var(--moncell-card-border);
  border-radius: 0.75rem;
  background: var(--moncell-card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
}

.dash-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-hero-text {
  min-width: 0;
}

.dash-hero-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1d21;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.dash-hero-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* Nome da loja: maior, visivel, fundo azul */
.dash-hero-loja {
  display: inline-block;
  margin: 0.5rem 0 0 0;
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: #1976d2;
  border-radius: 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.dash-hero-right {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* Pills e botoes na mesma linha quando couber; quebra para nao sumir */
.dash-hero-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
}

.dash-hero-item {
  flex: 1 1 0;
  min-width: 100px; /* garante que Trial e Pedidos (mes) permanecam visiveis */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.dash-hero-row .dash-pill.dash-hero-item {
  gap: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f8f9fa;
  color: #37474f;
  box-sizing: border-box;
  overflow: visible;
  min-width: 120px; /* Trial 10 dias / Pedidos (mes) XX sempre legiveis */
}

.dash-hero-row .dash-pill.dash-hero-item i {
  color: #1976d2;
}

.dash-hero-row .dash-pill.dash-hero-item strong {
  font-weight: 700;
}

.dash-hero-row .btn-dash-action.dash-hero-item {
  border-width: 1px;
}

.dash-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #37474f;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.dash-pill i {
  color: #1976d2;
}

.dash-pill strong {
  font-weight: 700;
}

.dash-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-dash-action {
  font-weight: 600;
}

/* Secoes do dashboard */
.dash-section {
  margin-bottom: 1.75rem;
}

.dash-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #37474f;
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.01em;
}

.dash-section-title.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dash-kpi-row,
.dash-indicators-row {
  --dash-card-min-h: 88px;
}

.dash-kpi-card {
  min-height: var(--dash-card-min-h, 88px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
}

.dash-alert {
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Cards de conteudo (grafico, tabela, atalhos) */
.dash-card {
  border-radius: 0.75rem;
  overflow: hidden;
}

.dash-card-header {
  background: transparent;
  border-bottom: 1px solid var(--moncell-card-border);
  padding: 0.875rem 1rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dash-card-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1d21;
  margin: 0;
}

.dash-card-body {
  padding: 1rem;
}

.dash-card-chart .dash-card-body {
  padding-top: 0.75rem;
}

/* Top 10 produtos: largura total e espacamento dos cards de cima */
.dash-section-top10 {
  margin-top: 1.5rem;
  padding-top: 0.01px; /* evita margin collapse */
}

.dash-card-top10 {
  background: var(--moncell-card-bg);
}

/* Cards com cor de fundo preenchida (KPI e Desempenho) */
.dash-kpi-card {
  background: #f0f4f8 !important;
}

.dash-kpi-card .card-body {
  background: transparent;
}

/* Cards de desempenho do mes: fundo preenchido por tipo */
.moncell-indicator-card.border-primary,
.dash-indicators-row .card.border-start.border-primary {
  background: #e8f0fe !important;
}

.moncell-indicator-card.border-secondary,
.dash-indicators-row .card.border-start.border-secondary {
  background: #f5f5f5 !important;
}

.moncell-indicator-card.border-success,
.dash-indicators-row .card.border-start.border-success {
  background: #e6f4ea !important;
}

.moncell-indicator-card.border-danger,
.dash-indicators-row .card.border-start.border-danger {
  background: #fce8e6 !important;
}

.moncell-indicator-card.border-info,
.dash-indicators-row .card.border-start.border-info {
  background: #e3f2fd !important;
}

.moncell-indicator-card.border-warning,
.dash-indicators-row .card.border-start.border-warning {
  background: #fff8e1 !important;
}

.dash-indicators-row .card .card-body {
  background: transparent;
}

.dash-kpi-card .card-body {
  gap: 0.75rem;
}

.dash-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.dash-kpi-icon i {
  font-size: 1.25rem;
}

.dash-kpi-icon-primary { background: rgba(25, 118, 210, 0.12); color: #1976d2; }
.dash-kpi-icon-success { background: rgba(0, 168, 89, 0.12); color: #00a859; }
.dash-kpi-icon-warning { background: rgba(245, 124, 0, 0.12); color: #f57c00; }
.dash-kpi-icon-info { background: rgba(2, 136, 209, 0.12); color: #0288d1; }

.dash-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-end;
}

.dash-filtergroup {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-filtersep {
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0 0.1rem;
}

.dash-filteractions {
  flex-direction: row;
  align-items: flex-end;
}

.dash-chart-wrap {
  position: relative;
  height: 260px;
}

/* Grafico Vendas por mes: maior altura, visual moderno */
.dash-chart-wrap-vendas {
  height: 380px;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.4) 100%);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.dash-chart-wrap-vendas canvas {
  border-radius: 8px;
}

.dash-chart-wrap-sm {
  height: 220px;
}

/* Grafico Top 10 produtos: area maior */
.dash-chart-wrap-top10 {
  height: 420px;
}

/* Tabela Top 10: fonte menor e altura de linha elegante */
.dash-table-top10 {
  font-size: 0.8125rem;
}

.dash-table-top10 thead th,
.dash-table-top10 tbody td {
  padding: 0.4rem 0.75rem;
  line-height: 1.4;
  vertical-align: middle;
}

.dash-table-top10 thead th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
}

@media (max-width: 767.98px) {
  .dash-hero-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-hero-right {
    width: 100%;
  }
  .dash-hero-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .dash-hero-item {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 120px;
  }
}

@media (max-width: 575.98px) {
  .dash-chart-wrap { height: 220px; }
  .dash-chart-wrap-vendas { height: 280px; }
  .dash-chart-wrap-sm { height: 200px; }
  .dash-chart-wrap-top10 { height: 320px; }
  .dash-filterbar {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-filteractions {
    align-items: stretch;
  }
}

.dash-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-shortcut {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dash-shortcut:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

.dash-shortcut .dash-shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Cards indicadores com numeros alinhados e hover suave */
.moncell-indicator-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.moncell-indicator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08) !important;
}

.moncell-indicator-card .card-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Barra de pagina (titulo + acoes) */
.moncell-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Botao Voltar consistente */
.btn-outline-secondary.btn-sm {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

/* Alertas em formularios */
.moncell-form .alert {
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}

/* Estado vazio de tabelas/listas */
.moncell-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6c757d;
}

.moncell-empty-state .moncell-empty-icon {
  font-size: 2.5rem;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

/* PDV modal (produtos em grid) */
.pdv-produto-card {
  transition: transform 0.15s, box-shadow 0.15s;
}
.pdv-produto-card:hover:not(.opacity-75) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.pdv-produto-card.pdv-added {
  background: #d4edda;
  border-color: #198754;
}

/* PDV modal - usa toda a largura (regra ajustada em pdv.css) */
.pdv-modal-dialog {
  min-height: 90vh;
}
.pdv-modal-dialog .modal-content {
  min-height: 90vh;
}
.pdv-modal-dialog .modal-body {
  min-height: calc(90vh - 120px);
}
.pdv-produtos-area {
  max-height: 520px;
  min-height: 420px;
}
.pdv-carrinho-area {
  max-height: 420px;
  min-height: 320px;
}

/* PDV profissional - layout top de mercado */
.pdv-profissional { min-height: calc(90vh - 60px); }
.pdv-toolbar { flex-shrink: 0; }
.pdv-body { flex: 1; min-height: 0; }
.pdv-produtos-col { display: flex; flex-direction: column; min-height: 0; }
.pdv-carrinho-col { min-height: 0; }
.pdv-produtos-area { min-height: 420px; max-height: calc(90vh - 200px); }
.pdv-carrinho-area { min-height: 220px; max-height: calc(90vh - 420px); }
.pdv-kbd { font-size: 0.7rem; padding: 0.2rem 0.4rem; background: #e9ecef; color: #495057; border-radius: 0.25rem; }
.pdv-kbd-primary { background: #198754; color: #fff; }
.pdv-finalizacao { flex-shrink: 0; }
.pdv-toast .toast { min-width: 200px; }
.pdv-sem-estoque .badge { font-size: 0.7rem; }

/* Area de foto do produto - tirar/colar/importar */
.foto-produto-area {
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.foto-produto-area:focus {
  border-color: #1976d2 !important;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

/* Tabela listagem de produtos - cabecalho negrito/maior, planilha inteira com sombreamento cinza claro */
.produto-list-table thead th {
  font-weight: 700;
  font-size: 1rem;
  background: #f0f2f5;
}
.produto-list-table tbody td {
  background: #f5f6f8;
}
.produto-list-table tbody tr:nth-of-type(even) td {
  background: #ebeef2;
}
.produto-list-table tbody tr:hover td {
  background: #e8eaef;
}
/* Coluna Qtd. em estoque: numeros em azul, negrito e fonte um pouco maior */
.produto-list-table .col-qtd-estoque {
  background: inherit;
}
.produto-list-table tbody td.col-qtd-estoque {
  color: #1976d2;
  font-weight: 700;
  font-size: 0.9375rem;
}
.produto-list-table tbody tr:hover td.col-qtd-estoque {
  color: #1565c0;
}
.produto-list-table .produto-list-sort-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.produto-list-table .produto-list-sort-link:hover {
  color: #1976d2;
}
.produto-list-table .produto-list-th-sortable .bi {
  font-size: 1.1em;
  vertical-align: middle;
}

/* Movimentação do Caixa: header com filtro inline */
.movimentacao-header .moncell-page-title {
  font-size: 1.35rem;
}
.movimentacao-filtro-inline .form-label {
  font-size: 0.7rem;
}

/* Bloco de valor: 3 métricas — mesmo tamanho, sem espaço em branco */
.movimentacao-destaque {
  margin-top: 0;
}
.movimentacao-destaque-row .col {
  min-width: 0;
}
.movimentacao-destaque-card {
  border-radius: 8px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--gc-border, #e9ecef);
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 80px;
  width: 100%;
}
/* Cards compactos: Vendas em dinheiro e Quebra de caixa */
.movimentacao-destaque-card-compact {
  padding: 0.4rem 0.6rem;
  min-height: 52px;
  gap: 0.15rem;
}
.movimentacao-destaque-card-compact .movimentacao-destaque-titulo {
  font-size: 0.6rem;
  line-height: 1.2;
}
.movimentacao-destaque-card-compact .movimentacao-destaque-valor {
  font-size: 1rem;
  font-weight: 700;
}
/* Card Caixa: esperado × contado — mais largo e mais baixo */
.movimentacao-card-esperado-contado {
  padding: 0.5rem 0.85rem;
  min-height: 0;
}
.movimentacao-destaque-saldo {
  border-left: 4px solid var(--gc-green, #22c55e);
  background: #f8fff9;
}
.movimentacao-destaque-dinheiro {
  border-left: 4px solid #0d6efd;
  background: #f0f7ff;
}
.movimentacao-destaque-quebra {
  border-left: 4px solid #6c757d;
  background: #f8f9fa;
}
.movimentacao-destaque-titulo {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}
.movimentacao-destaque-valor {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.movimentacao-destaque-ok {
  color: #22c55e;
}

/* Card Saldo: linhas esperado / fechamento / diferença */
.movimentacao-saldo-fechamento .movimentacao-destaque-valor {
  display: none;
}
.movimentacao-saldo-linhas {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.movimentacao-saldo-linha {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.movimentacao-saldo-linha-label {
  font-size: 0.7rem;
  color: #6c757d;
  flex-shrink: 0;
}
.movimentacao-saldo-linha-valor {
  font-size: 0.95rem;
  font-weight: 700;
}
.movimentacao-saldo-linha.movimentacao-saldo-diferenca {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}
.movimentacao-saldo-linha.movimentacao-saldo-diferenca .movimentacao-saldo-linha-valor {
  font-size: 1rem;
}
.movimentacao-saldo-dica .movimentacao-saldo-linha-dica {
  font-size: 0.7rem;
  color: #6c757d;
  font-style: italic;
}

/* Tabela do card Caixa: esperado × contado — compacta (menor altura) */
.movimentacao-card-tabela {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.movimentacao-card-tabela td {
  padding: 0.08rem 0;
  vertical-align: baseline;
}
.movimentacao-card-tabela tr.small.text-muted td,
.movimentacao-card-tabela .small.text-muted td {
  padding: 0;
  line-height: 1.2;
}
.movimentacao-card-tabela .movimentacao-card-tabela-saldo td {
  padding-top: 0.2rem;
  font-size: 0.8rem;
}
.movimentacao-card-tabela .movimentacao-card-tabela-diferenca td {
  padding-top: 0.15rem;
  padding-bottom: 0.05rem;
  font-size: 0.85rem;
}
.movimentacao-card-esperado-contado .movimentacao-destaque-titulo {
  margin-bottom: 0.15rem;
}

/* Bloco Composição — integrado à página (sem card), altura reduzida */
.movimentacao-composicao-bloco {
  background: transparent;
  border: none;
  box-shadow: none;
}
.movimentacao-composicao-bloco-titulo {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e9ecef;
}
.movimentacao-composicao-bloco-conteudo {
  padding: 0;
}

/* Composição em 3 colunas — mesma altura, compacto */
.movimentacao-composicao-colunas {
  font-variant-numeric: tabular-nums;
}
.movimentacao-composicao-colunas .col {
  min-width: 0;
}
.movimentacao-coluna {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  min-height: 100%;
  border: 1px solid #e9ecef;
  background: #fff;
}
.movimentacao-coluna-entradas {
  border-left: 3px solid #198754;
  background: #f8fff9;
}
.movimentacao-coluna-saidas {
  border-left: 3px solid #dc3545;
  background: #fff8f8;
}
.movimentacao-coluna-vendas {
  border-left: 3px solid #0d6efd;
  background: #f0f7ff;
}
.movimentacao-coluna-vendas .movimentacao-vendas-dinheiro {
  color: #0d6efd;
  font-weight: 600;
}
.movimentacao-coluna-vendas .movimentacao-vendas-total {
  color: #0d6efd;
}
.movimentacao-coluna-titulo {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #495057;
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.movimentacao-coluna-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.movimentacao-coluna-lista li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.8rem;
}
.movimentacao-coluna-lista li.movimentacao-coluna-total {
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.9rem;
}
.movimentacao-coluna-label {
  color: #495057;
}
.movimentacao-coluna-valor {
  flex-shrink: 0;
}
.movimentacao-composicao-saldo-fim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border-radius: 6px;
  border: none;
  color: #fff;
}
.movimentacao-composicao-saldo-fim .movimentacao-composicao-saldo-label {
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
}
.movimentacao-composicao-saldo-fim .movimentacao-composicao-saldo-valor {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}
.movimentacao-composicao-saldo-fim .text-success { color: #a3cfbb !important; }
.movimentacao-composicao-saldo-fim .text-danger { color: #f1aeb5 !important; }

/* Barra Sessão / Caixa — fundo azul */
.movimentacao-sessao-bar {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
}
.movimentacao-sessao-bar strong { color: #fff; }
.movimentacao-sessao-sep { margin: 0 0.35rem; opacity: 0.8; }
.movimentacao-filtro-row { align-items: flex-end; }
@media (max-width: 767.98px) {
  .movimentacao-destaque-valor {
    font-size: 1.2rem;
  }
}

/* Movimentação do Caixa: Total vendas em destaque azul */
.movimentacao-total-vendas {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  color: #fff;
  font-size: 1.05rem;
}
.movimentacao-total-vendas strong {
  color: #fff;
}
/* Cards de forma de pagamento na mesma linha, tamanho ajustado */
.movimentacao-formas-row .col {
  min-width: 0;
}
.movimentacao-forma-card .venda-balcao-resumo-label {
  font-size: 0.7rem;
}
.movimentacao-forma-card .venda-balcao-resumo-valor {
  font-size: 0.95rem;
}
@media (max-width: 991.98px) {
  .movimentacao-formas-row .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
@media (max-width: 575.98px) {
  .movimentacao-formas-row .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
