/* =========================
   AUTH PAGE
========================= */

.auth-topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.auth-page {
  min-height: calc(100vh - 90px);
  padding: 60px 24px 90px;

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

.auth-container {
  width: 100%;
  max-width: 500px;
}

.auth-topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;

  display: flex;
  align-items: center;
  position: relative;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;

  transition: opacity .2s ease;
}

.back-home svg {
  width: 22px;
  height: 22px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition: transform .2s ease;
}

.back-home:hover {
  opacity: .65;
}

.back-home:hover svg {
  transform: translateX(-4px);
}

.auth-topbar .brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}


/* =========================
   HEADING
========================= */

.auth-heading {
  margin-bottom: 36px;
  text-align: center;
}

.auth-heading .eyebrow {
  margin-bottom: 12px;
}

.auth-heading h1 {
  margin: 0;
  font-family: "JaoTomato", sans-serif;
  font-size: clamp(52px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;

  white-space: nowrap;
}

.auth-heading>p:last-child {
  max-width: 420px;
  margin: 16px auto 0;

  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}


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

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form label {
  margin: 0;

  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  padding: 0 16px;

  background: #fff;
  color: var(--ink);

  border: 1.5px solid var(--line);
  border-radius: 14px;

  font-family: inherit;
  font-size: 17px;

  outline: none;

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

.auth-form input::placeholder {
  color: #aaa;
}

.auth-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .05);
}


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

.password-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.forgot-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}


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

.auth-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;

  border-radius: 14px;

  font-size: 18px;
}

.auth-submit:hover {
  transform: translateY(-2px);
}


/* =========================
   SWITCH LOGIN / REGISTER
========================= */

.auth-switch {
  margin-top: 28px;
  text-align: center;

  color: var(--muted);
  font-size: 16px;
}

.auth-switch a {
  margin-left: 5px;

  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}


/* =========================
   SMALL DECORATION
========================= */

.auth-container::before {
  content: "✦";

  display: block;
  width: fit-content;

  margin: 0 auto 18px;

  color: var(--red);
  font-size: 22px;

  animation: auth-spark 2.4s ease-in-out infinite;
}

@keyframes auth-spark {

  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(12deg) scale(1.15);
  }
}


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

@media (max-width: 620px) {
  .auth-topbar {
    padding: 18px;
  }

  .auth-topbar .back-home span {
    display: none;
  }

  .back-home {
    gap: 0;
  }

  .auth-page {
    min-height: auto;
    padding: 40px 18px 70px;
  }

  .auth-container {
    max-width: 100%;
  }

  .auth-heading {
    margin-bottom: 30px;
  }

  .auth-heading h1 {
    font-size: clamp(42px, 12vw, 52px);
    white-space: nowrap;
  }

  .auth-heading>p:last-child {
    font-size: 17px;
  }

  .auth-form {
    gap: 18px;
  }

  .auth-form input {
    height: 52px;
    font-size: 16px;
  }

  .auth-form input::placeholder {
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    color: #aaa;
    opacity: 1;
  }

  .auth-submit {
    min-height: 52px;
    font-size: 17px;
  }

  .auth-switch {
    font-size: 15px;
  }
}

/* PASSWORD SHOW / HIDE */

.password-field {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);

  width: 28px;
  height: 28px;
  padding: 3px;

  display: grid;
  place-items: center;

  border: 0;
  background: transparent;
  color: #777;
}

.password-toggle:hover {
  color: #111;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-error {
  margin: -4px 0 0;
  color: #d92d20;
  font-size: 14px;
  line-height: 1.45;
}

.auth-submit:disabled {
  opacity: .6;
  cursor: wait;
}

.auth-success {
  margin: -4px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

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

.profile-page {
  min-height: calc(100vh - 90px);
  padding: 60px 24px 90px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.profile-container {
  width: 100%;
  max-width: 500px;
}


/* =========================
   PROFILE HEADING
========================= */

.profile-heading {
  margin-bottom: 36px;
  text-align: center;
}

.profile-heading .eyebrow {
  margin-bottom: 12px;
}

.profile-heading h1 {
  margin: 0;
  font-family: "JaoTomato", sans-serif;
  font-size: clamp(52px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.profile-heading>p:last-child {
  max-width: 420px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}


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

.profile-card {
  padding: 26px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 28px;
}

.profile-main {
  text-align: center;
}

.profile-main h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.profile-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}


/* =========================
   PROFILE INFO
========================= */

.profile-info {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.profile-info-row span {
  color: var(--muted);
  font-size: 14px;
}

.profile-info-row strong {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.profile-info-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--muted);
  border-radius: 50%;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.info-tooltip-text {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 10;
  width: max-content;
  max-width: 230px;
  padding: 8px 10px;

  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);

  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;

  box-shadow: 0 6px 18px rgba(0, 0, 0, .07);

  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none;
}

.info-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  border: 5px solid transparent;
  border-top-color: #fff;
  transform: translateX(-50%);
}

.info-tooltip:hover .info-tooltip-text,
.info-tooltip:focus .info-tooltip-text,
.info-tooltip:focus-within .info-tooltip-text {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* =========================
   PROFILE ACTIONS
========================= */

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
}

.profile-actions .btn {
  width: 100%;
  min-height: 46px;
}

.profile-actions .btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.profile-logout {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.profile-logout:hover {
  border-color: #e8b5b5;
  background: #fff7f7;
  color: var(--red);
}

.profile-actions .btn {
  width: 100%;
  min-height: 46px;
}

#edit-profile-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

#edit-profile-button:hover {
  opacity: .85;
}

#edit-profile-button.profile-cancel {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  opacity: 1;
}

#edit-profile-button.profile-cancel:hover {
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
  opacity: 1;
}

.profile-save {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.profile-save:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  opacity: .85;
}

.profile-actions .btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

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

@media (max-width: 620px) {
  .profile-page {
    min-height: auto;
    padding: 40px 18px 70px;
  }

  .profile-container {
    max-width: 100%;
  }

  .profile-heading {
    margin-bottom: 30px;
  }

  .profile-heading h1 {
    font-size: 58px;
  }

  .profile-heading>p:last-child {
    font-size: 17px;
  }

  .profile-card {
    padding: 22px 18px;
  }

  .profile-info-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .profile-info-row strong {
    text-align: left;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }
}

.profile-name-edit {
  min-width: 0;
  text-align: right;
}

.profile-name-input {
  width: 220px;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}

.profile-name-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .05);
}

@media (max-width: 620px) {
  .profile-name-edit {
    width: 100%;
    text-align: left;
  }

  .profile-name-input {
    width: 100%;
  }
}

.profile-save {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.profile-save:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  opacity: .85;
}