/* ============================================================
   Maqar · app · authentication pages
   Small additions layered on top of the shared Maqar styles.css.
   Same palette, same type, no new colours introduced.
   ============================================================ */

.auth {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ivory);
  padding-top: clamp(7rem, 14vh, 9rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
}
.auth__inner {
  width: min(100% - 3rem, 30rem);
  margin-inline: auto;
}

.auth__head { text-align: center; margin-bottom: clamp(2rem, 5vh, 2.8rem); }
.auth__eyebrow { margin-bottom: 1rem; }   /* uses .label */
.auth__title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0;
}
.auth__sub {
  margin: 1rem auto 0;
  max-width: 32ch;
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-soft);
}
/* Balance the English lines so no single short word is stranded ("here.").
   Arabic already wraps cleanly and is left untouched. */
html[lang="en"] .auth__sub { text-wrap: balance; }

/* fields */
.field { margin-top: 1.5rem; }
.field__label {
  display: block;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.66rem;
  color: var(--bronze);
  margin-bottom: 0.6rem;
}
.field__input {
  width: 100%;
  padding: 0.95rem 1.05rem;
  background: var(--ivory-soft);
  border: 1px solid rgba(160, 124, 82, 0.34);
  border-radius: 2px;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.4s var(--ease);
}
.field__input::placeholder { color: rgba(106, 90, 75, 0.5); }
.field__input:focus { outline: none; border-color: var(--bronze); }

/* The country selector wears the same quiet bordered field as the inputs, with
   the native control chrome removed and one soft bronze chevron drawn in. */
.field__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-inline-end: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23a07c52' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.05rem center;
}
html[lang="ar"] .field__select { background-position: left 1.05rem center; }
.field__hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-soft);
}

/* show / hide password toggle: a quiet bronze word at the field's trailing edge.
   Passwords are always dir="ltr", so the toggle and the reserved padding both sit
   at the physical right, in either page language. */
.field__pw { position: relative; }
.field__pw .field__input { padding-right: 3.9rem; }
.field__pw-toggle {
  position: absolute;
  right: 0.9rem;
  top: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--bronze);
  transition: color 0.35s var(--ease);
}
.field__pw-toggle:hover { color: var(--ink); }
.field__pw-toggle:focus-visible { outline: 1px solid var(--bronze); outline-offset: 2px; }

/* primary action */
.auth__submit {
  width: 100%;
  margin-top: 2rem;
  padding: 1.05rem 1.5rem;
  border: 1px solid rgba(53, 41, 31, 0.34);
  background: transparent;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), opacity 0.4s var(--ease);
}
.auth__submit:hover { background: var(--ivory-soft); border-color: var(--ink); }
.auth__submit:disabled { opacity: 0.5; cursor: default; }

/* quiet link to the other page */
.auth__alt {
  margin: 1.8rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-soft);
}
.auth__alt a {
  color: var(--bronze);
  border-bottom: 1px solid var(--bronze-soft);
  padding-bottom: 1px;
  transition: color 0.4s var(--ease);
}
.auth__alt a:hover { color: var(--ink); }

/* quiet "forgot your password" link under the password field */
.auth__forgot {
  margin: 0.7rem 0 0;
  text-align: end;
  font-size: 0.82rem;
  font-weight: 300;
}
.auth__forgot a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--bronze-soft);
  padding-bottom: 1px;
  transition: color 0.4s var(--ease);
}
.auth__forgot a:hover { color: var(--ink); }

/* calm message area (errors and confirmations), no harsh colours */
.auth__msg {
  margin-top: 1.6rem;
  padding: 0.95rem 1.1rem;
  border-inline-start: 2px solid var(--bronze-soft);
  background: rgba(160, 124, 82, 0.08);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink);
  display: none;
}
.auth__msg.is-shown { display: block; }
.auth__msg--ok { border-inline-start-color: var(--bronze); }

/* slim footer mark */
.auth__foot {
  text-align: center;
  padding: 2.4rem 1.5rem 2.8rem;
  color: var(--ink-soft);
}
.auth__foot .serif { font-size: 1.05rem; color: var(--ink); letter-spacing: 0.02em; }

/* Arabic spacing softening */
html[lang="ar"] .field__label { letter-spacing: 0.06em; }
html[lang="ar"] .auth__submit { letter-spacing: 0.1em; }

/* ============================================================
   THE PHONE
   ------------------------------------------------------------
   Mobile is the main case. The account pages are already simple and
   centred, so nothing here changes the design: the type, the palette
   and the quiet are untouched. Only two things change. The page stops
   sitting so tight to the edges, and the two small text links get a
   thumb sized tap area WITHOUT moving or growing, by way of an
   invisible halo around them. A member signs in one handed, at night.
   ============================================================ */
@media (max-width: 30rem) {
  .auth { padding-inline: 1.4rem; }

  /* the halo: the link looks identical, the thumb finds it anyway */
  .auth__forgot a,
  .auth__alt a { position: relative; }
  .auth__forgot a::after,
  .auth__alt a::after {
    content: "";
    position: absolute;
    inset: -1rem -0.75rem;                   /* 18px tall link -> ~48px of thumb */
  }
}
