@import url('../../css/professional-design-system.css');

:root {
  --dl-bg: var(--color-gray-50);
  --dl-card: var(--color-white);
  --dl-border: var(--color-gray-200);
  --dl-text: var(--color-gray-900);
  --dl-muted: var(--color-gray-600);
  --dl-primary: #1e40af;
  --dl-success: #059669;
  --dl-warning: #d97706;
  --dl-danger: #dc2626;
}

/* Container principal com melhor aproveitamento de espaço */
.mv-page-container.module-container {
  max-width: none !important;
  padding: 24px !important;
  box-sizing: border-box;
  background: var(--dl-bg);
}

/* Header profissional com gradiente */
.page-header {
  background: linear-gradient(135deg, var(--dl-primary) 0%, #1e3a8a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15);
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 1;
}

.page-header > div:first-child {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 28px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header h1 i {
  margin-right: 12px;
  opacity: 0.9;
}

.page-header p {
  margin: 8px 0 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 500;
}

.page-header__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* Seção de botões de ação acima da tabela */
.action-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  justify-content: flex-start;
  align-items: center;
}

.btn-action {
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  min-height: 48px;
}

.btn-action.btn-primary {
  background: linear-gradient(135deg, var(--dl-success) 0%, #10b981 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-action.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-action.btn-secondary {
  background: white;
  border: 2px solid var(--dl-border);
  color: var(--dl-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-action.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--dl-primary);
  color: var(--dl-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-action i {
  font-size: 16px;
}

/* Cards estatísticos melhorados */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--dl-card);
  border: 1px solid var(--dl-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dl-primary), var(--dl-success));
}

.kpi-card#kpi-pago::before {
  background: linear-gradient(90deg, var(--dl-success), #10b981);
}

.kpi-card#kpi-pendente::before {
  background: linear-gradient(90deg, var(--dl-warning), #f59e0b);
}

.kpi-card#kpi-vencido::before {
  background: linear-gradient(90deg, var(--dl-danger), #ef4444);
}

.kpi-card__label {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--dl-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.kpi-card__value {
  font-size: 32px;
  font-weight: 800;
  color: var(--dl-text);
  line-height: 1;
  margin-bottom: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.kpi-card__sub {
  font-size: 13px;
  color: var(--dl-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* Barra de filtros moderna e organizada */
.toolbar {
  background: var(--dl-card);
  border: 1px solid var(--dl-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-field {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.toolbar-field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dl-muted);
  font-size: 16px;
  pointer-events: none;
}

.toolbar-field__input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--dl-border);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fafbfc;
}

.toolbar-field__input:focus {
  outline: none;
  border-color: var(--dl-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.toolbar-select {
  min-width: 180px;
  padding: 12px 16px;
  border: 1px solid var(--dl-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-select:hover {
  border-color: var(--dl-primary);
  background: white;
}

.toolbar-select:focus {
  outline: none;
  border-color: var(--dl-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.toolbar-spacer {
  flex: 1;
}

.pill {
  padding: 8px 16px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dl-text);
  white-space: nowrap;
}

.toolbar .btn-secondary {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.toolbar .btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tabela estilo Excel premium */
.table-container {
  background: var(--dl-card);
  border: 1px solid var(--dl-border);
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--dl-border);
  background: #fafbfc;
}

.table-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--dl-text);
}

.table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

.data-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  padding: 16px 20px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--dl-border);
  white-space: nowrap;
}

.data-table td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: var(--dl-text);
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: #fafbfc;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.data-table tbody tr:nth-child(even):hover {
  background: #f1f5f9;
}

/* Badges e status melhorados */
.badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--dl-border);
  color: var(--dl-text);
  background: #fff;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.status-badge--pago { 
  background: rgba(5, 150, 105, 0.1);
  color: #065f46;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-badge--aberto { 
  background: rgba(2, 132, 199, 0.1);
  color: #075985;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.status-badge--vencido { 
  background: rgba(220, 38, 38, 0.1);
  color: #7f1d1d;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Badges para tipos de pendência */
.tipo-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tipo-badge--multa {
  background: rgba(220, 38, 38, 0.1);
  color: #7f1d1d;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.tipo-badge--acidente {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tipo-badge--pecas {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tipo-badge--outros {
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Data de vencimento */
.data-vencimento {
  font-family: 'Inter', monospace;
  font-weight: 600;
  font-size: 13px;
}

.data-vencimento--vencida {
  color: var(--dl-danger);
}

.data-vencimento--proxima {
  color: var(--dl-warning);
}

.data-vencimento--normal {
  color: var(--dl-text);
}

/* Ações da tabela melhoradas */
.row-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: nowrap;
  align-items: center;
}

.row-actions .btn-ghost,
.row-actions .btn-success,
.row-actions .btn-danger {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.col-acoes { text-align: right; }

.row-actions .btn-danger {
  width: 34px;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* Botão de editar profissional */
.row-actions .btn-ghost {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.row-actions .btn-ghost:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #94a3b8;
  color: #334155;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.row-actions .btn-ghost i {
  font-size: 12px;
}

.row-actions .btn-success:hover,
.row-actions .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* sugestões */
.suggestions {
  position: absolute;
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--dl-border);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15,23,42,0.14);
  width: 100%;
  max-height: 220px;
  overflow: auto;
  z-index: 20;
}

.form-group { position: relative; }

.suggestions button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

.suggestions button:hover {
  background: rgba(59,130,246,0.06);
}

/* Elementos especiais dos modais premium */
.preview {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dl-primary), var(--dl-success));
  opacity: 0.6;
}

.preview-box {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  background: white;
  color: var(--dl-text);
  font-size: 15px;
  font-weight: 600;
  min-height: 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.preview-box:hover {
  border-color: var(--dl-primary);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
}

.confirm-box {
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(239, 68, 68, 0.05) 100%);
  color: var(--dl-text);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}

.confirm-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dl-danger), #ef4444);
}

/* Seções organizadas nos modais */
.modal-section {
  margin-bottom: 32px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dl-text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-section-title i {
  color: var(--dl-primary);
  font-size: 14px;
}

/* Timeline do histórico melhorada */
.timeline {
  border: 1px solid var(--dl-border);
  border-radius: 12px;
  padding: 0;
  background: #fff;
  max-height: 400px;
  overflow-y: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  position: relative;
}

.timeline-item:last-child { 
  border-bottom: 0; 
}

.timeline-item:hover {
  background: #fafbfc;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--dl-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.timeline-item:hover::before {
  opacity: 1;
}

.timeline-item__date {
  color: var(--dl-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-item__text {
  color: var(--dl-text);
  font-size: 14px;
  line-height: 1.5;
}

/* skeleton */
.skeleton { padding: 16px; }
.skeleton__row {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 0%, #f6f8fb 45%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  margin: 12px 0;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsividade melhorada */
@media (max-width: 768px) {
  .mv-page-container.module-container {
    padding: 16px !important;
  }
  
  .page-header {
    padding: 24px;
    text-align: center;
  }
  
  .page-header__actions {
    width: 100%;
    justify-content: center;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .toolbar-field {
    min-width: auto;
  }
  
  .toolbar-spacer {
    display: none;
  }
  
  .modal-content {
    width: min(95vw, 500px);
    margin: 0;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .data-table {
    min-width: 800px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn-action {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 24px;
  }
  
  .kpi-card__value {
    font-size: 28px;
  }
  
  .modal-header,
  .modal-footer {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 16px 20px;
  }
}

/* =========================
   Modais Premium e Profissionais
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10050;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.4s ease;
}

.modal-content {
  position: relative;
  width: min(900px, 100%);
  max-height: min(95vh, 1200px);
  overflow: hidden;
  background: #fff;
  border: none;
  border-radius: 24px;
  box-shadow: 
    0 32px 64px rgba(15, 23, 42, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content--lg {
  width: min(1100px, 100%);
}

/* Header com gradiente elegante */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 36px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 2px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dl-primary), var(--dl-success));
}

.modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--dl-text);
  display: flex;
  align-items: center;
  gap: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-header h3 i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dl-primary), #1e3a8a);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

/* Corpo do modal com seções organizadas */
.modal-body {
  padding: 36px;
  max-height: 75vh;
  overflow-y: auto;
  background: #fafbfc;
}

/* Footer elegante */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 28px 36px;
  border-top: 2px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Grid de formulário premium */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  letter-spacing: 0.2px;
}

.form-group label::before {
  content: '';
  width: 3px;
  height: 16px;
  background: linear-gradient(135deg, var(--dl-primary), var(--dl-success));
  border-radius: 2px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  color: var(--dl-text);
}

.form-control:hover {
  border-color: #cbd5e1;
}

.form-control:focus {
  outline: none;
  border-color: var(--dl-primary);
  background: white;
  box-shadow: 
    0 0 0 4px rgba(30, 64, 175, 0.1),
    0 4px 12px rgba(30, 64, 175, 0.15);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Botões dos modais premium */
.modal-footer .btn-primary,
.modal-footer .btn-success {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0.3px;
  min-height: 48px;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, var(--dl-primary) 0%, #1e3a8a 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.modal-footer .btn-success {
  background: linear-gradient(135deg, var(--dl-success) 0%, #10b981 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.modal-footer .btn-secondary {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.modal-footer .btn-danger {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, var(--dl-danger) 0%, #ef4444 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.modal-footer .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.modal-footer .btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
  background: linear-gradient(135deg, #10b981 0%, var(--dl-success) 100%);
}

.modal-footer .btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--dl-primary);
  color: var(--dl-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, #ef4444 0%, var(--dl-danger) 100%);
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.small { font-size: 12px; }

/* Melhorias específicas para elementos */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--dl-muted);
}

.empty i {
  font-size: 48px;
  color: var(--dl-border);
  margin-bottom: 16px;
}

.empty h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--dl-text);
}

.empty p {
  margin: 0;
  font-size: 14px;
}

/* Melhorias nos botões de ação */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--dl-border);
  background: white;
  color: var(--dl-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #f8fafc;
  color: var(--dl-text);
  transform: scale(1.05);
}

/* Sugestões melhoradas */
.suggestions {
  position: absolute;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--dl-border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-height: 240px;
  overflow: auto;
  z-index: 30;
}

.suggestions button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--dl-text);
  transition: all 0.2s ease;
}

.suggestions button:hover {
  background: rgba(30, 64, 175, 0.05);
  color: var(--dl-primary);
}

/* Toast melhorado */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10100;
}

/* Melhorias nos inputs */
textarea.form-control {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

select.form-control {
  cursor: pointer;
}

/* Destaque para valores monetários */
.valor-destaque {
  font-weight: 700;
  font-family: 'Inter', monospace;
}

.valor-positivo {
  color: var(--dl-success);
}

.valor-negativo {
  color: var(--dl-danger);
}

.valor-neutro {
  color: var(--dl-warning);
}

/* Melhorias na tipografia */
.table-header__meta .muted {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--dl-muted);
}

/* Animação de loading melhorada */
.skeleton {
  padding: 20px;
}

.skeleton__row {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 45%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin: 16px 0;
}

.skeleton__row:first-child {
  width: 60%;
}

.skeleton__row:nth-child(2) {
  width: 80%;
}

.skeleton__row:nth-child(3) {
  width: 70%;
}

.skeleton__row:last-child {
  width: 90%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Melhorias nos códigos e placas */
code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--dl-primary);
  font-weight: 600;
}

/* Estilos para campos readonly */
.form-control[readonly] {
  background: #f8fafc;
  color: var(--dl-muted);
  cursor: not-allowed;
}

/* Melhorias nos selects */
.form-control option {
  padding: 8px;
}

/* Indicadores visuais */
.required::after {
  content: ' *';
  color: var(--dl-danger);
}

/* Melhorias nos estados de foco */
.form-control:focus,
.toolbar-field__input:focus,
.toolbar-select:focus {
  transform: translateY(-1px);
}

/* Transições suaves globais */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Melhorias na acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Melhorias para impressão */
@media print {
  .page-header__actions,
  .toolbar,
  .row-actions {
    display: none !important;
  }
  
  .page-header {
    background: none !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .table-container {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
/* Melhorias específicas para colunas da tabela */
.data-table th:nth-child(1) { width: 180px; } /* Locatário */
.data-table th:nth-child(2) { width: 100px; } /* Placa */
.data-table th:nth-child(3) { width: 140px; } /* Tipo de Pendência */
.data-table th:nth-child(4) { width: 120px; } /* Valor original */
.data-table th:nth-child(5) { width: 130px; } /* Falta pagar */
.data-table th:nth-child(6) { width: 90px; } /* Parcelas */
.data-table th:nth-child(7) { width: 170px; } /* Próximo Vencimento */
.data-table th:nth-child(8) { width: 120px; } /* Status */
.data-table th:nth-child(9) { width: 160px; } /* Ações */

/* Alinhamento específico para colunas numéricas */
.data-table td:nth-child(4) {
  text-align: right;
  font-family: 'Inter', monospace;
  font-weight: 600;
}

/* Alinhamento para parcelas */
.data-table td:nth-child(6) {
  text-align: center;
  font-weight: 600;
}

/* Estilo para placa */
.data-table td:nth-child(2) {
  font-family: 'Inter', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dl-primary);
}

/* Destaque para nome do locatário */
.data-table td:nth-child(1) {
  font-weight: 600;
  color: var(--dl-text);
}

/* Alinhamento consistente de cabeçalhos x colunas */
.data-table th:nth-child(3),
.data-table td:nth-child(3) { text-align: center; } /* Tipo pendência */

.data-table th:nth-child(4),
.data-table td:nth-child(4) { text-align: right; } /* Valor */

.data-table th:nth-child(5),
.data-table td:nth-child(5) { text-align: right; } /* Falta pagar */

.data-table th:nth-child(6),
.data-table td:nth-child(6) { text-align: center; } /* Parcelas */

.data-table th:nth-child(7),
.data-table td:nth-child(7) { text-align: center; } /* Próximo vencimento */

.data-table th:nth-child(8),
.data-table td:nth-child(8) { text-align: center; } /* Status */

.data-table td:nth-child(9) { text-align: right; } /* Ações (conteúdo) */
.data-table th:nth-child(9) { text-align: center; } /* Ações (título) */

/* Melhorias no modal de edição */
.modal-header h3 {
  background: linear-gradient(135deg, var(--dl-primary) 0%, #1e3a8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ícones nos botões de ação da tabela */
.btn-visualizar i::before { content: '\f06e'; } /* eye */
.btn-editar i::before { content: '\f044'; } /* edit */
.btn-baixa i::before { content: '\f155'; } /* dollar-sign */
.btn-excluir i::before { content: '\f2ed'; } /* trash-alt */

/* Hover states melhorados para a tabela */
.data-table tbody tr:hover {
  background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Indicador visual para valores */
.valor-positivo {
  color: var(--dl-success);
  font-weight: 700;
}

.valor-zero {
  color: var(--dl-muted);
  font-style: italic;
}

/* Melhorias nos tooltips */
[title] {
  position: relative;
  cursor: help;
}

/* Responsividade para a nova estrutura da tabela */
@media (max-width: 768px) {
  .data-table {
    min-width: 900px;
  }
  
  .data-table th:nth-child(3) { width: 120px; } /* Tipo de Pendência menor */
  .data-table th:nth-child(6) { width: 120px; } /* Próximo Vencimento menor */
}
/* Melhorias específicas para os modais */
.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: white;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
}

.btn-icon:hover {
  background: #f8fafc;
  border-color: var(--dl-danger);
  color: var(--dl-danger);
  transform: scale(1.1);
}

/* Melhorias nos selects */
.form-control option {
  padding: 12px;
  font-size: 14px;
}

/* Campos obrigatórios */
.form-group label[for$="*"]::after,
.form-group label:has(+ input[required])::after,
.form-group label:has(+ select[required])::after {
  content: ' *';
  color: var(--dl-danger);
  font-weight: 700;
}

/* Melhorias no textarea */
textarea.form-control {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
}

/* Estados de validação */
.form-control:invalid {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control:valid {
  border-color: rgba(5, 150, 105, 0.5);
}

/* Melhorias nas sugestões */
.suggestions {
  position: absolute;
  margin-top: 4px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-height: 200px;
  overflow: auto;
  z-index: 50;
}

.suggestions button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--dl-text);
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}

.suggestions button:last-child {
  border-bottom: none;
}

.suggestions button:hover {
  background: rgba(30, 64, 175, 0.05);
  color: var(--dl-primary);
}

/* Melhorias nos códigos */
code {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--dl-primary);
  font-weight: 600;
  border: 1px solid #cbd5e1;
}

/* Melhorias nos campos readonly */
.form-control[readonly] {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #64748b;
  cursor: not-allowed;
  border-style: dashed;
}

/* Indicadores visuais para diferentes tipos de input */
input[type="date"].form-control {
  position: relative;
}

input[type="number"].form-control {
  text-align: right;
}

input[inputmode="decimal"].form-control {
  text-align: right;
  font-family: 'Inter', monospace;
  font-weight: 600;
}

/* Melhorias na responsividade dos modais */
@media (max-width: 768px) {
  .modal-content {
    width: min(95vw, 500px);
    border-radius: 20px;
  }
  
  .modal-header,
  .modal-footer {
    padding: 20px 24px;
  }
  
  .modal-body {
    padding: 24px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  .modal-header h3 {
    font-size: 20px;
  }
  
  .modal-section-title {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 16px;
  }
  
  .modal-content {
    border-radius: 16px;
  }
  
  .modal-header,
  .modal-footer {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .form-grid {
    padding: 16px;
  }
  
  .modal-footer .btn-primary,
  .modal-footer .btn-success,
  .modal-footer .btn-secondary,
  .modal-footer .btn-danger {
    width: 100%;
    justify-content: center;
  }
  
  .modal-footer {
    flex-direction: column-reverse;
    gap: 12px;
  }
}

/* Animações melhoradas */
@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Melhorias para acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .modal-content {
    animation: none;
  }
  
  .modal-overlay {
    animation: none;
  }
  
  * {
    transition-duration: 0.01ms !important;
  }
}

/* Melhorias para modo escuro (futuro) */
@media (prefers-color-scheme: dark) {
  .modal-content {
    background: #1e293b;
    color: #f1f5f9;
  }
  
  .modal-header,
  .modal-footer {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-color: #475569;
  }
  
  .form-control {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
  }
}












