/* auth.css - login, signup and My Account pages */

.auth { display: flex; justify-content: center; padding: 20px 12px 8px; }

.auth__card {
  width: 100%;
  max-width: 440px;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid #f0e9dc;
  border-radius: 18px;
}
.auth__card--wide { max-width: 520px; }

.auth__title { margin: 0 0 6px; font-size: 24px; font-weight: 600; line-height: 1.25; color: #111; overflow-wrap: anywhere; }
.auth__sub { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--grey); }

.auth__field { display: block; margin-bottom: 14px; }
.auth__field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #333; }
.auth__input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid #e7dfd0;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 16px;                       /* 16px stops iOS zooming in on focus */
}
.auth__input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 106, 0, 0.15); }
.auth__hint { margin-top: 6px; font-size: 12px; color: #888; }

.auth__pw { position: relative; }
.auth__pw .auth__input { padding-right: 76px; }
.auth__toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
}

.auth__msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.auth__msg--error { background: #fdecec; color: #b3261e; }
.auth__msg--ok { background: #e5f2ed; color: var(--green); }
.auth__msg--info { background: #fff8f0; color: #8a4b00; }
.auth__msg[hidden] { display: none; }

.auth__btn {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.auth__btn:active { opacity: 0.85; }
.auth__btn:disabled { opacity: 0.6; cursor: default; }
.auth__btn--ghost { background: transparent; color: #b3261e; border: 1.5px solid #e7dfd0; margin-top: 26px; }
.auth__btn:focus-visible, .auth__toggle:focus-visible, .auth__alt a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.auth__alt { margin-top: 18px; text-align: center; font-size: 14px; color: var(--grey); }
.auth__alt a { color: var(--orange); font-weight: 600; text-decoration: none; }

/* My Account */
.acc__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.acc__head .auth__title { margin: 0 0 2px; }
.acc__head .auth__sub { margin: 0; font-size: 13px; }
.acc__avatar {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
}
.acc__list { list-style: none; display: grid; gap: 10px; margin: 0 0 8px; padding: 14px; background: #fff8f0; border-radius: 12px; }
.acc__list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #444; }
.acc__list b { font-weight: 600; color: #111; overflow-wrap: anywhere; text-align: right; }
.acc__h { margin: 24px 0 12px; padding-top: 20px; border-top: 1px solid #f0e9dc; font-size: 16px; font-weight: 600; color: #111; }

/* favorites */
.acc__stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f0e9dc;
  border-radius: 12px;
  color: var(--grey);
  font-size: 14px;
  text-decoration: none;
}
.acc__stat b { font-size: 22px; font-weight: 600; color: var(--orange); }
.acc__arrow { margin-left: auto; font-size: 22px; line-height: 1; color: #b5ab9b; }
.acc__stat:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* dark mode */
html[data-theme="dark"] .auth__card { background: #262422; border-color: #3a3836; }
html[data-theme="dark"] .auth__title,
html[data-theme="dark"] .acc__h,
html[data-theme="dark"] .acc__list b { color: #f5f5f5; }
html[data-theme="dark"] .auth__field > span { color: #d6d1ca; }
html[data-theme="dark"] .auth__input { background: #1b1a19; border-color: #3a3836; color: #f5f5f5; }
html[data-theme="dark"] .auth__hint { color: #8d8882; }
html[data-theme="dark"] .auth__msg--error { background: rgba(179, 38, 30, 0.2); color: #ff9c94; }
html[data-theme="dark"] .auth__msg--info { background: #3a2a1d; color: #f2b787; }
html[data-theme="dark"] .auth__msg--ok { background: rgba(0, 160, 120, 0.2); color: #5fd1ac; }
html[data-theme="dark"] .auth__btn--ghost { border-color: #3a3836; color: #ff9c94; }
html[data-theme="dark"] .acc__list { background: #2e2a26; }
html[data-theme="dark"] .acc__list li { color: #cfcac3; }
html[data-theme="dark"] .acc__h { border-top-color: #3a3836; }
html[data-theme="dark"] .acc__stat { border-color: #3a3836; }

/* desktop (also "Desktop site" mode on phones) */
@media (min-width: 900px) {
  .auth { padding: 48px 0 24px; }
  .auth__card { padding: 32px 30px; }
  .auth__btn { cursor: pointer; }
  .auth__btn:hover { opacity: 0.9; }
  .acc__stat { cursor: pointer; }
  .acc__stat:hover { border-color: var(--orange); }
  .auth__alt a:hover { text-decoration: underline; }
}
