/* DIESELNET Premium Login Design System 2025 */
:root {
  /* HSL Color Palette for Dynamic Theming */
  --primary-hue: 220;
  --primary-sat: 90%;
  --primary-light: 55%;

  --brand-primary: hsl(
    var(--primary-hue),
    var(--primary-sat),
    var(--primary-light)
  );
  --brand-dark: hsl(var(--primary-hue), 80%, 30%);
  --brand-glow: hsl(var(--primary-hue), 100%, 75%);

  --surface-glass: rgba(255, 255, 255, 0.85);
  --surface-glass-border: rgba(255, 255, 255, 0.4);

  --text-main: hsl(220, 40%, 15%);
  --text-muted: hsl(220, 20%, 45%);

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.08);
  --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.15);

  --meter-red: #ef4444;
  --meter-yellow: #f59e0b;
  --meter-green: #10b981;
}

body {
  margin: 0;
  font-family: "Outfit", "Inter", sans-serif; /* Clean, modern typeface */
}

/* --- Animated Background Wrapper --- */
.login-page-wrapper {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at top left, #a7f3d0, transparent 40%),
    radial-gradient(circle at bottom right, #3b82f6, transparent 40%), #ecfeff; /* Subtle tech/medical freshness */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Floating Orbs for depth */
.login-page-wrapper::before,
.login-page-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: floatOrb 20s infinite alternate
    cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.login-page-wrapper::before {
  width: 400px;
  height: 400px;
  background: var(--brand-glow);
  top: -100px;
  left: -100px;
}

.login-page-wrapper::after {
  width: 300px;
  height: 300px;
  background: #a7f3d0;
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}

/* --- Main Card Container (Glassmorphism) --- */
.login-dual-box {
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* More space for form */
  width: 100%;
  max-width: 1100px;
  background: var(--surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-glass-border);
  border-radius: 32px;
  box-shadow: var(--shadow-glass), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  position: relative;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  animation: entranceCard 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes entranceCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Visual Side (Left) --- */
.login-box-vizual {
  background: linear-gradient(
    135deg,
    hsl(220, 80%, 55%) 0%,
    hsl(200, 90%, 45%) 100%
  );
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Abstract dynamic pattern overlay */
.login-box-vizual::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.box-vizual-content {
  position: relative;
  z-index: 2;
}

.box-vizual-content img {
  height: 50px;
  width: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.box-vizual-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.box-vizual-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 320px;
  margin: 0 auto;
}

/* --- Form Side (Right) --- */
.login-box-formular {
  padding: 60px;
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-box-formular h2 {
  font-size: 2rem;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.form-sub-text {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* --- Form Elements --- */
/* --- Form Elements (Floating Labels) --- */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
  padding-top: 10px; /* Space for label to float up */
}

/* Base Label State */
.form-group label {
  position: absolute;
  top: 16px;
  left: 16px;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none; /* Let clicks pass through to input */
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: transparent;
  padding: 0 4px;
  margin: 0;
  z-index: 5;
}

/* Base Input State */
.form-group input {
  width: 100%;
  padding: 16px 18px 12px; /* Extra top padding for text when label floats */
  border: 2px solid transparent;
  border-radius: 16px;
  background: white;
  font-size: 1rem;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  height: 56px;
}

/* Focus & Filled State (Floating) */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  top: -8px;
  left: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: white;
  border-radius: 4px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 8px 24px rgba(30, 144, 255, 0.15);
  transform: translateY(-1px);
}

/* --- Password Toggle Icon --- */
.password-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--brand-primary);
}

/* --- Validation Icons --- */
.input-icon-valid {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success);
  display: none;
  pointer-events: none;
}

.form-group.valid .input-icon-valid {
  display: block;
}

/* --- Strength Meter --- */
.strength-meter-container {
  margin-top: -10px;
  margin-bottom: 20px;
  padding: 0 5px;
}

.strength-bar-bg {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 2px;
}

.strength-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-align: right;
  font-weight: 500;
}

/* --- Buttons --- */
.btn-login-reinventat {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: var(--brand-primary);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 10px 20px rgba(30, 144, 255, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

/* Loading Spinner */
.btn-loading {
  color: transparent !important; /* Hide text */
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-login-reinventat:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(30, 144, 255, 0.35);
}

/* --- OAuth Buttons --- */
.oauth-login-section {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
}

.btn-oauth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 14px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s;
  gap: 10px;
}

.btn-oauth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.oauth-text-label {
  display: none; /* Hide text on small screens, show icon only if space tight */
}

@media (min-width: 600px) {
  .oauth-text-label {
    display: inline;
  }
}

/* --- Divider --- */
.oauth-divider {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.oauth-divider span {
  padding: 0 15px;
}

/* --- Links --- */
.link-wrapp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-wrap input {
  width: auto;
  margin: 0;
  accent-color: var(--brand-primary);
}

.forgot-password-link-login {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-password-link-login:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* --- Register Footer --- */
.register-link-box {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.register-link-box a {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: none;
  margin-left: 5px;
}

.register-link-box a:hover {
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .login-dual-box {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .login-box-vizual {
    display: none; /* Hide visual on mobile to focus on inputs */
  }

  .login-box-formular {
    padding: 40px 30px;
  }
}
