/* =============================================
   CUSTOM STYLES - PAINEL DE ASSINATURAS
   ============================================= */

/* Auth Pages */
.auth-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.auth-page .card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
}

.auth-brand-icon {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Stats Cards */
.stats-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.12) !important;
}

.stats-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Avatar placeholder */
.avatar-placeholder {
  font-weight: 700;
  flex-shrink: 0;
}

/* Navbar customization */
.navbar {
  padding: 0.75rem 0;
}

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

.navbar .nav-link {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin: 0 0.125rem;
  transition: all 0.2s ease;
}

.navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Dropdown customization */
.dropdown-menu {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: #f0f6ff;
  transform: translateX(3px);
}

/* Card enhancements */
.card {
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
}

/* Table enhancements */
.table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem;
}

.table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: background-color 0.15s ease;
}

/* Badge enhancements */
.badge {
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Form enhancements */
.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

.form-control-lg {
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.input-group .input-group-text {
  border-radius: 10px 0 0 10px;
  background: transparent;
  border-right: none;
}

.input-group .form-control {
  border-left: none;
}

.input-group .form-control:focus {
  border-left: none;
}

.input-group:focus-within .input-group-text {
  border-color: #86b7fe;
}

/* Gradient background for welcome card */
.bg-gradient-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}

/* Alert customization */
.alert {
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

/* Button enhancements */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-sm:hover {
  transform: translateY(0);
}

.btn-lg {
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
}

/* Footer */
.footer {
  margin-top: 3rem;
}

/* Pagination */
.pagination {
  gap: 3px;
}

.page-link {
  border-radius: 8px !important;
  border: none;
  padding: 0.375rem 0.75rem;
  color: #6c757d;
  transition: all 0.15s ease;
}

.page-item.active .page-link {
  background: #0d6efd;
  color: white;
}

.page-item:not(.active) .page-link:hover {
  background: #f0f6ff;
  color: #0d6efd;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .navbar .navbar-collapse {
    padding-top: 0.5rem;
  }
  
  .navbar .nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  .stats-card .card-body {
    padding: 1rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .display-6 {
    font-size: 1.5rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Loading spinner */
.spinner-custom {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e9ecef;
  border-top-color: #0d6efd;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   MODO ESCURO (data-bs-theme="dark")
   ============================================= */

[data-bs-theme="dark"] .bg-white {
  background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #1e1f24 !important;
}

[data-bs-theme="dark"] .table-light {
  --bs-table-bg: #2a2b31;
  --bs-table-color: #e9ecef;
  --bs-table-striped-bg: #2a2b31;
  --bs-table-hover-bg: #33343b;
}

[data-bs-theme="dark"] .card-header {
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .list-group-item {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .page-item:not(.active) .page-link:hover {
  background: #2a2b31;
  color: var(--bs-primary);
}

[data-bs-theme="dark"] .footer {
  background-color: #1e1f24 !important;
  border-top-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .auth-page .card {
  background: rgba(33, 37, 41, 0.98);
}

[data-bs-theme="dark"] .avatar-placeholder {
  color: var(--bs-primary);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #4a4b52;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #5a5b63;
}

/* Botão fixo de tema nas páginas de auth */
.theme-toggle-fixed {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-bs-theme="dark"] .theme-toggle-fixed {
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color) !important;
  background: var(--bs-body-bg);
}

/* Tooltip style */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: #333;
  color: white;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1000;
}
