/*
 * File: public_html/public/assets/tutor/css/tutor-auth.css
 * Info: Theme-aware Tutor authentication and application page styles.
 */

.mln-tutor-auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(
      circle at top left,
      rgb(34 197 94 / 20%),
      transparent 34rem
    ),
    radial-gradient(
      circle at bottom right,
      rgb(37 99 235 / 18%),
      transparent 30rem
    ),
    var(--mln-bg);
}

.mln-tutor-auth-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  padding: 1.35rem;
  border: 1px solid var(--mln-border);
  border-radius: 1.25rem;
  background: var(--mln-bg-alt);
  box-shadow: var(--mln-shadow-card);
}

.mln-tutor-auth-card-wide {
  max-width: 560px;
}

.mln-tutor-auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.mln-tutor-auth-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.08em;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgb(255 255 255 / 36%),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #16a34a,
      var(--mln-accent)
    );
  box-shadow: var(--mln-shadow-soft);
}

.mln-tutor-auth-brand h1 {
  margin: 0;
  color: var(--mln-text);
  font-size: 1.45rem;
  font-weight: 900;
}

.mln-tutor-auth-brand p,
.mln-tutor-auth-subtitle {
  margin: 0;
  color: var(--mln-text-soft);
}

.mln-tutor-auth-subtitle {
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.mln-tutor-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mln-tutor-auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mln-tutor-auth-form label > span:first-child {
  color: var(--mln-text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mln-tutor-auth-form input,
.mln-tutor-auth-form textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid var(--mln-border);
  border-radius: 0.9rem;
  outline: none;
  background: var(--mln-bg-soft);
  color: var(--mln-text);
  font: inherit;
}

.mln-tutor-auth-form textarea {
  resize: vertical;
}

.mln-tutor-auth-form input:focus,
.mln-tutor-auth-form textarea:focus {
  border-color: var(--mln-accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
}

.mln-tutor-mobile-control {
  width: 100%;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--mln-border);
  border-radius: 0.9rem;
  background: var(--mln-bg-soft);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.mln-tutor-mobile-control:focus-within {
  border-color: var(--mln-accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
}

.mln-tutor-auth-form label .mln-tutor-mobile-prefix {
  flex: 0 0 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--mln-border);
  background: var(--mln-bg-alt);
  color: var(--mln-text);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: normal;
  text-transform: none;
}

.mln-tutor-mobile-control input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mln-tutor-mobile-control input:focus {
  border-color: transparent;
  box-shadow: none;
}

.mln-tutor-auth-help {
  display: block;
  color: var(--mln-text-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.mln-tutor-auth-submit {
  padding: 0.82rem 1rem;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      #16a34a,
      var(--mln-accent)
    );
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--mln-shadow-soft);
}

.mln-tutor-auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.mln-tutor-auth-message {
  display: none;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.mln-tutor-auth-message.is-error,
.mln-tutor-auth-message.is-ok {
  display: block;
}

.mln-tutor-auth-message.is-error {
  border: 1px solid rgb(239 68 68 / 35%);
  background: rgb(239 68 68 / 10%);
  color: #ef4444;
}

.mln-tutor-auth-message.is-ok {
  border: 1px solid rgb(34 197 94 / 35%);
  background: rgb(34 197 94 / 10%);
  color: #22c55e;
}

.mln-tutor-auth-footer {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1rem;
  color: var(--mln-text-soft);
  font-size: 0.9rem;
}

.mln-tutor-auth-footer a {
  color: var(--mln-accent);
  font-weight: 800;
  text-decoration: none;
}

.mln-tutor-auth-footer a:hover {
  text-decoration: underline;
}

.mln-tutor-theme-toggle {
  width: 38px;
  height: 38px;
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid var(--mln-border);
  border-radius: 999px;
  background: var(--mln-bg-soft);
  color: var(--mln-text);
  cursor: pointer;
}

.mln-tutor-auth-otp[hidden] {
  display: none !important;
}

.mln-tutor-auth-otp-title {
  margin: 0 0 0.35rem;
  color: var(--mln-text);
  font-size: 1.15rem;
  font-weight: 900;
}

.mln-tutor-auth-otp-copy {
  margin: 0 0 1rem;
  color: var(--mln-text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.mln-tutor-auth-otp-copy strong {
  color: var(--mln-text);
}

.mln-tutor-auth-otp-input {
  text-align: center;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.32em;
}

.mln-tutor-auth-otp-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.mln-tutor-auth-otp-meta span {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--mln-border);
  border-radius: 0.75rem;
  background: var(--mln-bg-soft);
  color: var(--mln-text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.mln-tutor-auth-otp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.mln-tutor-auth-secondary {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--mln-border);
  border-radius: 999px;
  background: var(--mln-bg-soft);
  color: var(--mln-text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.mln-tutor-auth-secondary:hover {
  border-color: var(--mln-accent);
  background: var(--mln-accent-soft);
  color: var(--mln-accent);
}

.mln-tutor-auth-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 599px) {
  .mln-tutor-auth-page {
    align-items: stretch;
    padding: 0.9rem;
  }

  .mln-tutor-auth-card,
  .mln-tutor-auth-card-wide {
    max-width: none;
  }

  .mln-tutor-auth-card {
    margin-top: 1rem;
    padding: 1rem;
  }

  .mln-tutor-auth-brand h1 {
    font-size: 1.25rem;
  }

  .mln-tutor-auth-otp-meta,
  .mln-tutor-auth-otp-actions {
    grid-template-columns: 1fr;
  }
}

/* Tablet */
@media (min-width: 600px) and (max-width: 1023px) {
  .mln-tutor-auth-card {
    max-width: 460px;
  }

  .mln-tutor-auth-card-wide {
    max-width: 560px;
  }
}

/* Desktop/Laptop */
@media (min-width: 1024px) {
  .mln-tutor-auth-card {
    max-width: 440px;
  }

  .mln-tutor-auth-card-wide {
    max-width: 560px;
  }
}