html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout adjustments for fixed footer */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px; /* Space for fixed footer */
}

main {
    flex: 1;
}

/* Fixed footer styles */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 0;
    z-index: 1000;
    margin-left: var(--sidebar-width, 280px);
    transition: margin-left 0.3s ease;
}

/* Adjust footer position when sidebar is collapsed */
body .sidebar.collapsed ~ .footer,
body .sidebar.collapsed + .footer {
    margin-left: var(--sidebar-collapsed-width, 70px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer {
        margin-left: 0 !important;
    }
    
    .sidebar.collapsed ~ .footer {
        margin-left: 0 !important;
    }
    
    .main-container {
        padding-bottom: 70px;
    }
}

/* Dark theme support */
body.dark .footer,
body.dark .app-footer,
.footer.dark,
.app-footer.dark {
  background-color: #1E2939 !important;
  border-top-color: #495057 !important;
  color: #ffffff !important;
}

/* Footer links in dark theme */
body.dark .footer a,
body.dark .app-footer a,
.footer.dark a,
.app-footer.dark a {
  color: #adb5bd !important;
  text-decoration: none;
}

body.dark .footer a:hover,
body.dark .app-footer a:hover,
.footer.dark a:hover,
.app-footer.dark a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Dark theme support for collapsible menu buttons */
body.dark .btn-toggle,
.sidebar.dark .btn-toggle {
  color: #ffffff !important;
  background-color: transparent;
}

body.dark .btn-toggle:hover,
.sidebar.dark .btn-toggle:hover {
  background-color: #495057 !important;
  color: #ffffff !important;
}

body.dark .btn-toggle[aria-expanded="true"],
.sidebar.dark .btn-toggle[aria-expanded="true"] {
  background-color: #495057 !important;
  color: #ffffff !important;
}

/* Dark theme support for collapsible menu links */
body.dark .btn-toggle-nav a,
.sidebar.dark .btn-toggle-nav a {
  color: #adb5bd !important;
  background-color: transparent;
}

body.dark .btn-toggle-nav a:hover,
.sidebar.dark .btn-toggle-nav a:hover {
  background-color: #495057 !important;
  color: #ffffff !important;
  text-decoration: none;
}

body.dark .btn-toggle-nav a:focus,
.sidebar.dark .btn-toggle-nav a:focus {
  background-color: #495057 !important;
  color: #ffffff !important;
  text-decoration: none;
}



label.error {
    color: #d32f2f;
    font-size: 0.95em;
    margin-top: 2px;
    display: block;
}

input.error, select.error, textarea.error {
    border-color: #d32f2f;
}

span.required
    {
        color: #d32f2f;
    }

/* Centra y superpone el spinner en toda la p�gina */
/*
#loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.8);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loading-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
}*/