/* =========================================================
   AUTH — LOGIN / SIGNUP
   Single-font responsive auth styling
   ========================================================= */

:root {
  --primary-color: #007bff;
  --accent-color: #0056b3;

  --text-color: #1f2937;
  --text-muted: #6b7280;

  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #d1d5db;

  --border-radius: 14px;

  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.12);

  --font-family: "Inter", sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}


/* =========================================================
   BODY
   ========================================================= */

body {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px 24px;

  background: linear-gradient(
    135deg,
    #fafafa 0%,
    #e6f0ff 100%
  );

  color: var(--text-color);

  font-family: var(--font-family);
  font-size: 16px;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.login-container {
  width: 100%;
  max-width: 560px;
}


/* =========================================================
   CARD
   ========================================================= */

.login-card {
  width: 100%;

  padding: 48px 44px;

  background: var(--card-bg);

  border-radius: var(--border-radius);

  box-shadow: var(--shadow-card);

  text-align: center;
}


/* =========================
   AUTH SWITCH
========================= */

.auth-switch {
  margin-top: 20px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

.auth-switch a {
  color: var(--primary-color, #2563eb);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-switch a:hover {
  color: var(--accent-color, #0056b3);
}


/* =========================================================
   LOGO
   ========================================================= */

.login-logo {
  display: block;

  width: 88px;
  max-width: 100%;

  height: auto;

  margin: 0 auto 28px;
}


/* =========================================================
   ERROR / SUCCESS / WARNING MESSAGES
   ========================================================= */

.error-message-box {
  width: 100%;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff5f5, #ffffff);
  border: 1px solid rgba(217, 48, 37, 0.25);
  border-left: 5px solid #d93025;
  color: #b3261e;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  animation: authErrorFadeIn 0.2s ease-in-out;
}

/* Error icon space 
.error-message-box::before {
  content: "";
  flex: 0 0 auto;
}
*/

/* =========================================================
   WARNING
   ========================================================= */

.warning-alert {
  background: linear-gradient(135deg, #fffaf0, #ffffff);
  border: 1px solid #fde68a;
  border-left-color: #f59e0b;
  color: #92400e;
}


/* =========================================================
   SUCCESS
   ========================================================= */

.success-alert {
  background: linear-gradient(135deg, #f0fdf4, #ffffff) !important;
  border: 1px solid #bbf7d0 !important;
  border-left: 5px solid #22c55e !important;
  color: #166534 !important;
}


/* =========================================================
   ERROR ANIMATION
   ========================================================= */

@keyframes authErrorFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   HEADINGS
   ========================================================= */

.login-card h2 {
  margin-bottom: 8px;

  color: var(--text-color);

  font-family: var(--font-family);

  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.2;

  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card > p {
  margin-bottom: 28px;

  color: var(--text-muted);

  font-family: var(--font-family);

  font-size: 16px;
  line-height: 1.5;
}


/* =========================================================
   FORM
   ========================================================= */

form {
  display: flex;
  flex-direction: column;

  gap: 14px;

  width: 100%;

  text-align: left;
}


/* =========================================================
   FORM ROW
   ========================================================= */

.form-row {
  display: flex;

  width: 100%;

  gap: 16px;
}

.form-group {
  flex: 1;

  min-width: 0;

  display: flex;
  flex-direction: column;
}


/* =========================================================
   LABELS
   ========================================================= */

label {
  display: block;

  margin-top: 4px;
  margin-bottom: 6px;

  color: #374151;

  font-family: var(--font-family);

  font-size: 14px;
  line-height: 1.4;

  font-weight: 600;
}


/* =========================================================
   INPUTS / SELECT
   ========================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;

  min-height: 50px;

  padding: 13px 15px;

  border: 1px solid var(--input-border);

  border-radius: 8px;

  background: var(--input-bg);

  color: var(--text-color);

  font-family: var(--font-family);

  font-size: 16px;
  line-height: 1.4;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

input::placeholder {
  color: #9ca3af;
}


/* =========================================================
   FOCUS
   ========================================================= */

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;

  border-color: var(--primary-color);

  box-shadow:
    0 0 0 4px rgba(0, 123, 255, 0.14);
}


/* =========================================================
   SELECT
   ========================================================= */

select {
  cursor: pointer;

  padding-right: 42px;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");

  background-repeat: no-repeat;

  background-position:
    calc(100% - 14px) center;
}

select:invalid,
select option[value=""] {
  color: #9ca3af;
}


/* =========================================================
   BUTTON
   ========================================================= */

button[type="submit"] {
  width: 100%;

  min-height: 52px;

  margin-top: 10px;

  padding: 13px 18px;

  border: none;

  border-radius: 8px;

  background: var(--primary-color);

  color: #ffffff;

  font-family: var(--font-family);

  font-size: 16px;
  line-height: 1.4;

  font-weight: 600;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

button[type="submit"]:hover {
  background: var(--accent-color);
}

button[type="submit"]:active {
  transform: translateY(1px);
}


/* =========================================================
   TERMS CHECKBOX
   ========================================================= */

.terms-check {
  display: flex;

  align-items: flex-start;

  gap: 10px;

  margin-top: 4px;

  color: #4b5563;

  font-family: var(--font-family);

  font-size: 14px;

  line-height: 1.5;

  font-weight: 400;

  cursor: pointer;
}

.terms-check input[type="checkbox"] {
  flex: 0 0 auto;

  width: 18px;
  height: 18px;

  margin-top: 2px;

  cursor: pointer;

  appearance: checkbox;
  -webkit-appearance: checkbox;
}

.terms-check a {
  color: var(--primary-color);

  font-weight: 600;

  text-decoration: none;
}

.terms-check a:hover {
  text-decoration: underline;
}


/* =========================================================
   LINKS / FOOTER TEXT
   ========================================================= */

.login-card .forgot-link {
  display: inline-block;

  margin-top: 22px;

  color: var(--primary-color);

  font-family: var(--font-family);

  font-size: 14px;

  font-weight: 600;

  text-decoration: none;
}

.login-card .forgot-link:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 24px !important;
  margin-bottom: 0 !important;

  color: var(--text-muted);

  font-family: var(--font-family);

  font-size: 14px;

  line-height: 1.5;
}

.auth-footer a {
  color: var(--primary-color);

  font-weight: 600;

  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {

  body {
    padding: 60px 32px;
  }

  .login-container {
    max-width: 620px;
  }

  .login-card {
    padding: 56px 52px;
  }

  .login-logo {
    width: 96px;
    margin-bottom: 30px;
  }

  .login-card h2 {
    font-size: 34px;
  }

  .login-card > p {
    font-size: 17px;
  }

  label {
    font-size: 15px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  select {
    min-height: 54px;
    font-size: 17px;
    padding: 14px 16px;
  }

  button[type="submit"] {
    min-height: 56px;
    font-size: 17px;
  }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 700px) {

  body {
    padding: 30px 18px;
  }

  .login-card {
    padding: 38px 28px;
  }

  .form-row {
    gap: 12px;
  }

  .error-message-box {
    font-size: 15px;
    padding: 16px 18px;
    margin-bottom: 22px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

  body {
    align-items: center;
    padding: 16px 12px; /* Adds comfortable breathing room around the edges */
  }

  .login-container {
    max-width: 100%;
    padding: 0 8px; /* Keeps the card from touching phone borders */
  }

  .login-card {
    padding: 24px 18px; /* Slimmer padding so it fits compact screens naturally */
  }

  .login-logo {
    width: 64px;
    margin-bottom: 16px;
  }

  .login-card h2 {
    font-size: 22px;
  }

  .login-card > p {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  label {
    font-size: 13px;
    margin-bottom: 4px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  select {
    min-height: 42px; /* Slightly more compact height for mobile */
    padding: 10px 12px;
    font-size: 14px;
  }

  button[type="submit"] {
    min-height: 44px;
    font-size: 14px;
    margin-top: 6px;
  }

  .terms-check {
    font-size: 12px;
  }

  .login-card .forgot-link {
    font-size: 13px;
    margin-top: 16px;
  }

  .auth-footer {
    font-size: 13px;
    margin-top: 18px !important;
  }

  .error-message-box {
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: 12px;
  }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

  body {
    padding: 12px 6px;
  }

  .login-container {
    padding: 0 4px;
  }

  .login-card {
    padding: 20px 14px;
  }

  .login-card h2 {
    font-size: 20px;
  }
}
