/* THEVORA — AUTH PAGE (login / register / change password) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: #fff7f6;
  color: #392b31;
  font-family: system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
}

/* change-password page has a header — reset body centering for it */
body:has(.auth-header) {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
}

/* -------------------------
   CARD
------------------------- */

.auth-container {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #f0dce1;
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: 0 4px 32px rgba(115, 52, 72, 0.08);
}

/* -------------------------
   LOGO
------------------------- */

.logo {
  display: block;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #a84f6a;
  text-decoration: none;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.logo:hover { opacity: 0.85; }

/* -------------------------
   HEADING
------------------------- */

h1 {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 800;
  color: #392b31;
  text-align: center;
  margin-bottom: 4px;
}

#form-description {
  font-size: 13px;
  color: #786970;
  text-align: center;
  margin-bottom: 20px;
}

/* -------------------------
   TABS
------------------------- */

.tabs {
  display: flex;
  border: 1px solid #f0dce1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #786970;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tabs button.active {
  background: #a84f6a;
  color: #fff;
}

.tabs button:not(.active):hover {
  background: #fff0f3;
  color: #a84f6a;
}

/* -------------------------
   MESSAGE
------------------------- */

#message {
  font-size: 13px;
  color: #c0392b;
  background: #fff5f5;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: none;
  line-height: 1.5;
}

#message:not(:empty) { display: block; }

#message.success {
  color: #1a7a4a;
  background: #edfaf3;
  border-color: #b7e8cf;
}

/* -------------------------
   FORM
------------------------- */

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #392b31;
}

#auth-form label[hidden] {
  display: none !important;
}

#auth-form input {
  padding: 11px 14px;
  border: 1.5px solid #f0dce1;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #392b31;
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
}

#auth-form input:focus {
  border-color: #a84f6a;
}

#auth-form input::placeholder {
  color: #c0a8b0;
}

/* -------------------------
   CAPTCHA
------------------------- */

.captcha-box {
  background: #fff7f6;
  border: 1px solid #f0dce1;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.captcha-box p {
  font-size: 13px;
  color: #786970;
}

.captcha-box strong {
  color: #392b31;
}

.captcha-box input {
  padding: 9px 12px;
  border: 1.5px solid #f0dce1;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: #392b31;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.captcha-box input:focus {
  border-color: #a84f6a;
}

#refresh-captcha {
  align-self: flex-start;
  background: none;
  border: none;
  color: #a84f6a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* -------------------------
   SUBMIT BUTTON
------------------------- */

#submit-button,
#cp-submit {
  width: 100%;
  min-height: 46px;
  padding: 12px 20px;
  background: #a84f6a;
  color: #fff;
  border: none;
  border-radius: 11px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}

#submit-button:hover,
#cp-submit:hover { opacity: 0.88; }
#submit-button:disabled,
#cp-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* -------------------------
   FORGOT PASSWORD LINK
------------------------- */

.forgot-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #786970;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  margin-top: 12px;
  text-decoration: underline;
  padding: 0;
}

.forgot-link:hover { color: #a84f6a; }

/* -------------------------
   RESPONSIVE
------------------------- */

@media (max-width: 480px) {
  .auth-container {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }
}
#cp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

#cp-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #392b31;
}

#cp-form input {
  padding: 11px 14px;
  border: 1.5px solid #f0dce1;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #392b31;
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
}

#cp-form input:focus {
  border-color: #a84f6a;
}

#cp-form input::placeholder {
  color: #c0a8b0;
}
/* -------------------------
   AUTH HEADER (change-password)
------------------------- */

.auth-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #f0dce1;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.auth-back-btn {
  background: none;
  border: none;
  color: #a84f6a;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
  flex-shrink: 0;
}

.auth-back-btn:hover { opacity: 0.75; }

.auth-header-logo {
  font-size: 18px;
  font-weight: 900;
  color: #a84f6a;
  letter-spacing: -0.5px;
  text-decoration: none;
}

/* center the form card below the header */
body:has(.auth-header) .auth-container {
  margin: auto;
  margin-top: 40px;
  margin-bottom: 48px;
}

@media (max-width: 480px) {
  body:has(.auth-header) .auth-container {
    margin-top: 24px;
    margin-bottom: 32px;
  }
}