/* ════════════════════════════════════════════
   LOGIN PAGE STYLES
════════════════════════════════════════════ */

/* ── Layout: split screen ── */
.login-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Left: Branding ── */
.login-brand {
  flex: 1;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 150%;
  background: radial-gradient(circle, rgba(220,38,38,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}

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

.brand-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.brand-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.brand-title em {
  font-style: normal;
  color: var(--red);
}

.brand-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  margin-bottom: 40px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.feature-item i {
  font-size: 1.1rem;
  color: var(--red);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220,38,38,0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

/* ── Right: Form ── */
.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

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

.login-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ── Alert ── */
.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--red-soft);
  border: 1px solid var(--red-mid);
  border-radius: 12px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 20px;
  animation: fadeUp 0.3s ease;
}

.login-alert i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Form Groups ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  transition: all var(--trans);
}

.input-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
  background: #fff;
}

.input-wrap > i {
  font-size: 1rem;
  color: var(--text-3);
  flex-shrink: 0;
  margin-right: 10px;
}

.input-wrap:focus-within > i {
  color: var(--red);
}

.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  padding: 11px 0;
  font-size: 0.88rem;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  color: var(--text);
}

.input-wrap input::placeholder {
  color: var(--text-3);
  font-size: 0.83rem;
}

.toggle-pass {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 1rem;
  padding: 4px;
  transition: color var(--trans);
}

.toggle-pass:hover {
  color: var(--text);
}

/* ── Options row ── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  cursor: pointer;
}

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

/* ── Login button ── */
.btn-login {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220,38,38,0.35);
  transition: all var(--trans);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220,38,38,0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ── Spin animation ── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* ── Footer ── */
.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  font-size: 0.72rem;
  color: var(--text-3);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card {
  animation: fadeUp 0.5s ease forwards;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-brand {
    padding: 40px 24px 30px;
    min-height: auto;
  }

  .brand-features {
    display: none;
  }

  .brand-sub {
    margin-bottom: 0;
  }

  .login-form-side {
    padding: 30px 24px;
  }
}

@media (max-width: 500px) {
  .login-form-side {
    padding: 24px 16px;
  }

  .login-header h2 {
    font-size: 1.3rem;
  }
}
