/* Login page — split layout (hero + form) */

/* Override body/wrapper for login */
body:has(.login-container) {
  background: #fff !important;
}
body:has(.login-container) .page-wrapper {
  display: flex;
  flex-direction: column;
  background: transparent;
  max-width: none;
  box-shadow: none;
  grid-template-columns: unset;
  grid-template-rows: unset;
}

/* ── Split layout ── */
.login-container {
  display: flex;
  height: 100vh;
  padding: 0;
}

/* ── Left: Hero ── */
.login-hero {
  flex: 1.1;
  background: url('/assets/icon/icon.png') center center / 30% no-repeat,
              linear-gradient(135deg, #0b1a2e 0%, #122a4a 50%, #0b1a2e 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  min-width: 0;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 15, 30, 0.8) 0%,
    rgba(10, 15, 30, 0.2) 50%,
    rgba(10, 15, 30, 0.05) 100%
  );
}

/* Subtle glow accent on hero */
.login-hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 30%;
  width: 40%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(6, 183, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-hero-content {
  position: relative;
  z-index: 1;
}

.login-hero-tagline {
  font-size: 28px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.login-hero-tagline strong {
  font-weight: 700;
  background: linear-gradient(135deg, #32f7ff, #06b7ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-hero-sub {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 380px;
  line-height: 1.5;
}

/* ── Right: Form side ── */
.login-side {
  flex: 0 0 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 40px;
}

.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Logo ── */
.login-logo {
  width: 56px;
  height: auto;
  margin-bottom: 8px;
}

.login-brand {
  font-weight: bold;
  letter-spacing: 18px;
  font-size: 36px;
  margin-bottom: 4px;
  padding-left: 18px;
  background: linear-gradient(135deg, #32f7ff 0%, #06b7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #32f7ff, #06b7ff);
  border-radius: 2px;
  margin: 12px auto 24px;
}

.login-tagline {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
  text-align: center;
}

/* ── Error ── */
.login-error {
  color: var(--risk-high);
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  text-align: center;
  width: 100%;
  font-size: 13px;
}

/* ── Fields ── */
.login-field {
  width: 100%;
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-family);
  border: 1.5px solid var(--border-medium);
  border-radius: 10px;
  outline: none;
  background: var(--bg-base);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input::placeholder {
  color: #cbd5e1;
}

.login-field input:focus {
  border-color: #06b7ff;
  box-shadow: 0 0 0 3px rgba(6, 183, 255, 0.1);
  background: #fff;
}

/* ── Password toggle ── */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-tertiary);
  padding: 4px;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

/* ── Button ── */
.login-button {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #32f7ff 0%, #06b7ff 100%);
  color: #0b1a2e;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-family);
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(6, 183, 255, 0.25);
}

.login-button:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(6, 183, 255, 0.35);
}

.login-button:active {
  transform: scale(0.98);
}

/* ── Footer ── */
.login-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .login-hero {
    display: none;
  }

  .login-container {
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b1a2e 0%, #122a4a 100%);
  }

  .login-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 24px;
  }

  .login-form {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 28px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 380px;
  }
}

@media (max-width: 400px) {
  .login-form {
    padding: 32px 20px 28px;
  }

  .login-brand {
    font-size: 28px;
    letter-spacing: 14px;
    padding-left: 14px;
  }
}
