/* -----------------------------------
   AUTH MODAL OVERLAY
----------------------------------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* -----------------------------------
   AUTH MODAL CARD
----------------------------------- */
.auth-modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: min(92vw, 400px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  position: relative;
}

.auth-overlay.visible .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.dark-mode .auth-modal {
  background: #1a1a2e;
  color: #eee;
}

/* -----------------------------------
   MODAL HEADER
----------------------------------- */
.auth-modal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-modal-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.auth-modal-logo span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-modal h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.auth-modal .auth-subtitle {
  font-size: 14px;
  opacity: 0.6;
  margin: 0 0 28px;
}

/* -----------------------------------
   TABS (Login / Sign Up)
----------------------------------- */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-radius: 10px;
  background: #f0f0f0;
  padding: 3px;
}

body.dark-mode .auth-tabs {
  background: #2a2a2a;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #888;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: #fff;
  color: #222;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

body.dark-mode .auth-tab.active {
  background: #333;
  color: #fff;
}

/* -----------------------------------
   FORM FIELDS
----------------------------------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
}

.auth-field input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  font-size: 15px;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

.auth-field input:focus {
  border-color: #abdbfd;
  box-shadow: 0 0 0 3px rgba(171, 219, 253, 0.3);
}

body.dark-mode .auth-field input {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}

body.dark-mode .auth-field input:focus {
  border-color: #abdbfd;
  box-shadow: 0 0 0 3px rgba(171, 219, 253, 0.15);
}

/* -----------------------------------
   AUTH ERROR / SUCCESS MESSAGES
----------------------------------- */
.auth-message {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}

.auth-message.error {
  background: #ffeaea;
  color: #c0392b;
  display: block;
}

.auth-message.success {
  background: #eafaf1;
  color: #1e8449;
  display: block;
}

body.dark-mode .auth-message.error {
  background: #3b1a1a;
  color: #ff8a80;
}

body.dark-mode .auth-message.success {
  background: #1a3b27;
  color: #69f0ae;
}

/* -----------------------------------
   SUBMIT BUTTON
----------------------------------- */
.auth-submit-btn {
  margin-top: 4px;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: #abdbfd;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
}

.auth-submit-btn:hover {
  background: #88ccf7;
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* -----------------------------------
   FORGOT PASSWORD LINK
----------------------------------- */
.auth-forgot {
  text-align: right;
  margin-top: -6px;
}

.auth-forgot button {
  background: none;
  border: none;
  font-size: 12px;
  color: #4a90e2;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.auth-forgot button:hover {
  text-decoration: underline;
}

/* -----------------------------------
   CLOSE BUTTON
----------------------------------- */
.auth-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 0;
}

.auth-close:hover {
  color: #333;
}

body.dark-mode .auth-close:hover {
  color: #eee;
}

/* -----------------------------------
   DIVIDER
----------------------------------- */
.auth-divider {
  text-align: center;
  margin: 6px 0;
  font-size: 12px;
  opacity: 0.45;
  position: relative;
}

/* -----------------------------------
   RESET PASSWORD PAGE (update-password.html)
----------------------------------- */
.reset-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #fafafa;
}

body.dark-mode .reset-page {
  background: #121212;
}

.reset-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  width: min(92vw, 400px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  text-align: center;
}

body.dark-mode .reset-card {
  background: #1a1a2e;
  color: #eee;
}

.reset-card .reset-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.reset-card .reset-logo img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.reset-card .reset-logo span {
  font-size: 24px;
  font-weight: 700;
}

.reset-card h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.reset-card p {
  font-size: 14px;
  opacity: 0.65;
  margin: 0 0 28px;
}

.reset-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.reset-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reset-field label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
}

.reset-field input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  font-size: 15px;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

.reset-field input:focus {
  border-color: #abdbfd;
  box-shadow: 0 0 0 3px rgba(171, 219, 253, 0.3);
}

body.dark-mode .reset-field input {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}

.reset-submit-btn {
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: #abdbfd;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  margin-top: 4px;
}

.reset-submit-btn:hover {
  background: #88ccf7;
}

.reset-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.reset-message {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
  text-align: center;
}

.reset-message.error {
  background: #ffeaea;
  color: #c0392b;
  display: block;
}

.reset-message.success {
  background: #eafaf1;
  color: #1e8449;
  display: block;
}

.reset-back-link {
  margin-top: 20px;
  font-size: 13px;
}

.reset-back-link a {
  color: #4a90e2;
  text-decoration: none;
}

.reset-back-link a:hover {
  text-decoration: underline;
}
