body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
}

/* Split Layout */
.split-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.left-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(82, 136, 193, 0.1), transparent 70%);
  position: relative;
}

.left-panel::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('/static/pattern.png');
  /* Optional pattern */
  opacity: 0.05;
}

.brand-content {
  text-align: center;
  z-index: 1;
}

.brand-logo {
  max-width: 200px;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.brand-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: 10px;
}

.right-panel {
  flex: 0 0 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(40px);
  border-left: 1px solid var(--border-glass);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

.login-form-container {
  width: 100%;
  max-width: 360px;
  padding: 40px;
}

h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Floating Labels */
.form-group {
  position: relative;
  margin-bottom: 25px;
}

.fluent-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-muted);
  border-radius: 0;
  padding: 10px 0;
  font-size: 16px;
  color: var(--text-primary);
  width: 100%;
  transition: border-color 0.3s;
}

.fluent-input:focus {
  border-bottom-color: var(--primary-color);
  box-shadow: none;
  background: transparent;
}

.form-group label {
  position: absolute;
  top: 10px;
  left: 0;
  font-size: 16px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: 0.2s ease all;
}

.fluent-input:focus~label,
.fluent-input:not(:placeholder-shown)~label {
  top: -20px;
  font-size: 12px;
  color: var(--primary-color);
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 10px;
  /* Align with input text */
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 0 5px;
  z-index: 10;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: var(--primary-color);
}

#error-msg {
  color: #ff8a80;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 20px;
  min-height: 20px;
  position: relative;
  z-index: 5;
  word-wrap: break-word;
  font-size: 0.9rem;
  display: none;
  /* Hide by default, show via JS */
}

#error-msg:not(:empty) {
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .split-container {
    flex-direction: column;
  }

  .left-panel {
    display: none;
    /* Hide branding on mobile for immersive form */
  }

  .right-panel {
    flex: 1;
    width: 100%;
    border-left: none;
    background: var(--bg-main);
    /* Solid background on mobile */
  }

  .login-form-container {
    padding: 20px;
  }
}