/* --- Theme vars --- */
:root {
  --accent: brown;
  /* primary accent/orange */
  --accent-dark: brown;
  --muted: #6b7280;
  --card-bg: #ffffff;
  --page-bg: #f7f9fb;
  --input-border: brown;
  --shadow: 0 8px 30px rgba(18, 25, 40, 0.06);
  --radius: 12px;
  --max-width: 90%;
}

/* Page background (keeps header unaffected) */
body {
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial;
}

/* Layout for the section */
.form-section {
  max-width: var(--max-width);
  margin: 100px auto 40px;
  padding: 28px;
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Form card */
.form-section > div:first-child {
  width: 52%;
  background: var(--card-bg);
  padding: 34px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

/* Make the image area fit nicely */
#undraw_img {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#undraw_img img {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
}

/* Form basics */
form h2 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  line-height: 1.1;
  color: #0f1724;
  letter-spacing: -0.2px;
}

form p {
  margin-top: 8px;
  color: var(--muted);
}

/* Field wrapper */
form > div {
  margin-top: 14px;
}

/* Labels */
label {
  display: inline-block;
  font-weight: 600;
  color: #0f1724;
  font-size: 0.95rem;
}

/* Input common styles */
input[type="email"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  font-size: 0.95rem;
  transition:
    border 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

/* Make sure inputs don't overflow inside small form card */
.form-section > div:first-child input {
  max-width: 100%;
}

/* Focus / accessibility */
input:focus,
input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(244, 124, 82, 0.12);
}

/* Placeholder style */
input::placeholder {
  color: #c7c7c7;
}

/* Forget password alignment */
.forget-password {
  text-align: right;
  margin-top: 6px;
}

.forget-password a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.forget-password a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Login button */
#loginBtn,
button#loginBtn {
  display: inline-block;
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    opacity 120ms ease;
  box-shadow: 0 8px 18px rgba(244, 124, 82, 0.16);
  font-size: 0.95rem;
}

#loginBtn:hover,
button#loginBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(244, 124, 82, 0.18);
}

#loginBtn:active,
button#loginBtn:active {
  transform: translateY(0);
  opacity: 0.98;
}

/* New account link */
form p {
  color: var(--muted);
  margin-top: 22px;
  font-size: 0.95rem;
}

form p a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

form p a:hover {
  text-decoration: underline;
}

/* Small screens: stack content */
@media (max-width: 900px) {
  .form-section {
    margin: 90px 16px;
    gap: 18px;
    padding: 8px;
    flex-direction: column;
  }

  .form-section > div:first-child,
  #undraw_img {
    width: 100%;
  }

  .form-section > div:first-child {
    padding: 22px;
  }

  #undraw_img img {
    max-width: 360px;
  }
}

/* Very small screens: tighten spacing */
@media (max-width: 420px) {
  form h2 {
    font-size: 1.25rem;
  }

  input[type="email"],
  input[type="password"] {
    padding: 10px;
    font-size: 0.92rem;
  }

  #loginBtn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
}
