/* ==========================================================================
   VARIABLES & REGLAS GENERALES
   ========================================================================== */
:root {
  --primary-color: #0f4c2c;
  --primary-hover: #0a3820;
  --accent-light: #206d44;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --card-bg: rgba(255, 255, 255, 0.45);
  --card-border: rgba(255, 255, 255, 0.4);
  --input-bg: rgba(255, 255, 255, 0.55);
  --input-border: rgba(255, 255, 255, 0.6);
  --shadow-color: rgba(0, 0, 0, 0.15);
  --radius-lg: 24px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?q=80&w=1920&auto=format&fit=crop') no-repeat center center fixed;
  background-size: cover;
  overflow-x: hidden;
}

/* Oscurecimiento y tinte verde al fondo */
.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 43, 27, 0.7) 0%,
    rgba(22, 77, 47, 0.55) 50%,
    rgba(15, 76, 44, 0.75) 100%
  );
  backdrop-filter: blur(4px);
  z-index: 1;
}

/* ==========================================================================
   CONTENEDOR & BOTÓN REGRESAR
   ========================================================================== */
.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  margin: 20px auto;
}

/* Botón Volver / Regresar */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 16px;
  transition: all 0.25s ease;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-3px);
  color: #ffffff;
}

.btn-back svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   TARJETA DE LOGIN (GLASSMORPHISM)
   ========================================================================== */
.login-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 20px 40px var(--shadow-color);
  text-align: center;
}

/* Logo personalizado */
.logo-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.brand-logo {
  max-width: 140px;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Encabezado */
.card-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.card-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 28px;
}

/* ==========================================================================
   FORMULARIO E INPUTS
   ========================================================================== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 0.8rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* Input Wrappers e Iconos */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #475569;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #64748b;
}

.input-wrapper input:focus {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(15, 76, 44, 0.2);
}

/* Botón de ocultar/mostrar contraseña */
.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.toggle-password:hover {
  color: var(--text-dark);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

/* Checkbox "Recordar dispositivo" */
.form-options {
  margin-top: -4px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ==========================================================================
   BOTONES Y ACCIONES
   ========================================================================== */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0e3b22 0%, #155732 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 76, 44, 0.4);
  transition: all 0.25s ease;
  margin-top: 6px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #0a2c19 0%, #0e4225 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 76, 44, 0.5);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Separador */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 16px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.divider span {
  padding: 0 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* Botón Google */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-google:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.google-svg {
  width: 18px;
  height: 18px;
}

/* Adaptación responsive para celulares */
@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
  }
}

