/* ===================================================================
   ATLASLAB — Auth Pages (Login, Register, Dashboard)
   =================================================================== */

/* -------------------------------------------------------------------
   Design tokens
   These were referenced throughout the file but never defined, which
   caused inputs and buttons on the dashboard to render with invisible
   borders. Defining them centrally here matches the Tailwind grayscale
   used elsewhere in the product.
   ------------------------------------------------------------------- */
:root {
  --gray-50:  #f9fafb;
  --gray-80:  #f3f4f6;
  --gray-100: #f3f4f6;
  --gray-150: #d4d8de;
  --gray-200: #e5e7eb;
  --gray-300: #b6bdc7;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --black:    #111827;
  --teal-soft:  #e6f6f3;
  --teal-light: #5eead4;
  --teal-deep:  #0f766e;
  --ui-danger: #d92d20;
}

/* -------------------------------------------------------------------
   AUTH TOP NAV — Consistent with main site
   ------------------------------------------------------------------- */
.auth-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 52px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-80);
}

.auth-topnav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.auth-topnav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.auth-topnav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--gray-500);
  transition: color 0.15s;
}

.auth-topnav-links a:hover {
  color: var(--black);
}

/* -------------------------------------------------------------------
   AUTH LAYOUT — Split panel design
   ------------------------------------------------------------------- */
.auth-body {
  background: var(--white);
  overflow-x: hidden;
}

.auth-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 52px; /* account for fixed nav */
}

/* --- Left branding panel --- */
.auth-brand {
  flex: 0 0 480px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, #0f766e 0%, #0d9488 40%, #06b6d4 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: rgba(255,255,255,0.95);
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 60px;
}

.auth-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.auth-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-brand-hero {
  margin-bottom: 48px;
}

.auth-brand-hero h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 14px;
}

.auth-brand-hero p {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
}

/* Features list */
.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: auto;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.auth-feature strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.auth-feature span {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* Stats */
.auth-brand-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 40px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.auth-stat {
  text-align: center;
}

.auth-stat-num {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Testimonial */
.auth-brand-testimonial {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: auto;
}

.auth-brand-testimonial p {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
  margin-bottom: 12px;
}

.auth-testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-testimonial-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.auth-testimonial-author strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.auth-testimonial-author span {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* Footer */
.auth-brand-footer {
  margin-top: auto;
  padding-top: 32px;
}

.auth-brand-footer p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* Decorative circles */
.auth-brand-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-decor-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
}

.auth-decor-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.auth-decor-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -80px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
}

.auth-decor-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 60%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
}

/* --- Right form panel --- */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--white);
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 8px;
}

.auth-form-header p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* --- Alert messages --- */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: authFadeIn 0.3s ease;
}

.auth-alert-error {
  background: var(--rose-soft);
  border: 1px solid var(--rose-light);
  color: var(--rose);
}

.auth-alert-info {
  background: var(--teal-soft);
  border: 1px solid var(--teal-light);
  color: var(--teal-deep);
}

.auth-alert svg {
  flex-shrink: 0;
}

.auth-invite-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--teal-light);
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 13px;
}

.auth-invite-note strong {
  font-weight: 700;
}

.auth-invite-note span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.auth-alert-shake {
  animation: auth-shake 0.5s ease;
}

/* --- Form fields --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: -0.01em;
}

.auth-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-forgot {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  color: var(--teal);
  font-weight: 500;
  transition: color 0.15s;
}

.auth-forgot:hover {
  color: var(--teal-deep);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.auth-input-row {
  display: flex;
  gap: 10px;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-300);
  pointer-events: none;
  transition: color 0.15s;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--teal);
}

.auth-input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1.5px solid var(--gray-150);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13,148,136,0.08);
}

.auth-input-wrap input::placeholder {
  color: var(--gray-300);
}

.auth-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--gray-300);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.auth-toggle-pw:hover {
  color: var(--gray-500);
}

.auth-hint {
  font-size: 12px;
  color: var(--gray-500);
}

/* Password strength */
.auth-pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-pw-bar {
  flex: 1;
  height: 4px;
  background: var(--gray-80);
  border-radius: 4px;
  overflow: hidden;
}

.auth-pw-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}

.pw-weak { background: var(--rose); }
.pw-fair { background: var(--amber); }
.pw-good { background: #06b6d4; }
.pw-strong { background: var(--teal); }

.auth-pw-strength span {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  min-width: 80px;
}

/* Checkbox */
.auth-remember,
.auth-terms {
  margin-top: 0;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-500);
}

.auth-checkbox input {
  display: none;
}

.auth-check-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: 5px;
  transition: all 0.15s;
  position: relative;
}

.auth-checkbox input:checked + .auth-check-mark {
  background: var(--teal);
  border-color: var(--teal);
}

.auth-checkbox input:checked + .auth-check-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-checkbox a {
  color: var(--teal);
  font-weight: 500;
}

/* Submit button */
.auth-submit {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-submit:hover:not(:disabled) {
  background: #2d2d2d;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.auth-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-secondary-btn {
  width: 110px;
  height: 48px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-150);
  background: var(--white);
  color: var(--gray-700);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.auth-secondary-btn:hover:not(:disabled) {
  border-color: var(--teal-light);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.auth-secondary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
}

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

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-150);
}

.auth-divider span {
  font-size: 12px;
  color: var(--gray-300);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
}

.auth-switch a {
  color: var(--teal);
  font-weight: 600;
  transition: color 0.15s;
}

.auth-switch a:hover {
  color: var(--teal-deep);
}

/* --- Verification card --- */
.auth-verify-card {
  text-align: center;
  padding: 20px 0;
}

.auth-verify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  margin-bottom: 20px;
}

.auth-verify-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.auth-verify-card > p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Code inputs */
.auth-code-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-code-digit {
  width: 48px;
  height: 56px;
  border: 1.5px solid var(--gray-150);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--black);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-code-digit:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13,148,136,0.08);
}

.auth-code-sep {
  font-size: 20px;
  color: var(--gray-300);
  font-weight: 300;
}

.auth-resend {
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

.auth-link-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link-btn:disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}

/* --- Animation --- */
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form-container {
  animation: authFadeIn 0.4s ease;
}

/* -------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .auth-brand {
    flex: 0 0 380px;
    padding: 36px;
  }
  .auth-brand-hero h1 {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
  }

  .auth-brand {
    flex: 0 0 auto;
    padding: 32px 24px;
    min-height: auto;
  }

  .auth-brand-hero {
    margin-bottom: 24px;
  }

  .auth-brand-hero h1 {
    font-size: 24px;
  }

  .auth-brand-features,
  .auth-brand-stats,
  .auth-brand-testimonial,
  .auth-brand-footer {
    display: none;
  }

  .auth-form-panel {
    padding: 32px 24px;
  }
}

/* -------------------------------------------------------------------
   DASHBOARD STYLES
   ------------------------------------------------------------------- */

.dash-layout {
  min-height: 100vh;
  background: var(--gray-50);
}

/* Dashboard nav */
.dash-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-150);
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.dash-nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dash-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
}

.dash-nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.dash-nav-sep {
  width: 1px;
  height: 24px;
  background: var(--gray-150);
}

.dash-nav-page {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 500;
}

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.dash-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.dash-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
}

.dash-user-email {
  font-size: 12px;
  color: var(--gray-500);
}

.dash-logout {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--gray-150);
  background: var(--white);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s;
}

.dash-logout:hover {
  border-color: var(--gray-300);
  color: var(--black);
}

/* Dashboard content area */
.dash-content {
  padding: 96px 32px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Profile header card */
.dash-profile-card {
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dash-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}

.dash-profile-info {
  flex: 1;
}

.dash-profile-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dash-profile-meta {
  font-size: 14px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-profile-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-user {
  background: var(--sky-soft);
  color: var(--sky);
}

.badge-admin {
  background: #f5f3ff;
  color: #7c3aed;
}

.badge-pro {
  background: var(--teal-soft);
  color: var(--teal);
}

/* Tabs */
.dash-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-150);
  margin-bottom: 24px;
  overflow-x: auto;
}

.dash-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}

.dash-tab:hover {
  color: var(--black);
}

.dash-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 600;
}

/* Tab content panels */
.dash-panel {
  display: none;
  animation: authFadeIn 0.3s ease;
}

.dash-panel.active {
  display: block;
}

/* Info cards */
.dash-card {
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.dash-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* Info rows */
.dash-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dash-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-info-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
}

/* Stats row */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.dash-stat-card {
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.dash-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dash-stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

/* Subscription card */
.dash-plan-card {
  background: linear-gradient(135deg, var(--teal-soft) 0%, var(--white) 100%);
  border: 1px solid var(--teal-light);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-plan-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}

.dash-plan-info p {
  font-size: 14px;
  color: var(--gray-500);
}

.dash-plan-price {
  text-align: right;
}

.dash-plan-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--teal-deep);
  letter-spacing: -0.02em;
}

.dash-plan-period {
  font-size: 13px;
  color: var(--gray-500);
}

.dash-plan-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-pay-btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
}

.dash-payment-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--gray-500);
}

/* Usage bars */
.dash-usage-item {
  margin-bottom: 18px;
}

.dash-usage-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dash-usage-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.dash-usage-count {
  font-size: 13px;
  color: var(--gray-500);
}

.dash-usage-bar {
  height: 8px;
  background: var(--gray-80);
  border-radius: 8px;
  overflow: hidden;
}

.dash-usage-fill {
  height: 100%;
  border-radius: 8px;
  background: var(--teal);
  transition: width 0.6s ease;
}

.dash-usage-fill.warn {
  background: var(--amber);
}

.dash-usage-fill.danger {
  background: var(--rose);
}

/* Security items */
.dash-security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-80);
}

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

.dash-security-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-security-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}

.dash-security-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 2px;
}

.dash-security-info span {
  font-size: 12px;
  color: var(--gray-500);
}

.dash-btn-sm {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--gray-150);
  background: var(--white);
  color: var(--gray-700);
}

.dash-btn-sm:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.dash-btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.dash-btn-primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
}

/* Session list */
.dash-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  margin-bottom: 8px;
}

.dash-session-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-session-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--gray-150);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}

.dash-session-detail strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.dash-session-detail span {
  font-size: 11px;
  color: var(--gray-500);
}

.dash-current-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-invite-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--teal-light);
  border-radius: 12px;
  background: var(--teal-soft);
}

.dash-invite-box strong {
  display: block;
  margin-top: 6px;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Admin panel styles */
.dash-admin-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-150);
}

.dash-config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-150);
  border-radius: 10px;
  margin-bottom: 10px;
}

.dash-config-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-config-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
}

.dash-config-meta {
  font-size: 12px;
  color: var(--gray-500);
}

.dash-config-actions {
  display: flex;
  gap: 8px;
}

.dash-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-active { background: var(--teal); }
.dot-inactive { background: var(--gray-300); }

.dash-admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.dash-admin-user-list {
  display: grid;
  gap: 8px;
}

.dash-admin-user-row {
  width: 100%;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  border: 1px solid var(--gray-120);
  border-radius: 11px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dash-admin-user-row:hover {
  border-color: var(--teal-light);
  background: var(--teal-soft);
}

.dash-admin-user-row strong {
  display: block;
  font-size: 13px;
  color: var(--black);
  margin-bottom: 4px;
}

.dash-admin-user-row span {
  font-size: 11px;
  color: var(--gray-500);
}

.dash-admin-user-metrics {
  display: flex;
  flex-shrink: 0;
  gap: 14px;
}

.dash-admin-user-metrics span:last-child {
  color: var(--teal-deep);
  font-weight: 600;
}

.dash-admin-user-detail {
  margin-top: 20px;
  border-top: 1px solid var(--gray-120);
  padding-top: 20px;
}

.dash-admin-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.dash-admin-credit-form {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.6fr auto;
  align-items: end;
  gap: 10px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--gray-100);
  border-radius: 11px;
  background: var(--gray-50);
}

.dash-admin-credit-form .auth-field {
  margin-bottom: 0;
}

.dash-admin-sync-note {
  max-width: 210px;
  text-align: right;
  font-size: 11px;
  color: var(--gray-500);
}

.dash-admin-gateway-note {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 12px;
  line-height: 1.45;
}

/* Profile edit form */
.dash-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.dash-edit-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-edit-field input {
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--gray-150);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-edit-field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.08);
}

@media (max-width: 768px) {
  .dash-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* Empty state */
.dash-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
}

.dash-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gray-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.dash-empty h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.dash-empty p {
  font-size: 13px;
  line-height: 1.6;
}

/* Avatar upload */
.dash-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.dash-avatar-wrapper .dash-profile-avatar {
  width: 100%;
  height: 100%;
}

.dash-profile-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.dash-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
}

.dash-avatar-overlay span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-avatar-wrapper:hover .dash-avatar-overlay {
  opacity: 1;
}

/* Responsive dashboard */
@media (max-width: 768px) {
  .dash-content {
    padding: 80px 16px 48px;
  }

  .dash-profile-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .dash-profile-meta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-info-grid {
    grid-template-columns: 1fr;
  }

  .dash-plan-card {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .dash-plan-price {
    text-align: center;
  }

  .dash-nav {
    padding: 0 16px;
  }

  .dash-admin-user-row,
  .dash-admin-detail-head {
    align-items: start;
    flex-direction: column;
  }

  .dash-admin-user-metrics {
    flex-wrap: wrap;
  }

  .dash-admin-credit-form {
    grid-template-columns: 1fr;
  }

  .dash-admin-sync-note {
    display: none;
  }
}

/* ===================================================================
   PASTEL POLISH — auth pages flat brand panel + dashboard de-card
   Appended 2026-05-25
   Uses --home-* tokens shared with the public homepage.
   =================================================================== */

/* ── Flat branding panel (no card pile) on login/register ──────── */
.auth-brand {
  background:
    radial-gradient(circle at 12% 0%, rgba(143, 182, 194, 0.18), transparent 38%),
    radial-gradient(circle at 88% 88%, rgba(181, 168, 201, 0.14), transparent 40%),
    linear-gradient(135deg, var(--home-paper, #fffdf8), var(--home-bg-cool, #edf6f2));
}

.auth-brand-content {
  padding: 56px 48px;
  color: var(--home-ink, #25323b);
}

.auth-brand-hero {
  margin-bottom: 36px;
}

.auth-eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--home-teal-strong, #5d8793);
}

.auth-brand-hero h1 {
  margin: 0 0 12px;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--home-ink, #25323b);
}

.auth-brand-hero p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--home-muted, #63737a);
}

.auth-brand-points {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-brand-points li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 18px;
  border-left: 2px solid var(--home-teal, #8fb6c2);
}

.auth-brand-points li strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--home-ink, #25323b);
}

.auth-brand-points li span {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--home-muted, #63737a);
}

.auth-brand-footer {
  margin-top: 48px;
  font-size: 11px;
  color: var(--home-subtle, #8c9996);
}

/* ── Auth form panel: cleaner, less chrome ─────────────────────── */
.auth-form-panel {
  background: var(--home-paper, #fffdf8);
}

.auth-form-header h2 {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--home-ink, #25323b);
}

.auth-form-header p {
  color: var(--home-muted, #63737a);
}

.auth-submit {
  background: linear-gradient(135deg, var(--home-teal-strong, #5d8793), var(--home-sage, #7a9e84));
  transition: box-shadow 0.25s ease, transform 0.15s ease, filter 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 6px 22px rgba(93, 135, 147, 0.30);
  transform: translateY(-1px);
}

/* ── Dashboard de-card: stats become inline figures ──────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--home-line, #dce3df);
  border-bottom: 1px solid var(--home-line, #dce3df);
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.dash-stat-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: left;
}

.dash-stat-value {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--home-ink, #25323b);
  letter-spacing: -0.015em;
}

.dash-stat-label {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--home-subtle, #8c9996);
}

/* ── Dashboard profile card: flatter, brand-aligned ─────────────── */
.dash-profile-card {
  background: linear-gradient(135deg, var(--home-paper, #fffdf8), rgba(143, 182, 194, 0.06)) !important;
  border: 1px solid var(--home-line, #dce3df) !important;
  box-shadow: 0 8px 28px rgba(93, 135, 147, 0.06) !important;
}

.dash-profile-name {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--home-ink, #25323b);
}

.dash-profile-meta {
  color: var(--home-muted, #63737a);
}

.dash-profile-avatar {
  background: linear-gradient(135deg, var(--home-teal, #8fb6c2), var(--home-lavender, #b5a8c9));
}

/* ── Dashboard nav: hairline divider, less heavy ─────────────────── */
.dash-nav {
  border-bottom: 1px solid var(--home-line, #dce3df);
  background: var(--home-paper, #fffdf8);
}

.dash-nav-brand span {
  font-family: "Times New Roman", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--home-ink, #25323b);
}

.dash-btn-sm,
.dash-logout {
  border-radius: 8px;
  font-weight: 500;
  font-size: 12px;
  transition: background 0.18s ease, color 0.18s ease;
}

.dash-btn-sm:hover {
  background: var(--home-bg-cool, #edf6f2);
  color: var(--home-teal-strong, #5d8793);
}

/* ── Drop heavy decorative circles entirely ───────────────────── */
.auth-brand-decor,
.auth-brand-stats,
.auth-brand-testimonial,
.auth-brand-features {
  display: none !important;
}

/* ── Responsive: brand panel hides on small screens ────────────── */
@media (max-width: 900px) {
  .auth-brand {
    display: none;
  }
  .auth-form-panel {
    padding: 24px 16px;
  }
}

/* === end PASTEL POLISH — auth pages === */

/* ── Dashboard nav-right: unify Back-to-Home anchor with Sign-out button ──
   Anchor is inline by default → height ignored, sits higher than the button.
   Force inline-flex centering and match height/font/radius exactly. */
.dash-nav-right .dash-btn-sm,
.dash-nav-right .dash-logout {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 34px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-family: var(--font) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  border: 1px solid var(--gray-150) !important;
  background: var(--white) !important;
  color: var(--gray-500) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.dash-nav-right .dash-btn-sm:hover,
.dash-nav-right .dash-logout:hover {
  border-color: var(--gray-300) !important;
  color: var(--home-teal-strong, #5d8793) !important;
  background: var(--home-bg-cool, #edf6f2) !important;
}
