/* ==========================================================================
   Taxibel — Authentication screens (Devise)
   Taxibel palette: ink brand panel, green accents, Archivo.
   ========================================================================== */

html,
body {
  margin: 0;
  padding: 0;
  background: #F5F7F2;
}

.auth *,
.auth *::before,
.auth *::after {
  box-sizing: border-box;
}

.auth {
  /* Brand palette (matches app/assets/stylesheets/landing.css) */
  --cyan: #5CC93D;       /* Taxibel green */
  --cyan-light: #7AD95F;
  --cyan-dark: #3FA52A;
  --teal: #111C15;       /* Taxibel surface */
  --teal-deep: #08110C;  /* Taxibel ink */
  --teal-ink: #08110C;
  --link: #1F7A34;       /* deep green: bright green text fails on white */
  --ink: #1A1A1A;
  --body: #2B2B2B;
  --gray: #66717A;
  --gray-light: #9AA4AE;
  --gray-bg: #F5F7F2;
  --line: #E4E9ED;
  --white: #FFFFFF;
  --danger: #C4342B;
  --danger-bg: #FDECEA;
  --danger-line: #F3C3BF;
  --success: #12805C;
  --success-bg: #E6F6F0;
  --success-line: #B9E4D5;

  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--body);
  line-height: 1.55;
  background: var(--gray-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Brand panel (desktop only) ============================================ */

.auth__brand {
  display: none;
  position: relative;
  overflow: hidden;
  padding: 56px 56px 48px;
  background: radial-gradient(120% 90% at 85% 10%, rgba(92, 201, 61, 0.16), rgba(92, 201, 61, 0) 55%), linear-gradient(160deg, var(--teal) 0%, var(--teal-deep) 60%, #050608 100%);
  color: var(--white);
  flex-direction: column;
  justify-content: space-between;
}

.auth__brand::before,
.auth__brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth__brand::before {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -160px;
  background: radial-gradient(circle, rgba(92, 201, 61, 0.38) 0%, rgba(92, 201, 61, 0) 68%);
}

.auth__brand::after {
  width: 520px;
  height: 520px;
  bottom: -240px;
  left: -180px;
  background: radial-gradient(circle, rgba(122, 217, 95, 0.20) 0%, rgba(122, 217, 95, 0) 70%);
}

.auth__brand-inner {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.auth__headline {
  margin: 40px 0 16px;
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.auth__headline em {
  font-style: normal;
  color: var(--cyan-light);
}

.auth__lede {
  margin: 0 0 36px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.76);
}

.auth__features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.auth__features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth__features svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 4px;
  border-radius: 50%;
  background: rgba(92, 201, 61, 0.22);
  fill: var(--cyan-light);
}

.auth__brand-foot {
  position: relative;
  z-index: 1;
  margin-top: 48px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* === Form panel ============================================================ */

.auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card__head {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--teal-ink);
}

.auth-card__subtitle {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--gray);
}

.auth-card__body {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px;
  box-shadow: 0 18px 44px -28px rgba(8, 17, 12, 0.42);
}

.auth-card__foot {
  margin-top: 22px;
  text-align: center;
}

/* === Logo ================================================================== */

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cyan);
  box-shadow: 0 8px 20px -6px rgba(92, 201, 61, 0.45);
}

.auth-logo svg {
  width: 100%;
  height: 100%;
}

.auth-logo--lg {
  width: 84px;
  height: 84px;
}

.auth-card__head .auth-logo {
  margin-bottom: 18px;
}

/* === Fields ================================================================ */

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-ink);
}

.auth-field__hint {
  font-weight: 400;
  color: var(--gray-light);
}

.auth-field input[type="email"],
.auth-field input[type="text"],
.auth-field input[type="password"] {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: #FAFBF8;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-field input::placeholder {
  color: #A9B3BB;
}

.auth-field input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(92, 201, 61, 0.16);
}

.auth-field--password {
  position: relative;
}

.auth-field--password input {
  padding-right: 50px;
}

.auth-reveal {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gray-light);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.auth-reveal:hover {
  color: var(--link);
  background: rgba(92, 201, 61, 0.10);
}

.auth-reveal svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.auth-reveal__off { display: none; }
.auth-reveal.is-visible .auth-reveal__on { display: none; }
.auth-reveal.is-visible .auth-reveal__off { display: block; }

/* === Checkbox ============================================================== */

.auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  color: var(--body);
}

.auth-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.auth-check label {
  cursor: pointer;
}

/* === Buttons =============================================================== */

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 13px 24px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--teal-ink);
  background: var(--cyan);
  border: 2px solid var(--cyan);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.08s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-btn:hover {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  box-shadow: 0 10px 22px -12px rgba(31, 122, 52, 0.9);
}

.auth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(92, 201, 61, 0.28);
}

.auth-btn:active {
  transform: translateY(1px);
}

.auth-btn--ghost {
  color: var(--link);
  background: transparent;
  border-color: var(--line);
}

.auth-btn--ghost:hover {
  background: var(--gray-bg);
  border-color: #CFD8DE;
  box-shadow: none;
}

.auth-btn--danger {
  color: var(--danger);
  background: transparent;
  border-color: var(--danger-line);
}

.auth-btn--danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  box-shadow: none;
}

/* === Links ================================================================= */

.auth-links {
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
  text-align: center;
}

.auth-links a,
.auth-link {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover,
.auth-link:hover {
  color: var(--link);
  text-decoration: underline;
}

.auth-links form {
  margin: 0;
}

/* === Alerts & errors ======================================================= */

.auth-alert {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.88rem;
}

.auth-alert svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: currentColor;
}

.auth-alert p,
.auth-alert ul {
  margin: 0;
}

.auth-alert--error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.auth-alert--success {
  color: var(--success);
  background: var(--success-bg);
  border-color: var(--success-line);
}

.auth-alert__title {
  font-weight: 600;
  margin-bottom: 4px !important;
}

.auth-alert ul {
  padding-left: 17px;
  list-style: disc;
}

.auth-alert li + li {
  margin-top: 3px;
}

/* === Standalone status screen (password reset done) ======================== */

.auth-status {
  text-align: center;
}

.auth-status__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--success-bg);
}

.auth-status__icon svg {
  width: 38px;
  height: 38px;
  fill: var(--success);
}

.auth-status p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--gray);
}

/* === Section divider & dev quick login ===================================== */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-light);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-quick {
  display: grid;
  gap: 8px;
}

.auth-quick__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  color: var(--teal-ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.auth-quick__btn:hover {
  background: var(--gray-bg);
  border-color: var(--cyan);
}

.auth-quick__btn strong {
  font-weight: 600;
}

.auth-quick__btn span {
  color: var(--gray-light);
  font-size: 0.78rem;
}

/* === Misc ================================================================== */

.auth-note {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--gray-light);
  text-align: center;
}

.auth-section-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-ink);
}

.auth-section-text {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--gray);
}

.auth-pending {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(92, 201, 61, 0.09);
  font-size: 0.84rem;
  color: var(--link);
}

/* === Responsive ============================================================ */

@media (min-width: 960px) {
  .auth {
    grid-template-columns: 1.05fr 1fr;
  }

  .auth__brand {
    display: flex;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
  }

  .auth__main {
    padding: 48px 40px;
    background: var(--white);
  }

  .auth-card__body {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-card__head .auth-logo,
  .auth-status .auth-logo {
    display: none;
  }

  .auth-status__logo-row {
    display: none;
  }

  .auth-card__head {
    text-align: left;
  }

  .auth-card__title {
    font-size: 1.85rem;
  }

  .auth-links {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .auth-card__body {
    padding: 24px 20px;
  }
}


/* === Taxibel wordmark ======================================================= */
.auth-logo {
  width: auto;
  height: auto;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--teal-deep);
  box-shadow: none;
  gap: 7px;
}
.auth-logo--lg { padding: 0; background: transparent; }
.auth-logo .auth-logo__mark { flex: none; display: block; width: 23px; height: 28px; }
.auth-logo--lg .auth-logo__mark { width: 32px; height: 39px; }
.auth-logo__text { font: italic 900 24px/1 'Archivo', sans-serif; font-stretch: 112%; letter-spacing: -0.02em; color: #F2F5EF; }
.auth-logo__text span { color: var(--cyan); }
.auth-logo--lg .auth-logo__text { font-size: 34px; }
