/* Corrige menu lateral: só ícones ao recolher */
.sidebar.collapsed .sidebar-logo {
  text-indent: -9999px;
  position: relative;
}
.sidebar.collapsed .sidebar-logo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;   /* ajuste conforme o tamanho desejado */
  height: 24px;
  background-image: url("/assets/img/logo-vitaro-minimal.png");
  background-size: contain;
  background-repeat: no-repeat;
}
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.2s, background 0.2s;
}
.sidebar-menu .menu-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}
.sidebar-menu .menu-label {
  flex: 1;
}
.sidebar.collapsed .sidebar-menu a {
  color: var(--primary-color);
  justify-content: center;
  padding-left: 0 !important;
}
.sidebar.collapsed .sidebar-menu .menu-label {
  display: none;
}
.sidebar.collapsed .sidebar-menu .menu-icon {
  margin: 0;
}
/* ===== MENU LATERAL COLAPSÁVEL ===== */
.sidebar {
  transition: width 0.3s;
}
.sidebar.collapsed {
  width: 60px !important;
  min-width: 60px !important;
}
.sidebar.collapsed .sidebar-logo {
  font-size: 1rem;
  padding-left: 12px;
  padding-top: 16px;
  padding-bottom: 12px;
}
.sidebar.collapsed .sidebar-menu a {
  padding: 12px;
  font-size: 0.95rem;
}
.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: -18px;
  width: 36px;
  height: 36px;
  background: var(--card-color);
  border-radius: 50%;
  box-shadow: var(--shadow);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 300;
  transition: background 0.2s;
}
.sidebar-toggle:hover {
  background: var(--bg-color);
}
.sidebar-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.menu-hamburger {
  width: 18px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 999px;
  position: relative;
  display: inline-block;
  transform-origin: center;
  transition: background 0.3s ease, transform 0.3s ease;
}
.menu-hamburger::before,
.menu-hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 999px;
  transform-origin: center;
  transition: background 0.3s ease, transform 0.3s ease, top 0.3s ease;
}
.menu-hamburger::before {
  top: -6px;
  transform: rotate(0deg);
}
.menu-hamburger::after {
  top: 6px;
  transform: rotate(0deg);
}
.menu-hamburger.is-open {
  background: transparent;
}
.menu-hamburger.is-open::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-hamburger.is-open::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    position: absolute;
    left: calc(100% + 16px);
    right: auto;
    top: 32px;
    z-index: 1300;
  }
}
.profile-container.collapsed, .main-content.collapsed, .header.collapsed {
  margin-left: 60px !important;
  left: 60px !important;
  transition: margin-left 0.3s, left 0.3s;
}
/* ===== MENU LATERAL GLOBAL ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: var(--card-color);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 200;
}
.sidebar-logo {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
  padding: 32px 0 24px 32px;
  letter-spacing: 2px;
}
.sidebar-menu {
  list-style: none;
  padding: 0 0 0 0;
  margin: 0;
  flex: 1;
}
.sidebar-menu li {
  margin-bottom: 8px;
}
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  border-left: 4px solid transparent;
  transition: var(--transition);
}
.sidebar-menu a:hover, .sidebar-menu a.active {
  background: var(--bg-color);
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
}

@media (max-width: 900px) {
  .sidebar {
    width: 60px;
    min-width: 60px;
  }
  .sidebar-logo {
    font-size: 1rem;
    padding-left: 12px;
    padding-top: 16px;
    padding-bottom: 12px;
  }
  .sidebar-menu a {
    padding: 12px;
    justify-content: center;
  }
  .sidebar-menu .menu-label { display: none; }
  .sidebar-menu .menu-icon { margin: 0; }
  .profile-container, .main-content, .header {
    margin-left: 60px !important;
    left: 60px !important;
  }
}
/* ===== RESET E BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cores VITARO */
  --primary-color: #1E7B4D;
  --primary-dark: #166138;
  --secondary-color: #F39C12;
  --secondary-dark: #E67E22;
  --bg-color: #F5F7FA;
  --card-color: #FFFFFF;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border-color: #E1E8ED;
  
  /* Cores de Status */
  --success-color: #27AE60;
  --warning-color: #F39C12;
  --error-color: #E74C3C;
  --info-color: #3498DB;
  
  /* Design System */
  --border-radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== LAYOUT PRINCIPAL ===== */
.profile-container {
  min-height: 100vh;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
}

/* ===== HEADER ===== */
.header {
  background: var(--card-color);
  padding: 16px 32px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-small {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 20px;
  text-decoration: none;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== COMPONENTES REUTILIZÁVEIS ===== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}
.btn-outline.active {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-sm {
  padding: 8px 10px;
  font-size: 10px;
}

.btn-block {
  width: 100%;
}

/* Cards */
.card {
  background: var(--card-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

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

/* ===== PRODUÇÃO ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
  max-width: 720px;
}

.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.production-summary-card {
  margin-bottom: 24px;
}

.summary-flex {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  flex: 1;
}

.summary-item {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.summary-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.summary-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
}

.summary-note {
  font-size: 12px;
  color: var(--text-secondary);
}

.summary-date-picker {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-date-picker input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #fff;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 4px 0 0;
  max-width: 760px;
}

.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.responsive-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.production-table tr[data-overbooking="true"] {
  background: rgba(231, 76, 60, 0.04);
}

.production-table tr[data-bloqueado="true"] {
  border-left: 3px solid var(--warning-color);
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.production-table.compact {
  min-width: 640px;
}

.justificativa-pill {
  display: inline-block;
  background: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 6px 10px;
  font-size: 12px;
  margin: 2px 4px 2px 0;
}

.justificativa-pill--info {
  background: rgba(52, 152, 219, 0.12);
  color: var(--info-color);
}

.justificativa-pill--warning {
  background: rgba(243, 156, 18, 0.12);
  color: var(--warning-color);
}

.justificativa-pill--note {
  background: rgba(39, 174, 96, 0.12);
  color: var(--success-color);
}

.justificativa-pill--alerta {
  background: rgba(231, 76, 60, 0.12);
  color: var(--error-color);
}

.justificativas-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.justificativas-resumo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.justificativas-detalhe {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 14px;
  background: #fff;
}

.justificativas-detalhe strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.justificativas-detalhe p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
}

.status-badge--success {
  background: rgba(39, 174, 96, 0.12);
  color: var(--success-color);
}

.status-badge--warning {
  background: rgba(243, 156, 18, 0.12);
  color: var(--warning-color);
}

.status-badge--error {
  background: rgba(231, 76, 60, 0.12);
  color: var(--error-color);
}

.status-badge--info {
  background: rgba(52, 152, 219, 0.12);
  color: var(--info-color);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /*max-height: 420px;*/
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--text-secondary);
}

.timeline-marker--realizado {
  background: var(--success-color);
}

.timeline-marker--planejamento {
  background: var(--info-color);
}

.timeline-marker--bloqueio {
  background: var(--warning-color);
}

.timeline-marker--alerta {
  background: var(--error-color);
}

.timeline-marker--evento {
  background: var(--primary-color);
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timeline-note {
  font-size: 13px;
  color: var(--text-primary);
  margin-top: 6px;
}

.modal-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.modal-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.responsive-columns .card {
  margin-bottom: 0;
}


.atp-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.atp-total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
}

.atp-total strong {
  font-size: 20px;
  color: var(--primary-color);
}

.atp-carousel {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.atp-carousel-viewport {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-width: none;
}
.atp-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.atp-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 4px 0;
  width: max-content;
}

.atp-carousel-card {
  flex: 0 0 260px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.atp-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.atp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.atp-card-product {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #5f6b78;
}

.atp-card-available {
  display: block;
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
}

.atp-card-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.atp-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: #5f6b78;
}

.atp-card-grid strong {
  display: block;
  font-size: 15px;
  color: #1f2933;
}

.atp-card-grid span {
  display: block;
  margin-top: 4px;
}

.atp-carousel-nav {
  width: 40px;
  min-height: 80px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.atp-carousel-nav:hover:not(:disabled) {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.atp-carousel-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.atp-carousel-empty {
  flex: 1;
  min-width: 100%;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #5f6b78;
  background: #fafbfc;
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.collapsible-content {
  display: none;
  width: 100%;
  margin-top: 12px;
}

.collapsible-content.is-visible {
  display: block;
}

.collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.collapse-toggle::after {
  content: '\25BC';
  font-size: 10px;
  transition: transform 0.2s ease;
}

.collapse-toggle[aria-expanded="false"]::after {
  transform: rotate(-90deg);
}

.collapse-toggle[aria-expanded="true"]::after {
  transform: rotate(0deg);
}

.resource-table tbody tr.is-dragging {
  opacity: 0.6;
}

.resource-table tbody tr.is-drag-over {
  outline: 2px dashed #1E7B4D;
  outline-offset: 2px;
  background: #f2f9f5;
}

.resource-table th {
  padding: 10px 12px;
  font-size: 12px;
  color: #5f6b78;
  text-align: left;
  background: #f7f9fb;
  white-space: nowrap;
}

.resource-table-veiculos {
  min-width: 760px;
}

.resource-table-cacambas {
  min-width: 620px;
}

.resource-summary {
  font-size: 12px;
  color: #5f6b78;
  margin-bottom: 8px;
}

.resource-note {
  font-size: 12px;
  color: #88919c;
  display: block;
  margin-bottom: 6px;
}

.resource-lock {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.resource-lock-active {
  color: #8a1f1f;
}

.resource-lock-free {
  color: #1f5133;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.modal-backdrop.is-visible {
  display: flex;
}

.modal-card {
  background: #ffffff;
  padding: 28px 24px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.18);
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 85vh;
  overflow: hidden;
}

.modal-title {
  margin: 0;
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 600;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding-right: 8px;
}

.modal-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f5;
  font-size: 13px;
}

.modal-info-row:last-child {
  border-bottom: 0;
}

.modal-info-label {
  font-weight: 600;
  color: #5f6b78;
}

.modal-info-value {
  color: #1f2633;
  text-align: right;
  flex: 1;
}

.modal-summary {
  background: #f7f9fb;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #4a5968;
  line-height: 1.5;
}

.modal-alert {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff4f0;
  color: #a23c2c;
  font-weight: 600;
  font-size: 12px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.modal-empty {
  margin: 0;
  font-size: 13px;
  color: #5f6b78;
}

.calendar-card-locked {
  border-left: 4px solid #c0392b;
  padding-left: 12px;
  position: relative;
}

.calendar-card-locked::after {
  content: 'Bloqueado';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #c0392b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn.is-disabled,
.btn.is-disabled:hover,
.btn.is-disabled:focus {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.modal-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #5f6b78;
}

.modal-field {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #1f2933;
}

.modal-textarea,
.modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5dde5;
  border-radius: 6px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  background: #ffffff;
  color: var(--text-primary);
}

.modal-textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-textarea:disabled,
.modal-input:disabled {
  background: #f3f5f8;
  color: #88919c;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-message {
  font-size: 12px;
  color: #8a1f1f;
}

.card-title {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

/* Formulários */
.input-group {
  margin-bottom: 10px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  transition: var(--transition);
  background: white;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(107, 128, 117, 0.1);
}
.input-group_ckeck label {
    display: flex;
    align-items: center;
    gap: 8px;                /* espaço entre checkbox e texto */
    font-size: 14px;         /* ajuste conforme seu design */
    color: #555;             /* mesma cor do print */
    cursor: pointer;         /* deixa clicável no texto também */
}

.input-group_ckeck input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #27b4a8;   /* cor do checkbox, igual botão ENTRAR */
}

.form-feedback {
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 600;
}

.form-feedback.error {
  color: #b42318;
}

.form-feedback.success {
  color: #1f5133;
}

.input-group input:invalid,
.input-group select:invalid {
  border-color: var(--error-color);
}

/* ===== SISTEMA DE GRID ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* ===== TELAS ESPECÍFICAS ===== */
/* Login */
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  padding: 20px;
}

.login-card {
  background: var(--card-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  color: var(--primary-color);
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 32px;
}

.login-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 12px;
}

/* Seleção de Perfil */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.profile-card {
  background: var(--card-color);
  padding: 32px 24px;
  border-radius: var(--border-radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
  text-decoration: none;
  color: inherit;
}

.profile-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.profile-icon img{
  max-width: 45px;
}
.profile-card h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.profile-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

/* ===== DASHBOARD ===== */
.dashboard-card {
  background: var(--card-color);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-subtitle {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.dashboard-quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.dashboard-panel {
  display: none;
}

.dashboard-panel.active {
  display: block;
}

.dashboard-section {
  margin-bottom: 32px;
}

.dashboard-section:last-child {
  margin-bottom: 0;
}

.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: var(--card-color);
  padding: 16px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-group input,
.filter-group select {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #fff;
  font-size: 0.9rem;
  color: var(--text-primary);
  min-width: 160px;
}

.filter-group select {
  appearance: none;
}

.filter-actions {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.filter-actions .btn-sm {
  padding: 8px 16px;
}

.dashboard-filters .btn-outline.btn-sm.active {
  background-color: var(--primary-color);
  color: #fff;
}

.insight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.insight-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.insight-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.insight-columns h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.dashboard-value {
  font-size: 28px;
  font-weight: bold;
  margin: 10px 0;
  color: var(--primary-color);
}

.dashboard-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-trend {
  font-size: 12px;
  margin-top: 5px;
  font-weight: 600;
}

.trend-up { color: var(--success-color); }
.trend-down { color: var(--error-color); }

/* ===== TABELAS ===== */
.table-container {
  overflow-x: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  background: var(--card-color);
}

.production-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-color);
  font-size: 12px;
  min-width: 800px;
}

.production-table th,
.production-table td {
  padding: 8px 5px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.production-table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 12px;
  position: sticky;
  top: 0;
}

.production-table tr:hover {
  background-color: rgba(30, 123, 77, 0.02);
}

.production-table tr:last-child td {
  border-bottom: none;
}

#card-estoque .table-responsive > table {
  width: 100%;
  min-width: 1000px;
}

#tabela-estoque th:nth-child(4),
#tabela-estoque th:nth-child(5) {
  white-space: normal;
}

/* ===== SISTEMA DE ABAS ===== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 4px;
  text-decoration: none;
}

.tab {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: var(--transition);
  font-size: 14px;
  text-decoration: none;
  
}

.tab:hover {
  color: var(--primary-color);
}

.tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ===== SISTEMA DE STATUS ===== */
.status-available { border-left: 4px solid var(--success-color); }
.status-delivery { border-left: 4px solid var(--info-color); }
.status-origination { border-left: 4px solid var(--secondary-color); }
.status-internal { border-left: 4px solid var(--text-light); }
.status-maintenance { border-left: 4px solid var(--error-color); }

.status-confirmed { background-color: rgba(39, 174, 96, 0.05); }
.status-risk { background-color: rgba(243, 156, 18, 0.05); }
.status-rupture { background-color: rgba(231, 76, 60, 0.05); }

/* ===== ALERTAS ===== */
.alert {
  position: relative;
  padding: 10px 36px 10px 12px;
  border-radius: 6px;
  margin: 12px 0;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: opacity 0.4s ease;
}

.alert-dismissible {
  padding-right: 44px;
}

.alert-message {
  display: block;
}

.alert-success {
  background-color: #e6f4ea;
  border-color: rgba(27, 125, 77, 0.35);
  color: #1a6a43;
}

.alert-error {
  background-color: #fdecea;
  border-color: rgba(218, 68, 55, 0.4);
  color: #aa1f16;
}

.alert-warning {
  background-color: #fff6e6;
  border-color: rgba(242, 153, 74, 0.45);
  color: #b16610;
}

.alert-info {
  background-color: #e8f3fc;
  border-color: rgba(46, 134, 193, 0.45);
  color: #23618b;
}

.alert-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.alert-close:hover {
  opacity: 0.7;
}

.alert.fade-out {
  opacity: 0;
}

/* ===== BADGES E INDICADORES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 8px;
  white-space: nowrap;
}

.badge-success { background: var(--success-color); color: white; }
.badge-warning { background: var(--warning-color); color: white; }
.badge-error { background: var(--error-color); color: white; }
.badge-info { background: var(--info-color); color: white; }

.atp-indicator {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 8px;
}

.atp-positive { background: var(--success-color); color: white; }
.atp-negative { background: var(--error-color); color: white; }
.atp-warning { background: var(--warning-color); color: white; }

/* ===== CALENDÁRIO/AGENDA ===== */
.calendar-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: white;
}

.calendar-time {
  padding: 12px;
  background: #f8f9fa;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  display: flex;
  align-items: center;
}

.calendar-slots {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  min-height: 80px;
}

.vehicle-card {
  padding: 12px;
  border-radius: 4px;
  background: var(--card-color);
  border-left: 4px solid;
  font-size: 13px;
  transition: var(--transition);
}

.vehicle-card:hover {
  transform: translateX(4px);
}

.vehicle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.vehicle-card-content {
  flex: 1;
  min-width: 200px;
}

.vehicle-card-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vehicle-card-actions .btn {
  flex: 0 1 auto;
  min-width: 110px;
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
  height: 8px;
  background: #E1E8ED;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ===== UTILITÁRIOS ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1200px) {
  .main-content {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .user-info {
    width: 100%;
    justify-content: space-between;
    order: 2;
    margin-top: 8px;
  }
  
  .main-content {
    padding: 24px 16px;
  }
  
  .login-card {
    padding: 32px 24px;
    margin: 0 16px;
  }
  
  .profiles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }
  
  .profile-card {
    padding: 24px 16px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tabs {
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
  }
  
  .tab {
    padding: 10px 16px;
    font-size: 13px;
    flex-shrink: 0;
  }
  
  .card {
    padding: 20px 16px;
    margin-bottom: 16px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .atp-total {
    align-items: flex-start;
    text-align: left;
  }

  .atp-total strong {
    font-size: 18px;
  }

  .atp-carousel {
    gap: 8px;
  }

  .atp-carousel-nav {
    display: none;
  }

  .atp-carousel-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .atp-carousel-track {
    padding: 0;
    width: max-content;
  }

  .atp-carousel-card {
    flex: 0 0 240px;
  }

  .resource-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
  }

  .resource-table thead {
    display: none;
  }

  .resource-table tbody {
    display: block;
    width: 100%;
  }

  .resource-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #d5dde5;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px 16px;
  }

  .resource-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .resource-table td {
    display: block;
    padding: 10px 0 !important;
    border: 0 !important;
    word-wrap: break-word;
    width: 100%;
  }

  .resource-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #5f6b78;
    margin-bottom: 4px;
  }

  .resource-table td:last-child {
    padding-bottom: 0 !important;
  }

  .modal-card {
    max-width: 100%;
    padding: 24px 20px;
  }
  
  .production-table {
    font-size: 12px;
  }
  
  .production-table th,
  .production-table td {
    padding: 8px 5px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 12px;
  }
  
  .dashboard-value {
    font-size: 24px;
  }
  
  .calendar-grid {
    grid-template-columns: 80px 1fr;
    font-size: 12px;
  }
  
  .calendar-time,
  .calendar-slots {
    padding: 8px;
  }
  
  .vehicle-card-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .vehicle-card-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .vehicle-card-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (max-width: 480px) {
  .header {
    padding: 8px 12px;
  }
  
  .main-content {
    padding: 16px 12px;
  }
  
  .login-card {
    padding: 24px 20px;
  }
  
  .card {
    padding: 16px 12px;
  }
  
  .input-group input,
  .input-group select,
  .input-group textarea {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .dashboard-card {
    padding: 16px 12px;
  }
  
  .dashboard-value {
    font-size: 20px;
  }
  
  .calendar-grid {
    grid-template-columns: 60px 1fr;
  }
  
  .modal-info-row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
  }

  .modal-info-value {
    text-align: left;
  }
  
  .calendar-time,
  .calendar-slots {
    padding: 6px;
    font-size: 11px;
  }

  .vehicle-card-actions .btn {
    flex: 1 1 100%;
  }
  
  .tabs {
    gap: 2px;
  }
  
  .tab {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* ===== ESTADOS DE FOCO ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== SCROLL PERSONALIZADO ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}


/* === Authoritative collapsed widths/margins (60px) === */
.sidebar.collapsed { width: 60px !important; min-width: 60px !important; }
.main-content.collapsed, .profile-container.collapsed, .header.collapsed { margin-left: 30px !important; left: 60px !important; }

@media (max-width: 1024px){
  .main-content{ margin-left: 0; padding: 16px; }
  .header{ margin-left: 0; }
}

/* Ensure the overhanging button is visible */
.sidebar { overflow: visible; }

/* === Mobile full-screen app (sidebar hidden by default) === */
@media (max-width: 1024px){
  /* Sidebar off-canvas; no width reserved */
  .sidebar{
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    z-index: 1000;
  }
  .sidebar.mobile-open{ transform: translateX(0); }

  /* Backdrop covers entire viewport */
  .sidebar-backdrop{
    position: fixed;
    inset: 0;
    z-index: 900;
  }

  /* App must fill full width regardless of collapsed state */
  .main-content,
  .profile-container,
  .header{
    margin-left: 0 !important;
    left: 0 !important;
  }
  .main-content.collapsed,
  .profile-container.collapsed,
  .header.collapsed{
    margin-left: 0 !important;
    left: 0 !important;
  }
}

/* === Mobile full-screen app (sidebar hidden by default) v2 === */
@media (max-width: 1024px){
  .sidebar{
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    z-index: 1000;
  }
  .sidebar.mobile-open{ transform: translateX(0); }
  .main-content, .profile-container, .header{
    margin-left: 0 !important;
    left: 0 !important;
  }
  .main-content.collapsed, .profile-container.collapsed, .header.collapsed{
    margin-left: 0 !important;
    left: 0 !important;
  }
}

/* === Responsive Tables: horizontal & vertical scrolling === */
.table-container,
.table-responsive{
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* When you want vertical scroll for long tables inside a panel/section */
.table-viewport{
  overflow-y: auto;
  max-height: calc(100dvh - 220px); /* adjust offset if header/footer height differs */
}

/* Make table minimum width fill container, but allow to grow for long rows */
.table-container > table,
.table-responsive > table{
  min-width: 100%;
  width: max-content;
}

/* Optional: sticky header helper */
.table-sticky thead th{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.profile-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
}
.profile-card-link .profile-card{
  cursor: pointer;
}

/* Backdrop só capta clique quando ativo (evita “tela morta” no mobile) */
.sidebar-backdrop{ pointer-events: none; }
.sidebar-backdrop.active{ pointer-events: auto; } 
.pedido-itens-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pedido-item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.pedido-item-row select {
  flex: 1 1 220px;
  min-width: 200px;
}

.pedido-item-row input.pedido-item-quantidade {
  width: 140px;
}

.pedido-item-row .pedido-remover-item {
  align-self: center;
}

.cliente-info-panel {
  background: #f8f9fa;
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  padding: 16px;
  font-size: 13px;
  color: #38424d;
}

.cliente-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.cliente-info-grid span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f6b78;
  margin-bottom: 4px;
}

.cliente-info-grid strong {
  display: block;
  font-size: 16px;
  color: #1E7B4D;
}

.cliente-historico-list {
  margin: 0;
  padding-left: 18px;
  color: #38424d;
}

.cliente-historico-list li {
  margin-bottom: 4px;
}

.atp-info-row {
  font-size: 13px;
  color: #38424d;
  margin-bottom: 4px;
}

/* Governanca search bars */
.search-bar{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.search-bar input[type="text"]{
  flex: 1 1 260px;
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  color: #38424d;
}

.search-bar button{
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.search-bar button[type="submit"]{
  background-color: var(--primary-color);
  color: #fff;
}

.search-bar button[type="submit"]:hover{
  background-color: var(--primary-dark);
}

.search-bar .search-clear-btn{
  background-color: var(--border-color);
  color: #38424d;
}

.search-bar .search-clear-btn:hover{
  background-color: #d5dee6;
}

@media (max-width: 768px){
  .search-bar{
    flex-wrap: wrap;
  }

  .search-bar input[type="text"]{
    flex: 1 1 100%;
  }

  .search-bar button{
    flex: 1 1 calc(50% - 4px);
  }
}

/* Governanca pagination */
.pagination-wrapper{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  align-items: center;
}

.pagination-info{
  font-size: 13px;
  color: #5f6b78;
  text-align: center;
}

.pagination-controls{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-controls .btn{
  min-width: 40px;
  text-align: center;
}

/* Governanca export modal */
.modal-backdrop.export-modal{
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
}

.modal-backdrop.export-modal .modal-export{
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-backdrop.export-modal .modal-header,
.modal-backdrop.export-modal .modal-footer{
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.modal-backdrop.export-modal .modal-footer{
  border-top: 1px solid #e2e8f0;
  border-bottom: none;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-backdrop.export-modal .modal-body{
  padding: 12px 16px 16px;
  background: #f8fafc;
}

.modal-backdrop.export-modal .modal-header h3{
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.modal-backdrop.export-modal .modal-close{
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #0f172a;
}

/* Estoque modals alerts */
.modal-alert{
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #ffe5e5;
  border: 1px solid #ffb3b3;
  color: #8b1a1a;
  font-size: 13px;
}

.modal-alert .alert-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-alert .alert-close{
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: inherit;
  padding: 0;
}

.modal-alert .alert-list{
  margin: 0;
  padding-left: 18px;
}

/* Toast de sucesso */
.toast-success{
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  background: #e6ffed;
  border: 1px solid #b2f2bb;
  color: #1b4332;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  font-size: 13px;
}

.toast-success .toast-content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}

.toast-success .toast-close{
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: inherit;
  padding: 0;
}

.toast-success p{
  margin: 0;
}

@media (max-width: 640px){
  .toast-success{
    right: 12px;
    left: 12px;
    bottom: 12px;
  }
}
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.table-toolbar .input-group {
  margin: 0;
}
.table-toolbar .toolbar-filter {
  flex: 1 1 260px;
  min-width: 200px;
}
.table-toolbar .toolbar-select {
  flex: 0 0 150px;
  min-width: 130px;
}
@media (max-width: 640px) {
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 16px;
  }
  .table-toolbar .toolbar-select {
    flex: 1 1 auto;
    width: 100%;
  }
  .table-toolbar .toolbar-filter {
    flex: 1 1 auto;
    width: 100%;
  }
}
