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;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ── Tema oscuro: overrides para utilidades Bootstrap con color fijo ───── */

/* bg-white y bg-light no responden automáticamente a data-bs-theme */
[data-bs-theme="dark"] .bg-white {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-body-color) !important;
}
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

/* Filas inactivas table-secondary (Bootstrap hardcodea colores claros) */
[data-bs-theme="dark"] .table-secondary,
[data-bs-theme="dark"] .table > :not(caption) > * > .table-secondary {
    --bs-table-color:         var(--bs-secondary-color);
    --bs-table-bg:            rgba(255, 255, 255, 0.05);
    --bs-table-striped-bg:    rgba(255, 255, 255, 0.05);
    --bs-table-striped-color: var(--bs-secondary-color);
    --bs-table-active-bg:     rgba(255, 255, 255, 0.08);
    --bs-table-hover-bg:      rgba(255, 255, 255, 0.08);
    --bs-table-border-color:  var(--bs-border-color);
    color: var(--bs-secondary-color) !important;
    border-color: var(--bs-border-color) !important;
}

/* Encabezados de tabla table-light */
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table > :not(caption) > * > .table-light {
    --bs-table-color:         var(--bs-body-color);
    --bs-table-bg:            var(--bs-secondary-bg);
    --bs-table-striped-bg:    var(--bs-tertiary-bg);
    --bs-table-striped-color: var(--bs-body-color);
    --bs-table-active-bg:     var(--bs-tertiary-bg);
    --bs-table-hover-bg:      var(--bs-tertiary-bg);
    --bs-table-border-color:  var(--bs-border-color);
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color) !important;
}

/* text-dark fuera de badges conserva legibilidad */
[data-bs-theme="dark"] :not(.badge).text-dark {
    color: var(--bs-body-color) !important;
}

/* Badge advertencia: texto oscuro para contraste sobre fondo amarillo */
[data-bs-theme="dark"] .badge.bg-warning {
    color: #212529 !important;
}

/* Details/summary */
[data-bs-theme="dark"] details > summary {
    color: var(--bs-body-color);
}

/* Etiquetas small text-muted en card-headers ya adaptan vía --bs-secondary-color */

/* Popover */
[data-bs-theme="dark"] .popover {
    --bs-popover-bg:           var(--bs-secondary-bg);
    --bs-popover-border-color: var(--bs-border-color);
    --bs-popover-header-bg:    var(--bs-tertiary-bg);
    --bs-popover-body-color:   var(--bs-body-color);
    --bs-popover-header-color: var(--bs-body-color);
}

/* Focus ring sobre fondo oscuro */
[data-bs-theme="dark"] .btn:focus,
[data-bs-theme="dark"] .btn:active:focus,
[data-bs-theme="dark"] .btn-link.nav-link:focus,
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem var(--azell-blue);
}

/* Scrollbar WebKit */
[data-bs-theme="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-track { background: var(--bs-body-bg); }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--bs-border-color); border-radius: 4px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--bs-secondary-color); }

/* ── AZELL Loader global ──────────────────────────────────────────────────── */
#azl-overlay{
  position:fixed; inset:0; z-index:99999;
  background:#101820;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-family:'Barlow',system-ui,sans-serif;
  transition:opacity .55s ease, visibility .55s ease;
}
#azl-overlay.azl-hidden{ opacity:0; visibility:hidden; pointer-events:none; }
.azl-halo{ position:absolute; width:520px; height:520px; border-radius:50%;
  background:radial-gradient(circle, rgba(56,212,48,.10), transparent 62%);
  filter:blur(6px); pointer-events:none; }
.azl-gaz{ position:relative; width:99px; height:168px; margin-bottom:44px; }
.azl-ghost,.azl-fill{
  position:absolute; inset:0;
  -webkit-mask-image:var(--azl-icon); mask-image:var(--azl-icon);
  -webkit-mask-size:contain; mask-size:contain;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-position:center; mask-position:center; }
.azl-ghost{ background:rgba(255,255,255,.10); }
.azl-fill{ background:#38D430; filter:drop-shadow(0 0 10px rgba(56,212,48,.5));
  animation:azl-fill 2.4s cubic-bezier(.5,0,.2,1) infinite; }
.azl-edge{ position:absolute; left:-6px; right:-6px; height:2px;
  background:linear-gradient(90deg,transparent,#38D430,transparent);
  box-shadow:0 0 14px #38D430; animation:azl-edge 2.4s cubic-bezier(.5,0,.2,1) infinite; }
.azl-logo{ height:26px; width:auto; opacity:.95; margin-bottom:22px; }
.azl-bar{ width:220px; height:2px; background:rgba(255,255,255,.12); border-radius:2px;
  position:relative; overflow:hidden; }
.azl-bar > i{ position:absolute; top:0; width:35%; height:100%; background:#38D430;
  border-radius:2px; box-shadow:0 0 12px #38D430; animation:azl-slide 1.3s cubic-bezier(.65,0,.35,1) infinite; }
.azl-cap{ margin-top:16px; font-size:11px; letter-spacing:.22em; text-transform:uppercase;
  color:rgba(255,255,255,.45); display:flex; align-items:center; gap:6px; }
.azl-cap b{ display:inline-flex; gap:4px; }
.azl-cap b i{ width:4px; height:4px; border-radius:99px; background:rgba(255,255,255,.6);
  display:block; animation:azl-dots 1.4s ease-in-out infinite; }
.azl-cap b i:nth-child(2){ animation-delay:.18s; }
.azl-cap b i:nth-child(3){ animation-delay:.36s; }
@keyframes azl-fill{ 0%{clip-path:inset(100% 0 0 0)} 55%{clip-path:inset(0 0 0 0)} 100%{clip-path:inset(0 0 0 0)} }
@keyframes azl-edge{ 0%{top:100%;opacity:0} 10%{opacity:1} 50%{top:0%;opacity:1} 60%{opacity:0} 100%{opacity:0} }
@keyframes azl-slide{ 0%{left:-35%} 100%{left:100%} }
@keyframes azl-dots{ 0%,80%,100%{opacity:.2;transform:translateY(0)} 40%{opacity:1;transform:translateY(-3px)} }
@media (prefers-reduced-motion:reduce){
  .azl-fill{ animation:none; clip-path:inset(0 0 0 0); }
  .azl-edge{ display:none; }
  .azl-bar > i{ animation-duration:2.2s; }
  .azl-cap b i{ animation:none; opacity:.6; }
}
