/* 
 * Autovisiones - Portal de Dashboards
 * Estilos personalizados sobre Bootstrap 5
 */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --bg-light: #f8f9fa;
  --text-dark: #212529;
  
  /* Tema claro (por defecto) */
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --card-bg: #ffffff;
  --border-color: #dee2e6;
  --navbar-bg: #0d6efd;
  --navbar-color: #ffffff;
  --footer-bg: #6c757d;
  --footer-color: #ffffff;
}

/* Tema oscuro */
[data-bs-theme="dark"] {
  --bg-color: #212529;
  --text-color: #f8f9fa;
  --card-bg: #343a40;
  --border-color: #495057;
  --navbar-bg: #343a40;
  --navbar-color: #f8f9fa;
  --footer-bg: #343a40;
  --footer-color: #f8f9fa;
}

body {
  font-family: 'Roboto', 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  margin-top: 5rem;
  transition: background-color 0.3s;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.dashboard-container {
  padding: 2rem;
}

.empresa-card {
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
  margin-bottom: 1.5rem;
  height: 100%;
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.empresa-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.empresa-card .card-body {
  display: flex;
  flex-direction: column;
}

.empresa-card .btn {
  margin-top: auto;
}

.iframe-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(100vh - 120px);
  margin-top: 1rem;
}

.iframe-container iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

footer {
  margin-top: auto;
  padding: 1rem 0;
  background-color: var(--footer-bg);
  color: var(--footer-color);
  text-align: center;
  font-size: 0.9rem;
  transition: background-color 0.3s, color 0.3s;
}

/* Botón de cambio de tema */
.theme-toggle {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle i {
  font-size: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .login-container {
    margin-top: 2rem;
    padding: 1.5rem;
  }
  
  .dashboard-container {
    padding: 1rem;
  }
  
  .iframe-container {
    height: calc(100vh - 100px);
  }
}