:root {
  --login-primary: #2563EB;
  --login-secondary: #3B82F6;
  --login-dark: #111827;
  --login-bg: #F8FAFC;
  --login-border: #E5E7EB;
  --login-text: #111827;
  --login-subtle: #6B7280;
  --login-success: #22C55E;
  --login-error: #EF4444;
  --login-radius: 22px;
  --login-transition: 250ms;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--login-bg);
  color: var(--login-text);
}

/* Split Screen */
.login-split {
  display: flex;
  min-height: 100vh;
}

/* Left Panel - Brand */
.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 45%;
  min-height: 100vh;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #111827 0%, #1E3A8A 55%, #2563EB 100%);
  color: #fff;
}

/* Abstract Decorative Shapes */
.login-brand::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.login-shape-1 {
  position: absolute;
  top: 40%;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.login-shape-2 {
  position: absolute;
  bottom: 30%;
  left: 10%;
  width: 150px;
  height: 150px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.login-brand-header {
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.login-brand-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.login-brand-logo-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.login-brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.login-brand-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin-top: 2px;
}

/* Feature List */
.login-features {
  position: relative;
  z-index: 1;
  margin-top: 24px;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  opacity: 0;
  animation: loginFadeUp 0.5s ease forwards;
}

.login-feature-item:nth-child(1) { animation-delay: 0.1s; }
.login-feature-item:nth-child(2) { animation-delay: 0.15s; }
.login-feature-item:nth-child(3) { animation-delay: 0.2s; }
.login-feature-item:nth-child(4) { animation-delay: 0.25s; }
.login-feature-item:nth-child(5) { animation-delay: 0.3s; }
.login-feature-item:nth-child(6) { animation-delay: 0.35s; }
.login-feature-item:nth-child(7) { animation-delay: 0.4s; }

.login-feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-feature-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--login-success);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-brand-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.login-brand-version {
  margin-bottom: 4px;
}

/* Right Panel - Login Card */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55%;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 450px;
  background: #fff;
  border-radius: var(--login-radius);
  padding: 40px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.04);
  animation: loginFadeUp 0.4s ease;
  transition: box-shadow var(--login-transition) ease;
}

.login-card:hover {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 24px 72px rgba(0, 0, 0, 0.06);
}

.login-header {
  margin-bottom: 32px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  color: var(--login-text);
}

.login-subtitle {
  font-size: 14px;
  color: var(--login-subtle);
  margin: 0;
  line-height: 1.5;
}

/* Form Fields */
.login-field {
  margin-bottom: 20px;
}

.login-input-group {
  position: relative;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
  color: var(--login-subtle);
  transition: color var(--login-transition) ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-input-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.login-field:focus-within .login-input-icon {
  color: var(--login-primary);
}

.login-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 48px;
  border: 1.5px solid var(--login-border);
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: var(--login-text);
  background: #fff;
  transition: all var(--login-transition) ease;
  outline: none;
  box-sizing: border-box;
}

.login-input:focus {
  border-color: var(--login-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-input::placeholder {
  color: #9CA3AF;
}

.login-input.error {
  border-color: var(--login-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Password Toggle */
.login-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 8px;
  transition: all var(--login-transition) ease;
}

.login-password-toggle:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.login-password-toggle:active {
  background: #d1d5db;
}

.login-password-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Select Field */
.login-select {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 48px;
  border: 1.5px solid var(--login-border);
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: var(--login-text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all var(--login-transition) ease;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
}

.login-select:focus {
  border-color: var(--login-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Remember & Forgot Row */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--login-subtle);
  user-select: none;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--login-primary);
  cursor: pointer;
}

.login-forgot {
  font-size: 13px;
  color: var(--login-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--login-transition) ease;
}

.login-forgot:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* Submit Button */
.login-submit {
  width: 100%;
  height: 52px;
  background: var(--login-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--login-transition) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit:hover:not(:disabled) {
  background: #1D4ED8;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.login-submit:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error Messages */
.login-error-banner {
  display: none;
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  color: #991B1B;
  font-size: 13px;
  margin-bottom: 20px;
  animation: loginShake 0.4s ease;
}

.login-field-error {
  display: none;
  font-size: 12px;
  color: var(--login-error);
  margin-top: 6px;
  padding-left: 4px;
}

/* Spinner */
.login-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.6s linear infinite;
}

/* Animations */
@keyframes loginFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

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

/* Responsive */
@media (max-width: 1024px) {
  .login-brand {
    width: 40%;
    padding: 40px 32px;
  }
  .login-panel {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .login-brand {
    display: none;
  }
  .login-panel {
    width: 100%;
    padding: 16px;
    min-height: 100vh;
    align-items: center;
  }
  .login-card {
    max-width: 400px;
    padding: 32px 24px;
    border-radius: 18px;
  }
  .login-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .login-panel {
    padding: 12px;
  }
  .login-card {
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: none;
    background: transparent;
  }
  .login-card:hover {
    box-shadow: none;
  }
  body {
    background: #fff;
  }
  .login-title {
    font-size: 22px;
  }
}

/* Utility */
.login-hidden {
  display: none !important;
}
