/* ============================================================
   AGRO-SHIELD REGISTER PAGE
   ============================================================ */

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

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

body {
  background: var(--color-page, #f5f7f6);
}

/* ============================================================
   MAIN AUTH CONTAINER
   ============================================================ */

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ============================================================
   LEFT SIDE
   ============================================================ */

.auth-left {
  background: var(--color-brand, #1f7a4d);
  background-size: cover;
  background-position: center;

  color: #ffffff;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 60px;
}

.auth-left h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.1;

  margin-bottom: 20px;
}

.auth-left p {
  max-width: 600px;

  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

/* ============================================================
   RIGHT SIDE
   ============================================================ */

.auth-right {
  display: flex;
  justify-content: center;
  align-items: center;

  background: var(--color-page, #f5f7f6);

  padding: 40px 24px;
}

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

.auth-form-wrapper {
  width: 100%;
  max-width: 560px;
}

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

.auth-brand {
  display: block;

  width: auto;
  max-width: 190px;
  max-height: 70px;

  object-fit: contain;

  margin: 0 auto 20px;
}

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

.auth-right form {
  width: 100%;

  background: var(--color-surface, #ffffff);

  padding: 40px;

  border: 1px solid var(--color-border, #dbe7dc);
  border-radius: 16px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.auth-right form h2 {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;

  margin-bottom: 24px;

  color: var(--color-ink, #17231c);
}

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

.form-group {
  width: 100%;
}

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

.auth-right form label {
  display: block;

  margin-top: 18px;
  margin-bottom: 8px;

  font-weight: 700;

  color: var(--color-ink, #17231c);
}

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

.auth-right form input,
.auth-right form select {
  width: 100%;

  min-height: 48px;

  padding: 12px 14px;

  border: 1px solid var(--color-border, #dbe7dc);
  border-radius: 10px;

  background: #ffffff;

  color: var(--color-ink, #17231c);

  font-size: 16px;

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

.auth-right form input::placeholder {
  color: #8a968f;
}

.auth-right form input:focus,
.auth-right form select:focus {
  outline: none;

  border-color: var(--color-brand, #1f7a4d);

  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.1);
}

/* ============================================================
   TWO COLUMN ROW
   ============================================================ */

.auth-right form .row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 16px;
}

/* ============================================================
   ROLE SELECTOR
   ============================================================ */

.auth-right form .role-select {
  display: flex;
  flex-direction: column;

  gap: 10px;

  margin-bottom: 8px;
}

.auth-right form .role-select > label {
  margin: 0;
}

.auth-right form .role-option {
  display: flex;
  align-items: center;

  gap: 10px;

  width: 100%;

  padding: 13px 15px;

  border: 1px solid var(--color-border, #dbe7dc);
  border-radius: 10px;

  background: var(--color-surface, #ffffff);

  font-weight: 500;

  cursor: pointer;

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

.auth-right form a.role-option {
  color: inherit;
  text-decoration: none;
}

.auth-right form .learning-role-option span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-right form .learning-role-option small {
  color: #5d6d62;
  font-size: 0.85em;
  font-weight: 400;
}

.auth-right form .role-option:hover {
  border-color: var(--color-brand, #1f7a4d);

  background: var(--color-brand-soft, #eaf7ea);
}

.auth-right form .role-option:has(input:checked) {
  border-color: var(--color-brand, #1f7a4d);

  background: var(--color-brand-soft, #eaf7ea);

  box-shadow: 0 0 0 2px rgba(31, 122, 77, 0.08);
}

.auth-right form .role-option input {
  width: 18px;
  min-height: 18px;

  margin: 0;

  padding: 0;

  accent-color: var(--color-brand, #1f7a4d);

  flex-shrink: 0;
}

/* ============================================================
   PASSWORD
   ============================================================ */

.password-wrapper {
  position: relative;

  width: 100%;
}

.password-wrapper input {
  padding-right: 48px !important;
}

.toggle-password {
  position: absolute;

  right: 14px;
  top: 50%;

  transform: translateY(-50%);

  margin: 0 !important;

  color: #66756c;

  cursor: pointer;
  user-select: none;

  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--color-brand, #1f7a4d);
}

/* ============================================================
   PROFILE PICTURE
   ============================================================ */

.profile-upload {
  margin-top: 4px;
}

.profile-upload input[type="file"] {
  min-height: auto;

  padding: 10px;

  background: #fafcfb;

  cursor: pointer;
}

.profile-upload input[type="file"]::file-selector-button {
  margin-right: 12px;

  padding: 9px 14px;

  border: 0;
  border-radius: 8px;

  background: var(--color-brand, #1f7a4d);

  color: #ffffff;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

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

.profile-upload input[type="file"]::file-selector-button:hover {
  background: var(--color-brand-dark, #14532d);
}

/* ============================================================
   CREATE ACCOUNT BUTTON
   ============================================================ */

.auth-right form button[type="submit"] {
  width: 100%;

  min-height: 48px;

  margin-top: 28px;

  padding: 0 20px;

  border: 1px solid var(--color-brand, #1f7a4d);

  border-radius: 10px;

  background: var(--color-brand, #1f7a4d);

  color: #ffffff;

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(31, 122, 77, 0.16);

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

.auth-right form button[type="submit"]:hover {
  background: var(--color-brand-dark, #14532d);

  border-color: var(--color-brand-dark, #14532d);

  transform: translateY(-1px);

  box-shadow: 0 6px 16px rgba(31, 122, 77, 0.22);
}

.auth-right form button[type="submit"]:active {
  transform: translateY(0);

  box-shadow: none;
}

.auth-right form button[type="submit"]:disabled {
  opacity: 0.55;

  cursor: not-allowed;

  transform: none;

  box-shadow: none;
}

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

.auth-footer {
  margin-top: 22px;

  text-align: center;

  color: var(--color-muted, #66756c);
}

.auth-footer a {
  color: var(--color-brand, #1f7a4d);

  font-weight: 700;

  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--color-brand-dark, #14532d);

  text-decoration: underline;
}

/* ============================================================
   MESSAGES
   ============================================================ */

.message {
  margin-top: 20px;

  font-weight: 700;
}

.password-strength {
  display: block;

  margin-top: 8px;

  font-weight: 700;
}

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

@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-left {
    min-height: 260px;

    padding: 40px 32px;
  }

  .auth-right {
    padding: 32px 20px;
  }
}

/* ============================================================
   PHONE
   ============================================================ */

@media (max-width: 600px) {
  .auth-left {
    min-height: auto;

    padding: 30px 20px;
  }

  .auth-left h1 {
    font-size: 34px;

    margin-bottom: 12px;
  }

  .auth-left p {
    font-size: 16px;

    line-height: 1.6;
  }

  .auth-right {
    padding: 20px 12px;

    align-items: flex-start;
  }

  .auth-form-wrapper {
    max-width: 100%;
  }

  .auth-brand {
    max-width: 160px;
    max-height: 58px;

    margin-bottom: 16px;
  }

  .auth-right form {
    padding: 24px 18px;

    border-radius: 14px;
  }

  .auth-right form h2 {
    font-size: 28px;

    margin-bottom: 20px;
  }

  /* Stack first and last name */
  .auth-right form .row {
    grid-template-columns: 1fr;

    gap: 0;
  }

  .auth-right form label {
    margin-top: 16px;
  }

  .auth-right form input,
  .auth-right form select {
    min-height: 46px;

    font-size: 16px;
  }

  .auth-right form .role-option {
    font-size: 14px;

    line-height: 1.4;
  }

  .profile-upload input[type="file"] {
    font-size: 14px;
  }

  .profile-upload input[type="file"]::file-selector-button {
    padding: 8px 12px;
  }

  .auth-right form button[type="submit"] {
    min-height: 48px;

    margin-top: 24px;
  }
}

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

@media (max-width: 380px) {
  .auth-left {
    padding: 26px 16px;
  }

  .auth-left h1 {
    font-size: 30px;
  }

  .auth-right {
    padding: 16px 10px;
  }

  .auth-right form {
    padding: 20px 14px;
  }

  .auth-brand {
    max-width: 145px;
  }
}
/* ============================================================
   TEAMMATE CORRECTIONS - REGISTRATION PAGE
   ============================================================ */

/* 1. Remove Profile Picture field entirely */
/* .profile-upload {
    display: none !important;
} */

/* 2. Role Selector Text - Simplified */
.auth-right form .role-option {
  font-size: 15px;
  font-weight: 600;
  padding: 15px 18px;
}

/* 3. Phone number as primary - Add visual emphasis */
.auth-right form input[type="tel"] {
  border-color: var(--color-brand, #1f7a4d);
  border-width: 2px;
}

/* 4. Make the form slightly wider for better readability */
.auth-form-wrapper {
  max-width: 600px;
}

/* 5. Ensure text is always readable */
.auth-right form input,
.auth-right form select {
  color: #17231c !important;
  background: #ffffff !important;
}

/* ============================================================
   MOBILE OPTIMIZATION - REGISTER PAGE
   ============================================================ */

@media (max-width: 600px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-left {
        min-height: 180px;
        padding: 30px 20px;
    }

    .auth-left h1 {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .auth-left p {
        font-size: 14px;
        line-height: 1.6;
    }

    .auth-right {
        padding: 20px 12px;
        align-items: flex-start;
    }

    .auth-form-wrapper {
        max-width: 100%;
    }

    .auth-brand {
        max-width: 150px;
        margin-bottom: 16px;
    }

    .auth-right form {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .auth-right form h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .auth-right form .row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-right form label {
        margin-top: 16px;
    }

    .auth-right form input,
    .auth-right form select {
        min-height: 46px;
        font-size: 16px;
    }

    .auth-right form .role-option {
        font-size: 14px;
        line-height: 1.4;
    }

    .profile-upload input[type="file"] {
        font-size: 14px;
    }

    .auth-right form button[type="submit"] {
        min-height: 48px;
        margin-top: 24px;
    }
}

@media (max-width: 400px) {
    .auth-left {
        padding: 20px 15px;
    }

    .auth-left h1 {
        font-size: 26px;
    }

    .auth-left p {
        font-size: 13px;
    }

    .auth-right {
        padding: 16px 10px;
    }

    .auth-right form {
        padding: 20px 14px;
    }

    .auth-brand {
        max-width: 140px;
    }
}
