:root {
  --blue: #007bff;

  /* Base */
  --bg-0: #0f1419;
  --bg-1: #1a2226;

  /* Glass tokens */
  --glass-sidebar: rgba(44, 62, 80, 0.55);
  --glass-surface: rgba(44, 62, 80, 0.34);
  --glass-surface-2: rgba(0, 0, 0, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --glass-blur: 14px;

  /* Legacy var (por compatibilidad con tu código) */
  --sidebar-dark-primary: #2c3e50;
}

/* Base dark (con fondo “vivo” para que el glass se note) */
body,
html {
  background:
    radial-gradient(
      900px circle at 15% 10%,
      rgba(0, 123, 255, 0.1),
      transparent 55%
    ),
    radial-gradient(
      700px circle at 85% 30%,
      rgba(255, 255, 255, 0.06),
      transparent 60%
    ),
    linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-0) 100%);
  color: #fff;
}
.content-wrapper,
.content,
.content-header {
  background: transparent;
  color: #fff;
}

/* Navbar + dropdown */
.main-header.navbar {
  background: rgba(26, 34, 38, 0.55);
  border-bottom: 1px solid var(--glass-border);
}
.dropdown-menu {
  z-index: 3000;
  background: rgba(44, 62, 80, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.dropdown-item {
  color: #fff;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Sidebar + brand (glass) */
.main-sidebar,
.brand-link {
  background: var(--glass-sidebar);
}
.main-sidebar {
  border-right: 1px solid var(--glass-border);
}
.brand-link {
  border-bottom: 1px solid var(--glass-border);
}

/* Cards (glass) */
.card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.card-header {
  background: var(--glass-surface-2);
  border-bottom: 1px solid var(--glass-border);
  border-top-left-radius: 0.9rem;
  border-top-right-radius: 0.9rem;
}

/* Focus moderno */
.form-control:focus,
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Sidebar: spacing + estados */
.nav-sidebar .nav-link {
  border-radius: 0.65rem;
  margin: 0.2rem 0.5rem;
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
.nav-sidebar .nav-link:hover {
  background: var(--glass-hover);
  transform: translateX(2px);
}
.nav-sidebar .nav-link.active {
  background: rgba(0, 123, 255, 0.18);
  border-color: rgba(0, 123, 255, 0.25);
}
.nav-sidebar .nav-icon {
  opacity: 0.9;
}

/* Auth pages (login/register) */
body.auth {
  min-height: 100vh;
  background:
    radial-gradient(
      1200px circle at 20% 10%,
      rgba(255, 255, 255, 0.06),
      transparent 55%
    ),
    radial-gradient(
      900px circle at 85% 25%,
      rgba(0, 123, 255, 0.1),
      transparent 60%
    ),
    linear-gradient(135deg, #22313f 0%, #1a2226 100%);
}
.auth .card {
  background: rgba(20, 24, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}
.auth .login-box,
.auth .register-box {
  width: 380px;
  
}
.auth .login-logo a,
.auth .register-logo a {
  color: #fff;
}
.auth .login-box .login-card-body,
.auth .register-box .login-card-body {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

/* Footer */
.main-footer {
  background: rgba(26, 34, 38, 0.55);
  border-top: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.6);
}
.main-footer a {
  color: rgba(255, 255, 255, 0.6);
}
.main-footer a:hover {
  color: #fff;
}

/* Text muted en dark (más legible) */
.text-muted {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Backdrop-filter (solo si hay soporte) */
@supports (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  .main-header.navbar,
  .main-sidebar,
  .brand-link,
  .card,
  .dropdown-menu,
  .auth .card,
  .main-footer {
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}
/* Botón estilo Tailwind (reusable) */
.btn-glass{
  display: block;                 /* block */
  margin-top: 2.5rem;             /* mt-10 (10 * .25rem) */
  padding: .75rem 1rem;           /* px-4 py-3 */
  font-size: .875rem;             /* text-sm */
  background: #1e40af;            /* bg-blue-800 */
  border: 2px solid #fff;         /* border-white border-4 */
  border-radius: 9999px;          /* rounded-full */
  font-weight: 700;               /* font-bold */
  margin: .5rem;                  /* m-2 */
  color: #fff;                    /* text-white */
  box-shadow: 0 .375rem .875rem rgba(0,0,0,.25); /* shadow-md */
  transition: all .5s;            /* transition-all duration-500 */
}

.btn-glass:hover{
  box-shadow: 0 .125rem .5rem rgba(0,0,0,.18);   /* hover:shadow-sm */
  text-decoration: none;          /* por si lo usas en <a> */
}

/* === EFECTOS GLASS PARA TODOS LOS BOTONES BOOTSTRAP === */
/* Aplicar efectos visuales modernos preservando colores y tamaños originales */

.btn {
  border: 2px solid #fff !important; /* Bordes gruesos blancos como .btn-glass */
  border-radius: 9999px !important; /* ✅ Completamente redondeado como .btn-glass */
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; /* Sombra sutil */
  transition: all 0.3s ease !important; /* Transición suave */
  position: relative !important;
  overflow: hidden !important;
}

.btn:hover {
  transform: translateY(-1px) !important; /* Efecto de elevación */
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15) !important; /* Sombra más pronunciada */
  border-color: rgba(255, 255, 255, 0.4) !important; /* Borde más visible en hover */
}

.btn:active {
  transform: translateY(0) !important; /* Efecto de presión */
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25), 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* === VARIACIONES ESPECÍFICAS PARA MEJOR CONTRASTE === */

/* Botones oscuros - borde más visible */
.btn-primary,
.btn-dark,
.btn-secondary {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.btn-primary:hover,
.btn-dark:hover,
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Botones claros - borde más sutil */
.btn-light,
.btn-warning {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.btn-light:hover,
.btn-warning:hover {
  border-color: rgba(0, 0, 0, 0.2) !important;
}

/* === PRESERVAR ESTILO ORIGINAL DE .btn-glass === */
/* Cuando se combina con Bootstrap, mantener los bordes característicos */

.btn.btn-glass {
  border: 4px solid #fff !important;         /* Restaurar borde grueso blanco */
  border-radius: 9999px !important;          /* Mantener border radius completo */
  background: #1e40af !important;            /* Mantener color azul */
  color: #fff !important;                    /* Mantener texto blanco */
  box-shadow: 0 .375rem .875rem rgba(0,0,0,.25) !important; /* Mantener sombra original */
  transition: all .5s !important;            /* Mantener transición */
  display: block !important;                 /* Mantener display block */
  margin-top: 2.5rem !important;             /* Mantener margin top */
  margin: .5rem !important;                  /* Mantener margin general */
  padding: .75rem 1rem !important;           /* Mantener padding */
  font-size: .875rem !important;             /* Mantener font size */
  font-weight: 700 !important;               /* Mantener font weight */
}

.btn.btn-glass:hover {
  box-shadow: 0 .125rem .5rem rgba(0,0,0,.18) !important;   /* Mantener hover effect */
  text-decoration: none !important;
}

/* Para combinaciones con tamaños Bootstrap */
.btn.btn-glass.btn-lg {
  font-size: 1rem !important;               /* lg:text-md */
  padding: 0.75rem 1rem !important;         /* Mantener padding para lg */
}

/* === PRESERVAR COLORES ORIGINALES === */

@media (min-width: 992px){ /* lg */
  .btn-glass{ font-size: 1rem; }  /* lg:text-md */
}

/* Modal Styles - z-index alto para asegurar visibilidad */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999 !important;
    display: none;
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 10% auto;
    max-width: 500px;
    z-index: 10000 !important;
}

.modal-content {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(var(--glass-blur));
    position: relative;
    z-index: 10001 !important;
}

.modal-header {
    background: var(--glass-surface);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 15px 15px 0 0;
}

.modal-title {
    color: white;
    font-weight: 600;
}

.modal-body {
    background: var(--glass-surface);
    border-radius: 0 0 15px 15px;
}

.modal-body label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 8px;
}

.modal-body .form-control {
    background: var(--glass-surface-2);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 8px;
    backdrop-filter: blur(var(--glass-blur));
}

.modal-body .form-control:focus {
    background: var(--glass-hover);
    border-color: var(--blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    color: white;
}

.modal-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modal-footer {
    background: var(--glass-surface);
    border-top: 1px solid var(--glass-border);
    border-radius: 0 0 15px 15px;
}

.modal .close {
    color: rgba(255, 255, 255, 0.8);
}

.modal .close:hover {
    color: white;
}

.btn-secondary {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    color: white;
    backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    color: white;
}

.btn-primary {
    background: var(--blue);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all .5s;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 .125rem .5rem rgba(0,0,0,.18);
    text-decoration: none;
}

/* Modal Backdrop - z-index más bajo que el modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998 !important;
    display: none;
}

.modal-backdrop.show {
    display: block;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.fade.show {
    opacity: 1;
}

/* Modal Open State */
body.modal-open {
    overflow: hidden;
}

/* Modal Show/Hide */
.modal {
    display: none;
}

.modal.show {
    display: block;
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal.fade.show {
    opacity: 1;
}

/* Clientes Card - Dejar que AdminLTE funcione naturalmente */
/* Sin CSS personalizado para evitar conflictos */
