/* ========================================
   COSTALOG - SISTEMA DE VIAGENS
   CSS Completo e Otimizado - VERSÃO FINAL
   ======================================== */

/* ========== 1. VARIÁVEIS CSS ========== */
:root {
  /* Cores Primárias */
  --color-primary: #E31837;
  --color-primary-dark: #B71C1C;
  --color-primary-light: #FF5252;
  
  /* Cores Neutras */
  --color-black: #1A1A1A;
  --color-white: #FFFFFF;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #E0E0E0;
  --color-gray-300: #BDBDBD;
  --color-gray-400: #999999;
  --color-gray-500: #666666;
  
  /* Cores de Status */
  --color-embarque-cheio: #28a745;
  --color-retirada-vazio: #007bff;
  --color-devolucao-vazio: #ffc107;
  --color-retirada-cheio: #dc3545;
  
  /* Tipografia */
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  
  /* Tamanhos de Fonte */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  
  /* Pesos */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Espaçamentos */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
  --spacing-xxl: 80px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(227, 24, 55, 0.15);
  
  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  
  /* Container */
  --container-max-width: 1400px;
  --container-padding: 40px;
}

/* ========== 2. RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ========== 3. TIPOGRAFIA ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-black);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

/* ========== 4. LAYOUT ========== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.main-content {
  padding: 32px 0;
  min-height: calc(100vh - 80px);
}

/* ========== 5. BOTÕES ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 14px 32px;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
}

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

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

.btn-logout {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  padding: 10px 24px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.btn-logout:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-foto {
  padding: 6px 12px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-foto:hover {
  background: #0056b3;
}

.btn-foto i {
  font-size: 11px;
}

.btn-filter, .btn-clear {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
  flex: 1;
}

.btn-filter {
  background: #E31837;
  color: #fff;
}

.btn-filter:hover {
  background: #c01530;
}

.btn-clear {
  background: #6c757d;
  color: #fff;
}

.btn-clear:hover {
  background: #5a6268;
}

/* ========== BOTÃO DE EXPORTAÇÃO ========== */
.export-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #e0e0e0;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #28a745;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-export:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-export:active {
  transform: translateY(0);
}

.btn-export i {
  font-size: 16px;
}

/* ========== 6. BADGES ========== */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  font-family: var(--font-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge--embarque-cheio {
  background: var(--color-embarque-cheio);
}

.badge--retirada-vazio {
  background: var(--color-retirada-vazio);
}

.badge--devolucao-vazio {
  background: var(--color-devolucao-vazio);
}

.badge--retirada-cheio {
  background: var(--color-retirada-cheio);
}

/* ========== 7. FORMULÁRIOS ========== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-label i {
  margin-right: 6px;
  color: #E31837;
  font-size: 13px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: #1a1a1a;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #E31837;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(227, 24, 55, 0.1);
}

.form-input::placeholder {
  color: #999;
}

/* Select específico */
select.form-input, select.filter-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23E31837' d='M1.41 0L6 4.59L10.59 0L12 1.41l-6 6l-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  background-color: #f9f9f9;
}

/* ========== 8. PÁGINA DE LOGIN ========== */
.login-page {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 40px 32px;
  text-align: center;
}

.login-logo {
  margin-bottom: 24px;
}

.logo-image {
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.login-description {
  font-size: 14px;
  color: #666;
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.login-form {
  text-align: left;
}

.btn-login {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #E31837;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(227, 24, 55, 0.3);
}

.btn-login:hover {
  background: #c01530;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(227, 24, 55, 0.4);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(227, 24, 55, 0.3);
}

.btn-login i {
  font-size: 16px;
}

.error-message {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #ffe6e6;
  border: 2px solid #ff4444;
  border-radius: 8px;
  color: #c00;
  font-size: 14px;
  margin-top: 20px;
  font-weight: 500;
}

.error-message i {
  font-size: 16px;
}

/* ========== 9. HEADER ========== */
.header {
  background: var(--color-black);
  color: var(--color-white);
  height: 80px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-image-header {
  height: 45px;
  width: auto;
}

.header-brand {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  letter-spacing: 1px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header-welcome {
  font-size: 15px;
  color: var(--color-white);
}

.header-welcome strong {
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* ========== 10. ESTATÍSTICAS (5 CARDS) ========== */
.stats-section {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-base);
}

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

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-white);
  flex-shrink: 0;
}

.stat-icon--total {
  background: #E31837;
}

.stat-icon--embarque-cheio {
  background: #28a745;
}

.stat-icon--retirada-cheio {
  background: #dc3545;
}

.stat-icon--devolucao-vazio {
  background: #ffc107;
}

.stat-icon--retirada-vazio {
  background: #007bff;
}

.stat-info h3 {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 600;
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  color: #1a1a1a;
  line-height: 1;
}

/* ========== 11. FILTROS - LAYOUT PADRÃO ========== */
.filters-section {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: end;
}

.filter-actions {
  grid-column: span 4;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  max-width: 400px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.filter-group input,
.filter-group select {
  padding: 10px 12px;
  font-size: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #E31837;
}

/* ========== FILTROS - DASHBOARD MASTER (5 FILTROS) ========== */
.dashboard-master .filters-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: end;
}

.dashboard-master .filter-actions {
  grid-column: span 3;
  max-width: none;
}

/* ========== FILTROS - DASHBOARD MOTORISTA (4 FILTROS) ========== */
.dashboard-motorista .filters-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: end;
}

.dashboard-motorista .filter-actions {
  grid-column: span 4;
  max-width: 400px;
}

/* ========== 12. TABELA ========== */
.table-section {
  margin-bottom: 40px;
}

.table-container {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.data-table thead {
  background: var(--color-primary);
  color: var(--color-white);
}

.data-table th {
  padding: 16px 12px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  text-align: left;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--color-gray-200);
  transition: all var(--transition-fast);
}

.data-table tbody tr:nth-child(odd) {
  background: var(--color-white);
}

.data-table tbody tr:nth-child(even) {
  background: var(--color-gray-100);
}

.data-table tbody tr:hover {
  background: #FFF0F0;
}

.data-table td {
  padding: 16px 12px;
  font-size: 15px;
  color: var(--color-black);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table td strong {
  font-weight: var(--font-weight-semibold);
}

/* ========== 13. GRÁFICOS ========== */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: #E31837;
  font-size: 22px;
}

.charts-section {
  margin-bottom: 40px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.chart-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

canvas {
  max-height: 300px;
}

/* ========== 14. MODAL ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 900px;
  max-height: 90vh;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
}

.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--color-black);
  color: var(--color-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-base);
  z-index: 1002;
}

.modal-close:hover {
  background: var(--color-primary);
  transform: rotate(90deg);
}

.modal-title {
  padding: var(--spacing-md) var(--spacing-md) 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-black);
}

.modal-body {
  padding: var(--spacing-md);
  max-height: 70vh;
  overflow-y: auto;
}

.foto-frame {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 8px;
  background: #f5f5f5;
}

/* ========== 15. RESPONSIVO ========== */
@media (max-width: 1200px) {
  .stats-section {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .dashboard-master .filters-form {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-master .filter-actions {
    grid-column: span 2;
  }
  
  .dashboard-motorista .filters-form {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-motorista .filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
  }
  
  /* Login */
  .login-box {
    padding: 32px 24px;
  }
  
  .logo-image {
    max-width: 150px;
  }
  
  .login-title {
    font-size: 20px;
  }
  
  .login-description {
    font-size: 13px;
  }
  
  /* Header */
  .header {
    height: auto;
    padding: 12px 0;
  }
  
  .header-container {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .header-user {
    width: 100%;
    justify-content: space-between;
  }
  
  .logo-image-header {
    height: 35px;
  }
  
  .header-brand {
    font-size: 16px;
  }
  
  /* Main content */
  .main-content {
    padding: 20px 0;
  }
  
  /* Stats */
  .stats-section {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  /* Filtros */
  .dashboard-master .filters-form,
  .dashboard-motorista .filters-form {
    grid-template-columns: 1fr;
  }
  
  .dashboard-master .filter-actions,
  .dashboard-motorista .filter-actions {
    grid-column: span 1;
    flex-direction: column;
    max-width: none;
  }
  
  /* Export */
  .export-section {
    justify-content: stretch;
  }
  
  .btn-export {
    width: 100%;
    justify-content: center;
  }
  
  /* Tabela vira Cards */
  .table-container {
    overflow-x: visible;
  }
  
  .data-table {
    min-width: auto;
  }
  
  .data-table thead {
    display: none;
  }
  
  .data-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
  }
  
  .data-table td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border: none;
    white-space: normal;
  }
  
  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
    margin-right: 10px;
  }
  
  .data-table td:last-child {
    display: block;
  }
  
  .btn-foto {
    width: 100%;
    justify-content: center;
  }
  
  /* Modal */
  .foto-frame {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    max-width: 130px;
  }
  
  .login-title {
    font-size: 18px;
  }
}

/* ========== 16. ANIMAÇÕES ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  animation: fadeIn 0.5s ease;
}

.modal.active .modal-content {
  animation: fadeIn 0.3s ease;
}
/* ========== DARK MODE - VARIÁVEIS ========== */
body.dark-mode {
  --color-black: #FFFFFF;
  --color-white: #1A1A1A;
  --color-gray-100: #2A2A2A;
  --color-gray-200: #3A3A3A;
  --color-gray-300: #4A4A4A;
  --color-gray-400: #999999;
  --color-gray-500: #CCCCCC;
}

body.dark-mode {
  background: #1A1A1A;
  color: #FFFFFF;
}

/* Cards no Dark Mode */
body.dark-mode .stat-card,
body.dark-mode .filters-section,
body.dark-mode .table-container,
body.dark-mode .chart-card {
  background: #2A2A2A;
  border-color: #3A3A3A;
}

body.dark-mode .stat-info h3 {
  color: #CCCCCC;
}

body.dark-mode .stat-number {
  color: #FFFFFF;
}

/* Filtros no Dark Mode */
body.dark-mode .filter-group label {
  color: #CCCCCC;
}

body.dark-mode .filter-group input,
body.dark-mode .filter-group select {
  background: #3A3A3A;
  border-color: #4A4A4A;
  color: #FFFFFF;
}

body.dark-mode .filter-group input:focus,
body.dark-mode .filter-group select:focus {
  background: #2A2A2A;
  border-color: #E31837;
}

body.dark-mode .export-section {
  border-top-color: #3A3A3A;
}

/* Tabela no Dark Mode */
body.dark-mode .data-table tbody tr:nth-child(odd) {
  background: #2A2A2A;
}

body.dark-mode .data-table tbody tr:nth-child(even) {
  background: #242424;
}

body.dark-mode .data-table tbody tr:hover {
  background: #3A2020;
}

body.dark-mode .data-table td {
  color: #FFFFFF;
}

/* Títulos no Dark Mode */
body.dark-mode .section-title,
body.dark-mode .chart-title,
body.dark-mode .login-title {
  color: #FFFFFF;
}

/* Modal no Dark Mode */
body.dark-mode .modal-content {
  background: #2A2A2A;
}

body.dark-mode .modal-title {
  color: #FFFFFF;
}

/* ========== BOTÃO DE TOGGLE DARK MODE ========== */
.btn-theme-toggle {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
}

.btn-theme-toggle:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: rotate(180deg);
}

body.dark-mode .btn-theme-toggle i::before {
  content: "\f185"; /* Ícone de sol (fa-sun) */
}
/* ========== NOTIFICAÇÕES ========== */

/* Botão de Notificações */
.btn-notifications {
  position: relative;
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
}

.btn-notifications:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.1);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #E31837;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1a1a1a;
}

.notification-badge.hidden {
  display: none;
}

/* Painel de Notificações */
.notifications-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  z-index: 1100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.notifications-panel.active {
  right: 0;
}

.notifications-header {
  padding: 20px;
  background: #E31837;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #c01530;
}

.notifications-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-notifications {
  background: transparent;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 16px;
}

.btn-close-notifications:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notifications-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.notification-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.notification-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.notification-empty p {
  font-size: 14px;
}

/* Item de Notificação */
.notification-item {
  background: #f9f9f9;
  border-left: 4px solid #E31837;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.notification-item:hover {
  background: #f0f0f0;
  transform: translateX(-4px);
}

.notification-item.unread {
  background: #fff5f5;
  box-shadow: 0 2px 8px rgba(227, 24, 55, 0.1);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #E31837;
  border-radius: 50%;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E31837;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  float: left;
  margin-right: 12px;
}

.notification-content {
  overflow: hidden;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: #999;
}

/* Footer */
.notifications-footer {
  padding: 16px;
  border-top: 1px solid #e0e0e0;
  background: #f9f9f9;
}

.btn-mark-read {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #666;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-mark-read:hover {
  background: #E31837;
  color: #fff;
  border-color: #E31837;
}

/* Overlay */
.notifications-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  display: none;
}

.notifications-overlay.active {
  display: block;
}

/* Dark Mode */
body.dark-mode .notifications-panel {
  background: #2A2A2A;
}

body.dark-mode .notification-item {
  background: #3A3A3A;
  border-left-color: #E31837;
}

body.dark-mode .notification-item:hover {
  background: #404040;
}

body.dark-mode .notification-item.unread {
  background: #3A2020;
}

body.dark-mode .notification-title {
  color: #FFFFFF;
}

body.dark-mode .notification-message {
  color: #CCCCCC;
}

body.dark-mode .notifications-footer {
  background: #2A2A2A;
  border-top-color: #3A3A3A;
}

/* Responsivo */
@media (max-width: 768px) {
  .notifications-panel {
    width: 100%;
    right: -100%;
  }
}
/* ========== MODAL - AÇÕES (DOWNLOAD) ========== */
.modal-actions {
  padding: 0 var(--spacing-md);
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.btn-download-foto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #28a745;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-download-foto:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-download-foto:active {
  transform: translateY(0);
}

.btn-download-foto i {
  font-size: 14px;
}

/* Dark Mode */
body.dark-mode .btn-download-foto {
  background: #28a745;
}

body.dark-mode .btn-download-foto:hover {
  background: #218838;
}

/* Responsivo */
@media (max-width: 768px) {
  .modal-actions {
    padding: 0 16px;
  }
  
  .btn-download-foto {
    width: 100%;
    justify-content: center;
  }
}
/* ========== FILTROS RÁPIDOS POR PERÍODO ========== */
.quick-filters-section {
  background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quick-filters-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.quick-filters-header i {
  color: #E31837;
  font-size: 16px;
}

.quick-filters-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-quick-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-quick-filter:hover {
  background: #fff5f5;
  border-color: #E31837;
  color: #E31837;
  transform: translateY(-2px);
}

.btn-quick-filter.active {
  background: #E31837;
  border-color: #E31837;
  color: #fff;
  box-shadow: 0 2px 8px rgba(227, 24, 55, 0.3);
}

.btn-quick-filter i {
  font-size: 12px;
}

/* Dark Mode */
body.dark-mode .quick-filters-section {
  background: #2A2A2A;
  border-color: #3A3A3A;
}

body.dark-mode .quick-filters-header {
  color: #CCCCCC;
}

body.dark-mode .btn-quick-filter {
  background: #3A3A3A;
  border-color: #4A4A4A;
  color: #CCCCCC;
}

body.dark-mode .btn-quick-filter:hover {
  background: #404040;
  border-color: #E31837;
  color: #E31837;
}

body.dark-mode .btn-quick-filter.active {
  background: #E31837;
  border-color: #E31837;
  color: #fff;
}

/* Responsivo */
@media (max-width: 768px) {
  .quick-filters-section {
    padding: 16px;
  }
  
  .quick-filters-buttons {
    gap: 8px;
  }
  
  .btn-quick-filter {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .btn-quick-filter i {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .btn-quick-filter {
    flex: 1 1 100%;
  }
}

/* ========== FIM ========== */