/* ============================================================
   dfe-receiver - estilo do frontend
   Bootstrap 5 + customizacoes
   ============================================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f7fa;
  color: #2c3e50;
}

/* === Login === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 440px;
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-check + .btn-outline-primary {
  border-color: #dee2e6;
  color: #495057;
}
.btn-check:checked + .btn-outline-primary {
  background-color: #667eea;
  border-color: #667eea;
  color: white;
}

.login-card .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.login-card .btn-primary {
  background-color: #667eea;
  border-color: #667eea;
  padding: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.login-card .btn-primary:hover {
  background-color: #5568d3;
  border-color: #5568d3;
}

/* === Navbar === */
.navbar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
}
.navbar-brand {
  letter-spacing: 0.5px;
  font-size: 1.25rem;
}

/* === Dashboard === */
.stats-card {
  border: 0;
  border-left: 4px solid;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  background: white;
}
.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.stats-card.border-primary { border-left-color: #667eea; }
.stats-card.border-info { border-left-color: #17a2b8; }
.stats-card.border-success { border-left-color: #28a745; }
.stats-card.border-warning { border-left-color: #ffc107; }

.stats-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stats-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin: 8px 0 4px;
}

.stats-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
}

/* === Cards === */
.card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card-header {
  background-color: #fff !important;
  border-bottom: 1px solid #e9ecef;
  padding: 14px 18px;
  font-weight: 600;
}
.card-header h5 {
  font-size: 1rem;
  color: #495057;
}

/* === Tables === */
.table {
  margin-bottom: 0;
}
.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6c757d;
  border-bottom-width: 1px;
  font-weight: 600;
  padding: 12px;
}
.table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background-color: #f8fafd;
}

/* === Badges === */
.badge {
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
}

/* === Buttons em ações === */
.btn-outline-primary {
  border-color: #667eea;
  color: #667eea;
}
.btn-outline-primary:hover {
  background-color: #667eea;
  border-color: #667eea;
}

/* === Dropdowns (estilo SYSPDV - shadow forte, espacamento, icones alinhados) === */
.dropdown-menu {
  min-width: 240px;
  border: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 8px 0;
}

.dropdown-item {
  padding: 9px 18px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  transition: background-color 0.15s;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #f1f5f9;
}

.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
  background-color: #fde8e8;
  color: var(--bs-danger) !important;
}

.dropdown-item i.bi {
  width: 20px;
  text-align: center;
  color: #64748b;
  margin-right: 8px;
}

.dropdown-item.text-danger i.bi {
  color: var(--bs-danger);
}

.dropdown-divider {
  margin: 4px 0;
  border-top-color: #eef0f3;
}

/* Colunas secundarias somem no mobile (grade mantem cabecalho visivel) */
@media (max-width: 767.98px) {
  .col-hide-sm { display: none !important; }
}

/* === Responsive tweaks === */
@media (max-width: 768px) {
  .login-card { padding: 28px 24px; }
  .stats-value { font-size: 1.6rem; }
  .stats-icon { width: 44px; height: 44px; font-size: 18px; }

  /* Botoes de acao em tabela compactos no mobile */
  .btn-group-sm .btn { padding: 0.25rem 0.4rem; }

  /* Cards headers mais compactos */
  .card-header { padding: 12px 14px; }
  .card-header h5 { font-size: 0.95rem; }

  /* Tabelas: reduz padding pra caber mais conteudo */
  .table thead th { padding: 8px 6px; font-size: 0.7rem; }
  .table tbody td { padding: 10px 6px; font-size: 0.85rem; }

  /* Modal fullscreen-md-down: rodape sticky pra Salvar/Cancelar sempre visiveis */
  .modal-fullscreen-md-down .modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #dee2e6;
  }

  /* Dropdowns mais legiveis em mobile */
  .dropdown-menu { min-width: 200px; }
  .dropdown-item { padding: 12px 16px; font-size: 0.95rem; }
}

@media (max-width: 576px) {
  /* Stats KPI ainda mais compactos */
  .stats-value { font-size: 1.4rem; }

  /* Container fluido sem padding lateral grande */
  .container-fluid { padding-left: 12px; padding-right: 12px; }

  /* Login compacto */
  .login-card { padding: 24px 18px; border-radius: 12px; }
  .logo-circle { width: 64px; height: 64px; font-size: 28px; }
}
