/* ========================================
   Temas Personalizados - SB Admin 2
   ======================================== */

/* ====== TELAS DE AUTENTICACAO ====== */
.auth-logo {
  display: block;
  width: 190px;
  max-width: 65%;
  max-height: 58px;
  height: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
}

@media (max-width: 576px) {
  .auth-logo {
    width: 160px;
    max-width: 70%;
    max-height: 50px;
  }
}

/* ====== DARK MODE ====== */
body.tema-dark {
  background-color: #1a1c23 !important;
  color: #e0e0e0 !important;
}

body.tema-dark .bg-white,
body.tema-dark .card {
  background-color: #27293d !important;
  color: #e0e0e0 !important;
  border-color: #3a3f51 !important;
}

body.tema-dark .topbar {
  background-color: #27293d !important;
}

body.tema-dark .topbar .nav-link,
body.tema-dark .topbar .dropdown-item,
body.tema-dark .topbar .form-control {
  color: #e0e0e0 !important;
  background-color: #27293d !important;
}

body.tema-dark .sidebar {
  background: linear-gradient(180deg, #232840 0%, #1a1c23 100%) !important;
}

body.tema-dark .sidebar .nav-link {
  color: #a0a5b5 !important;
}

body.tema-dark .sidebar .nav-link.active,
body.tema-dark .sidebar .nav-link:hover {
  color: #fff !important;
}

body.tema-dark .table,
body.tema-dark .table-striped tbody tr:nth-of-type(odd) {
  background-color: #27293d !important;
  color: #e0e0e0 !important;
}

body.tema-dark .table thead th {
  border-color: #3a3f51 !important;
  background-color: #2e3142 !important;
  color: #e0e0e0 !important;
}

body.tema-dark .form-control,
body.tema-dark .form-control:focus {
  background-color: #1a1c23 !important;
  color: #e0e0e0 !important;
  border-color: #3a3f51 !important;
}

body.tema-dark .form-control::placeholder {
  color: #6b7280 !important;
}

body.tema-dark .modal-content {
  background-color: #27293d !important;
  color: #e0e0e0 !important;
}

body.tema-dark .dropdown-menu {
  background-color: #27293d !important;
  border-color: #3a3f51 !important;
}

body.tema-dark .alert-info {
  background-color: #1e3a5f !important;
  color: #b8d4e8 !important;
  border-color: #2a5a8f !important;
}

body.tema-dark .alert-warning {
  background-color: #5f4e1e !important;
  color: #e8d4b8 !important;
  border-color: #8f7a2a !important;
}

body.tema-dark .alert-success {
  background-color: #1e5f2a !important;
  color: #b8e8c4 !important;
  border-color: #2a8f4a !important;
}

body.tema-dark .alert-danger {
  background-color: #5f1e1e !important;
  color: #e8b8b8 !important;
  border-color: #8f2a2a !important;
}

/* ====== TEMA AZUL ====== */
body.tema-blue .sidebar {
  background: linear-gradient(180deg, #1a3a5c 0%, #0d2137 100%) !important;
}

body.tema-blue .sidebar-brand {
  background-color: #0d2137 !important;
}

body.tema-blue .bg-gradient-primary {
  background: linear-gradient(180deg, #1a3a5c 0%, #0d2137 100%) !important;
}

body.tema-blue .btn-primary,
body.tema-blue .badge-primary {
  background-color: #1a3a5c !important;
  border-color: #0d2137 !important;
}

body.tema-blue .text-primary {
  color: #1a3a5c !important;
}

body.tema-blue .border-left-primary {
  border-left: 0.25rem solid #1a3a5c !important;
}

body.tema-blue .nav-item.active .nav-link {
  background-color: #1a3a5c !important;
}

body.tema-blue .sidebar .nav-link:hover,
body.tema-blue .sidebar .nav-link.active {
  background-color: rgba(26, 58, 92, 0.3) !important;
}

body.tema-blue .topbar {
  background: linear-gradient(90deg, #f0f4f8 0%, #e8edf2 100%) !important;
}

body.tema-blue .bg-white {
  background-color: #f0f4f8 !important;
}

body.tema-blue footer.bg-white {
  background: linear-gradient(90deg, #f0f4f8 0%, #e8edf2 100%) !important;
  color: #1a3a5c !important;
}

/* ====== TEMA VERDE ====== */
body.tema-green .sidebar {
  background: linear-gradient(180deg, #1a5c3a 0%, #0d3721 100%) !important;
}

body.tema-green .sidebar-brand {
  background-color: #0d3721 !important;
}

body.tema-green .bg-gradient-primary {
  background: linear-gradient(180deg, #1a5c3a 0%, #0d3721 100%) !important;
}

body.tema-green .btn-primary,
body.tema-green .badge-primary {
  background-color: #1a5c3a !important;
  border-color: #0d3721 !important;
}

body.tema-green .text-primary {
  color: #1a5c3a !important;
}

body.tema-green .border-left-primary {
  border-left: 0.25rem solid #1a5c3a !important;
}

body.tema-green .nav-item.active .nav-link {
  background-color: #1a5c3a !important;
}

body.tema-green .sidebar .nav-link:hover,
body.tema-green .sidebar .nav-link.active {
  background-color: rgba(26, 92, 58, 0.3) !important;
}

body.tema-green .topbar {
  background: linear-gradient(90deg, #f0f8f2 0%, #e8f2ec 100%) !important;
}

body.tema-green .bg-white {
  background-color: #f0f8f2 !important;
}

body.tema-green footer.bg-white {
  background: linear-gradient(90deg, #f0f8f2 0%, #e8f2ec 100%) !important;
  color: #1a5c3a !important;
}

/* ====== TEMA ROXO ====== */
body.tema-purple .sidebar {
  background: linear-gradient(180deg, #3a1a5c 0%, #210d37 100%) !important;
}

body.tema-purple .sidebar-brand {
  background-color: #210d37 !important;
}

body.tema-purple .bg-gradient-primary {
  background: linear-gradient(180deg, #3a1a5c 0%, #210d37 100%) !important;
}

body.tema-purple .btn-primary,
body.tema-purple .badge-primary {
  background-color: #3a1a5c !important;
  border-color: #210d37 !important;
}

body.tema-purple .text-primary {
  color: #3a1a5c !important;
}

body.tema-purple .border-left-primary {
  border-left: 0.25rem solid #3a1a5c !important;
}

body.tema-purple .nav-item.active .nav-link {
  background-color: #3a1a5c !important;
}

body.tema-purple .sidebar .nav-link:hover,
body.tema-purple .sidebar .nav-link.active {
  background-color: rgba(58, 26, 92, 0.3) !important;
}

body.tema-purple .topbar {
  background: linear-gradient(90deg, #f5f0f8 0%, #ede8f2 100%) !important;
}

body.tema-purple .bg-white {
  background-color: #f5f0f8 !important;
}

body.tema-purple footer.bg-white {
  background: linear-gradient(90deg, #f5f0f8 0%, #ede8f2 100%) !important;
  color: #3a1a5c !important;
}

/* ====== TEMA VERMELHO ====== */
body.tema-red .sidebar {
  background: linear-gradient(180deg, #5c1a1a 0%, #370d0d 100%) !important;
}

body.tema-red .sidebar-brand {
  background-color: #370d0d !important;
}

body.tema-red .bg-gradient-primary {
  background: linear-gradient(180deg, #5c1a1a 0%, #370d0d 100%) !important;
}

body.tema-red .btn-primary,
body.tema-red .badge-primary {
  background-color: #5c1a1a !important;
  border-color: #370d0d !important;
}

body.tema-red .text-primary {
  color: #5c1a1a !important;
}

body.tema-red .border-left-primary {
  border-left: 0.25rem solid #5c1a1a !important;
}

body.tema-red .nav-item.active .nav-link {
  background-color: #5c1a1a !important;
}

body.tema-red .sidebar .nav-link:hover,
body.tema-red .sidebar .nav-link.active {
  background-color: rgba(92, 26, 26, 0.3) !important;
}

body.tema-red .topbar {
  background: linear-gradient(90deg, #f8f0f0 0%, #f2e8e8 100%) !important;
}

body.tema-red .bg-white {
  background-color: #f8f0f0 !important;
}

body.tema-red footer.bg-white {
  background: linear-gradient(90deg, #f8f0f0 0%, #f2e8e8 100%) !important;
  color: #5c1a1a !important;
}

/* ====== TELA DE LOGIN ====== */
body.tema-blue.bg-gradient-primary {
  background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%) !important;
}

body.tema-green.bg-gradient-primary {
  background: linear-gradient(135deg, #1a5c3a 0%, #0d3721 100%) !important;
}

body.tema-purple.bg-gradient-primary {
  background: linear-gradient(135deg, #3a1a5c 0%, #210d37 100%) !important;
}

body.tema-red.bg-gradient-primary {
  background: linear-gradient(135deg, #5c1a1a 0%, #370d0d 100%) !important;
}

body.tema-dark.bg-gradient-primary {
  background: linear-gradient(135deg, #27293d 0%, #1a1c23 100%) !important;
}

body.tema-dark.bg-gradient-primary .card,
body.tema-dark.bg-gradient-primary .card-body,
body.tema-dark.bg-gradient-primary .input-group-text {
  background-color: #ffffff !important;
  color: #5a5c69 !important;
  border-color: #d1d3e2 !important;
}

body.tema-dark.bg-gradient-primary .form-control,
body.tema-dark.bg-gradient-primary .form-control:focus {
  background-color: #ffffff !important;
  color: #6e707e !important;
  border-color: #d1d3e2 !important;
}

body.tema-dark.bg-gradient-primary .form-control::placeholder {
  color: #858796 !important;
}

/* ====== DROPDOWN DO SELETOR ====== */
.theme-selector-dropdown {
  position: relative;
  display: inline-block;
}

.theme-selector-dropdown .dropdown-menu {
  min-width: 160px;
  padding: 0.5rem 0;
}

.theme-selector-dropdown .theme-option {
  display: flex;
  align-items: center;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.theme-selector-dropdown .theme-option:hover {
  background-color: #f8f9fc;
}

body.tema-dark .theme-selector-dropdown .theme-option:hover {
  background-color: #3a3f51 !important;
}

.theme-color-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid #ddd;
  flex-shrink: 0;
}

.theme-color-preview.preview-default {
  background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.theme-color-preview.preview-dark {
  background: linear-gradient(135deg, #27293d 0%, #1a1c23 100%);
  border-color: #555;
}

.theme-color-preview.preview-blue {
  background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
}

.theme-color-preview.preview-green {
  background: linear-gradient(135deg, #1a5c3a 0%, #0d3721 100%);
}

.theme-color-preview.preview-purple {
  background: linear-gradient(135deg, #3a1a5c 0%, #210d37 100%);
}

.theme-color-preview.preview-red {
  background: linear-gradient(135deg, #5c1a1a 0%, #370d0d 100%);
}
