/* Admin Template Styles - Dark Theme */

/* Body and Layout */
.admin-body {
  font-family: "Nunito", sans-serif;
  background-color: #1a1a1a;
  color: #e9ecef;
}

/* Header Styles */
.header {
  background: #2d2d2d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
  z-index: 1000;
  border-bottom: 1px solid #404040;
}

.header .logo {
  text-decoration: none;
  color: #e9ecef;
  font-weight: 600;
  font-size: 1.2rem;
}

.header .logo .button-color {
  color: #c85716 !important;
  font-weight: 700;
}

.header .logo-img {
  height: 50px;
  width: auto;
  transform: scale(1.5);
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.header .logo-img:hover {
  transform: scale(1.6);
  filter: drop-shadow(0 4px 8px rgba(0, 123, 255, 0.3));
}

.toggle-sidebar-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: #e9ecef;
  margin-left: 1rem;
}

.header-nav {
  margin-left: auto;
}

.header-nav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
}

.header-nav .nav-item {
  margin-left: 1rem;
  list-style: none !important;
  display: inline-block;
}

.header-nav .nav-item::before,
.header-nav .nav-item::after {
  display: none !important;
}

.header-nav .nav-link {
  color: #e9ecef;
  text-decoration: none;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.header-nav .nav-link:hover {
  background-color: #404040;
  color: #c85716;
}

/* Iconos de notificaciones específicos */
.header-nav .nav-icon {
  font-size: 1.2rem;
  color: #e9ecef;
  transition: all 0.3s ease;
}

.header-nav .nav-icon:hover {
  color: #c85716;
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-profile img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border: 2px solid #555555;
  transition: all 0.3s ease;
}

.nav-profile img:hover {
  border-color: #c85716;
  transform: scale(1.05);
}

.nav-profile span {
  font-weight: 500;
  color: #e9ecef;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar expanded - show full name */
.sidebar:not(.collapsed) .sidebar-expanded-name {
  display: inline-block !important;
}

.sidebar:not(.collapsed) .sidebar-collapsed-name {
  display: none !important;
}

/* Sidebar collapsed - show first name only */
.sidebar.collapsed .sidebar-expanded-name {
  display: none !important;
}

.sidebar.collapsed .sidebar-collapsed-name {
  display: inline-block !important;
}

/* Default state - show expanded name by default */
.sidebar-expanded-name {
  display: inline-block;
}

.sidebar-collapsed-name {
  display: none;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 250px;
  height: calc(100vh - 60px);
  background: #2d2d2d;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
  z-index: 999;
  overflow-y: auto;
  transition: all 0.3s ease;
  border-right: 1px solid #404040;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .nav-link span {
  display: none;
}

.sidebar.collapsed .nav-content {
  display: none;
}

.sidebar.collapsed .nav-heading {
  display: none;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar.collapsed .nav-link i {
  margin-right: 0;
}

.sidebar.collapsed .nav-link {
  position: relative;
}

.sidebar.collapsed .nav-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: #2d2d2d;
  color: #e9ecef;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid #404040;
  margin-left: 0.5rem;
}

.sidebar-nav {
  padding: 1rem 0;
  list-style: none;
  margin: 0;
}

.sidebar-nav .nav-item {
  margin-bottom: 0.5rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #e9ecef;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
  background-color: #404040;
  color: #c85716;
}

.sidebar-nav .nav-link.active {
  background-color: #1a1a1a;
  color: #c85716;
  border-left-color: #c85716;
}

.sidebar-nav .nav-link i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.sidebar-nav .nav-content {
  background-color: transparent;
  padding-left: 2.5rem;
  list-style: none;
  margin: 0;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.sidebar-nav .nav-content li {
  list-style: none;
  margin: 0 0 0.5rem 0;
  padding: 0;
}

.sidebar-nav .nav-content .nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #adb5bd;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-nav .nav-content .nav-link:hover {
  background-color: #404040 !important;
  color: #c85716 !important;
  text-decoration: none;
  border-radius: 6px;
  width: 100%;
}

.sidebar-nav .nav-content .nav-link.active {
  background-color: #404040 !important;
  color: #c85716 !important;
  text-decoration: none;
  border-radius: 6px;
  width: 100%;
}

.sidebar-nav .nav-content .nav-link i {
  margin-right: 1.5rem;
  width: 16px;
  text-align: center;
  font-size: 0.8rem;
}

/* Controlar espaciado entre icono y texto usando CSS */
.sidebar-nav .nav-content .nav-link {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* Esto reemplaza el margin-right del icono */
}

.sidebar-nav .nav-content .nav-link i {
  margin-right: 0; /* Removemos el margin-right ya que usamos gap */
  width: 16px;
  text-align: center;
  font-size: 0.8rem;
}

/* Mejorar estilos generales del sidebar */
.sidebar-nav a {
  text-decoration: none !important;
  color: inherit;
}

.sidebar-nav a:hover {
  text-decoration: none !important;
}

.sidebar-nav a:focus {
  text-decoration: none !important;
  outline: none;
}

.sidebar-nav a:visited {
  text-decoration: none !important;
}

/* Estilos específicos para elementos de lista anidados */
.sidebar-nav .nav-content a {
  color: #adb5bd !important;
  text-decoration: none !important;
  border-bottom: none !important;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.sidebar-nav .nav-content a:hover {
  color: #c85716 !important;
  text-decoration: none !important;
  background-color: #404040 !important;
  border-radius: 6px;
}

.sidebar-nav .nav-content a.active {
  color: #c85716 !important;
  text-decoration: none !important;
  background-color: #404040 !important;
  border-radius: 6px;
}

/* Eliminar estilos por defecto de enlaces */
.sidebar-nav .nav-content a:link,
.sidebar-nav .nav-content a:visited,
.sidebar-nav .nav-content a:active {
  text-decoration: none !important;
  color: #adb5bd !important;
}

/* Mejorar espaciado y alineación - estilos ya aplicados arriba */

.nav-heading {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content */
.main {
  margin-left: 250px;
  padding: 2rem;
  min-height: calc(100vh - 60px);
  transition: all 0.3s ease;
}

.main.sidebar-collapsed {
  margin-left: 60px;
}

.footer.sidebar-collapsed {
  margin-left: 60px;
}

/* Page Title */
.pagetitle {
  margin-bottom: 2rem;
}

.pagetitle h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #e9ecef;
  margin: 0;
}

.breadcrumb {
  background: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #adb5bd;
}

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
  background: #2d2d2d;
  border: 1px solid #404040;
}

.card-header {
  background: #1a1a1a;
  border-bottom: 1px solid #404040;
  padding: 1rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
  background: #2d2d2d;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e9ecef;
  margin-bottom: 1rem;
}

/* Info Cards */
.info-card {
  border-left: 4px solid #007bff;
}

.info-card.sales-card {
  border-left-color: #28a745;
}

.info-card.revenue-card {
  border-left-color: #ffc107;
}

.info-card.customers-card {
  border-left-color: #dc3545;
}

.info-card .card-icon {
  width: 60px;
  height: 60px;
  background: #e3f2fd;
  color: #007bff;
  font-size: 1.5rem;
}

.sales-card .card-icon {
  background: #e8f5e8;
  color: #28a745;
}

.revenue-card .card-icon {
  background: #fff3cd;
  color: #ffc107;
}

.customers-card .card-icon {
  background: #f8d7da;
  color: #dc3545;
}

.info-card h6 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e9ecef;
  margin: 0;
}

.info-card .text-success {
  color: #28a745 !important;
}

.info-card .text-danger {
  color: #dc3545 !important;
}

/* Filter Dropdown */
.filter {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.filter .icon {
  color: #adb5bd;
  font-size: 1.2rem;
  cursor: pointer;
}

.filter .dropdown-menu {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  background: #2d2d2d;
  border: 1px solid #404040;
}

/* Activity Feed */
.activity {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  padding: 1rem 0;
  border-bottom: 1px solid #404040;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-label {
  width: 80px;
  font-size: 0.8rem;
  color: #adb5bd;
  flex-shrink: 0;
}

.activity-badge {
  width: 8px;
  height: 8px;
  margin: 0.5rem 1rem 0 0;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Tables */
.table {
  margin-bottom: 0;
  color: #e9ecef;
}

.table th {
  border-top: none;
  font-weight: 600;
  color: #e9ecef;
  font-size: 0.9rem;
  background: #1a1a1a;
  border-bottom: 1px solid #404040;
}

.table td {
  vertical-align: middle;
  font-size: 0.9rem;
  border-bottom: 1px solid #404040;
}

.badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

/* Footer */
.footer {
  background: #2d2d2d;
  padding: 1rem 2rem;
  border-top: 1px solid #404040;
  margin-left: 250px;
  transition: all 0.3s ease;
}

.footer.sidebar-collapsed {
  margin-left: 60px;
}

.copyright {
  font-size: 0.9rem;
  color: #adb5bd;
  text-align: center;
  width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1050;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main {
    margin-left: 0;
  }
  
  .footer {
    margin-left: 0;
  }
  
  .pagetitle h1 {
    font-size: 1.5rem;
  }
  
  /* Overlay for mobile sidebar */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
}

/* Chart Containers */
#reportsChart,
#budgetChart {
  position: relative;
  height: 300px;
}

/* Dropdown Styles */
.dropdown-menu {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  background: #2d2d2d;
  border: 1px solid #404040;
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 200px;
}

.dropdown-menu.show {
  display: block;
}

/* Dropdown del perfil específico */
.nav-profile {
  position: relative;
}

.profile.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 250px;
  margin-top: 0.5rem;
  margin-right: 1rem;
}

.profile.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #e9ecef;
  display: flex;
  align-items: center;
}

.dropdown-item:hover {
  background-color: #404040;
  color: #c85716;
}

.dropdown-item i {
  margin-right: 0.75rem;
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.dropdown-header {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Language selector in header */
.header-nav .nav-item select {
  background: #2d2d2d !important;
  border: 1px solid #404040 !important;
  color: #e9ecef !important;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-nav .nav-item select:hover {
  border-color: #007bff;
  background: #404040;
}

.header-nav .nav-item select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
  outline: none;
}

.header-nav .nav-item select option {
  background: #2d2d2d;
  color: #e9ecef;
  padding: 0.5rem;
}

/* Utility Classes */
.text-muted {
  color: #6c757d !important;
}

.text-success {
  color: #28a745 !important;
}

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

.text-warning {
  color: #ffc107 !important;
}

.text-info {
  color: #17a2b8 !important;
}

.text-primary {
  color: #007bff !important;
}

.bg-success {
  background-color: #28a745 !important;
}

.bg-warning {
  background-color: #ffc107 !important;
}

.bg-danger {
  background-color: #dc3545 !important;
}

.bg-primary {
  background-color: #007bff !important;
}

/* Profile Page Styles */
.profile-card {
  background: #2d2d2d;
  border: 1px solid #404040;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: #e9ecef;
}

.profile-card h2 {
  color: #ffffff;
  font-weight: 700;
}

.profile-card h3 {
  color: #adb5bd;
  font-weight: 400;
}

.profile-card img {
  border: 3px solid #c85716;
  transition: all 0.3s ease;
}

.profile-card img:hover {
  transform: scale(1.05);
  border-color: #e67e22;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #404040;
  color: #e9ecef;
  border-radius: 50%;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #c85716;
  color: #ffffff;
  transform: translateY(-2px);
}

.nav-tabs-bordered .nav-link {
  color: #adb5bd;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-tabs-bordered .nav-link.active {
  color: #c85716;
  border-bottom-color: #c85716;
  background: transparent;
}

.nav-tabs-bordered .nav-link:hover {
  color: #c85716;
  border-bottom-color: #c85716;
}

.label {
  font-weight: 600;
  color: #c85716;
}


/* General text colors for dark theme */
.card-title {
  color: #ffffff !important;
}

.card-body {
  color: #e9ecef !important;
}

.form-label {
  color: #e9ecef !important;
}

.form-control {
  color: #e9ecef !important;
  background-color: #404040 !important;
  border-color: #555555 !important;
}

.form-control:focus {
  color: #e9ecef !important;
  background-color: #404040 !important;
  border-color: #c85716 !important;
  box-shadow: 0 0 0 0.2rem rgba(200, 87, 22, 0.25) !important;
}

.breadcrumb {
  background-color: transparent !important;
}

.breadcrumb-item {
  color: #adb5bd !important;
}

.breadcrumb-item.active {
  color: #e9ecef !important;
}

.breadcrumb-item a {
  color: #c85716 !important;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: #e67e22 !important;
}

/* General dark theme text colors */
body {
  color: #e9ecef !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}

p {
  color: #e9ecef !important;
}

.text-muted {
  color: #adb5bd !important;
}

.text-secondary {
  color: #adb5bd !important;
}

.alert {
  color: #e9ecef !important;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.2) !important;
  border-color: #28a745 !important;
  color: #e9ecef !important;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.2) !important;
  border-color: #dc3545 !important;
  color: #e9ecef !important;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.2) !important;
  border-color: #ffc107 !important;
  color: #e9ecef !important;
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.2) !important;
  border-color: #17a2b8 !important;
  color: #e9ecef !important;
}

/* Table text colors */
.table th {
  color: #ffffff !important;
}

.table td {
  color: #e9ecef !important;
}

/* Button text colors */
.btn {
  color: #ffffff !important;
}

.btn-outline-primary {
  color: #c85716 !important;
  border-color: #c85716 !important;
}

.btn-outline-primary:hover {
  background-color: #c85716 !important;
  color: #ffffff !important;
}

/* Pagination */
.page-link {
  color: #e9ecef !important;
  background-color: #404040 !important;
  border-color: #555555 !important;
}

.page-link:hover {
  color: #c85716 !important;
  background-color: #555555 !important;
  border-color: #c85716 !important;
}

.page-item.active .page-link {
  background-color: #c85716 !important;
  border-color: #c85716 !important;
  color: #ffffff !important;
}

/* Sistema de color naranja corporativo */
.text-orange {
  color: #c85716 !important;
}

.bi-dot.text-orange {
  color: #c85716 !important;
}
