/* Shared styles: auth, create flow, dashboard, download, legal */

.page-main {
  min-height: calc(100vh - var(--nav-h) - 73px);
  padding: 56px 0 80px;
}

.page-head {
  margin-bottom: 32px;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.page-head p {
  color: var(--text-muted);
  max-width: 38em;
  line-height: 1.65;
}

/* Forms */
.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field .hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 5px;
  line-height: 1.5;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
}

.form-field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  display: none;
  padding: 10px 13px;
  margin-bottom: 16px;
  background: #fbeae4;
  border: 1px solid #e8c4b2;
  border-radius: var(--radius);
  color: #9a3c12;
  font-size: 0.8125rem;
}

.form-error.visible {
  display: block;
}

/* Auth card */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-card > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-card .btn {
  width: 100%;
  margin-top: 4px;
}

.auth-alt {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-alt a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-alt a:hover {
  text-decoration: underline;
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.role-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-picker label {
  display: block;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  background: #fff;
}

.role-picker label strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.role-picker label span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.role-picker input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.legal-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.legal-consent input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.legal-consent a {
  color: var(--accent);
}

/* Wizard / create flow */
.wizard {
  max-width: 640px;
  margin: 0 auto;
}

.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 36px;
  counter-reset: step;
}

.wizard-steps li {
  list-style: none;
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.8125rem;
  color: var(--text-light);
  padding-top: 30px;
}

.wizard-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-steps li::after {
  content: '';
  position: absolute;
  top: 12px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 1px;
  background: var(--border);
}

.wizard-steps li:last-child::after {
  display: none;
}

.wizard-steps li.active {
  color: var(--text);
  font-weight: 500;
}

.wizard-steps li.active::before {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wizard-steps li.done::before {
  content: '✓';
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.wizard-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.wizard-panel h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.wizard-panel > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.trust-callout {
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--accent-soft);
  border: 1px solid #e8d5c4;
  border-radius: 8px;
}

.trust-callout strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.trust-callout p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
}

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

/* Download cards inside wizard & download page */
.dl-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 14px;
}

.dl-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-icon svg {
  width: 24px;
  height: 24px;
}

.dl-card-body {
  flex: 1;
  min-width: 0;
}

.dl-card-body strong {
  display: block;
  font-size: 0.9375rem;
}

.dl-card-body span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Status / next steps list */
.next-steps {
  list-style: none;
  margin: 20px 0;
}

.next-steps li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  align-items: flex-start;
}

.next-steps li:last-child {
  border-bottom: none;
}

.next-steps .step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.dash-stat {
  padding: 20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dash-stat span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 6px;
}

.dash-stat strong {
  font-family: var(--serif);
  font-size: 1.875rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.dash-section {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #f0ede6;
}

.dash-section-head h2 {
  font-size: 0.875rem;
  font-weight: 600;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.dash-table th,
.dash-table td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.dash-table th {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.status-pill.live {
  background: #e3efe3;
  color: #2d5a2d;
}

.status-pill.pending {
  background: #faf0d7;
  color: #8a6116;
}

.status-pill.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.dash-empty {
  padding: 40px 24px;
  text-align: center;
}

.dash-empty p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

/* Download page */
.download-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 56px;
}

.download-hero .btn-primary {
  font-size: 0.9375rem;
  padding: 13px 24px;
}

.dl-meta {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.dl-meta code {
  background: #ece8df;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.req-list {
  list-style: none;
  margin-top: 24px;
}

.req-list li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.req-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.privacy-strip {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

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

.privacy-grid h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.privacy-grid p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Legal docs */
.legal-doc {
  max-width: 720px;
  margin: 0 auto;
}

.legal-doc h1 {
  font-family: var(--serif);
  font-size: 2.125rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 36px;
}

.legal-doc h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 32px 0 10px;
}

.legal-doc p,
.legal-doc li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-doc ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

.legal-doc li {
  margin-bottom: 6px;
}

.legal-doc a {
  color: var(--accent);
}

@media (max-width: 860px) {
  .download-hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .wizard-panel {
    padding: 24px 20px;
  }

  .price-row {
    grid-template-columns: 1fr;
  }
}

/* Account */
.container-narrow {
  max-width: 640px;
}

.account-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.account-card-highlight {
  background: var(--accent-soft);
  border-color: rgba(196, 92, 38, 0.2);
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1.125rem;
}

.account-email {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.account-badges {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.expert-links {
  font-size: 0.875rem;
  margin: 0 0 12px;
}

.expert-links a {
  color: var(--accent-hover);
  font-weight: 600;
  text-decoration: none;
}

.expert-links a:hover {
  text-decoration: underline;
}

.account-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.55;
}

.account-benefits {
  margin: 16px 0 20px;
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.account-benefits li {
  margin-bottom: 6px;
}

.auth-role-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: -4px 0 16px;
}
