/* ==========================================================================
   MANIA FOODS — APP DE CONTAGEM DE ESTOQUE (CSS DESIGN SYSTEM)
   Mobile-First, Touch-Friendly, Alta Performance
   ========================================================================== */

:root {
  --primary: #1E3A8A;
  --primary-dark: #0F172A;
  --primary-light: #3B82F6;
  --accent: #EA580C;
  --accent-hover: #C2410C;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --border: #E2E8F0;
  --border-focus: #3B82F6;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --success: #16A34A;
  --success-bg: #DCFCE7;
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --warning: #D97706;
  --warning-bg: #FEF3C7;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   VIEWS / ROTEAMENTO SPA
   ========================================================================== */
.view {
  display: none;
  min-height: 100vh;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   TELA 0: LOGIN & IDENTIFICAÇÃO
   ========================================================================== */
#view-login {
  display: none;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  padding: 24px 16px;
  align-items: center;
  justify-content: center;
}

#view-login.active {
  display: flex;
}

.login-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 420px;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.brand-badge {
  display: inline-block;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid #BFDBFE;
}

.app-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

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

.password-input-wrapper .form-control {
  padding-right: 46px;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.login-toggle-actions {
  text-align: center;
  margin-top: 14px;
}

.login-helper-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
  text-align: center;
}

.login-helper-box small {
  color: #166534;
  font-size: 12px;
}

/* ==========================================================================
   COMPONENTES DE FORMULÁRIO E BOTÕES
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  background: #FFFFFF;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 12px 20px;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.btn-accent {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn-accent:active {
  background: var(--accent-hover);
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 52px;
  font-size: 16px;
}

.btn-xl {
  height: 56px;
  font-size: 17px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-danger-sm {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}

.btn-danger-sm:hover,
.btn-danger-sm:active {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ==========================================================================
   TELA 1: HOME & DASHBOARD
   ========================================================================== */
.app-header {
  background: var(--primary-dark);
  color: var(--text-inverse);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-size: 28px;
}

.header-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.user-meta-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-badge {
  display: inline-block;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
}

.badge-perfil-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  color: #93C5FD;
  border: 1px solid rgba(147, 197, 253, 0.3);
}

.badge-perfil-tag.admin {
  background: rgba(234, 88, 12, 0.25);
  color: #FDBA74;
  border-color: rgba(253, 186, 116, 0.4);
}

.badge-perfil-tag.espectador {
  background: rgba(147, 51, 234, 0.2);
  color: #D8B4FE;
  border-color: rgba(216, 180, 254, 0.4);
}

.header-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-menu-toggle {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-menu-toggle:hover,
.btn-menu-toggle:focus {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.02);
}

.btn-menu-toggle:active {
  transform: scale(0.95);
}

.dropdown-menu-custom {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #FFFFFF;
  color: #0F172A;
  width: 275px;
  max-width: 90vw;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.08);
  padding: 10px;
  z-index: 200;
  animation: menuDrop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuDrop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 10px;
}

.dropdown-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dropdown-user-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
}

.dropdown-user-role {
  display: block;
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 6px 0;
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-item:hover,
.menu-item:active {
  background: #F1F5F9;
}

.menu-item-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
}

.menu-item-content {
  display: flex;
  flex-direction: column;
}

.menu-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.2;
}

.menu-item-desc {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.menu-item-admin {
  background: #EFF6FF;
}

.menu-item-admin:hover,
.menu-item-admin:active {
  background: #DBEAFE;
}

.menu-item-admin .menu-item-title {
  color: #1D4ED8;
}

.menu-item-danger:hover,
.menu-item-danger:active {
  background: #FEF2F2;
}

.menu-item-danger .menu-item-title {
  color: #DC2626;
}

.admin-usuarios-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.badge-ativo {
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.badge-inativo {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.main-content {
  padding: 20px 16px 40px;
  max-width: 680px;
  margin: 0 auto;
}

.action-card {
  background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.action-text h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 4px;
}

.action-text p {
  font-size: 13px;
  color: #CBD5E1;
}

.history-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

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

.section-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease;
}

.history-item-card:active {
  transform: scale(0.99);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.history-date-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.history-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.history-obs {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

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

.badge-concluida {
  background: var(--success-bg);
  color: var(--success);
}

.badge-andamento {
  background: var(--warning-bg);
  color: var(--warning);
}

.history-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.history-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.history-card-actions .btn,
.history-card-actions .btn-danger-sm {
  flex: 1 1 calc(50% - 8px);
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

@media (min-width: 560px) {
  .history-card-actions .btn,
  .history-card-actions .btn-danger-sm {
    flex: 0 1 auto;
  }
}

/* ==========================================================================
   TELA 2: CONTAGEM DE ESTOQUE (STICKY HEADER & ACORDEÕES)
   ========================================================================== */
.sticky-count-header {
  background: var(--primary-dark);
  color: #FFFFFF;
  padding: 12px 16px 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.count-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-icon-back {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.count-title-box {
  text-align: center;
  flex: 1;
}

.badge-etapa {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 2px;
}

.count-round-title {
  font-size: 18px;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: -0.3px;
}

.badge-progresso {
  background: var(--accent);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}

.count-meta-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94A3B8;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box {
  margin-top: 10px;
}

.input-search {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: #FFFFFF;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.input-search::placeholder {
  color: #94A3B8;
}

.count-content {
  padding: 16px 14px 60px;
  max-width: 680px;
  margin: 0 auto;
}

.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ACORDEÃO POR LINHA DE PRODUTO */
.accordion-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  background: #FFFFFF;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.accordion-header:active {
  background: var(--bg-subtle);
}

.accordion-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.accordion-count-badge {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
}

.accordion-arrow {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.expanded .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 14px 14px 18px;
  background: #F8FAFC;
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 14px;
}

.accordion-item.expanded .accordion-body {
  display: flex;
}

/* CARD DE SKU INDIVIDUAL */
.sku-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sku-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.sku-info {
  flex: 1;
}

.sku-code {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: #EFF6FF;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
}

.sku-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.sku-subtotal-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.sku-rows-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* LINHA DE PREENCHIMENTO (QUANT + TIPO + OBS) */
.lancamento-row {
  background: var(--bg-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 85px 120px 1fr 34px;
  gap: 8px;
  align-items: center;
}

@media (max-width: 480px) {
  .lancamento-row {
    grid-template-columns: 80px 115px 1fr 30px;
    gap: 6px;
    padding: 6px 8px;
  }
}

.input-quant {
  height: 42px;
  padding: 6px 8px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  outline: none;
}

.input-quant:focus {
  border-color: var(--primary-light);
}

.select-tipo {
  height: 42px;
  padding: 6px 6px;
  font-size: 13px;
  font-weight: 600;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  outline: none;
}

.input-obs {
  height: 42px;
  padding: 6px 8px;
  font-size: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  outline: none;
}

.btn-remove-row {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 16px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.btn-remove-row:active {
  background: var(--danger-bg);
}

.btn-add-row {
  align-self: flex-start;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 2px;
}

.btn-add-row:active {
  background: #EFF6FF;
}

.count-footer-actions {
  margin-top: 28px;
}

/* ==========================================================================
   MODAIS & DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-card.modal-lg {
  max-width: 900px;
  width: 95%;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 18px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-scroll {
  max-height: 65vh;
}

.modal-footer {
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.justify-center {
  justify-content: center;
}

.modal-feedback-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: 100%;
}

@media (min-width: 480px) {
  .modal-feedback-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.info-alert {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 14px;
}

.feedback-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.feedback-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.feedback-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.divergencias-box {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
}

/* TABELA DE CONSULTA */
.table-responsive {
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-custom th {
  background: var(--bg-subtle);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 1.5px solid var(--border);
}

.table-custom td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-dark);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  pointer-events: none;
  transition: all 0.25s ease;
}

/* ============================================================ */
/* BARRA DE STATUS DE REDE / OFFLINE                            */
/* ============================================================ */
.network-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.network-status-bar.online {
  background: #ECFDF5;
  color: #065F46;
  border-bottom-color: #A7F3D0;
}

.network-status-bar.offline {
  background: #FFFBEB;
  color: #92400E;
  border-bottom-color: #FDE68A;
}

.network-status-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  font-size: 10px;
  line-height: 1;
}

.btn-sync-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-sync-mini:active {
  transform: scale(0.96);
}

.sync-count-badge {
  background: var(--accent);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
}

