/* GESTUM - Design Minimalista inspirado no Admin King */

/* ============================================
   PALETA DE CORES MINIMALISTA
   ============================================ */
:root {
  --bg-primary: #f5f7fa;
  --bg-white: #ffffff;
  --bg-light: #f7fafc;
  --text-primary: #1a202c;
  --text-secondary: #718096;
  --text-muted: #4a5568;
  --border-color: #e2e8f0;
  --border-light: #cbd5e0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ============================================
   RESET E BASE
   ============================================ */
body {
  background-color: var(--bg-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.3px;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--text-secondary) !important;
}

/* ============================================
   CARDS E CONTAINERS
   ============================================ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-body {
  padding: 1.5rem;
}

/* Cards de estatísticas */
.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
  border-top: 3px solid var(--border-color);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Cards de ação */
.action-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.action-card h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border-light);
}

.btn-primary {
  background-color: var(--text-primary);
  border-color: var(--text-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--text-muted);
  border-color: var(--text-muted);
  transform: none;
}

.btn-success {
  background-color: #4caf50;
  border-color: #4caf50;
  color: white;
}

.btn-success:hover {
  background-color: #45a049;
  border-color: #45a049;
}

.btn-danger {
  background-color: #f44336;
  border-color: #f44336;
  color: white;
}

.btn-danger:hover {
  background-color: #e53935;
  border-color: #e53935;
}

.btn-warning {
  background-color: #ffc107;
  border-color: #ffc107;
  color: var(--text-primary);
}

.btn-warning:hover {
  background-color: #e0a800;
  border-color: #e0a800;
}

.btn-secondary {
  background-color: #94a3b8;
  border-color: #94a3b8;
  color: white;
}

.btn-secondary:hover {
  background-color: #7c8a9d;
  border-color: #7c8a9d;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-dark {
  background-color: transparent;
  border-width: 1px;
}

.btn-outline-primary {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-outline-primary:hover {
  background-color: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline-dark {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-outline-dark:hover {
  background-color: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline-success {
  color: #28a745;
  border-color: #28a745;
}

.btn-outline-success:hover {
  background-color: #28a745;
  color: white;
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-danger:hover {
  background-color: #dc3545;
  color: white;
}

/* Botões de ação */
.action-btn {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  text-align: left;
  color: var(--text-muted);
  background: var(--bg-white);
  font-size: 0.9rem;
}

.action-btn:hover {
  background: var(--bg-light);
  border-color: var(--border-light);
  color: var(--text-primary);
  transform: none;
}

.action-btn i {
  width: 20px;
  color: var(--text-secondary);
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-label {
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  padding: 0.625rem 0.875rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-secondary);
}

/* ============================================
   TABELAS
   ============================================ */
.table {
  margin-bottom: 0;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.table thead {
  background: var(--bg-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table thead th {
  border-bottom: 1px solid var(--border-color);
  padding: 0.875rem 0.75rem;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
  background: var(--bg-light);
}

.table tbody td {
  padding: 0.875rem 0.75rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.table-modern {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.table-modern thead {
  background: var(--bg-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.table-modern tbody tr:hover {
  background: var(--bg-light);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  background: #94a3b8;
  color: #ffffff;
}

.badge-primary {
  background-color: var(--bg-light);
  color: var(--text-primary);
}

.badge-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.badge-danger {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.badge-warning {
  background-color: #fff8e1;
  color: #f57c00;
  border: 1px solid #ffe082;
}

.badge-info {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
}

/* Badge secundário padrão - cinza suave com texto branco */
.badge.bg-secondary,
.bg-secondary.badge {
  background-color: #94a3b8 !important;
  color: #ffffff !important;
  border: none;
}

/* Classe bg-secondary global para badges e outros elementos */
.bg-secondary {
  background-color: #94a3b8 !important;
}

.bg-secondary.text-white,
.bg-secondary .text-white,
.badge.bg-secondary {
  color: #ffffff !important;
}

.badge-perfil {
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  background: #94a3b8;
  color: #ffffff;
}

.badge-custom {
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  background: #94a3b8;
  color: #ffffff;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #c8e6c9;
  color: #2e7d32;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #ffcdd2;
  color: #c62828;
}

.alert-warning {
  background-color: #fff8e1;
  border-color: #ffe082;
  color: #f57c00;
}

.alert-info {
  background-color: #e3f2fd;
  border-color: #bbdefb;
  color: #1565c0;
}

.alert-light {
  background-color: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.accordion-button {
  background-color: var(--bg-light);
  border: none;
  font-weight: 500;
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.accordion-button:not(.collapsed) {
  background-color: var(--bg-white);
  color: var(--text-primary);
  box-shadow: none;
}

.accordion-button:hover {
  background-color: var(--bg-white);
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--border-color);
}

.accordion-body {
  padding: 1.25rem;
  background-color: var(--bg-white);
}

/* ============================================
   NAVEGAÇÃO
   ============================================ */
.navbar {
  background-color: var(--text-primary) !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.navbar-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.nav-tabs {
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}

.nav-tabs .nav-link.active {
  font-weight: 600;
  color: var(--text-primary);
  background-color: transparent;
  border-bottom-color: var(--text-primary);
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.section-header {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--text-primary);
}

.section-header h1 {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.section-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.admin-section {
  background: var(--bg-primary);
  min-height: 100vh;
  padding: 2rem 0;
}

.admin-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.admin-card h3 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  font-size: 1.5rem;
}

.filter-card {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
  .stat-card {
    padding: 1.25rem;
  }

  .stat-card .stat-value {
    font-size: 1.75rem;
  }

  .admin-card {
    padding: 1.5rem;
  }

  .section-header {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   ESPECÍFICOS DO SISTEMA
   ============================================ */
.dashboard-header {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--text-primary);
}

.dashboard-header h1 {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.dashboard-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Lista de itens */
.client-list-item,
.access-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
  border-left: 3px solid var(--border-light);
}

.client-list-item:hover,
.access-item:hover {
  box-shadow: var(--shadow-md);
}

.permission-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  margin: 0.125rem;
  background: #94a3b8;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #ffffff;
  border: none;
}

.info-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
}

/* ============================================
   CORES FINANCEIRAS SUTIS
   ============================================ */
.text-success {
  color: #2e7d32 !important;
}

.text-danger {
  color: #c62828 !important;
}

/* Valores financeiros com cores mais sutis */
.valor-positivo {
  color: #388e3c;
  font-weight: 500;
}

.valor-negativo {
  color: #d32f2f;
  font-weight: 500;
}

.valor-zero {
  color: var(--text-muted);
}

/* Preenchimentos sutis para valores financeiros */
.bg-success-subtle {
  background-color: #e8f5e9 !important;
  color: #2e7d32 !important;
  border: 1px solid #c8e6c9;
}

.bg-danger-subtle {
  background-color: #ffebee !important;
  color: #c62828 !important;
  border: 1px solid #ffcdd2;
}

.bg-primary-subtle {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  border: 1px solid #bbdefb;
}

/* Badges mais sutis */
.badge.bg-success {
  background-color: #e8f5e9 !important;
  color: #2e7d32 !important;
  border: 1px solid #c8e6c9;
}

.badge.bg-danger {
  background-color: #ffebee !important;
  color: #c62828 !important;
  border: 1px solid #ffcdd2;
}

.badge.bg-primary {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  border: 1px solid #bbdefb;
}

.badge.bg-info {
  background-color: #e1f5fe !important;
  color: #0277bd !important;
  border: 1px solid #b3e5fc;
}

/* Override para evitar cores muito fortes em tabelas */
.table .text-success {
  color: #388e3c !important;
}

.table .text-danger {
  color: #d32f2f !important;
}

/* Células de tabela com preenchimento sutil */
.table td.bg-success,
.table th.bg-success {
  background-color: #e8f5e9 !important;
  color: #2e7d32 !important;
}

.table td.bg-danger,
.table th.bg-danger {
  background-color: #ffebee !important;
  color: #c62828 !important;
}

.table td.bg-primary,
.table th.bg-primary {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
}

