/* Variáveis CSS para Padronização de Cores - Tema Moderno/Premium Institucional */
:root {
  --primary-color: #0d6efd;
  --primary-dark: #0a58ca;
  --secondary-color: #6c757d;
  --bg-body: #f4f6f9;
  --sidebar-w: 250px;
  --sidebar-bg: #212529;
  /* Dark Sidebar */
  --sidebar-hover: #343a40;
  --sidebar-active: #0d6efd;
  --card-border-radius: 0.5rem;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: #333;
}

/* Utilities adicionais para tipografia */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* =======================================
   Login
======================================== */
.login-body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-body .card {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

/* =======================================
   Sidebar & Layout (Dashboard)
======================================== */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.sidebar {
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  background-color: var(--sidebar-bg);
  color: #fff;
  transition: all 0.3s;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  z-index: 1030;
}

.sidebar .sidebar-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar ul.components {
  padding: 20px 0;
}

.sidebar ul li a {
  padding: 12px 20px;
  font-size: 1.05em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: 0.2s;
  border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
  color: #fff;
  background: var(--sidebar-hover);
  border-left-color: rgba(255, 255, 255, 0.2);
}

.sidebar ul li.active>a {
  color: #fff;
  background: var(--sidebar-active);
  border-left: 3px solid #fff;
}

.content-wrapper {
  width: calc(100% - var(--sidebar-w));
  margin-left: var(--sidebar-w);
  padding: 30px;
  min-height: 100vh;
}

/* =======================================
   Cards & Tabelas 
======================================== */
.card-stats {
  border: none;
  border-radius: var(--card-border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-stats:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.table-modern {
  background-color: #fff;
  border-radius: var(--card-border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.table-modern table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

/* =======================================
   Formulários de Relatório
======================================== */
.form-section-title {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
  color: var(--primary-dark);
  font-size: 1.25rem;
}

.dynamic-table {
  width: 100%;
}

.dynamic-table th,
.dynamic-table td {
  padding: 0.75rem;
}

.dynamic-table input,
.dynamic-table select {
  min-width: 150px;
}

/* Glassmorphism ou Elementos Dinâmicos - Subtis */
.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* =======================================
   Botão de Ação Flutuante ou Principal
======================================== */
.action-buttons {
  gap: 10px;
}

/* Destaque para relatórios com feedback não lido (Dourado) */
.row-feedback-unread td {
  background-color: #fff9c4 !important;
}

.row-feedback-unread {
  border-left: 5px solid #fbc02d !important;
}

.row-feedback-unread td {
  font-weight: 500;
}

/* =======================================
   Responsive Design & Mobile Header
======================================== */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  z-index: 1020;
  padding: 0 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1025;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1030;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .content-wrapper {
    margin-left: 0;
    width: 100%;
    padding: 15px;
    padding-top: 80px; /* Account for mobile-header */
  }

  /* Optimize padding for dashboard cards */
  .card-body {
    padding: 1rem;
  }
}