/* ── Account button (inside .top-nav) ─────────────────────────────────────── */

.account-btn {
  margin-left: auto; /* push to the right end of the nav row */
}

/* ── Dropdown (logged-in state) ────────────────────────────────────────────── */

.account-dropdown {
  position: absolute;
  z-index: 200;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e6e0dd);
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.08));
  min-width: 160px;
  max-width: calc(100vw - 16px);
  overflow: hidden;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  color: var(--text, #1a1a1a);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.dropdown-item:hover {
  background: var(--accent-light, #fde6e9);
  color: var(--accent, #c8102e);
}

/* ── Modal overlay ──────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 0.15s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--card-bg, #fff);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
  padding: 24px;
  width: 100%;
  max-width: 380px;
  position: relative;
  animation: slide-up 0.18s ease-out;
}

@keyframes slide-up {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-soft, #6b6b6b);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.1s;
}

.modal-close:hover {
  color: var(--text, #1a1a1a);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  margin: 0 0 16px;
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border, #e6e0dd);
  margin-bottom: 20px;
}

.modal-tab {
  flex: 1;
  padding: 8px 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft, #6b6b6b);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition:
    color 0.12s,
    border-color 0.12s;
}

.modal-tab:hover {
  color: var(--accent, #c8102e);
}

.modal-tab.is-active {
  color: var(--accent, #c8102e);
  border-bottom-color: var(--accent, #c8102e);
  font-weight: 600;
}

/* ── Form elements ─────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #1a1a1a);
  margin-bottom: 5px;
}

.form-group input {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  border: 1.5px solid var(--border, #e6e0dd);
  border-radius: var(--radius, 12px);
  background: var(--bg, #faf7f5);
  color: var(--text, #1a1a1a);
  outline: none;
  transition: border-color 0.12s;
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: var(--accent, #c8102e);
}

.form-group input::placeholder {
  color: var(--text-soft, #6b6b6b);
  font-size: 13px;
}

.form-error {
  font-size: 13px;
  color: var(--error, #c8102e);
  background: var(--error-bg, #fde6e9);
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 12px;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent, #c8102e);
  border: none;
  border-radius: var(--radius, 12px);
  cursor: pointer;
  transition:
    opacity 0.12s,
    background 0.12s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark, #8b0a1e);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Auth v2: forgot password / verify-OTP / reset-password additions ──────── */

.form-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--accent, #c8102e);
  text-decoration: none;
  cursor: pointer;
}

.form-link:hover {
  text-decoration: underline;
}

.modal-info {
  font-size: 13px;
  color: var(--success, #0a7a3a);
  background: #e6f4ec;
  border-radius: 8px;
  padding: 7px 12px;
  margin: 0 0 12px;
}

.otp-banner {
  background: #fff8e1;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #7a5a00;
  margin-bottom: 14px;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.otp-grid input {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  padding: 10px 0;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  letter-spacing: 2px;
}

.otp-resend {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-soft, #6b6b6b);
  text-align: center;
}

.otp-resend button {
  background: none;
  border: none;
  color: var(--accent, #c8102e);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.otp-resend button:disabled {
  color: #aaa;
  cursor: not-allowed;
}

.otp-resend .form-link {
  margin-top: 0;
}

/* ── Auth v3: pending-verify nav label + persistent top banner ─────────────── */

.account-btn.has-pending {
  background: #fff8e1;
  color: #7a5a00;
  border-color: #d4a73e;
}

.account-btn.has-pending:hover {
  background: #fff3d4;
}

.pending-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--error, #c8102e);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  animation: pending-pulse 1.5s ease-in-out infinite;
}

@keyframes pending-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.verify-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  background: #fff8e1;
  border-bottom: 1px solid #ffe0a3;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: #7a5a00;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: verify-banner-slide 0.22s ease-out;
}

@keyframes verify-banner-slide {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.verify-banner-text {
  flex: 1;
  min-width: 0;
}

.verify-banner-email {
  font-weight: 600;
  word-break: break-all;
}

.verify-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-banner {
  background: transparent;
  border: 1px solid #d4a73e;
  color: #7a5a00;
  padding: 5px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s;
}

.btn-banner:hover:not(:disabled) {
  background: #fff3d4;
}

.btn-banner:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-banner-primary {
  background: var(--accent, #c8102e);
  color: #fff;
  border-color: var(--accent, #c8102e);
}

.btn-banner-primary:hover:not(:disabled) {
  background: var(--accent-dark, #8b0a1e);
  border-color: var(--accent-dark, #8b0a1e);
}

.btn-banner-icon {
  background: transparent;
  border: none;
  color: #7a5a00;
  font-size: 20px;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
  font: inherit;
}

.btn-banner-icon:hover {
  color: #5a4200;
}

@media (max-width: 480px) {
  .verify-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .verify-banner-actions {
    justify-content: flex-end;
  }
}
