/* 🎨 Paleta institucional */
:root {
  --primary-color: #d4af37;
  --secondary-color: #002b5c;
  --highlight-color: #8B0000;
  --icon-color: #333333;
}

/* 🧱 Estructura base del documento */
html, body {
  height: 100%;
  overflow-y: auto;
}

.layout-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f8f9fa;
}

/* 💻 Área principal de contenido */
.main-content {
  margin-left: 240px;
  margin-top: 56px;
  padding: 2rem 1rem;
  flex-grow: 1;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* 🔝 Navbar institucional */
.navbar-usa {
  background-color: var(--highlight-color);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  width: 100%;
}

.navbar-usa .bi-box-fill,
.navbar-usa .text-dark,
.navbar-usa .btn-outline-dark {
  color: #ffffff !important;
  border-color: #ffffff;
}

/* 🧾 Branding institucional */
.logo-cde {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 2px rgba(0,0,0,0.25);
  -webkit-text-fill-color: var(--primary-color);
  -webkit-text-stroke: 0.2px rgba(0, 0, 0, 0.2);
}

.logo-hides {
  color: #fcfdfe;
  font-weight: 500;
}

/* 🖱️ Botones institucionales */
.btn-outline-dark {
  border-color: var(--highlight-color);
  color: var(--highlight-color);
}

.btn-outline-dark:hover {
  background-color: var(--highlight-color);
  color: #ffffff;
}

.btn-cde {
  background-color: var(--highlight-color);
  color: #ffffff;
  border-radius: 0.5rem;
  transition: background-color 0.25s ease-in-out;
}

.btn-cde:hover {
  background-color: var(--primary-color);
  color: var(--icon-color);
}

/* 📑 Formularios y títulos */
h1, h2, h3, h4 {
  color: var(--highlight-color);
}

select, input {
  border-color: var(--highlight-color);
}

.form-control {
  border-radius: 0.5rem;
  border: 1px solid var(--highlight-color);
}

.form-label i {
  margin-right: 6px;
  color: var(--highlight-color);
}

/* 📚 Sidebar institucional */
.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 240px;
  z-index: 1020;
  overflow-y: auto;
  background-color: var(--secondary-color);
  color: #ffffff;
  padding-top: 1rem;
}

.sidebar .nav-link {
  color: #ffffff;
  font-weight: 500;
  border-radius: 4px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar h6 {
  color: var(--primary-color);
}

.sidebar small {
  color: #f8f9fa;
}

.sidebar .text-white-50 {
  color: #cccccc !important;
}

/* 🔚 Footer institucional */
footer {
  background-color: var(--primary-color);
  color: var(--highlight-color);
  font-size: 0.85rem;
}

/* 🌌 Fondo institucional solo para login */
.login-background {
  position: fixed;
  inset: 0;
  background: url("../../img/fondoinicial.jpg");
  opacity: 0.18;
  filter: grayscale(80%) blur(2px);
  z-index: -1;
  pointer-events: none;
}

body {
  position: relative;
  z-index: 1;
}

/* 🧭 Contenedor centrado tipo modal */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

/* 💠 Modal visualmente elevado */
.login-modal {
  background-color: #ffffffee;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  z-index: 1;
}

/* 📝 Subtítulo y título del login */
.login-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--highlight-color);
  margin-bottom: 0.5rem;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--icon-color);
}

.login-title span:first-child {
  color: var(--highlight-color);
}

.login-title span:last-child {
  color: var(--secondary-color);
}

/* 🔗 Links de ayuda */
.forgot-password,
.change-site {
  display: block;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 0.75rem;
}

.forgot-password {
  color: var(--secondary-color);
}

.forgot-password:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.change-site {
  color: #6c757d;
}

.change-site:hover {
  text-decoration: underline;
  color: var(--highlight-color);
}

.btn-usa { background-color: #8B0000; }

@media (max-width: 768px) {
  #createLabelModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }

  #createLabelModal .modal-content {
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
  }

  #createLabelModal .modal-body {
    padding: 1rem;
    overflow-y: auto;
  }

  #createLabelModal .modal-header,
  #createLabelModal .modal-footer {
    padding: 1rem;
  }

  #createLabelModal .form-label {
    font-size: 0.9rem;
  }

  #createLabelModal .form-control,
  #createLabelModal .form-select {
    font-size: 0.9rem;
  }

  #createLabelModal .table-responsive {
    max-height: 200px;
  }

  #createLabelModal .btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  #createLabelModal h5 {
    font-size: 1rem;
  }
}