/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Layout — split screen ───────────────────────────────────────────────── */
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  background: #f8f9fc;
}

/* ── Left panel ──────────────────────────────────────────────────────────── */
.login-left {
  width: 45%;
  min-height: 100vh;
  background: linear-gradient(160deg, #0f0f1a 0%, #1a1a2e 40%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid pattern overlay */
.login-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(230,57,70,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,57,70,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Glowing accent circle */
.login-left::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,57,70,0.15) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  pointer-events: none;
}

.login-left-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
}

/* Brand */
.brand-logo {
  margin-bottom: 20px;
}

.brand-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

.brand-name {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.brand-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: 52px;
}

/* Feature list */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 52px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(230,57,70,0.15);
  border: 1px solid rgba(230,57,70,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  color: #e63946;
}

.feature-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

/* Brand footer */
.brand-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

.brand-footer .dot { font-size: 16px; }

/* ── Right panel ─────────────────────────────────────────────────────────── */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: #f8f9fc;
}

.login-form-wrap {
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Form header */
.form-header {
  margin-bottom: 36px;
}

.form-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.form-header p {
  font-size: 14px;
  color: #6b7280;
}

/* Fields */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #9ca3af;
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrap input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.input-wrap input::placeholder { color: #d1d5db; }

.input-wrap input:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

/* Show/hide password toggle */
.toggle-pwd {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.toggle-pwd:hover { color: #6b7280; }

.toggle-pwd svg {
  width: 17px;
  height: 17px;
}

/* Error box */
.error-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #dc2626;
  animation: shake 0.4s ease;
}

.error-box svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}

/* Sign in button */
.sign-in-btn {
  width: 100%;
  padding: 14px;
  background: #e63946;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
  letter-spacing: 0.2px;
  margin-top: 8px;
}

.sign-in-btn:hover:not(:disabled) {
  background: #c62828;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(230,57,70,0.35);
}

.sign-in-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.sign-in-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Form footer */
.form-footer {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #9ca3af;
}

.security-badge svg {
  width: 13px;
  height: 13px;
  color: #6b7280;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  body { flex-direction: column; }

  .login-left {
    width: 100%;
    min-height: auto;
    padding: 40px 30px 36px;
  }

  .login-left-inner { max-width: 100%; }
  .brand-tagline    { margin-bottom: 0; }
  .feature-list     { display: none; }
  .brand-footer     { display: none; }

  .login-right {
    flex: none;
    padding: 40px 24px 60px;
  }
}

@media (max-width: 480px) {
  .login-left { padding: 32px 24px 28px; }
  .brand-name { font-size: 26px; }
  .form-header h2 { font-size: 24px; }
}
