/* Variables CSS idénticas a administrador.html */
:root {
  /* Colores principales del administrador */
  --primary-blue: #0099cc;
  --secondary-blue: #33aaff;
  --accent-blue: #66c2ff;
  --dark-blue: #007bb3;
  --darker-blue: #005f73;
  
  /* Sistema de grises */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Colores de temperatura */
  --temp-cold: #0099cc;
  --temp-normal: #059669;
  --temp-warm: #d97706;
  --temp-hot: #dc2626;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f4f9fd 0%, #e1f0ff 20%, #cce7ff 40%, #b3ddff 60%, #99d4ff 80%, #80ccff 100%);
  position: relative;
}

.container {
  max-width: 440px;
  width: 90%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  padding: 48px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 153, 204, 0.15);
  border: 1px solid rgba(0, 153, 204, 0.1);
  animation: fadeIn 0.8s ease-out;
  position: relative;
}

/* Borde superior igual al administrador */
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #0099cc 0%, #33aaff 50%, #66c2ff 100%);
  border-radius: 12px 12px 0 0;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.form-container {
  text-align: center;
}

/* Estilos para el logotipo con sensor dinámico */
.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  padding: 0;
}

.logo-icon {
  margin-bottom: 5px;
}

.thermometer-container {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 90px;
  margin: 0 auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  border: 2px solid rgba(0, 153, 204, 0.2);
  box-shadow: 0 2px 10px rgba(0, 153, 204, 0.15);
  transition: all 0.3s ease;
}

.thermometer-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 153, 204, 0.4);
  border-color: rgba(0, 153, 204, 0.4);
}

.thermometer-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 153, 204, 0.1));
}

.thermometer-tube {
  fill: var(--gray-200);
  stroke: var(--primary-blue);
  stroke-width: 0.5;
}

.thermometer-bulb {
  fill: var(--gray-200);
  stroke: var(--primary-blue);
  stroke-width: 0.5;
}

.thermometer-mercury {
  fill: var(--primary-blue);
  transition: all 0.3s ease;
}

.thermometer-scale {
  stroke: var(--primary-blue);
  stroke-width: 0.5;
  opacity: 0.7;
}

.temperature-display {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: bold;
  color: #0099cc;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 12px;
  border-radius: 20px;
  border: 2px solid rgba(0, 153, 204, 0.2);
  min-width: 48px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 153, 204, 0.15);
}

.temperature-display:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 153, 204, 0.35);
  border-color: rgba(0, 153, 204, 0.5);
}

.logo-text {
  text-align: center;
  margin-top: 8px;
}

.header-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #0099cc, #00d4ff, #0099cc);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 8px rgba(0, 153, 204, 0.3);
  letter-spacing: -0.5px;
  animation: gradientShift 3s ease-in-out infinite;
  position: relative;
}

.header-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #0099cc, transparent);
  border-radius: 2px;
  opacity: 0.7;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.header-division {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #0099cc;
  margin: 2px 0 10px 0;
  opacity: 0.85;
  position: relative;
  display: inline-block;
}

.header-division::before,
.header-division::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 153, 204, 0.5));
}

.header-division::before {
  right: calc(100% + 8px);
  background: linear-gradient(90deg, transparent, rgba(0, 153, 204, 0.5));
}

.header-division::after {
  left: calc(100% + 8px);
  background: linear-gradient(90deg, rgba(0, 153, 204, 0.5), transparent);
}

.header-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0 0 20px 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
  font-weight: 400;
  opacity: 0.9;
}

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

.form-group {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

input[type="text"], input[type="password"], input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  transition: all 0.3s ease;
  outline: none;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-container input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.toggle-password:hover {
  transform: scale(1.05);
  color: #0099cc;
}

/* Estilos para el icono SVG corporativo */
.eye-icon {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
}

.eye-visible, .eye-hidden {
  transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
  border-color: #0099cc;
  box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

input[type="text"]::placeholder, input[type="password"]::placeholder, input[type="email"]::placeholder {
  color: #adb5bd;
}

button {
  background: linear-gradient(135deg, #0099cc, #66c2ff);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 153, 204, 0.3);
}

button:hover {
  background: linear-gradient(135deg, #007bb3, #0099cc);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 153, 204, 0.4);
}

button:active {
  transform: translateY(0);
}

.form-footer {
  text-align: center;
  margin-top: 20px;
}

.forgot-password {
  color: #0099cc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #007bb3;
  text-decoration: underline;
}

#loginMessage {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  display: none;
}

#loginMessage.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

#loginMessage.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

button:hover {
  background: linear-gradient(135deg, #007bb3 0%, #0099cc 50%, #33aaff 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 153, 204, 0.4);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 153, 204, 0.3);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#loginMessage {
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  border: 2px solid transparent;
}

.success-message {
  color: #065f46;
  background: linear-gradient(145deg, #f4f9fd 0%, #e8f4fd 100%);
  border-color: rgba(0, 153, 204, 0.2);
}

.error-message {
  color: #991b1b;
  background: linear-gradient(145deg, #fef2f2 0%, #fecaca 100%);
  border-color: #fca5a5;
}

.warning-message {
  color: #92400e;
  background: linear-gradient(145deg, #fffbeb 0%, #fed7aa 100%);
  border-color: #fdba74;
}

/* Modo oscuro opcional */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  }
  
  .container {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
  }
  
  .container::before {
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
  }
  
  .thermometer-container {
    background: linear-gradient(135deg, var(--gray-700), var(--gray-600));
    border-color: var(--gray-600);
  }
  
  .header-title {
    color: var(--gray-100);
  }
  
  .header-subtitle {
    color: var(--gray-400);
  }
  
  .header-division {
    color: var(--accent-cyan);
    opacity: 0.7;
  }
  
  .header-division::before {
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4));
  }
  
  .header-division::after {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.4), transparent);
  }
  
  label {
    color: var(--gray-300);
  }
  
  input[type="text"],
  input[type="password"],
  input[type="email"] {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-100);
  }
  
  input[type="text"]:focus,
  input[type="password"]:focus,
  input[type="email"]:focus {
    border-color: var(--primary-blue);
    background: var(--gray-600);
  }
  
  input[type="text"]::placeholder,
  input[type="password"]::placeholder,
  input[type="email"]::placeholder {
    color: var(--gray-500);
  }
  
  .temperature-display {
    background: var(--gray-700);
    color: var(--accent-cyan);
    border-color: var(--gray-600);
  }
}

/* Estilos responsive mejorados */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 40px 32px;
    border-radius: 12px;
  }
  
  .logo-section {
    margin-bottom: 36px;
  }
  
  .logo-icon {
    margin-bottom: 20px;
  }
  
  .header-title {
    font-size: 2.4rem;
  }
  
  .header-subtitle {
    font-size: 1rem;
  }
  
  .header-division {
    font-size: 0.75rem;
    letter-spacing: 2.5px;
  }
  
  .thermometer-container {
    width: 60px;
    height: 80px;
  }
  
  .temperature-display {
    font-size: 11px;
    bottom: -36px;
  }
  
  .form-group input {
    font-size: 16px;
    padding: 12px 16px;
  }
  
  button {
    padding: 16px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 95%;
    padding: 32px 24px;
    margin: 16px;
  }
  
  .logo-section {
    margin-bottom: 32px;
  }
  
  .logo-icon {
    margin-bottom: 16px;
  }
  
  .header-title {
    font-size: 2.0rem;
  }
  
  .header-subtitle {
    font-size: 0.9rem;
  }
  
  .header-division {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }
  
  .header-division::before,
  .header-division::after {
    width: 20px;
  }
  
  .thermometer-container {
    width: 55px;
    height: 75px;
  }
  
  .temperature-display {
    bottom: -34px;
    font-size: 10px;
  }
  
  .login-form {
    gap: 20px;
  }
}

/* Indicador de carga */
.loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Efecto hover para el termómetro */
.thermometer-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 153, 204, 0.4);
  border-color: rgba(0, 153, 204, 0.4);
  transition: all 0.3s ease;
}

.thermometer-container:not(:hover) {
  transition: all 0.3s ease;
}
