/* TPA Profiles — Same design system as TPA News */
/* Fonts: Playfair Display (headings), DM Sans (body) */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dark: #002117;
  --dark-light: #003325;
  --dark-lighter: #004433;
  --gold: #c5a059;
  --gold-hover: #d4b06a;
  --gold-muted: #a8884a;
  --cream: #f5f0e8;
  --cream-dark: #ebe4d8;
  --white: #ffffff;
  --text-on-dark: #ffffff;
  --text-on-cream: #002117;
  --text-muted-dark: rgba(255,255,255,0.6);
  --text-muted-cream: #5a6e64;
  --border-dark: rgba(255,255,255,0.1);
  --border-cream: #d9d0c3;
  --red: #d32f2f;
  --red-dark: #9f2222;
  --red-light: #ffebee;
  --green: #2e7d32;
  --green-light: #e8f5e9;
  --shadow-soft: 0 18px 42px rgba(0, 33, 23, 0.16);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-on-cream);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

body.modal-open {
  overflow: hidden;
}

main {
  flex: 1;
}

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ HEADER ============ */
.site-header {
  background: var(--dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 60px;
}

.logo a {
  color: var(--text-on-dark);
  text-decoration: none;
}
.logo a:hover { text-decoration: none; }

.logo h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text-on-dark);
}

.logo-accent { color: var(--gold); }

.tagline {
  font-size: 11px;
  color: var(--text-muted-dark);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}

.header-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.header-nav a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
  text-decoration: none;
}

.btn-nav {
  background: var(--gold) !important;
  color: var(--dark) !important;
  padding: 6px 16px !important;
  border-radius: 4px;
  font-weight: 600 !important;
  border-bottom: none !important;
}
.btn-nav:hover {
  background: var(--gold-hover) !important;
  border-bottom: none !important;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--dark);
  border-top: 1px solid var(--border-dark);
  padding: 16px 20px 24px;
  z-index: 99;
  flex-direction: column;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dark);
  text-decoration: none;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--gold); text-decoration: none; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--dark);
  border-top: 2px solid var(--gold);
  padding: 28px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-brand strong { font-size: 14px; color: var(--text-on-dark); }
.footer-brand p { font-size: 12px; color: var(--text-muted-dark); margin-top: 2px; }
.footer-brand p a { color: var(--gold); }
.footer-links { display: flex; gap: 20px; font-size: 13px; }
.footer-links a { color: rgba(255,255,255,0.65); }
.footer-links a:hover { color: var(--gold); text-decoration: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  line-height: 1.4;
  text-align: center;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--gold);
  color: var(--dark);
}
.btn-primary:hover {
  background: var(--gold-hover);
  color: var(--dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--border-cream);
}
.btn-secondary:hover {
  background: var(--cream-dark);
  color: var(--dark);
}

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover {
  background: #b71c1c;
  color: white;
}

.btn-outline-danger {
  background: transparent;
  color: var(--red-dark);
  border: 1px solid rgba(159, 34, 34, 0.22);
}
.btn-outline-danger:hover {
  background: rgba(211, 47, 47, 0.08);
  color: var(--red-dark);
}

.btn-destructive-soft {
  background: var(--red);
  color: var(--white);
}
.btn-destructive-soft:hover {
  background: #b71c1c;
  color: var(--white);
}

.btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  padding: 80px 0;
  text-align: center;
  border-bottom: 2px solid var(--gold);
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--text-on-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.gold { color: var(--gold); }

.hero-desc {
  font-size: 17px;
  color: var(--text-muted-dark);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-inline-alert {
  margin-bottom: 20px;
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: var(--text-on-dark);
}
.hero-actions .btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255,255,255,0.05);
}

/* ============ FEATURES ============ */
.features {
  padding: 64px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border-cream);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted-cream);
  line-height: 1.5;
}

/* ============ AUTH FORMS ============ */
.auth-wrapper {
  display: flex;
  justify-content: center;
  padding: 48px 0 64px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border-cream);
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 28px rgba(0, 33, 23, 0.06);
}

.auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-muted-cream);
  margin-bottom: 24px;
}

.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted-cream);
  margin-top: 24px;
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-cream);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-on-cream);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.input-disabled {
  background: var(--cream) !important;
  color: var(--text-muted-cream) !important;
  cursor: not-allowed;
}

.optional {
  font-weight: 400;
  color: var(--text-muted-cream);
}

.field-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted-cream);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.chip-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--border-cream);
  border-radius: 6px;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chip-input:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.input-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  background: rgba(197, 160, 89, 0.12);
  color: var(--dark);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.input-chip:hover {
  background: rgba(197, 160, 89, 0.2);
}

.chip-remove {
  font-size: 16px;
  line-height: 1;
  color: var(--gold-muted);
}

.chip-text-input {
  flex: 1;
  min-width: 140px;
  min-height: 32px !important;
  border: none !important;
  box-shadow: none !important;
  padding: 6px 2px !important;
  background: transparent !important;
}

.submit-btn {
  justify-content: center;
  min-width: 170px;
}

.submit-btn.is-loading {
  opacity: 1;
}

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

.spinner {
  width: 16px;
  height: 16px;
  animation: spin 0.85s linear infinite;
}

.spinner-track,
.spinner-head {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.spinner-track {
  opacity: 0.25;
}

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

/* Input with prefix */
.input-with-prefix {
  display: flex;
  border: 1px solid var(--border-cream);
  border-radius: 6px;
  overflow: hidden;
}
.input-with-prefix .input-prefix {
  background: var(--cream);
  padding: 10px 8px;
  font-size: 12px;
  color: var(--text-muted-cream);
  white-space: nowrap;
  border-right: 1px solid var(--border-cream);
  display: flex;
  align-items: center;
}
.input-with-prefix input {
  border: none;
  border-radius: 0;
}
.input-with-prefix input:focus {
  box-shadow: none;
}

/* Field status */
.field-status {
  font-size: 13px;
  margin-top: 4px;
  min-height: 20px;
}
.status-success { color: var(--green); }
.status-error { color: var(--red); }
.status-checking { color: var(--text-muted-cream); }

/* OTP input */
.otp-input {
  font-size: 28px !important;
  letter-spacing: 10px;
  text-align: center;
  font-family: monospace !important;
  font-weight: 700;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(211, 47, 47, 0.2);
}
.alert-success {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid rgba(46, 125, 50, 0.2);
}

/* Wizard */
.step-indicator {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

/* Checkbox */
.terms-box {
  margin: 20px 0;
}
.checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}

/* ============ DASHBOARD ============ */
.dashboard-layout {
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-intro-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0, 33, 23, 0.98), rgba(0, 51, 37, 0.96));
  color: var(--text-on-dark);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.dashboard-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.dashboard-primary-column,
.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.dashboard-intro-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.dashboard-intro-copy {
  max-width: 700px;
  color: rgba(255,255,255,0.75);
}

.dashboard-tour-link-wrap {
  display: flex;
  align-items: center;
  align-self: flex-start;
}

.tour-relaunch-link {
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.72);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.tour-relaunch-link:hover {
  color: var(--gold);
}

.tour-relaunch-link[hidden] {
  display: none !important;
}

.dash-card {
  background: var(--white);
  border: 1px solid var(--border-cream);
  border-radius: 8px;
  padding: 24px;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dash-card-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
}

/* Profile card */
.profile-link-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  flex-shrink: 0;
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-image-small {
  width: 48px;
  height: 48px;
}

.avatar-image-large {
  width: 100px;
  height: 100px;
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-fallback-small {
  width: 48px;
  height: 48px;
}

.avatar-fallback-large {
  width: 100px;
  height: 100px;
}

.profile-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}

.profile-username {
  font-size: 14px;
  color: var(--text-muted-cream);
}

.profile-url-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(245, 240, 232, 0.96), rgba(235, 228, 216, 0.92));
  border: 1px solid rgba(197, 160, 89, 0.22);
  border-radius: 14px;
}

.profile-url-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-cream);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted-cream);
  background: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-feedback {
  min-height: 20px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted-cream);
}

#copyBtn.is-success {
  background: var(--green);
  color: var(--white);
}

#copyBtn.is-error {
  background: var(--red);
  color: var(--white);
}

.profile-stats {
  display: flex;
  gap: 20px 32px;
  flex-wrap: wrap;
}

.inline-alert {
  margin-bottom: 20px;
}

.profile-card-footer-corner {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(197, 160, 89, 0.18);
}

.subtle-destructive-link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: rgba(159, 34, 34, 0.82);
  text-decoration: underline;
  text-decoration-color: rgba(159, 34, 34, 0.32);
  text-underline-offset: 2px;
  cursor: pointer;
}

.subtle-destructive-link:hover {
  color: var(--red-dark);
  text-decoration-color: rgba(159, 34, 34, 0.55);
}

.stat {
  display: flex;
  flex-direction: column;
  min-width: 110px;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted-cream);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted-cream);
  margin-bottom: 20px;
}

/* Projects list (dashboard) */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-cream);
}
.project-item:last-child { border-bottom: none; }

.project-item-info {
  min-width: 0;
  flex: 1;
}

.project-item-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.project-desc {
  font-size: 13px;
  color: var(--text-muted-cream);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--cream);
  border: 1px solid var(--border-cream);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted-cream);
}

.project-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.news-card {
  position: sticky;
  top: 92px;
}

.dash-card-header-tight {
  align-items: flex-start;
}

.news-view-all {
  font-size: 13px;
  font-weight: 600;
}

.dashboard-news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-news-item {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-cream);
}

.dashboard-news-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.dashboard-news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold-muted);
}

.dashboard-news-item h3 {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.dashboard-news-item h3 a {
  color: var(--dark);
}

.dashboard-news-item h3 a:hover {
  color: var(--gold-hover);
}

.dashboard-news-item p,
.news-empty-state p {
  font-size: 14px;
  color: var(--text-muted-cream);
  line-height: 1.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 33, 23, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  position: relative;
  width: min(100%, 480px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.modal-card-wide {
  width: min(100%, 560px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-cream);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-muted-cream);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--dark);
  background: var(--cream);
}

.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red-dark);
  margin-bottom: 10px;
}

.modal-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 10px;
}

.modal-copy {
  color: var(--text-muted-cream);
  margin-bottom: 20px;
}

.modal-benefit-list {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.modal-benefit-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(197, 160, 89, 0.18);
  background: linear-gradient(180deg, rgba(245, 240, 232, 0.9), rgba(235, 228, 216, 0.82));
  color: var(--text-on-cream);
  font-size: 14px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============ PUBLIC PROFILE ============ */
.profile-page {
  padding: 48px 0;
  max-width: 720px;
  margin: 0 auto;
}

.profile-header {
  text-align: center;
  margin-bottom: 48px;
}

.profile-avatar-large {
  margin-bottom: 20px;
}

.profile-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.profile-handle {
  font-size: 16px;
  color: var(--text-muted-cream);
  margin-bottom: 16px;
}

.profile-meta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.profile-meta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted-cream);
}
.profile-meta-link:hover { color: var(--gold); }

.profile-meta-views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted-cream);
}

.profile-about {
  font-size: 15px;
  color: var(--text-on-cream);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-share-feedback {
  min-height: 22px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted-cream);
}

/* Projects grid */
.profile-projects {
  margin-top: 32px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border-cream);
  padding-bottom: 6px;
  margin-bottom: 24px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border-cream);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 24px;
  overflow: hidden;
}

.project-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.project-card-desc {
  font-size: 14px;
  color: var(--text-muted-cream);
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-card-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.08);
  border: 1px solid rgba(197, 160, 89, 0.18);
}
.project-link:hover {
  color: var(--gold-hover);
  background: rgba(197, 160, 89, 0.14);
  text-decoration: none;
}

.profile-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted-cream);
}

/* Avatar uploader */
.avatar-upload-card {
  border: 1px solid var(--border-cream);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(245, 240, 232, 0.8), rgba(255,255,255,0.95));
  padding: 22px;
  margin-bottom: 24px;
}

.avatar-upload-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  color: var(--dark);
  margin-bottom: 6px;
}

.avatar-upload-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
}

.avatar-preview-shell {
  flex-shrink: 0;
}

.avatar-preview-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 3px solid rgba(197, 160, 89, 0.35);
  background: var(--cream);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 33, 23, 0.05);
}

.avatar-preview-frame.large {
  width: 132px;
  height: 132px;
}

.avatar-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-upload-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.avatar-hint {
  font-size: 12px;
  color: var(--text-muted-cream);
}

.upload-status {
  min-height: 20px;
  font-size: 13px;
  color: var(--text-muted-cream);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crop-modal-card {
  width: min(100%, 640px);
}

.cropper-stage-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 33, 23, 0.06);
  border: 1px solid rgba(197, 160, 89, 0.25);
}

.cropper-stage {
  width: 100%;
  height: min(62vh, 420px);
}

.cropper-stage img {
  display: block;
  max-width: 100%;
}

.cropper-controls {
  margin-top: 16px;
}

.cropper-controls label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cropper-controls input[type="range"] {
  width: 100%;
}

/* ============ SHEPHERD TOUR ============ */
.shepherd-element.tpa-shepherd-theme {
  width: min(380px, calc(100vw - 24px));
  max-width: min(380px, calc(100vw - 24px));
}

.shepherd-element.tpa-shepherd-theme .shepherd-content {
  background: var(--white);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.shepherd-element.tpa-shepherd-theme .shepherd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  padding: 18px 20px 0;
}

.shepherd-element.tpa-shepherd-theme .shepherd-title {
  min-width: 0;
  flex: 1;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
  color: var(--dark);
  overflow-wrap: anywhere;
}

.shepherd-element.tpa-shepherd-theme .shepherd-cancel-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-muted-cream);
  transition: background 0.15s ease, color 0.15s ease;
}

.shepherd-element.tpa-shepherd-theme .shepherd-cancel-icon:hover {
  background: rgba(0, 33, 23, 0.06);
  color: var(--dark);
}

.shepherd-element.tpa-shepherd-theme .shepherd-text {
  padding: 10px 20px 0;
  color: var(--text-muted-cream);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.shepherd-element.tpa-shepherd-theme .shepherd-text p {
  margin-bottom: 0;
}

.shepherd-element.tpa-shepherd-theme .shepherd-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 20px 20px;
  gap: 10px;
}

.shepherd-element.tpa-shepherd-theme .shepherd-button {
  border-radius: 999px;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.shepherd-element.tpa-shepherd-theme .shepherd-button:not(.shepherd-button-secondary) {
  background: var(--gold);
  color: var(--dark);
}

.shepherd-element.tpa-shepherd-theme .shepherd-button.shepherd-button-secondary {
  background: var(--cream);
  color: var(--dark);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .dashboard-layout-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-inner { height: 56px; gap: 12px; }
  .logo { min-width: 0; }
  .logo h1 { font-size: 17px; }
  .tagline { letter-spacing: 0.35px; }
  .mobile-nav {
    top: 56px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .hero { padding: 48px 0; }
  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 15px; }
  .hero-actions .btn {
    width: 100%;
  }

  .features { padding: 48px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 24px 20px; }

  .auth-wrapper { padding: 28px 0 40px; }
  .auth-card { padding: 24px; }
  .auth-title { font-size: 24px; }
  .auth-subtitle { font-size: 14px; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions-row { flex-direction: column-reverse; align-items: stretch; }
  .form-actions-row .btn,
  .modal-actions .btn { width: 100%; justify-content: center; }
  .chip-text-input { min-width: 110px; }

  .input-with-prefix {
    flex-direction: column;
    overflow: visible;
  }

  .input-with-prefix .input-prefix {
    border-right: none;
    border-bottom: 1px solid var(--border-cream);
    justify-content: flex-start;
    padding: 10px 12px;
    font-size: 12px;
  }

  .avatar-upload-card { padding: 20px; }

  .avatar-upload-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .avatar-preview-shell,
  .avatar-upload-controls {
    width: 100%;
  }

  .avatar-preview-frame.large {
    margin: 0 auto;
  }

  .avatar-upload-controls .btn {
    width: 100%;
    justify-content: center;
  }

  .dashboard-layout { padding: 24px 0 40px; }

  .dashboard-intro-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
  }

  .dashboard-intro-card h2 {
    font-size: 26px;
  }

  .dash-card { padding: 20px; }

  .dash-card-header {
    align-items: flex-start;
  }

  .dash-card-header .btn,
  .news-view-all {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .profile-link-row {
    align-items: flex-start;
  }

  .profile-stats {
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-links { flex-wrap: wrap; gap: 12px; }

  .project-item { flex-direction: column; }
  .project-item-actions {
    align-self: stretch;
    width: 100%;
  }
  .project-item-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .modal-backdrop {
    padding: 16px;
    align-items: flex-end;
  }

  .modal-card {
    width: 100%;
    max-height: min(90vh, 760px);
    padding: 24px 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .modal-card h3 {
    font-size: 24px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .profile-page {
    padding: 32px 0 40px;
  }

  .profile-header {
    margin-bottom: 36px;
  }

  .profile-name { font-size: 28px; }
  .profile-meta-row {
    gap: 12px;
  }

  .profile-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .profile-url-row {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  .profile-url-input {
    width: 100%;
  }
  #copyBtn {
    width: 100%;
    justify-content: center;
  }

  .project-card {
    padding: 20px;
  }

  .project-card-links {
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .shepherd-element.tpa-shepherd-theme {
    width: min(100vw - 16px, 360px);
    max-width: min(100vw - 16px, 360px);
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-content {
    border-radius: 16px;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-header {
    padding: 16px 16px 0;
    gap: 10px;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-title {
    font-size: 20px;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-text {
    padding: 8px 16px 0;
    font-size: 14px;
    line-height: 1.55;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-footer {
    padding: 16px;
    justify-content: stretch;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-button {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .logo h1 { font-size: 15px; }
  .hero-title { font-size: 24px; }
  .container { padding: 0 16px; }
  .input-with-prefix .input-prefix { font-size: 11px; padding: 9px 12px; }
  .otp-input {
    font-size: 22px !important;
    letter-spacing: 6px;
  }

  .profile-link-row {
    align-items: flex-start;
    gap: 12px;
  }

  .profile-info h3 {
    font-size: 17px;
  }

  .profile-url-row {
    padding: 10px;
    border-radius: 12px;
  }

  .profile-url-input {
    font-size: 12px;
    padding: 10px 11px;
  }

  .copy-feedback,
  .profile-share-feedback {
    font-size: 12px;
    line-height: 1.5;
  }

  .project-item-actions {
    flex-direction: column;
  }

  .project-item-actions .btn,
  .project-link {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    padding: 22px 16px 16px;
  }

  .shepherd-element.tpa-shepherd-theme {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-header {
    padding: 14px 14px 0;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-title {
    font-size: 18px;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-cancel-icon {
    width: 32px;
    height: 32px;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-text {
    padding: 8px 14px 0;
  }

  .shepherd-element.tpa-shepherd-theme .shepherd-footer {
    padding: 14px;
  }
}
