.login-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
  background: #f7f8fa;
}

/* ── Background photo with light overlay ── */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(247, 248, 250, 0.86) 42%,
      rgba(255, 255, 255, 0.9) 100%
    ),
    url('/bg.jpg') center center / cover no-repeat;
}

.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

/* ── Layout ── */
.login-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 480px;
  width: 100%;
  min-height: 100vh;
}

/* ── Brand panel ── */
.login-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
  color: var(--text, #1a1d23);
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2.5rem;
}

.logo-mark {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.login-brand-logo .logo-mark {
  width: 44px;
  height: 44px;
}

.login-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text, #1a1d23);
}

.login-brand-tagline {
  font-size: 0.8rem;
  color: var(--text3, #8892a0);
  margin-top: 2px;
}

.login-hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 480px;
  color: var(--text, #1a1d23);
}

.login-hero-title span {
  background: linear-gradient(135deg, #2563eb, #00b87a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-hero-desc {
  font-size: 1rem;
  color: var(--text2, #4a5060);
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 2.5rem;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 12px;
  max-width: 400px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}

.login-feature:hover {
  border-color: var(--border2, #d0d4dc);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.login-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.login-feature-icon.green { background: var(--green-bg, #e8faf3); }
.login-feature-icon.blue { background: var(--blue-bg, #eff6ff); }
.login-feature-icon.amber { background: var(--amber-bg, #fffbeb); }

.login-feature-text strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #1a1d23);
  margin-bottom: 2px;
}

.login-feature-text span {
  font-size: 0.75rem;
  color: var(--text3, #8892a0);
}

.login-brand-footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.75rem;
  color: var(--text3, #8892a0);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-powered-by a {
  color: var(--text2, #4a5060);
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}

.login-powered-by a:hover {
  color: var(--blue, #2563eb);
}

/* ── Form panel ── */
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 2rem 2rem 0;
  background: transparent;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.08);
}

.login-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card-header .logo-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
}

.login-card-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text, #1a1d23);
  letter-spacing: -0.02em;
}

.login-card-header p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text3, #8892a0);
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.login-alert.info {
  background: var(--green-bg, #e8faf3);
  color: var(--green, #00b87a);
  border: 1px solid var(--green-border, #b3edd6);
}

.login-alert.error {
  background: var(--red-bg, #fef0f1);
  color: var(--red, #e8394a);
  border: 1px solid #fca5a5;
}

.login-field {
  margin-bottom: 1.15rem;
}

.login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2, #4a5060);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-field input,
.login-password-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text, #1a1d23);
  background: var(--bg2, #f7f8fa);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.login-field input::placeholder,
.login-password-input::placeholder {
  color: var(--text3, #8892a0);
}

.login-field input:focus,
.login-password-input:focus {
  border-color: var(--text, #1a1d23);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 29, 35, 0.06);
}

.login-field input.invalid,
.login-password-input.invalid {
  border-color: var(--red, #e8394a);
  box-shadow: 0 0 0 3px rgba(232, 57, 74, 0.08);
}

.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-password-input {
  padding-right: 44px;
}

.login-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text3, #8892a0);
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.login-password-toggle:hover {
  color: var(--text, #1a1d23);
  background: rgba(26, 29, 35, 0.05);
  cursor: pointer;
}

.login-password-toggle:focus-visible {
  outline: 2px solid var(--text, #1a1d23);
  outline-offset: 1px;
}

.login-password-toggle .bi {
  font-size: 1.125rem;
  line-height: 1;
}

.login-field-error {
  font-size: 0.75rem;
  color: var(--red, #e8394a);
  margin-top: 4px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text2, #4a5060);
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--text, #1a1d23);
  cursor: pointer;
}

.login-forgot {
  font-size: 0.8rem;
  color: var(--text3, #8892a0);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}

.login-forgot:hover {
  color: var(--text, #1a1d23);
}

.login-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  justify-content: center;
  border-radius: 8px;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-card-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, #e2e5eb);
  font-size: 0.75rem;
  color: var(--text3, #8892a0);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    border-left: none;
    min-height: 100vh;
    background: transparent;
    justify-content: center;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
  }

  .login-form-panel {
    padding: 1.25rem;
  }
}
