:root {
  --card-bg: rgba(255, 255, 255, 0.94); 
  --text-main: #1e293b;
  --text-muted: #64748b;
  --primary: #003d4d; /* Azul oscuro del logo */
  --secondary: #8bc53f; 
  --border: #e2e8f0;
}

* { box-sizing: border-box; }

html, body { 
  height: 100%; 
  margin: 0; 
  padding: 0;
  overflow: hidden; 
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  
  /* --- CAMBIO CRÍTICO AQUÍ --- */
  /* Eliminamos el degradado negro pesado. 
     Usamos un tinte blanco muy suave (0.1) para que la textura brille. */
  background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), 
                    url('../uploads/logo/textura.jpg');
  
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* Centrado total */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* LOADER SPLASH SCREEN */
#loader-wrapper {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-logo {
  width: 180px;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(0.95); }
}

/* LOGIN BOX */
.page {
  width: 100%;
  display: none; /* Controlado por JS */
  justify-content: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 30px;
  padding: 45px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.title {
  color: var(--primary);
  font-size: 28px;
  text-align: center;
  margin: 10px 0 5px 0;
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: 30px;
}

.form { display: flex; flex-direction: column; gap: 20px; }

.label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: -12px;
  margin-left: 5px;
}

.input {
  width: 100%;
  height: 50px;
  border-radius: 15px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  padding: 0 15px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 61, 77, 0.1);
}

.btn {
  margin-top: 10px;
  height: 54px;
  border: none;
  border-radius: 15px;
  background: #003d4d; /* Azul petróleo sólido */
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #002a35;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 61, 77, 0.3);
}

.password-wrap { position: relative; }

.eye-btn {
  position: absolute;
  right: 15px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: #94a3b8;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}