/* Fuente global Roboto */
html,
body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif !important;
}

.card,
.card-body,
.card-title,
.card-text,
h2,
h1,
h3,
h4,
h5,
h6 {
  font-family: 'Roboto', Arial, Helvetica, sans-serif !important;
}

/* === ESTILOS DE LOGIN === */
.login-page {
  background: #343a40;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid #dee2e6;
  overflow: hidden;
  max-width: 900px;
  width: 100%;
}

.login-content {
  padding: 2rem;
  display: flex;
  align-items: center;
  min-height: 400px;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.logo-img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.form-section {
  padding: 2rem;
}

.login-form .form-control {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 1rem;
}

.login-form .form-control:focus {
  border-color: #495057;
  box-shadow: 0 0 0 0.2rem rgba(73, 80, 87, 0.25);
}

.btn-login {
  background-color: #343a40;
  border: 1px solid #343a40;
  border-radius: 4px;
  padding: 12px 2rem;
  font-weight: 600;
  color: white;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.btn-login:hover {
  background-color: #495057;
  border-color: #495057;
  color: white;
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
  border-radius: 4px;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.version-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #343a40;
  padding: 5px 15px;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.copyright-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.copyright-text a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.copyright-text a:hover {
  color: white;
  text-decoration: underline;
}

/* === ESTILOS GENERALES === */

.sidebar {
  width: 170px;
  background-color: #343a40 !important;
  /* gris oscuro */
  color: #fff;
}

@media (min-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-right: 1px solid #495057;
    background-color: #343a40 !important;
    /* reforzar gris oscuro */
  }

  .content {
    margin-left: 220px;
  }
}

.nav-link {
  color: #fff !important;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.nav-link:hover {
  background-color: #495057;
  color: #f8f9fa !important;
}

.nav-link i {
  font-size: 1.2rem;
}

.sidebar .user-info {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar .user-info #userName {
  font-weight: 600;
  font-size: 0.95rem;
}

.sidebar .user-info a#logout {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.8rem;
}

.sidebar .user-info a#logout:hover {
  text-decoration: none;
  color: #414040;
  background-color: #495057;
}

.brand {
  font-size: 11px;
  color: #bbb;
  letter-spacing: 0.5px;
  display: block;
  text-align: left;
  margin-left: 16px;
  transition: color 0.2s;
}

@media (max-width: 767.98px) {
  .brand {
    color: #fff;
    text-align: center;
    margin-left: 0;
    font-size: 13px;
    padding-bottom: 8px;
    padding-top: 2px;
  }
}

@media (min-width: 768px) {
  .sidebar .nav {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .brand-li {
    margin-top: auto;
    margin-bottom: 10px;
  }
}

.sidebar-body-fullheight {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 767.98px) {
  .sidebar-body-fullheight {
    min-height: 100dvh;
    height: 100dvh;
  }
}

/* === ESTILOS DE TOAST === */
.toast {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-container {
  z-index: 1100;
}

.toast .bi {
  font-size: 1.2rem;
  flex-shrink: 0;
}