/* DAIN - Investment Analysis System CSS */

:root {
  --primary-color: #1a365d;
  --secondary-color: #2d5aa0;
  --accent-color: #38a169;
  --danger-color: #e53e3e;
  --warning-color: #d69e2e;
  --info-color: #3182ce;
  --dark-bg: #1a202c;
  --light-bg: #f7fafc;
  --sidebar-width: 250px;
  --navbar-height: 60px;
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: #2d3748;
  line-height: 1.6;
}

/* Navbar superior */
.navbar-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  height: var(--navbar-height);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: white !important;
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: white !important;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
  z-index: 1020;
  transition: transform 0.3s ease;
}

.sidebar-closed {
  transform: translateX(-100%);
}

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

.sidebar-nav li {
  margin: 0;
}

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

.sidebar-nav a:hover {
  background-color: #edf2f7;
  color: var(--primary-color);
  border-left-color: var(--accent-color);
}

.sidebar-nav a.active {
  background-color: #e6fffa;
  color: var(--primary-color);
  border-left-color: var(--accent-color);
  font-weight: 600;
}

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

/* Contenido principal */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
  padding: 2rem;
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-closed {
  margin-left: 0;
}

/* Cards personalizadas */
.card-custom {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 12px 12px 0 0 !important;
  padding: 1.25rem 1.5rem;
  border: none;
}

/* Stats cards */
.stats-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-3px);
}

.stats-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.stats-card.positive .icon { color: var(--accent-color); }
.stats-card.negative .icon { color: var(--danger-color); }
.stats-card.neutral .icon { color: var(--info-color); }

.stats-card h3 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stats-card p {
  color: #718096;
  margin: 0;
}

/* Botones personalizados */
.btn-custom {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, #2c5282, #2b6cb0);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(45, 90, 160, 0.4);
}

.btn-success-custom {
  background: linear-gradient(135deg, var(--accent-color), #48bb78);
  color: white;
}

.btn-success-custom:hover {
  background: linear-gradient(135deg, #2f855a, #38a169);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(56, 161, 105, 0.4);
}

.btn-danger-custom {
  background: linear-gradient(135deg, var(--danger-color), #f56565);
  color: white;
}

.btn-danger-custom:hover {
  background: linear-gradient(135deg, #c53030, #e53e3e);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
}

/* Formularios */
.form-control-custom {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-custom:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(45, 90, 160, 0.15);
  outline: none;
}

/* Tablas */
.table-custom {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.table-custom thead th {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.table-custom tbody td {
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  vertical-align: middle;
}

.table-custom tbody tr:hover {
  background-color: #f7fafc;
}

/* Login page */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  color: var(--primary-color);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #718096;
}

/* Badges y estados */
.badge-buy {
  background-color: var(--accent-color);
  color: white;
}

.badge-sell {
  background-color: var(--danger-color);
  color: white;
}

.badge-active {
  background-color: var(--info-color);
  color: white;
}

.badge-inactive {
  background-color: #a0aec0;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .stats-card h3 {
    font-size: 1.5rem;
  }
  
  .login-card {
    margin: 1rem;
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .main-content {
    padding: 0.75rem;
  }
  
  .card-custom {
    margin-bottom: 1rem;
  }
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease;
}

/* Scrollbar personalizado */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Toggle button para sidebar mobile */
.sidebar-toggle {
  display: none;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-block;
  }
}

/* Estilos específicos para la página de información */
.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-icon {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-item {
  padding: 0.5rem 0;
}

/* Mejorar las tarjetas de información */
.card {
  border: none;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-bottom: none;
}
