/* ── Securatrade shared styles ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --blue:      #2F6BFF;
  --blue-dark: #1a50d4;
  --blue-light:#EEF3FF;
  --green:     #19A76F;
  --green-light:#E8F7F1;
  --red:       #DC2626;
  --red-light: #FEF2F2;
  --amber:     #D97706;
  --amber-light:#FFF7ED;
  --dark:      #0F172A;
  --muted:     #64748B;
  --border:    #E2E8F0;
  --bg:        #F8FAFC;
  --white:     #FFFFFF;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow:    0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.14);
}

/* Trade profile forms and directory details */
.trade-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.trade-form-grid .field {
  margin-bottom: 0;
}

.trade-form-grid .field-full {
  grid-column: 1 / -1;
}

.trade-profile-note {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 12px 14px;
}

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

.service-picker-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.service-picker-copy {
  margin-bottom: 12px;
}

.service-picker-copy strong {
  color: var(--dark);
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
}

.service-picker-copy p,
.service-extra-hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 3px;
}

.service-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-check-card {
  align-items: flex-start;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  font-size: 0.83rem;
  font-weight: 700;
  gap: 8px;
  line-height: 1.3;
  min-height: 38px;
  padding: 9px 12px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.service-check-card:hover {
  border-color: #BFD0FF;
  background: #F0F4FF;
}

.service-check-card input {
  accent-color: var(--blue);
  flex: 0 0 auto;
  margin-top: 1px;
}

.service-check-card:has(input:checked) {
  background: var(--blue-light);
  border-color: #9CB7FF;
  color: var(--blue-dark);
}

.service-empty-state {
  background: #F8FAFC;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 12px;
}

.service-selected-extra {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 12px;
}

.service-small-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.service-extra-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue-dark);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  margin-top: 14px;
  min-height: 38px;
  padding: 8px 13px;
}

.service-extra-toggle:hover {
  background: var(--blue-light);
  border-color: #BFD0FF;
}

.service-extra-panel {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 14px;
}

.service-search-input {
  margin-bottom: 6px;
}

.service-extra-results {
  margin-top: 10px;
}

.service-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}

.service-group summary {
  color: var(--dark);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
  padding: 11px 12px;
}

.service-group summary::-webkit-details-marker {
  display: none;
}

.service-group .service-check-grid {
  border-top: 1px solid var(--border);
  padding: 10px;
}

.signup-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.signup-steps li {
  align-items: center;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--dark);
  display: flex;
  font-size: 0.72rem;
  font-weight: 750;
  gap: 7px;
  line-height: 1.2;
  min-height: 52px;
  padding: 8px;
}

.signup-steps span {
  align-items: center;
  background: var(--blue-light);
  border-radius: 999px;
  color: var(--blue-dark);
  display: inline-flex;
  flex: 0 0 22px;
  font-size: 0.74rem;
  font-weight: 850;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.signup-section {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 20px;
}

.signup-section:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.signup-steps + .signup-section {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.signup-section-title {
  color: var(--dark);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.3;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.signup-section-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

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

.trade-chip {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  padding: 5px 9px;
}

.trade-status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 5px 9px;
}

.trade-status-approved,
.trade-status-live {
  background: #DCFCE7;
  color: #166534;
}

.trade-status-pending_approval,
.trade-status-pending,
.trade-status-draft {
  background: #FEF3C7;
  color: #92400E;
}

.trade-status-suspended {
  background: #FEE2E2;
  color: #991B1B;
}

@media (max-width: 680px) {
  .trade-form-grid,
  .service-check-grid {
    grid-template-columns: 1fr;
  }

  .signup-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signup-steps li:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .service-picker-card {
    padding: 12px;
  }

  .signup-steps {
    grid-template-columns: 1fr;
  }

  .signup-steps li:last-child {
    grid-column: auto;
  }
}

/* Launch-readiness alignment and content helpers */
h1, h2, h3, h4, h5, h6,
.section-title, .page-title, .job-title, .hero-h1,
.auth-card-title, .invite-title, .dash-stat-value,
.stat-value, .pricing-amount, .price-opt-val {
  letter-spacing: 0 !important;
}

h1.page-title,
h1.auth-card-title,
h1.jobs-header-title,
h1.page-header-title,
h1.review-page-title {
  margin-top: 0;
}

h1.page-title,
h1.jobs-header-title,
h1.page-header-title,
h1.review-page-title {
  margin-bottom: 0;
}

.nav-links > a,
.nav-auth-out > a,
.nav-auth-in > a,
.nav-auth-in > button,
.nav-mobile-auth a,
.nav-mobile-auth button,
.sidebar-link,
.side-link,
.sidebar-panel button.side-link,
.action-dropdown a,
.action-dropdown button {
  box-sizing: border-box;
  line-height: 1.2;
}

.nav-auth-out,
.nav-auth-in {
  align-items: center;
}

.nav-auth-in > button.btn,
.nav-auth-out > a.btn,
.nav-auth-in > a.btn {
  min-height: 34px;
}

.nav-auth-in > button.btn-ghost {
  color: var(--red);
  border: 1px solid transparent;
}

.nav-auth-in > button.btn-ghost:hover {
  background: var(--red-light);
  color: #B91C1C;
  transform: none;
}

.nav-mobile-auth .nav-auth-out,
.nav-mobile-auth .nav-auth-in {
  align-items: stretch !important;
}

.nav-mobile-auth a,
.nav-mobile-auth button {
  display: flex !important;
  align-items: center;
  min-height: 44px;
}

.nav-mobile-auth .logout-btn {
  color: var(--red);
  font-weight: 600;
}

.nav-mobile-auth .logout-btn:hover {
  background: var(--red-light);
  color: #B91C1C;
}

.sidebar-footer .sidebar-link,
.sidebar-panel button.side-link,
.side-link {
  min-height: 44px;
  align-items: center;
}

.sidebar-panel .side-link,
.sidebar-panel button.side-link {
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.side-link,
button.side-link {
  display: flex !important;
  width: 100%;
  text-align: left;
}

.action-dropdown a,
.action-dropdown button {
  display: flex !important;
  align-items: center;
  min-height: 40px;
}

.launch-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

.launch-muted {
  color: var(--muted);
  line-height: 1.7;
}

.launch-note,
.stripe-note,
.verification-note,
.dispute-note,
.legal-review-note,
.invite-warning {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.65;
}

.launch-note,
.stripe-note {
  background: var(--blue-light);
  border-color: rgba(47,107,255,0.18);
  color: #1E3A8A;
}

.verification-note {
  background: var(--green-light);
  border-color: rgba(25,167,111,0.22);
  color: #047857;
}

.dispute-note {
  background: #FFF7ED;
  border-color: #FDBA74;
  color: #9A3412;
}

.legal-review-note {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.invite-warning {
  background: #FFFBEB;
  border-color: #FCD34D;
  color: #92400E;
}

.status-check-grid,
.account-status-grid,
.onboarding-flow {
  display: grid;
  gap: 16px;
}

.account-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-check-card,
.account-status-card,
.onboarding-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.status-check-card h3,
.account-status-card h3,
.onboarding-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--dark);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  background: #F1F5F9;
  color: var(--muted);
}

.status-pill.ok {
  background: var(--green-light);
  color: var(--green);
}

.status-pill.warn {
  background: #FFF7ED;
  color: #C2410C;
}

.status-pill.action {
  background: var(--red-light);
  color: var(--red);
}

.onboarding-flow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.onboarding-step {
  position: relative;
  min-width: 0;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.onboarding-step-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.onboarding-step-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.onboarding-step-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.progress-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.progress-inline span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-inline span.active {
  background: var(--blue-light);
  color: var(--blue);
}

.milestone,
.ms,
.milestone-item,
.milestone-builder-row,
.wizard-review-row,
.payment-choice-job,
.payment-choice-rows div {
  min-width: 0;
}

.milestone > *,
.ms > *,
.milestone-item > *,
.milestone-builder-row > *,
.wizard-review-row > *,
.payment-choice-job > *,
.payment-choice-rows div > * {
  min-width: 0;
}

.ms-amount,
.milestone-amount,
.payment-choice-rows strong {
  white-space: normal;
}

.ms-status,
.badge,
.status-badge {
  max-width: 100%;
}

@media (max-width: 900px) {
  .account-status-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-flow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .milestone,
  .ms,
  .milestone-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 16px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    background: var(--white) !important;
    margin-bottom: 12px !important;
  }

  .milestone:last-child,
  .ms:last-child,
  .milestone-item:last-child {
    margin-bottom: 0 !important;
  }

  .milestone > div:not(.ms-dot):not(.milestone-dot-wrap),
  .ms > div:not(.ms-dot):not(.milestone-dot-wrap),
  .milestone-content,
  .ms-actions,
  .milestone-builder-row,
  .wizard-review-row {
    width: 100% !important;
  }

  .ms-actions {
    align-items: stretch !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  .ms-action-note {
    text-align: left !important;
    max-width: none !important;
  }

  .ms-amount,
  .milestone-amount {
    width: 100%;
    color: var(--blue);
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
  }

  .ms-status,
  .badge,
  .status-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .milestone-builder-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 14px !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    margin-bottom: 12px !important;
  }

  .milestone-builder-row input,
  .milestone-builder-row .input-prefix {
    width: 100% !important;
    flex: none !important;
  }

  .milestone-builder-row button {
    align-self: flex-start;
  }

  .wizard-review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .wizard-review-label {
    min-width: 0 !important;
  }

  .wizard-review-val {
    width: 100%;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .customers-panel {
    padding: 24px 20px !important;
    gap: 24px !important;
  }

  .customers-panel > div {
    min-width: 0 !important;
    width: 100%;
  }
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 3px solid rgba(47,107,255,0.28);
  outline-offset: 2px;
}

/* ── Layout ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.25rem; font-weight: 800; color: var(--dark);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--blue); }
.nav-logo-mark {
  width: 32px; height: 32px; background: var(--blue);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.nav-logo-mark svg { width: 18px; height: 18px; fill: #fff; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--dark); background: var(--bg); }
.nav-links a.active { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-auth-in  { display: none; align-items: center; gap: 10px; }
.nav-auth-out { display: flex; align-items: center; gap: 10px; }
.nav-user-name {
  font-size: 0.85rem; font-weight: 600; color: var(--dark);
  padding: 0 4px;
}
/* Mobile auth links inside hamburger menu */
.nav-mobile-auth {
  display: none;
  flex-direction: column; gap: 6px;
  padding-top: 12px; margin-top: 8px;
  border-top: 1px solid var(--border);
}
.nav-mobile-auth a,
.nav-mobile-auth button {
  display: block; width: 100%;
  padding: 11px 14px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 500;
  color: var(--muted); text-align: left;
  background: none; border: none; font-family: inherit;
  cursor: pointer; transition: color 0.15s, background 0.15s;
}
.nav-mobile-auth a:hover,
.nav-mobile-auth button:hover { color: var(--dark); background: var(--bg); }
.nav-mobile-auth a.primary {
  background: var(--blue); color: #fff; font-weight: 600;
}
.nav-mobile-auth a.primary:hover { background: var(--blue-dark); }
.nav-mobile-auth .logout-btn { color: #ef4444; }
.nav-mobile-auth .nav-auth-out,
.nav-mobile-auth .nav-auth-in { flex-direction: column; width: 100%; gap: 4px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0;
  position: relative;
  z-index: 250;
  box-shadow: var(--shadow-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px;
  margin: 3px 0; transition: all 0.2s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 600;
  transition: all 0.18s; white-space: nowrap;
  line-height: 1.2;
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(47,107,255,0.3);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(47,107,255,0.4); }
.btn-secondary { background: var(--white); color: var(--dark); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--dark); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(25,167,111,0.3); }
.btn-green:hover { background: #15906a; transform: translateY(-1px); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(220,38,38,0.24); }
.btn-danger:hover { background: #B91C1C; transform: translateY(-1px); }
.btn-lg { padding: 17px 32px; font-size: 1.02rem; border-radius: 14px; letter-spacing: -0.01em; }
.btn-md { padding: 13px 24px; font-size: 0.92rem; border-radius: var(--radius); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled,
.btn[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Cards ── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-p { padding: 28px; }
.card-p-lg { padding: 40px; }

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 0.78rem; font-weight: 600;
}
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-orange { background: #FFF7ED; color: #C2410C; }
.badge-red { background: #FEF2F2; color: #DC2626; }
.badge-gray { background: #F1F5F9; color: var(--muted); }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 0.78rem; font-weight: 600;
}

.alert {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.alert-success { background: var(--green-light); border-color: rgba(25,167,111,0.24); color: #047857; }
.alert-error { background: var(--red-light); border-color: #FCA5A5; color: #991B1B; }
.alert-warning { background: var(--amber-light); border-color: #FDBA74; color: #9A3412; }

/* ── Section titles ── */
.section-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
  display: block;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.18; color: var(--dark);
  margin-bottom: 18px;
}
.section-sub {
  font-size: 1.05rem; color: var(--muted); max-width: 560px; line-height: 1.75;
}
.section-head { margin-bottom: 64px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin: 0 auto; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ── Forms ── */
.field { margin-bottom: 20px; }
.label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--dark); margin-bottom: 6px;
}
.label-hint { font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.95rem; font-family: inherit; color: var(--dark);
  background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,0.12);
}
.input::placeholder, .textarea::placeholder { color: #94A3B8; }
.textarea { min-height: 100px; resize: vertical; }
.input-prefix {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-prefix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,0.12); }
.input-prefix-symbol {
  padding: 12px 14px; background: var(--bg);
  border-right: 1.5px solid var(--border);
  font-weight: 600; color: var(--muted); font-size: 0.95rem;
}
.input-prefix .input { border: none; box-shadow: none; border-radius: 0; }
.input-prefix .input:focus { box-shadow: none; }

/* ── Trust strip ── */
.trust-strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center; gap: 20px; padding: 32px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.trust-item {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  text-align: center;
}
.trust-item svg { color: var(--green); flex-shrink: 0; }

/* ── Stat cards ── */
.stat-card { text-align: center; }
.stat-num {
  font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em;
  color: var(--dark); line-height: 1;
}
.stat-num .stat-prefix { font-size: 1.4rem; }
.stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 6px; font-weight: 500; }

/* ── Step flow ── */
.step {
  display: flex; gap: 20px; align-items: flex-start;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
}
.step-content { flex: 1; }
.step-title { font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.step-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ── Scenario cards ── */
.scenario-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 28px;
  box-shadow: var(--shadow);
}
.scenario-quote {
  font-size: 1rem; color: var(--dark); line-height: 1.7;
  font-style: italic; margin-bottom: 16px;
}
.scenario-meta { display: flex; align-items: center; gap: 12px; }
.scenario-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff; flex-shrink: 0;
}
.scenario-name { font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.scenario-role { font-size: 0.8rem; color: var(--muted); }

/* ── Pricing cards ── */
.pricing-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 2px solid var(--border); padding: 32px;
  position: relative; transition: all 0.2s;
}
.pricing-card.featured {
  border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,107,255,0.08);
}
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff;
  padding: 4px 16px; border-radius: 99px;
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.pricing-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.pricing-desc { font-size: 0.88rem; color: var(--muted); margin-bottom: 24px; }
.pricing-amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; }
.pricing-amount span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pricing-features { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.pricing-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--dark);
}
.pricing-feature svg { color: var(--green); flex-shrink: 0; }

/* ── Footer ── */
.footer {
  background: var(--dark); color: #94A3B8;
  padding: 64px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.footer-brand-logo img {
  display: block;
  height: 28px;
  width: auto;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-size: 0.82rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.88rem; margin-bottom: 10px; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem;
}
.footer-bottom a { transition: color 0.15s; }
.footer-bottom a:hover { color: #fff; }

/* ── Dashboard layout ── */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 20px 8px;
  font-size: 1.15rem; font-weight: 800; color: var(--dark);
  letter-spacing: -0.02em; border-bottom: 1px solid var(--border);
  padding-bottom: 16px; margin-bottom: 8px;
}
.sidebar-logo span { color: var(--blue); }
.sidebar-section { padding: 8px 12px; margin-bottom: 4px; }
.sidebar-section-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); padding: 4px 8px; margin-bottom: 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  transition: all 0.15s; margin-bottom: 2px;
  min-height: 42px;
  width: 100%;
  line-height: 1.2;
  border: 0;
  background: transparent;
  text-align: left;
}
.sidebar-link:hover { background: var(--bg); color: var(--dark); }
.sidebar-link.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-link .badge { margin-left: auto; }
.sidebar-footer .sidebar-link {
  color: var(--red) !important;
  font-size: 0.88rem !important;
  font-weight: 600;
  padding: 9px 12px !important;
  border-radius: 10px !important;
}
.sidebar-footer .sidebar-link:hover {
  background: var(--red-light);
  color: #B91C1C !important;
}
.sidebar-panel {
  max-width: 86vw;
  overflow-y: auto;
}
.sidebar-panel .side-link,
.sidebar-panel button.side-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: left;
  font-family: inherit;
}
.sidebar-panel button.side-link {
  color: var(--red) !important;
}
.sidebar-panel button.side-link:hover {
  background: var(--red-light) !important;
  color: #B91C1C !important;
}
.app-main { flex: 1; overflow-x: hidden; }
.app-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0 32px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.app-header-title { font-weight: 700; font-size: 1rem; }
.app-header-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; justify-content: center;
}
.app-header-logo img { height: 30px; display: block; }
.app-content { padding: 32px; }

.trade-verification-banner {
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  color: #991B1B;
  font-size: 0.88rem;
  line-height: 1.6;
}
.trade-verification-banner strong { color: #7F1D1D; }
.trade-verification-banner .btn {
  border-color: #FCA5A5;
  color: #991B1B;
  background: #fff;
  flex-shrink: 0;
}
@media (max-width: 620px) {
  .trade-verification-banner { flex-direction: column; }
}

/* ── Job status ── */
.payment-choice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
}

.payment-choice-dialog {
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFF 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 24px 28px 22px;
}

.payment-choice-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.payment-choice-close:hover {
  color: var(--dark);
  border-color: var(--blue);
}

.payment-choice-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 10px;
}

.payment-choice-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.payment-choice-dialog h2 {
  margin: 0 42px 8px 0;
  color: var(--dark);
  font-size: 1.62rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.payment-choice-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 660px;
}

.payment-choice-job {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
  margin-bottom: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.payment-choice-job span,
.payment-choice-rows span {
  color: var(--muted);
}

.payment-choice-job strong {
  color: var(--dark);
  font-size: 1.18rem;
}

.payment-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.payment-choice-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  border: 1px solid #DDE6F3;
  border-radius: 18px;
  padding: 18px 18px 16px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

/* Fallback polish for older cached modal markup. */
.payment-choice-card > div:first-child:not(.payment-choice-card-head) {
  min-height: 92px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}

.payment-choice-card-flexible {
  border-color: #D7DFF0;
}

.payment-choice-card-head {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}

.payment-choice-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 900;
  font-size: 0.95rem;
}

.payment-choice-card-title {
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 5px;
  line-height: 1.25;
}

.payment-choice-card-text {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.48;
}

.payment-choice-rate {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  background: #F1F5FF;
  color: var(--blue);
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 800;
}

.payment-choice-total {
  background: #F8FAFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.payment-choice-total span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.payment-choice-total strong {
  display: block;
  color: var(--dark);
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.payment-choice-rows {
  border-top: 1px solid var(--border);
  padding-top: 4px;
  margin-top: 0;
}

.payment-choice-card > div:first-child:not(.payment-choice-card-head) + .payment-choice-rows {
  border-top: 0;
  padding-top: 0;
}

.payment-choice-rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  font-size: 0.9rem;
}

.payment-choice-rows strong {
  color: var(--dark);
  white-space: nowrap;
}

.payment-choice-card > div:first-child:not(.payment-choice-card-head) + .payment-choice-rows div:last-child {
  background: #F8FAFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 6px;
  padding: 10px 12px;
}

.payment-choice-card > div:first-child:not(.payment-choice-card-head) + .payment-choice-rows div:last-child strong {
  font-size: 1.05rem;
}

.payment-choice-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.payment-choice-card .btn {
  min-height: 44px;
  border-radius: 12px;
  margin-top: auto;
}

.payment-choice-card .btn,
.payment-choice-card .btn-secondary {
  background: var(--blue) !important;
  color: #fff !important;
  border-color: var(--blue) !important;
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.28);
}

.payment-choice-card .btn:hover,
.payment-choice-card .btn-secondary:hover {
  background: var(--blue-dark) !important;
  color: #fff !important;
  border-color: var(--blue-dark) !important;
}

@media (max-width: 700px) {
  .payment-choice-backdrop { align-items: flex-start; padding: 12px; }
  .payment-choice-dialog { padding: 22px 16px 18px; border-radius: 18px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .payment-choice-top { grid-template-columns: 1fr; align-items: stretch; }
  .payment-choice-grid { grid-template-columns: 1fr; }
  .payment-choice-dialog h2 { font-size: 1.5rem; margin-right: 42px; }
  .payment-choice-total strong { font-size: 1.25rem; }
  .payment-choice-card { padding: 16px; }
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.status-pending { background: #F59E0B; }
.status-active  { background: var(--green); }
.status-review  { background: var(--blue); }
.status-complete{ background: #94A3B8; }
.status-dispute { background: #EF4444; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
td { padding: 14px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ── Progress bar ── */
.progress-bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 99px; transition: width 0.4s; }
.progress-fill.green { background: var(--green); }

/* ── Wizard (mobile create job) ── */
.wizard-header { margin-bottom: 28px; }
.wizard-steps {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.wizard-step-dot {
  flex: 1; height: 4px; border-radius: 99px;
  background: var(--border); transition: background 0.3s;
}
.wizard-step-dot.done { background: var(--green); }
.wizard-step-dot.active { background: var(--blue); }
.wizard-step-label { font-size: 0.82rem; color: var(--muted); }
.wizard-step-label strong { color: var(--dark); }

/* ── Summary panel ── */
.summary-panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  position: sticky; top: 80px;
}
.summary-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 0.88rem;
}
.summary-row:not(:last-child) { border-bottom: 1px solid var(--bg); }
.summary-row .label { color: var(--muted); font-weight: 500; }
.summary-row .val { font-weight: 600; color: var(--dark); }
.summary-total {
  margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.summary-total-label { font-weight: 700; }
.summary-total-val { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; color: var(--blue); }

/* ── Payment options ── */
.pay-option {
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; cursor: pointer; transition: all 0.18s; margin-bottom: 16px;
  position: relative;
}
.pay-option:hover { border-color: var(--blue); }
.pay-option.selected { border-color: var(--blue); background: var(--blue-light); box-shadow: 0 0 0 4px rgba(47,107,255,0.08); }
.pay-option-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pay-option-name { font-weight: 700; font-size: 1rem; }
.pay-option-amount { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--blue); }
.pay-option-desc { font-size: 0.85rem; color: var(--muted); }
.pay-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.pay-option.selected .pay-radio { border-color: var(--blue); background: var(--blue); }
.pay-option.selected .pay-radio::after {
  content: ''; width: 8px; height: 8px;
  border-radius: 50%; background: #fff;
}

/* ── Milestone bar ── */
.milestone-list { display: flex; flex-direction: column; gap: 0; }
.milestone-item {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.milestone-item:last-child { border-bottom: none; }
.milestone-dot-wrap { display: flex; flex-direction: column; align-items: center; }
.milestone-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.milestone-dot.done { background: var(--green); color: #fff; }
.milestone-dot.active { background: var(--blue); color: #fff; }
.milestone-dot.pending { background: var(--border); color: var(--muted); }
.milestone-content { flex: 1; padding-top: 2px; }
.milestone-name { font-weight: 600; font-size: 0.9rem; }
.milestone-amount { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-in { animation: fadeIn 0.4s ease both; }
[data-delay="1"] { animation-delay: 0.1s; }
[data-delay="2"] { animation-delay: 0.2s; }
[data-delay="3"] { animation-delay: 0.3s; }
[data-delay="4"] { animation-delay: 0.4s; }
[data-delay="5"] { animation-delay: 0.5s; }

/* ── Hero mock UI ── */
.hero-mock {
  background: var(--white); border-radius: 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-mock-header {
  background: var(--bg); padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-mock-body { padding: 20px; }
.mock-job-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--bg); border-radius: 10px;
  margin-bottom: 8px; border: 1px solid var(--border);
}
.mock-job-title { font-size: 0.85rem; font-weight: 600; color: var(--dark); }
.mock-job-sub { font-size: 0.75rem; color: var(--muted); }
.mock-amount { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.mock-stat-row { display: flex; gap: 8px; margin-bottom: 12px; }
.mock-stat {
  flex: 1; background: var(--bg); border-radius: 10px;
  padding: 12px; border: 1px solid var(--border);
  text-align: center;
}
.mock-stat-val { font-size: 1.1rem; font-weight: 800; color: var(--dark); }
.mock-stat-label { font-size: 0.7rem; color: var(--muted); }
.mock-progress-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.mock-release-btn {
  width: 100%; background: var(--blue); color: #fff;
  border-radius: 8px; padding: 10px; text-align: center;
  font-size: 0.82rem; font-weight: 700; margin-top: 12px;
}

/* ── Shared app/dashboard components ── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(15,23,42,0.35);
}
.sidebar-overlay.open { display: block; }

.sidebar-toggle-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: none; border: none; color: var(--muted);
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.sidebar-toggle-btn:hover { background: var(--bg); color: var(--dark); }

.header-right { display: flex; align-items: center; gap: 16px; }
.bell-btn {
  position: relative; width: 36px; height: 36px; border-radius: 8px;
  background: none; border: none; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.bell-btn:hover { background: var(--bg); color: var(--dark); }
.bell-badge {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #EF4444; border: 2px solid var(--white);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--dark); }
.page-subtitle { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 24px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .container,
  .container-sm {
    width: 100%;
    max-width: 100%;
  }
  .section { padding: 80px 0; }
  .section-sm { padding: 56px 0; }
  .section-title { font-size: clamp(1.7rem, 6vw, 2.2rem); }
  .section-head { margin-bottom: 48px; }

  /* Nav */
  .nav-inner { min-width: 0; gap: 10px; }
  .nav-logo { min-width: 0; flex: 1 1 auto; }
  .nav-logo img { max-width: min(190px, 54vw); height: auto; }
  .nav-actions { flex: 0 0 auto; }
  .nav-links:not(.open) { display: none !important; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 16px 20px 20px; z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  body.nav-open { overflow: hidden; }
  .nav-links.open > a { padding: 11px 14px; border-radius: 10px; font-size: 0.95rem; }
  /* Hide desktop-only auth buttons when dropdown is open */
  .nav-links.open > .nav-auth-out,
  .nav-links.open > .nav-auth-in { display: none !important; }
  /* Show the mobile auth block */
  .nav-links.open > .nav-mobile-auth { display: flex; }
  .nav-toggle { display: flex !important; flex: 0 0 44px; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; margin-left: auto; cursor: pointer; border: 1.5px solid var(--border); background: #fff; padding: 0; }
  .nav-actions > .btn { display: none; }
  .nav-mobile-auth { display: none; }
  .nav-auth-in .nav-user-name { display: none; }

  /* Grids */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer { padding: 56px 0 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; margin-bottom: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* App */
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; left: 0; top: 0; bottom: 0; z-index: 200; width: min(280px, 86vw); box-shadow: var(--shadow-lg); }
  .sidebar-toggle-btn { display: flex; }
  .app-header { padding: 0 16px; }
  .app-header-logo img { height: 26px; }
  .app-content { padding: 24px 16px; }

  /* Components */
  .page-header { margin-bottom: 20px; }
  .page-title { font-size: 1.3rem; }
  .summary-panel { position: static; }
  .pricing-card { padding: 24px; }
  .card-p-lg { padding: 28px; }
  .card,
  .launch-card,
  .pricing-card,
  .scenario-card {
    max-width: 100%;
  }
  h1,
  h2,
  .section-title,
  .page-title,
  .hero-h1 {
    overflow-wrap: anywhere;
  }
  .trust-strip { gap: 16px; padding: 24px 0; }
  .scenario-card { padding: 24px; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .section-sm { padding: 48px 0; }

  /* Buttons — full width on mobile for CTAs */
  .hero-actions { flex-direction: column; gap: 14px; }
  .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }

  /* Trust strip — stack items */
  .trust-strip { grid-template-columns: 1fr; align-items: stretch; gap: 16px; padding: 28px 0; }
  .trust-item { justify-content: flex-start; text-align: left; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .container-sm { padding: 0 18px; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .trust-strip { gap: 14px; }
  .btn-lg { padding: 16px 24px; font-size: 0.97rem; }
  .section-head { margin-bottom: 40px; }
  .pay-option { padding: 18px; }
  .pay-option-amount { font-size: 1.2rem; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  th, td { white-space: normal; }
  td { word-break: break-word; }
  .scenario-card { padding: 20px; }
  .section-title { font-size: clamp(1.6rem, 7vw, 2rem); letter-spacing: -0.03em; }
  .section-sub { font-size: 0.97rem; }
  .footer { padding: 48px 0 24px; }
  .footer-grid { gap: 28px; }
}


/* ── Desktop nav polish ───────────────────────────────────── */
@media (min-width: 769px) {
  .nav-inner { gap: 18px; }
  .nav-links { gap: 2px; flex: 1; justify-content: flex-end; }
  .nav-links > a { padding: 8px 10px; font-size: 0.86rem; }
  .nav-auth-out, .nav-auth-in { margin-left: 8px; gap: 8px; }
  .nav-auth-out .btn, .nav-auth-in .btn { padding: 8px 13px; }
  .nav-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── Dashboard mobile fixes (≤650px) ───────────────────────── */
@media (max-width: 650px) {
  /* Last-line-of-defense overflow guard. */
  html, body { overflow-x: hidden; }
  body { max-width: 100%; }

  /* Centred topbar logo overlaps the page title on narrow screens — drop it. */
  .topbar-logo,
  .app-header-logo,
  .jobs-header-logo { display: none !important; }

  /* Header containers — give children min-width:0 so they shrink instead of overflow. */
  .topbar,
  .app-header,
  .jobs-header { padding: 0 14px; gap: 10px; }
  .topbar > *,
  .app-header > *,
  .jobs-header > * { min-width: 0; }

  .topbar .top-left,
  .app-header > div:first-child,
  .jobs-header > div:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .topbar .top-left h1,
  .app-header-title,
  .jobs-header-title,
  .jobs-header-sub {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
  }
  .topbar .top-left h1 { font-size: 1rem; }

  .topbar > *:last-child,
  .app-header .header-right,
  .jobs-header > *:last-child { flex-shrink: 0; }

  /* ── Mobile job cards ── */
  .table-card,
  .recent-jobs-card,
  .jobs-table-card {
    border-radius: 18px;
  }
  .table-card { overflow: hidden; }

  .table-card table, .table-card thead, .table-card tbody, .table-card th, .table-card td, .table-card tr,
  .recent-jobs-card table, .recent-jobs-card thead, .recent-jobs-card tbody, .recent-jobs-card th, .recent-jobs-card td, .recent-jobs-card tr,
  .jobs-table-card table, .jobs-table-card thead, .jobs-table-card tbody, .jobs-table-card th, .jobs-table-card td, .jobs-table-card tr {
    display: block;
  }

  .table-card thead,
  .recent-jobs-card thead,
  .jobs-table-card thead { display: none; }

  .table-card tr,
  .recent-jobs-card tr,
  .jobs-table-card tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    margin: 12px 0;
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
  }

  .table-card td,
  .recent-jobs-card td,
  .jobs-table-card td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
  }

  /* 1: Job title */
  .table-card td:nth-child(1),
  .recent-jobs-card td:nth-child(1),
  .jobs-table-card td:nth-child(1) {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.35;
    margin-bottom: 8px;
    padding-right: 42px !important;
  }

  /* 2: Customer / trade name */
  .table-card td:nth-child(2),
  .recent-jobs-card td:nth-child(2),
  .jobs-table-card td:nth-child(2) {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 10px;
  }

  /* 3: Value — sits inline next to status */
  .table-card td:nth-child(3),
  .recent-jobs-card td:nth-child(3),
  .jobs-table-card td:nth-child(3) {
    display: inline-block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    margin-right: 10px;
    margin-bottom: 8px;
  }

  /* 4: Status badge — inline next to value */
  .table-card td:nth-child(4),
  .recent-jobs-card td:nth-child(4),
  .jobs-table-card td:nth-child(4) {
    display: inline-block;
    margin-bottom: 8px;
  }

  /* 5: Date — small subtle row */
  .table-card td:nth-child(5),
  .recent-jobs-card td:nth-child(5),
  .jobs-table-card td:nth-child(5) {
    font-size: 0.86rem;
    color: var(--muted);
    margin-top: 4px;
  }

  /* Last cell (action button) — pinned top-right of the card */
  .table-card td:last-child,
  .recent-jobs-card td:last-child,
  .jobs-table-card td:last-child {
    position: absolute;
    top: 14px;
    right: 14px;
    margin: 0;
  }

  /* Loading / empty colspan rows fall back to a centred block. */
  .table-card td[colspan],
  .recent-jobs-card td[colspan],
  .jobs-table-card td[colspan] {
    position: static !important;
    padding: 28px 16px !important;
    text-align: center !important;
    font-weight: 500;
    margin: 0 !important;
    color: var(--muted);
  }

  .action-menu,
  .action-menu button {
    width: 34px;
    height: 34px;
  }
  .action-menu button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
  }

  .section-header { align-items: center; margin-bottom: 10px; }
  .section-title,
  .dash-section-title { font-size: 1.15rem; }
  .tbl-action { padding: 10px 14px; border-radius: 12px; }

  /* Job titles and badges wrap as words — never letter-by-letter. */
  .job-title-link,
  .badge,
  .status-badge {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }

}
