/*===== GOOGLE FONTS =====*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/*===== CSS VARIABLES =====*/
:root {
  --primary-color: #181818;
  --secondary-color: #00015c;
  --accent-color: #3be5ff;
  --white-color: #FFFFFF;
  --light-gray: #F8F9FA;
  --gray-color: #6C757D;
  --dark-gray: #343A40;
  --text-color: #2C3E50;
  --border-color: #E9ECEF;
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --font-family: 'Poppins', sans-serif;
  --shadow-light: 0 2px 12px rgba(0, 78, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 78, 0, 0.15);
}

/*===== BASE =====*/
body {
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--text-color);
  background-color: var(--white-color);
  line-height: 1.4;
}

/*===== NAVBAR =====*/
.navbar {
  background: var(--gradient-primary) !important;
  padding: 0.4rem 0;
  box-shadow: var(--shadow-light);
  min-height: 48px;
}

.navbar-brand {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand img {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  max-width: 150px !important;
  background: white;
  padding: 4px;
  border-radius: 4px;
  object-fit: contain;
}

.navbar-nav .nav-link {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}

/*===== SIDEBAR =====*/
.sidebar {
  position: fixed;
  top: 48px;
  bottom: 0;
  left: 0;
  padding-top: 0.5rem;
  overflow-y: auto;
  background-color: var(--light-gray);
  border-right: 1px solid var(--border-color);
  font-size: 0.813rem;
}

.sidebar .nav-link {
  color: var(--text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  margin: 0.15rem 0.5rem;
  transition: all 0.2s;
  font-size: 0.813rem;
}

.sidebar .nav-link:hover {
  background-color: #e9ecef;
  color: var(--secondary-color);
}

.sidebar .nav-link.active {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
  width: 18px;
  font-size: 0.875rem;
}

/*===== MAIN CONTENT =====*/
main {
  margin-top: 48px;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
}

/*===== HEADERS =====*/
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.938rem; }
h6 { font-size: 0.875rem; }

.border-bottom {
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

/*===== CARDS =====*/
.card {
  border: none;
  box-shadow: var(--shadow-light);
  margin-bottom: 0.75rem;
}

.card-header {
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.card-body {
  padding: 0.75rem 1rem;
}

.card-title {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/*===== DASHBOARD CARDS =====*/
.card.text-white {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.card.text-white .card-body {
  padding: 0.5rem;
}

.card.text-white h6,
.card.text-white .card-title,
.card.text-white h2,
.card.text-white h3,
.card.text-white h4,
.card.text-white h5,
.card.text-white p,
.card.text-white span,
.card.text-white div {
  color: white !important;
}

.card.text-white i {
  font-size: 2rem !important;
  opacity: 0.3;
  color: white !important;
}

/*===== GRÁFICOS =====*/
.card-body canvas {
  max-height: 160px !important;
}

#timelineChart {
  max-height: 120px !important;
}

/*===== TABELAS =====*/
.table {
  font-size: 0.813rem;
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.688rem;
  letter-spacing: 0.5px;
  color: var(--gray-color);
  border-bottom: 2px solid var(--border-color);
  padding: 0.35rem 0.4rem;
  white-space: nowrap;
  background: #f8f9fa;
}

.table td {
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
  font-size: 0.75rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
  background-color: var(--light-gray);
}

.table-sm th,
.table-sm td {
  padding: 0.35rem 0.4rem;
}

.table-responsive {
  font-size: 0.813rem;
}

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
}

/*===== FORMULÁRIOS =====*/
.form-label {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.35rem;
  font-size: 0.813rem;
}

.form-control,
.form-select {
  font-size: 0.813rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.25rem;
}

.form-control-sm,
.form-select-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 1, 92, 0.25);
}

/*===== BOTÕES =====*/
.btn {
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.813rem;
  padding: 0.4rem 0.75rem;
}

.btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-group-sm .btn {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
}

/*===== BADGES =====*/
.badge {
  font-weight: 500;
  padding: 0.25em 0.5em;
  font-size: 0.75rem;
}

/*===== ALERTS =====*/
.alert {
  padding: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.813rem;
  border-radius: 0.25rem;
}

/*===== PAGINAÇÃO =====*/
.pagination {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.page-link {
  color: var(--secondary-color);
  font-size: 0.813rem;
  padding: 0.35rem 0.65rem;
}

.page-item.active .page-link {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
}

/*===== FILTROS =====*/
.card.mb-4 {
  margin-bottom: 0.75rem !important;
}

.row.g-3 {
  --bs-gutter-y: 0.5rem;
  --bs-gutter-x: 0.75rem;
}

/*===== STATUS E BRAND SELECTS =====*/
.status-select,
.brand-select {
  min-width: 110px;
  font-size: 0.75rem;
}

/*===== TOAST =====*/
.toast {
  min-width: 280px;
  font-size: 0.813rem;
}

/*===== SCROLLBAR =====*/
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/*===== RESPONSIVE =====*/
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    top: 0;
    height: auto;
  }
  
  main {
    margin-top: 0;
  }
  
  .table-responsive {
    font-size: 0.75rem;
  }
}

/*===== UTILITIES =====*/
.text-muted {
  color: var(--gray-color) !important;
}

small {
  font-size: 0.75rem;
}

/*===== ANIMAÇÕES =====*/
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

#persistentLeadNotification {
  animation: slideInRight 0.3s ease-out;
}

#persistentLeadNotification i {
  animation: pulse 2s infinite;
}
