/* ============================================
   Auth Modal & Auth Indicator
   JARGAN SPA — Dark-first, responsive, accessible
   Brand: #DD5100 (Traffic Orange) — animation philosophy: ease-out, organic, <300ms
   ============================================ */

/* ---- Animations ---- */

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes authScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Logo: subtle spring entrance — pops in with slight overshoot */
@keyframes authLogoEntrance {
  0%   { opacity: 0; transform: scale(0.75); }
  65%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

/* Auth indicator: slides in from right when user authenticates */
@keyframes authIndicatorSlideIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes authErrorSlideIn {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; padding-top: 0; padding-bottom: 0; }
  to { opacity: 1; transform: translateY(0); max-height: 120px; padding-top: 8px; padding-bottom: 8px; }
}

@keyframes authSpinner {
  to { transform: rotate(360deg); }
}

/* ---- Overlay ---- */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: authFadeIn 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
  padding: 16px;
  overflow-y: auto;
}

/* ---- Modal Content ---- */

.auth-modal-content {
  background: #1a1a1a;
  border: 2px solid #DD5100;
  border-radius: 8px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: authScaleIn 250ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ---- Header ---- */

.auth-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 12px;
  /* Brand logo springs in after the modal card settles */
  animation: authLogoEntrance 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 120ms;
  transition: transform 200ms ease;
}

.auth-logo:hover {
  transform: scale(1.06);
}

.auth-modal-header h2 {
  font-size: 28px;
  color: #DD5100;
  margin: 0 0 6px 0;
  font-weight: bold;
  letter-spacing: 0.02em;
}

.auth-modal-header p {
  color: #999;
  margin: 0;
  font-size: 14px;
}

/* ---- Tabs ---- */

.auth-modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid #333;
  position: relative;
}

.auth-tab-btn {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  color: #999;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  /* Use pseudo-element for sliding indicator — no hard border-bottom here */
  border-bottom: 2px solid transparent;
  position: relative;
  transition: color 150ms ease-in-out;
  min-height: 48px;
}

/* Sliding tab underline: scales in from 0 width when active, fades out when inactive.
   Combined with the color transition, this gives a smooth "slide to" feel. */
.auth-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px; /* Overlaps the .auth-modal-tabs border-bottom */
  left: 10%;
  width: 80%;
  height: 2px;
  background: #DD5100;
  border-radius: 2px;
  transform: scaleX(0);
  opacity: 0;
  transform-origin: center;
  transition: transform 150ms ease-in-out, opacity 150ms ease-in-out;
}

.auth-tab-btn.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.auth-tab-btn:focus-visible {
  outline: 2px solid #DD5100;
  outline-offset: -2px;
  border-radius: 4px 4px 0 0;
}

.auth-tab-btn.active {
  color: #DD5100;
}

.auth-tab-btn:hover:not(.active) {
  color: #ccc;
}

/* ---- Tab Content ---- */

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
  animation: authFadeIn 150ms ease-in-out;
}

/* ---- Form Groups ---- */

.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  margin-bottom: 6px;
  color: #ccc;
  font-size: 13px;
  font-weight: 500;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 14px;
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  color: #fff;
  font-size: 16px; /* 16px prevents iOS zoom on focus */
  line-height: 1.4;
  box-sizing: border-box;
  transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
  -webkit-appearance: none; /* Remove iOS input styling */
  appearance: none;
}

.auth-form-group input::placeholder {
  color: #666;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #DD5100;
  box-shadow: 0 0 0 3px rgba(221, 81, 0, 0.15);
}

/* ---- Buttons ---- */

.auth-btn-primary {
  width: 100%;
  padding: 14px 16px;
  background: #DD5100;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  /* Multi-property transition: bg color + lift transform + shadow depth */
  transition: background 50ms ease-in-out, transform 50ms ease-in-out, box-shadow 50ms ease-in-out, opacity 150ms ease-in-out;
  min-height: 48px; /* Touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  position: relative;
}

.auth-btn-primary:hover:not(:disabled):not(.loading) {
  background: #c44600;
  /* Subtle lift — adds depth and confirms interactivity */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(221, 81, 0, 0.35);
}

.auth-btn-primary:active:not(:disabled):not(.loading) {
  transform: translateY(0);
  box-shadow: none;
  background: #b03e00;
}

.auth-btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.auth-btn-primary:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Loading state */
.auth-btn-primary.loading {
  pointer-events: none;
  background: #555;
}

.auth-btn-primary .auth-btn-text {
  display: inline;
}

.auth-btn-primary .auth-btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.auth-btn-primary.loading .auth-btn-text {
  display: none;
}

.auth-btn-primary.loading .auth-btn-loading {
  display: flex;
}

/* CSS-only spinner */
.auth-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpinner 0.6s linear infinite;
  flex-shrink: 0;
}

/* ---- Error Message ---- */

.auth-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 6px;
  border-left: 3px solid #ff6b6b;
  overflow: hidden;
}

.auth-error.auth-error-animate {
  animation: authErrorSlideIn 200ms ease-out both;
}

/* ---- Auth Indicator (header) ---- */

.auth-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
}

/* Entrance animation applied via JS when indicator becomes visible */
.auth-indicator.auth-indicator-entering {
  animation: authIndicatorSlideIn 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

#userDisplayName {
  color: #DD5100;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.auth-sign-out-btn {
  background: transparent;
  color: #999;
  border: 1px solid #666;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: color 150ms ease-in-out, border-color 150ms ease-in-out;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.auth-sign-out-btn:hover {
  color: #fff;
  border-color: #DD5100;
}

.auth-sign-out-btn:focus-visible {
  outline: 2px solid #DD5100;
  outline-offset: 2px;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .auth-modal-content {
    max-width: 420px;
    padding: 32px;
  }

  .auth-logo {
    width: 80px;
    height: 80px;
  }

  .auth-modal-header h2 {
    font-size: 24px;
  }

  #userDisplayName {
    max-width: 120px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .auth-modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .auth-modal-content {
    max-width: none;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 28px 20px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-modal-header {
    margin-bottom: 20px;
  }

  .auth-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
  }

  .auth-modal-header h2 {
    font-size: 22px;
  }

  .auth-modal-tabs {
    margin-bottom: 20px;
  }

  .auth-form-group {
    margin-bottom: 16px;
  }

  /* Auth indicator: stack on very narrow screens */
  .auth-indicator {
    gap: 8px;
  }

  #userDisplayName {
    max-width: 100px;
    font-size: 13px;
  }

  .auth-sign-out-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Tiny screens (320px) */
@media (max-width: 360px) {
  .auth-modal-content {
    padding: 24px 16px;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
  }

  .auth-modal-header h2 {
    font-size: 20px;
  }
}

/* ============================================
   Light Theme Support
   Auth modal adapts to [data-theme] on <body>
   Default/instrument-paper: white backgrounds
   ============================================ */

[data-theme="default"] .auth-modal-content,
[data-theme="instrument-paper"] .auth-modal-content {
  background: #ffffff;
  border-color: #DD5100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="default"] .auth-modal-header h2,
[data-theme="instrument-paper"] .auth-modal-header h2 {
  color: #DD5100;
}

[data-theme="default"] .auth-modal-header p,
[data-theme="instrument-paper"] .auth-modal-header p {
  color: #666;
}

[data-theme="default"] .auth-modal-tabs,
[data-theme="instrument-paper"] .auth-modal-tabs {
  border-bottom-color: #e0e0e0;
}

[data-theme="default"] .auth-tab-btn,
[data-theme="instrument-paper"] .auth-tab-btn {
  color: #888;
}

[data-theme="default"] .auth-tab-btn.active,
[data-theme="instrument-paper"] .auth-tab-btn.active {
  color: #DD5100;
}

[data-theme="default"] .auth-tab-btn:hover:not(.active),
[data-theme="instrument-paper"] .auth-tab-btn:hover:not(.active) {
  color: #333;
}

[data-theme="default"] .auth-form-group label,
[data-theme="instrument-paper"] .auth-form-group label {
  color: #444;
}

[data-theme="default"] .auth-form-group input,
[data-theme="instrument-paper"] .auth-form-group input {
  background: #f5f5f5;
  border-color: #ddd;
  color: #1a1a1a;
}

[data-theme="default"] .auth-form-group input::placeholder,
[data-theme="instrument-paper"] .auth-form-group input::placeholder {
  color: #aaa;
}

[data-theme="default"] .auth-form-group input:focus,
[data-theme="instrument-paper"] .auth-form-group input:focus {
  border-color: #DD5100;
  box-shadow: 0 0 0 3px rgba(221, 81, 0, 0.12);
}

[data-theme="default"] .auth-modal-overlay,
[data-theme="instrument-paper"] .auth-modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* Pastel-Mondrian variant */
[data-theme="pastel-mondrian"] .auth-modal-content {
  background: #f9f4f0;
  border-color: #DD5100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="pastel-mondrian"] .auth-form-group label {
  color: #5a7a8f;
}

[data-theme="pastel-mondrian"] .auth-form-group input {
  background: #fff;
  border-color: #c8bdb7;
  color: #304c61;
}

[data-theme="pastel-mondrian"] .auth-form-group input::placeholder {
  color: #a08c84;
}

[data-theme="pastel-mondrian"] .auth-modal-header p {
  color: #5a7a8f;
}

[data-theme="pastel-mondrian"] .auth-modal-tabs {
  border-bottom-color: #d4c8c0;
}

[data-theme="pastel-mondrian"] .auth-tab-btn {
  color: #a09090;
}

[data-theme="pastel-mondrian"] .auth-tab-btn:hover:not(.active) {
  color: #5a7a8f;
}

[data-theme="pastel-mondrian"] .auth-modal-overlay {
  background: rgba(48, 76, 97, 0.6);
}

/* ============================================
   Forgot Password
   ============================================ */

.auth-forgot-link-group {
  margin-bottom: 12px;
  text-align: right;
}

.auth-forgot-link {
  font-size: 13px;
  color: #DD5100;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.auth-forgot-link:hover {
  opacity: 0.8;
}

.auth-form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 16px;
  text-align: center;
}

.auth-back-link {
  background: none;
  border: none;
  color: #DD5100;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  margin-bottom: 16px;
  text-align: left;
  transition: opacity 200ms ease;
  font-family: inherit;
}

.auth-back-link:hover {
  opacity: 0.8;
}

/* ============================================
   Confirmation Overlays
   ============================================ */

.auth-confirmation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: authFadeIn 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
  padding: 16px;
}

.auth-confirmation-content {
  background: #1a1a1a;
  border: 2px solid #DD5100;
  border-radius: 8px;
  padding: 40px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: authScaleIn 250ms cubic-bezier(0.4, 0, 0.2, 1) both;
  position: relative;
}

.confirmation-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: #DD5100;
  animation: authScaleIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 100ms;
}

.confirmation-icon svg {
  width: 100%;
  height: 100%;
}

.confirmation-icon.success { color: #4CAF50; }
.confirmation-icon.error { color: #d64545; }

.confirmation-title {
  font-size: 20px;
  color: white;
  margin: 0 0 8px 0;
  font-weight: bold;
}

.confirmation-text {
  font-size: 14px;
  color: #ccc;
  margin: 0 0 4px 0;
}

.confirmation-text strong {
  color: #DD5100;
}

.confirmation-hint {
  font-size: 12px;
  color: #666;
  margin: 8px 0 20px 0;
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.auth-btn-secondary {
  background: #DD5100;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn-secondary:hover { background: #c44600; }
.auth-btn-secondary:disabled { background: #666; cursor: not-allowed; }
.auth-btn-secondary .auth-btn-loading { display: none; }
.auth-btn-secondary.loading .auth-btn-text { display: none; }
.auth-btn-secondary.loading .auth-btn-loading { display: flex; align-items: center; gap: 8px; }

.auth-btn-link {
  background: none;
  border: none;
  color: #DD5100;
  cursor: pointer;
  font-size: 14px;
  padding: 8px;
  text-decoration: none;
  transition: opacity 200ms ease;
  font-family: inherit;
  font-weight: 500;
}

.auth-btn-link:hover { opacity: 0.8; }

/* ============================================
   Full Screen Views (Reset Password, Verification)
   ============================================ */

.auth-full-screen-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: authFadeIn 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
  padding: 16px;
}

.reset-password-container {
  background: #1a1a1a;
  border: 2px solid #DD5100;
  border-radius: 8px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  animation: authScaleIn 250ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.reset-password-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-small {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  animation: authLogoEntrance 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.reset-password-header h2 {
  font-size: 22px;
  color: white;
  margin: 0;
}

.password-strength-indicator {
  font-size: 11px;
  margin-top: 4px;
  display: block;
  color: #999;
}

.password-strength-indicator.weak { color: #d64545; }
.password-strength-indicator.fair { color: #dd9e3b; }
.password-strength-indicator.strong { color: #4CAF50; }

/* ============================================
   Email Verification
   ============================================ */

.verification-container {
  background: #1a1a1a;
  border: 2px solid #DD5100;
  border-radius: 8px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: authScaleIn 250ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.verification-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: #DD5100;
  animation: authScaleIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 100ms;
}

.verification-icon svg {
  width: 100%;
  height: 100%;
}

.verification-title {
  font-size: 24px;
  color: white;
  margin: 0 0 12px 0;
  font-weight: bold;
}

.verification-text {
  font-size: 14px;
  color: #ccc;
  margin: 0 0 8px 0;
}

.verification-text strong { color: #DD5100; }

.verification-hint {
  font-size: 13px;
  color: #999;
  margin: 0 0 24px 0;
  font-style: italic;
}

.verification-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.verification-footer {
  font-size: 11px;
  color: #666;
  margin-top: 20px;
}

/* ============================================
   User Dropdown Menu
   ============================================ */

.auth-user-name-btn {
  background: none;
  border: none;
  color: #DD5100;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background 200ms ease;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.auth-user-name-btn:hover {
  background: rgba(221, 81, 0, 0.15);
}

.dropdown-caret {
  width: 10px;
  height: 10px;
  color: #999;
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.auth-indicator.dropdown-open .dropdown-caret {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #2a2a2a;
  border: 1px solid #DD5100;
  border-radius: 6px;
  margin-top: 4px;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: authFadeIn 150ms ease-out;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #ccc;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  transition: background 150ms ease, color 150ms ease;
}

.user-dropdown-item:hover {
  background: rgba(221, 81, 0, 0.1);
  color: #DD5100;
}

.user-dropdown-item:first-child {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.user-dropdown-item:last-child {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.user-dropdown-separator {
  height: 1px;
  background: #444;
  margin: 4px 0;
}

.user-dropdown-label {
  display: block;
  padding: 6px 14px 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
  font-weight: 600;
}

.user-dropdown-item.user-dropdown-signout {
  border-top: 1px solid #444;
  color: #d64545;
}

.user-dropdown-item.user-dropdown-signout:hover {
  background: rgba(214, 69, 69, 0.1);
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   Account Settings Page
   ============================================ */

.account-settings-full-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 9999;
  overflow-y: auto;
  animation: authFadeIn 200ms ease;
}

.account-settings-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.account-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid #333;
}

.account-settings-header h1 {
  font-size: 24px;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
}

.back-button {
  background: none;
  border: none;
  color: #DD5100;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 200ms ease;
  font-family: inherit;
}

.back-button:hover { background: rgba(221, 81, 0, 0.1); }
.back-button svg { width: 18px; height: 18px; }

.account-settings-content { padding-bottom: 40px; }

.settings-section {
  margin-bottom: 24px;
  padding: 20px;
  background: #242424;
  border-radius: 6px;
}

.settings-section-danger-zone { border-left: 3px solid #dd9e3b; }
.settings-danger-zone { border-left: 3px solid #d64545; }

.section-title {
  font-size: 16px;
  color: #DD5100;
  margin: 0 0 16px 0;
  font-weight: 600;
}

.danger-title { color: #d64545; }

.danger-description {
  font-size: 13px;
  color: #999;
  margin: 0 0 12px 0;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #333;
}

.settings-item:last-child { border-bottom: none; }

.settings-item-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-value {
  font-size: 14px;
  color: white;
  font-weight: 500;
}

.settings-badge {
  font-size: 11px;
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
  padding: 4px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

.settings-edit-btn {
  background: none;
  border: 1px solid #DD5100;
  color: #DD5100;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 200ms ease;
}

.settings-edit-btn:hover { background: rgba(221, 81, 0, 0.1); }

.settings-action-btn {
  background: transparent;
  border: 1px solid #DD5100;
  color: #DD5100;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  transition: background 200ms ease;
}

.settings-action-btn:hover { background: rgba(221, 81, 0, 0.1); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.form-actions .auth-btn-primary {
  flex: 1;
  min-width: 140px;
}

.btn-danger {
  background: #d64545;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  width: 100%;
  transition: background 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-danger:hover { background: #e0545f; }
.btn-danger:disabled { background: #666; cursor: not-allowed; }
.btn-danger .auth-btn-loading { display: none; }
.btn-danger.loading .auth-btn-text { display: none; }
.btn-danger.loading .auth-btn-loading { display: flex; align-items: center; gap: 8px; }

.delete-account-modal { border-color: #d64545; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 200ms ease;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: white; }

/* ============================================
   Google Sign-In
   ============================================ */

.google-signin-container {
  margin-bottom: 4px;
}

.google-signin-container .auth-error {
  margin-top: 8px;
  margin-bottom: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #666;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #333;
}

.auth-divider span {
  white-space: nowrap;
}

/* Light theme divider */
[data-theme="default"] .auth-divider,
[data-theme="instrument-paper"] .auth-divider {
  color: #aaa;
}

[data-theme="default"] .auth-divider::before,
[data-theme="default"] .auth-divider::after,
[data-theme="instrument-paper"] .auth-divider::before,
[data-theme="instrument-paper"] .auth-divider::after {
  background: #ddd;
}

[data-theme="pastel-mondrian"] .auth-divider {
  color: #a08c84;
}

[data-theme="pastel-mondrian"] .auth-divider::before,
[data-theme="pastel-mondrian"] .auth-divider::after {
  background: #d4c8c0;
}

/* ============================================
   Prefers-Reduced-Motion
   WCAG 2.3.3 — honor user's motion preference
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .auth-modal-overlay,
  .auth-modal-content,
  .auth-logo,
  .auth-tab-content.active,
  .auth-error.auth-error-animate,
  .auth-indicator.auth-indicator-entering,
  .auth-confirmation-overlay,
  .auth-confirmation-content,
  .auth-full-screen-view,
  .verification-container,
  .reset-password-container,
  .account-settings-full-view {
    animation: none !important;
  }

  .auth-tab-btn,
  .auth-tab-btn::after,
  .auth-form-group input,
  .auth-btn-primary,
  .auth-sign-out-btn,
  .auth-btn-secondary,
  .auth-btn-link,
  .auth-user-name-btn,
  .dropdown-caret,
  .back-button,
  .settings-edit-btn,
  .settings-action-btn,
  .btn-danger {
    transition: none !important;
  }
}

/* ---- Anonymous Sign-In Button (header) ---- */

.anon-sign-in-btn {
  background: transparent;
  border: 1px solid #555;
  color: #ccc;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 8px;
}

.anon-sign-in-btn:hover {
  border-color: #DD5100;
  color: #DD5100;
}

[data-theme="light"] .anon-sign-in-btn {
  border-color: #ccc;
  color: #555;
}

[data-theme="light"] .anon-sign-in-btn:hover {
  border-color: #DD5100;
  color: #DD5100;
}

/* ---- Auth Nudge Toast ---- */
/* Gentle, non-blocking prompt for anonymous users */

.auth-nudge-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  max-width: 380px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  pointer-events: none;
}

.auth-nudge-toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.auth-nudge-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-left: 3px solid #DD5100;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-nudge-content p {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.auth-nudge-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.auth-nudge-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-nudge-signup {
  background: #DD5100;
  color: #fff;
}

.auth-nudge-signup:hover {
  background: #c44800;
}

.auth-nudge-dismiss {
  background: transparent;
  color: #888;
  border: 1px solid #444;
}

.auth-nudge-dismiss:hover {
  background: #222;
  color: #bbb;
}

/* Light theme */
[data-theme="light"] .auth-nudge-content {
  background: #fff;
  border-color: #ddd;
  border-left-color: #DD5100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .auth-nudge-content p {
  color: #333;
}

[data-theme="light"] .auth-nudge-dismiss {
  color: #666;
  border-color: #ccc;
}

[data-theme="light"] .auth-nudge-dismiss:hover {
  background: #f5f5f5;
  color: #333;
}

/* Mobile: full width at bottom */
@media (max-width: 480px) {
  .auth-nudge-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
