/* content moved 1:1 from your template */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Force this page to render as LIGHT regardless of global theme */
body[data-route="login"] {
  color-scheme: light; /* UA controls (inputs) use light colors */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left side - Branding */
.branding-side {
  flex: 1;
  background: #1a1d21;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.geometric-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.1;
}

.geometric-bg::before,
.geometric-bg::after {
  content: '';
  position: absolute;
  background: #6366f1;
}

.geometric-bg::before {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  top: -100px;
  left: -100px;
}

.geometric-bg::after {
  width: 400px;
  height: 400px;
  transform: rotate(45deg);
  bottom: -200px;
  right: -200px;
  border-radius: 20%;
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.logo-container {
  margin-bottom: 40px;
}

.logo {
  width: 80px;
  height: 80px;
  background: #6366f1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.logo svg {
  width: 50px;
  height: 50px;
  fill: white;
}

.brand-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.brand-tagline {
  color: #9ca3af;
  font-size: 18px;
  font-weight: 400;
}

.feature-list {
  margin-top: 60px;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  color: #e5e7eb;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  fill: #6366f1;
}

/* Right side - Login Form */
.login-side {
  flex: 1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1d21;
  margin-bottom: 8px;
}

.login-subtitle {
  color: #6b7280;
  font-size: 16px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
}

.input-icon svg {
  width: 100%;
  height: 100%;
  fill: #9ca3af;
}

.form-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f9fafb;
  color: #111827;            /* ensure readable text */
  caret-color: #111827;
}

.form-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #ffffff;
  color: #111827;            /* stay readable on white */
}

.form-input::placeholder{
  color: #9ca3af;
  opacity: 1;                /* Firefox */
}

/* WebKit autofill fix (can force white text) */
input.form-input:-webkit-autofill,
input.form-input:-webkit-autofill:focus{
  -webkit-text-fill-color: #111827 !important;
  transition: background-color 9999s ease-out 0s;
}

.form-input:focus + .input-icon svg {
  fill: #6366f1;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  accent-color: #6366f1;
}

.remember-me label {
  font-size: 14px;
  color: #4b5563;
}

.forgot-link {
  font-size: 14px;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn:hover {
  background: #5558e3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-icon {
  width: 20px;
  height: 20px;
  margin-left: 8px;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
  fill: white;
}

.divider {
  text-align: center;
  margin: 32px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.divider span {
  background: white;
  padding: 0 16px;
  color: #9ca3af;
  font-size: 14px;
  position: relative;
}

.social-login {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.social-btn {
  flex: 1;
  padding: 12px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-btn:hover {
  border-color: #6366f1;
  background: #f9fafb;
}

.social-btn svg {
  width: 24px;
  height: 24px;
}

.signup-prompt {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.signup-link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}

.signup-link:hover {
  text-decoration: underline;
}

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

  .branding-side {
    display: none;
  }

  .login-side {
    min-height: 100vh;
    background: #f8f9fa;
  }

  .login-container {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
  }

  .mobile-logo .logo {
    width: 60px;
    height: 60px;
  }

  .mobile-logo .logo svg {
    width: 36px;
    height: 36px;
  }
}

@media (min-width:769px) {
  .mobile-logo {
    display: none;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0) }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) }
  20%, 40%, 60%, 80% { transform: translateX(5px) }
}

/* ---- Hard overrides to isolate from dark/light theme toggles ---- */
html[data-theme="dark"] body[data-route="login"] .form-input,
html[data-theme="light"] body[data-route="login"] .form-input,
body[data-route="login"] .form-input {
  color: #111827 !important;
  background-color: #f9fafb !important;
  border-color: #e5e7eb !important;
}

html[data-theme="dark"] body[data-route="login"] .form-input:focus,
html[data-theme="light"] body[data-route="login"] .form-input:focus,
body[data-route="login"] .form-input:focus {
  color: #111827 !important;
  background-color: #ffffff !important;
  border-color: #6366f1 !important;
}

html[data-theme="dark"] body[data-route="login"] .forgot-link,
html[data-theme="light"] body[data-route="login"] .forgot-link,
html[data-theme="dark"] body[data-route="login"] .signup-link,
html[data-theme="light"] body[data-route="login"] .signup-link {
  color: #6366f1 !important;
}
