/* login.css
   Modern redesign for the login page
   Keeps all existing IDs, names, action, and JS hooks intact
*/

/* ===== Theme variables ===== */
:root {
  --accent: #ff8a5b;
  --accent-2: #ff6b3d;
  --accent-dark: #ef5a2a;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(255, 255, 255, 0.28);
  --card-bg: rgba(255, 255, 255, 0.9);
  --overlay: rgba(10, 15, 28, 0.62);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
  --radius: 24px;
}

/* ===== Page base ===== */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  background: #0f172a;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Full-page background ===== */
#loginFormContainer {
  min-height: 100vh;
  background-image: url(../assets/hero.png);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

#loginFormOverlay {
  min-height: 100vh;
  background: linear-gradient(
      135deg,
      rgba(9, 13, 24, 0.78),
      rgba(44, 48, 70, 0.62)
    ),
    var(--overlay);
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
header {
  position: relative;
  z-index: 2;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  user-select: none;
}

.logo-img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 30px rgba(239, 90, 42, 0.35);
}

.logo-text {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.logo-text span {
  color: #ffd7c8;
}

/* ===== Center the form ===== */
main.form-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 46px;
  max-width: 100%;
}

/* ===== Form card ===== */
#loginForm {
  width: 100%;
  max-width: 470px;
  padding: 36px 32px 30px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

#loginForm::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2),
    var(--accent-dark)
  );
}

/* ===== Typography ===== */
#loginForm h2 {
  margin: 10px 0 18px;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

#loginForm p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

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

#loginForm p a:hover {
  text-decoration: underline;
}

/* ===== Fields ===== */
#loginForm label {
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

#loginForm input[type="email"],
#loginForm input[type="password"] {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border-radius: 14px;
  border: 1.5px solid rgba(226, 232, 240, 1);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease, background 0.18s ease;
}

#loginForm input[type="email"]::placeholder,
#loginForm input[type="password"]::placeholder {
  color: #94a3b8;
}

#loginForm input[type="email"]:focus,
#loginForm input[type="password"]:focus {
  border-color: rgba(255, 122, 78, 0.95);
  box-shadow: 0 0 0 5px rgba(255, 138, 91, 0.18);
  background: #fff;
  transform: translateY(-1px);
}

#loginForm input:-webkit-autofill,
#loginForm input:-webkit-autofill:hover,
#loginForm input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* ===== Forgot password area ===== */
#loginForm > div[style*="text-align: right"] {
  margin-top: 10px !important;
  text-align: right !important;
}

#loginForm > div[style*="text-align: right"] a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  font-weight: 600;
}

#loginForm > div[style*="text-align: right"] a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ===== Button ===== */
#loginBtn,
button#loginBtn {
  width: 100%;
  height: 52px;
  margin-top: 18px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 30px rgba(239, 90, 42, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#loginBtn:hover,
button#loginBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(239, 90, 42, 0.32);
  filter: brightness(1.02);
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  header nav {
    padding: 16px 0;
  }

  #loginForm {
    padding: 28px 22px 24px;
    border-radius: 20px;
  }

  #loginForm h2 {
    font-size: 1.65rem;
  }

  #loginForm input[type="email"],
  #loginForm input[type="password"],
  #loginBtn,
  button#loginBtn {
    height: 50px;
    border-radius: 12px;
  }
}

@media (max-width: 420px) {
  main.form-section {
    padding: 18px 12px 30px;
  }

  #loginForm {
    padding: 24px 18px 20px;
  }

  .logo-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .logo-text {
    font-size: 0.98rem;
  }
}
