/* ============================================================
   Michigan Property Solutions — Partner Portal Design System
   Brand tokens extracted from michiganpropertysolutions.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap');

/* --- Design Tokens --- */
:root {
  --primary:        hsl(215, 45%, 9%);
  --primary-light:  hsl(215, 35%, 16%);
  --primary-hover:  hsl(215, 45%, 14%);
  --accent:         hsl(38, 55%, 48%);
  --accent-light:   hsl(38, 65%, 58%);
  --accent-dim:     hsl(38, 40%, 92%);
  --bg:             hsl(0, 0%, 100%);
  --bg-muted:       hsl(30, 10%, 96%);
  --bg-card:        hsl(0, 0%, 100%);
  --border:         hsl(30, 10%, 90%);
  --border-focus:   hsl(215, 45%, 9%);
  --text:           hsl(215, 45%, 9%);
  --text-muted:     hsl(215, 15%, 38%);
  --text-subtle:    hsl(215, 10%, 55%);
  --text-on-dark:   hsl(0, 0%, 100%);
  --radius:         6px;
  --radius-lg:      12px;
  --radius-xl:      20px;
  --shadow-sm:      0 1px 3px hsl(215 45% 9% / .06), 0 1px 2px hsl(215 45% 9% / .04);
  --shadow-md:      0 4px 12px hsl(215 45% 9% / .08), 0 2px 6px hsl(215 45% 9% / .05);
  --shadow-lg:      0 16px 40px hsl(215 45% 9% / .12), 0 4px 12px hsl(215 45% 9% / .07);
  --shadow-xl:      0 32px 80px hsl(215 45% 9% / .18), 0 8px 24px hsl(215 45% 9% / .1);
  --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nav-logo img {
  height: 38px;
  width: auto;
}

.nav-logo-text {
  font-family: 'Source Serif 4', serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

.nav-logo-text span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-link:hover { color: var(--primary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: var(--accent);
  color: var(--text-on-dark);
  box-shadow: 0 4px 14px hsl(38 55% 48% / .35);
}
.btn-accent:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 20px hsl(38 55% 48% / .45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--bg-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.625rem 1rem;
}
.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--primary);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-full { width: 100%; }

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

/* ============================================================
   HERO / LANDING
   ============================================================ */
#page-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, hsl(215 45% 9% / .06) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-muted) 0%, var(--bg) 50%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, hsl(38 55% 48% / .08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  color: hsl(38, 55%, 34%);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  line-height: 1.08;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-top: 1.5rem;
}

.hero-trust svg { color: var(--accent); }

.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}

.hero-card-header {
  background: var(--primary);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-card-header-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(0 0% 100% / .85);
  letter-spacing: 0.04em;
}

.hero-card-body { padding: 1.5rem; }

.partner-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.partner-stat {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid var(--border);
}

.partner-stat-value {
  font-family: 'Source Serif 4', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.partner-stat-value span { color: var(--accent); }
.partner-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

.partner-preview-list { display: flex; flex-direction: column; gap: 0.625rem; }
.partner-preview-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
}

.partner-preview-icon {
  width: 32px; height: 32px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.partner-preview-name { font-weight: 600; color: var(--primary); }
.partner-preview-role { font-size: 0.75rem; color: var(--text-muted); }
.partner-preview-badge {
  margin-left: auto;
  background: hsl(142 60% 92%);
  color: hsl(142 50% 35%);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
}

/* Benefits section */
.benefits {
  padding: 80px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.benefits-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.benefits-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 3rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.benefit-card:hover {
  border-color: hsl(215 45% 9% / .25);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.benefit-icon {
  width: 48px; height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.benefit-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--primary); }
.benefit-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* Footer */
.footer {
  background: var(--primary);
  color: hsl(0 0% 100% / .7);
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
}
.footer a { color: var(--accent-light); }

/* ============================================================
   STEP FLOW WRAPPER
   ============================================================ */
#page-flow {
  display: none;
  min-height: 100vh;
  background: var(--bg-muted);
  padding-top: 64px;
}

/* Progress bar */
.progress-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 64px;
  z-index: 90;
}

.progress-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 0;
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.progress-step {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.progress-step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-subtle);
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.progress-step.active .progress-step-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.progress-step.done .progress-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.progress-step-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-subtle);
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.progress-step.active .progress-step-label { color: var(--primary); font-weight: 600; }
.progress-step.done .progress-step-label { color: var(--accent); }

.progress-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  transition: var(--transition-slow);
}

.progress-step.done ~ .progress-step-line,
.progress-step.done + .progress-step-line {
  background: var(--accent);
}

/* ============================================================
   STEP PANELS
   ============================================================ */
.flow-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.step-panel {
  display: none;
  animation: stepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.step-card-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.step-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.step-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.step-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step-card-body { padding: 2rem; }

.step-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  background: hsl(30 10% 98%);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.375rem;
}

label .req {
  color: var(--accent);
  margin-left: 2px;
}

.input, .select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.input:focus, .select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(215 45% 9% / .08);
}

.input::placeholder, textarea::placeholder { color: var(--text-subtle); }

textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.input-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Checkbox group */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
}

.checkbox-item:hover { border-color: var(--primary); background: var(--bg-muted); }
.checkbox-item.checked {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: hsl(38, 55%, 28%);
}

.checkbox-item input { display: none; }
.checkbox-check {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.checkbox-item.checked .checkbox-check {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ============================================================
   STEP 1 — AUTH
   ============================================================ */
.auth-hero {
  text-align: center;
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary) 0%, hsl(215 45% 14%) 100%);
}

.auth-logo {
  height: 56px;
  margin: 0 auto 1.25rem;
}

.auth-hero-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.auth-hero-sub {
  font-size: 0.9375rem;
  color: hsl(0 0% 100% / .7);
}

.otp-display {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--accent-dim);
  border: 1.5px solid hsl(38 55% 70%);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  color: hsl(38 55% 28%);
}

.otp-display strong {
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  font-family: 'Inter', sans-serif;
  display: block;
  margin-top: 0.375rem;
}

.otp-inputs {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
  margin: 0.5rem 0;
}

.otp-input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  outline: none;
  background: var(--bg);
  color: var(--primary);
}

.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(215 45% 9% / .1);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-subtle);
  font-size: 0.8125rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   STEP 3 — EXPECTATIONS
   ============================================================ */
.expectations-header {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(215 45% 14%) 100%);
  padding: 2rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.expectations-header h2 {
  color: white;
  font-size: 1.625rem;
  margin-bottom: 0.5rem;
}

.expectations-header p {
  color: hsl(0 0% 100% / .7);
  font-size: 0.9375rem;
}

.expectation-section {
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border);
}

.expectation-section:last-child { border-bottom: none; }

.expectation-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.expectation-icon {
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.expectation-items { display: flex; flex-direction: column; gap: 0.625rem; }

.expectation-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.expectation-item::before {
  content: '✓';
  width: 20px; height: 20px;
  background: hsl(142 60% 92%);
  color: hsl(142 50% 35%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.revenue-highlight {
  background: var(--accent-dim);
  border: 1px solid hsl(38 55% 70%);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 0.75rem;
}

.revenue-highlight h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: hsl(38 55% 28%);
  margin-bottom: 0.75rem;
}

.revenue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(38 40% 80%);
  font-size: 0.875rem;
}

.revenue-row:last-child { border-bottom: none; }
.revenue-row-label { color: hsl(38 30% 40%); }
.revenue-row-value { font-weight: 700; color: var(--accent); }

/* ============================================================
   DOCUSIGN EMBED STEPS
   ============================================================ */
.docusign-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: #1a1a2e;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.docusign-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docusign-logo-icon {
  width: 32px; height: 32px;
  background: #F7C23F;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.docusign-badge {
  margin-left: auto;
  background: hsl(0 0% 100% / .1);
  color: hsl(0 0% 100% / .8);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  border: 1px solid hsl(0 0% 100% / .2);
}

.docusign-body {
  padding: 2rem;
}

.docusign-doc-preview {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.docusign-doc-toolbar {
  background: #f3f3f3;
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-toolbar-dot {
  width: 8px; height: 8px; border-radius: 50%;
}

.docusign-doc-content {
  padding: 2rem;
  min-height: 300px;
  font-size: 0.875rem;
  color: #333;
  line-height: 1.8;
}

.docusign-doc-content h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.125rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  text-align: center;
}

.docusign-doc-content h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin: 1rem 0 0.375rem;
}

.docusign-doc-content p { margin-bottom: 0.75rem; }

.docusign-sig-box {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  background: hsl(38 55% 97%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docusign-sig-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.docusign-sig-name {
  font-family: 'Source Serif 4', serif;
  font-size: 1.375rem;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.docusign-sig-name.signed { opacity: 1; }

.docusign-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.docusign-status.pending { }
.docusign-status.signed {
  background: hsl(142 60% 94%);
  color: hsl(142 50% 30%);
  border-color: hsl(142 60% 80%);
}

.docusign-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: hsl(40 90% 60%);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.docusign-status.signed .docusign-status-dot {
  background: hsl(142 60% 50%);
  animation: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ============================================================
   DASHBOARD
   ============================================================ */
#page-dashboard {
  display: none;
  min-height: 100vh;
  background: var(--bg-muted);
  padding-top: 64px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

/* Sidebar */
.dashboard-sidebar {
  background: var(--primary);
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-partner-info {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid hsl(0 0% 100% / .1);
  margin-bottom: 1rem;
}

.sidebar-avatar {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.sidebar-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
}

.sidebar-role {
  font-size: 0.75rem;
  color: hsl(0 0% 100% / .55);
  margin-top: 2px;
}

.sidebar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: hsl(142 60% 70%);
  font-weight: 500;
}

.sidebar-status::before {
  content: '';
  width: 6px; height: 6px;
  background: hsl(142 60% 60%);
  border-radius: 50%;
}

.sidebar-nav { padding: 0 0.75rem; }

.sidebar-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(0 0% 100% / .35);
  padding: 0.75rem 0.5rem 0.375rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(0 0% 100% / .65);
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: hsl(0 0% 100% / .08);
  color: white;
}

.sidebar-link.active {
  background: var(--accent);
  color: white;
}

.sidebar-link-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-badge {
  margin-left: auto;
  background: hsl(0 0% 100% / .15);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

.sidebar-link.active .sidebar-badge { background: hsl(0 0% 100% / .25); }

/* Dashboard main */
.dashboard-main {
  padding: 2rem;
  overflow-x: hidden;
}

.dashboard-tab { display: none; }
.dashboard-tab.active { display: block; animation: stepIn 0.3s ease both; }

.dashboard-greeting {
  margin-bottom: 1.75rem;
}

.dashboard-greeting h1 {
  font-size: 1.875rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.dashboard-greeting p { color: var(--text-muted); font-size: 0.9375rem; }

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-family: 'Source Serif 4', serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-card-value.accent { color: var(--accent); }

.stat-card-change {
  font-size: 0.75rem;
  color: hsl(142 50% 40%);
  font-weight: 600;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Jobs table */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
}

.card-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.table { width: 100%; border-collapse: collapse; }

.table th {
  background: var(--bg-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: hsl(30 10% 98%); }

.job-title { font-weight: 600; color: var(--primary); }
.job-address { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.625rem;
  border-radius: 100px;
}

.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.status-pending { background: hsl(40 90% 95%); color: hsl(40 70% 35%); }
.status-active  { background: hsl(210 80% 95%); color: hsl(210 60% 35%); }
.status-done    { background: hsl(142 60% 93%); color: hsl(142 50% 30%); }

.table-action-btn {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.table-action-btn:hover { background: var(--primary); color: white; }

/* Photo upload */
.photo-grid-section { margin-bottom: 1.5rem; }

.job-select-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.job-select-row .select { max-width: 320px; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.25rem;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-text { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0.375rem; }
.upload-sub { font-size: 0.8125rem; color: var(--text-subtle); }
.upload-zone input { display: none; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: var(--transition);
}

.photo-card:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

.photo-card img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(215 45% 9% / .7) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 0.625rem;
}

.photo-card:hover .photo-card-overlay { opacity: 1; }

.photo-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.photo-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px; height: 28px;
  background: hsl(0 72% 45% / .85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.photo-card:hover .photo-delete { opacity: 1; }

/* Revenue */
.revenue-overview {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.revenue-chart-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.revenue-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.625rem;
  flex: 1;
  padding-top: 1rem;
}

.revenue-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  height: 100%;
  justify-content: flex-end;
}

.revenue-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 4px;
}

.revenue-bar:hover { background: var(--accent); }

.revenue-bar-label {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  font-weight: 500;
  white-space: nowrap;
}

.revenue-bar-value {
  position: absolute;
  top: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  opacity: 0;
  transition: var(--transition);
}

.revenue-bar:hover .revenue-bar-value { opacity: 1; }

.revenue-summary-card {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  display: flex;
  flex-direction: column;
}

.revenue-summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(0 0% 100% / .55);
  margin-bottom: 0.5rem;
}

.revenue-summary-amount {
  font-family: 'Source Serif 4', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.revenue-summary-sub {
  font-size: 0.8125rem;
  color: hsl(0 0% 100% / .6);
  margin-bottom: 1.25rem;
}

.revenue-breakdown { margin-top: auto; }

.revenue-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-top: 1px solid hsl(0 0% 100% / .1);
  font-size: 0.8125rem;
}

.revenue-breakdown-row-label { color: hsl(0 0% 100% / .65); }
.revenue-breakdown-row-val { font-weight: 600; color: white; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: hsl(215 45% 9% / .5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-close {
  width: 32px; height: 32px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover { background: var(--primary); color: white; }

.modal-body { padding: 1.5rem; }

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--primary);
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s ease both;
  border-left: 4px solid var(--accent);
}

.toast.success { border-left-color: hsl(142 60% 50%); }
.toast.error { border-left-color: hsl(0 72% 55%); background: hsl(0 50% 15%); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(24px); }
}

.toast.removing { animation: toastOut 0.25s ease forwards; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 96px 0 60px; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; height: auto; display: flex; flex-wrap: wrap; }
  .revenue-overview { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .step-card-header, .step-card-body, .step-actions { padding: 1.25rem; }
  .otp-input { width: 44px; height: 52px; font-size: 1.25rem; }
  .progress-step-label { display: none; }
  .progress-inner { padding: 0.875rem 0; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .checkbox-group { grid-template-columns: 1fr; }
}

/* ============================================================
   Chat UI Styles
   ============================================================ */

.partner-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  margin-bottom: 0.5rem;
}

.partner-chat-msg.from-me {
  align-self: flex-end;
  align-items: flex-end;
}

.partner-chat-msg.from-them {
  align-self: flex-start;
  align-items: flex-start;
}

.partner-chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.from-me .partner-chat-bubble {
  background-color: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.from-them .partner-chat-bubble {
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.partner-chat-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  padding: 0 0.25rem;
}
