/* Login page */
.login-page {
  display: flex;
  min-height: 100vh;
  position: relative;
  background: #0f172a url('/images/login-bg.jpg') center center / cover no-repeat fixed;
}

.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(15, 23, 42, 0.45) 50%,
    rgba(15, 23, 42, 0.65) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.login-visual {
  flex: 1;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #fff;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.35), transparent 60%);
  pointer-events: none;
}

.login-visual::after {
  display: none;
}

.login-visual-content { position: relative; z-index: 1; max-width: 400px; }
.login-visual h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.login-visual p { font-size: 16px; opacity: 0.92; line-height: 1.7; text-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.login-visual-features { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.login-feature { display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: 0.95; }
.login-feature-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: transparent;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .login-card {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
}

.login-card-header { margin-bottom: 32px; }
.login-card-header h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.login-card-header p { color: var(--text-muted); font-size: 15px; }

.login-top-bar {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.login-page .theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  backdrop-filter: blur(8px);
}
.login-page .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.login-forgot { text-align: center; margin-top: 16px; font-size: 14px; }

@media (max-width: 768px) {
  .login-page {
    flex-direction: column;
    justify-content: center;
    background-attachment: scroll;
  }
  .login-page::before {
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.25) 0%,
      rgba(15, 23, 42, 0.1) 45%,
      rgba(15, 23, 42, 0.35) 100%
    );
  }
  .login-visual { display: none; }
  .login-form-side {
    flex: none;
    width: 100%;
    padding: 32px 20px;
    padding-top: calc(48px + env(safe-area-inset-top));
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
  .login-top-bar {
    top: calc(12px + env(safe-area-inset-top));
    right: 16px;
  }
  .login-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 28px 22px;
  }
  [data-theme="dark"] .login-card {
    background: transparent;
    border: none;
  }
  .login-card-header h2 {
    font-size: 22px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  }
  .login-card-header p {
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  }
  .login-page .field label {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  }
  .login-page .field input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .login-page .field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }
  .login-page .field input:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  }
  .login-forgot a {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  }
  .login-page .error {
    color: #fecaca;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 380px) {
  .login-form-side { padding: 24px 16px; padding-top: calc(44px + env(safe-area-inset-top)); }
  .login-card { padding: 24px 18px; }
  .login-card-header { margin-bottom: 24px; }
}
