/* ── AUTH MODAL & HEADER USER STATE ─────────────────────────────
   Append to assets/css/style.css
   All classes prefixed auth- — no conflicts
   ─────────────────────────────────────────────────────────────── */

/* Header user state */
.auth-user-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green, #2d6a4f);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--black, #1a1a1a);
}

.auth-logout-btn {
  background: transparent;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.auth-logout-btn:hover {
  border-color: #d62828;
  color: #d62828;
}

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

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

/* ── MODAL ── */
.auth-modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  animation: auth-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes auth-pop {
  from {
    transform: scale(0.92) translateY(16px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Close */
.auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.auth-close:hover {
  color: #333;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f4f4f4;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

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

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

/* Headings */
.auth-heading {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 900;
  color: #1b4332;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.auth-sub {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
}

/* Google button */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-google-btn:hover {
  border-color: #aaa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: #ccc;
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

/* Form fields */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  position: relative;
}

.auth-field label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-field input {
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.auth-field input:focus {
  border-color: #2d6a4f;
  background: #fff;
}

/* Forgot password */
.auth-forgot {
  background: none;
  border: none;
  font-size: 12px;
  color: #2d6a4f;
  cursor: pointer;
  text-align: right;
  padding: 0;
  margin-top: 4px;
  align-self: flex-end;
  text-decoration: underline;
}

/* Error message */
.auth-error {
  font-size: 13px;
  color: #c0392b;
  min-height: 18px;
  margin-bottom: 10px;
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  background: #1b4332;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  font-family: inherit;
  margin-bottom: 14px;
}
.auth-submit-btn:hover {
  background: #2d6a4f;
  transform: translateY(-1px);
}

/* Switch tab text */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: #888;
}
.auth-switch button {
  background: none;
  border: none;
  color: #2d6a4f;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}

/* Loading panel */
.auth-loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  text-align: center;
  color: #555;
  font-size: 14px;
}

.auth-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #2d6a4f;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .auth-modal {
    padding: 28px 22px;
    margin: 0 16px;
  }
}
