:root {
  --primary: #0f766e;
  --primary-2: #14b8a6;
  --accent: #d6a84f;
  --bg: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--primary);
}

.btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: #115e59;
  --bs-btn-hover-border-color: #115e59;
}

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: var(--border);
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.16);
}

.app-shell {
  min-height: 100vh;
}

.landing-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(226, 232, 240, 0.72) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.72) 1px, transparent 1px),
    radial-gradient(circle at 84% 16%, rgba(214, 168, 79, 0.16), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.portal-nav {
  position: relative;
  z-index: 5;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
  backdrop-filter: blur(16px);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #0f172a;
  text-decoration: none;
}

.portal-brand strong,
.portal-brand small {
  display: block;
  line-height: 1.15;
}

.portal-brand strong {
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
}

.portal-brand small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.portal-admin-link {
  flex: 0 0 auto;
}

.landing-hero {
  min-height: calc(100vh - 91px);
  display: flex;
  align-items: center;
  padding: 54px 0 64px;
}

.landing-hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #0f172a;
  font-size: clamp(2.05rem, 5vw, 4.55rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin: 0 0 28px;
  color: #475569;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.72;
}

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

.hero-actions .btn,
.portal-preview .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-support {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
  color: #334155;
  font-size: 0.94rem;
  font-weight: 800;
}

.hero-support span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-support i {
  color: var(--primary);
}

.portal-preview {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

.portal-preview::before {
  content: "";
  position: absolute;
  inset: 16px -14px -14px 22px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(214, 168, 79, 0.16));
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.84rem;
}

.preview-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
}

.preview-topbar span:first-child {
  background: var(--accent);
}

.preview-topbar strong {
  margin-left: auto;
  font-weight: 900;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(210px, 0.7fr);
  gap: 14px;
  padding: 14px 0 0;
}

.preview-main,
.preview-action {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.preview-main {
  min-height: 300px;
  padding: 24px;
}

.preview-icon,
.auth-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ccfbf1;
  color: var(--primary);
  font-size: 1.35rem;
}

.preview-main h2 {
  margin: 22px 0 10px;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 900;
}

.preview-main p {
  max-width: 360px;
  margin-bottom: 24px;
  color: #64748b;
  line-height: 1.65;
}

.preview-side {
  display: grid;
  gap: 14px;
}

.preview-action {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 112px;
  padding: 18px;
  color: #0f172a;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.preview-action:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 16px 38px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px);
}

.preview-action i {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--primary);
  font-size: 1.18rem;
}

.preview-action strong,
.preview-action small {
  display: block;
}

.preview-action strong {
  font-weight: 900;
}

.preview-action small {
  margin-top: 3px;
  color: #64748b;
  font-weight: 700;
}

.public-header {
  padding: 30px 0 34px;
  background: linear-gradient(135deg, #0b5f59 0%, #0f766e 52%, #123b38 100%);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}

.public-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
  color: #fff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
}

.public-header p {
  max-width: 920px;
  color: #ecfeff;
  opacity: 1 !important;
  line-height: 1.6;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #172554;
  font-weight: 900;
  letter-spacing: 0;
}

.form-wrap {
  max-width: 1120px;
  margin: 24px auto 56px;
  padding: 0 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.sticky-progress {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 16px 18px;
  border-bottom: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.sticky-progress strong {
  color: #0f172a;
}

.sticky-progress [data-autosave-indicator] {
  color: #475569 !important;
  font-weight: 700;
}

.stepper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-color: #94a3b8 #e2e8f0;
}

.step-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 0.86rem;
}

.step-pill .num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #cbd5e1;
  color: var(--text);
  font-size: 0.8rem;
}

.step-pill.active {
  border-color: var(--primary);
  color: #064e3b;
  background: #ccfbf1;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.28);
}

.step-pill.active .num {
  background: var(--primary);
  color: #fff;
}

.step-pill.done .num {
  background: var(--primary);
  color: #fff;
}

.step-pill.warn .num {
  background: #f59e0b;
  color: #fff;
}

.form-step {
  display: none;
  padding: 28px;
  scroll-margin-top: 180px;
}

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

.section-title {
  font-size: 1.32rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
}

.section-desc {
  color: #475569;
  margin-bottom: 20px;
}

.form-label {
  color: #334155;
  font-weight: 700;
  margin-bottom: 6px;
}

.accordion {
  --bs-accordion-border-color: #cbd5e1;
  --bs-accordion-btn-color: #0f172a;
  --bs-accordion-active-color: #064e3b;
  --bs-accordion-active-bg: #ccfbf1;
  border-radius: 8px;
}

.accordion-item {
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  overflow: hidden;
}

.accordion-item + .accordion-item {
  margin-top: 12px;
}

.accordion-button {
  min-height: 52px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  background: #ccfbf1;
  color: #064e3b;
}

.accordion-button:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

.accordion-body {
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  padding: 18px;
}

.repeat-card,
.upload-card {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.repeat-card {
  border-left: 4px solid var(--primary-2);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.form-step h3 {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #0f172a;
}

.upload-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: #eef6f5;
  cursor: pointer;
}

.upload-card strong {
  color: #0f172a;
}

.upload-card:focus-within,
.upload-card:hover {
  border-color: var(--primary);
  background: #ecfdf5;
}

.review-box {
  border-left: 4px solid var(--primary);
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 8px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(226, 232, 240, 0.62) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.62) 1px, transparent 1px),
    radial-gradient(circle at 16% 16%, rgba(20, 184, 166, 0.15), transparent 26%),
    linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.auth-shell {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px;
  align-items: stretch;
}

.auth-visual,
.auth-card {
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
}

.auth-visual {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  overflow: hidden;
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.13), rgba(214, 168, 79, 0.12));
}

.admin-auth .auth-visual::after {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.12), rgba(15, 118, 110, 0.13));
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 510px;
}

.auth-visual-copy h1 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0;
}

.auth-visual-copy p {
  margin: 0;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.72;
}

.auth-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 14px;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  background: #ecfdf5;
  color: #115e59;
  font-weight: 800;
}

.auth-note i {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
}

.auth-card {
  width: 100%;
  padding: 30px;
}

.auth-page > .auth-card {
  width: min(100%, 440px);
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.auth-card-head h2 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 900;
}

.auth-card-head p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 2;
  color: #64748b;
  transform: translateY(-50%);
}

.input-icon .form-control {
  padding-left: 42px;
}

.auth-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #f1f5f9;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f3f3b 0%, #0b302d 100%);
  color: #dff7f4;
  padding: 22px;
  box-shadow: 12px 0 30px rgba(15, 23, 42, 0.08);
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 0;
  border-radius: 8px;
  color: #dff7f4;
  text-decoration: none;
  font-weight: 700;
}

.admin-sidebar a i {
  width: 22px;
  font-size: 1.05rem;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.admin-main {
  padding: 24px;
  overflow-x: hidden;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 62%, #123b38 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.22);
}

.admin-hero-kicker {
  color: #f6d889;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-hero h2 {
  margin: 4px 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
}

.admin-hero p {
  max-width: 680px;
  margin: 0;
  color: #dff7f4;
}

.stat-card {
  position: relative;
  min-height: 138px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #ccfbf1;
  color: var(--primary);
  font-size: 1.25rem;
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.stat-card-warning .stat-icon {
  background: #fef3c7;
  color: #b45309;
}

.stat-card-danger .stat-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.stat-card-success .stat-icon {
  background: #dcfce7;
  color: #15803d;
}

.stat-card-teal .stat-icon {
  background: #ccfbf1;
  color: #0f766e;
}

.table-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.table-card h2 i {
  color: var(--primary);
  margin-right: 6px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-row strong {
  color: var(--primary);
}

.logged-in-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #ecfdf5;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-list dd {
  font-weight: 700;
  margin-bottom: 12px;
}

.pdf-page {
  font-family: DejaVu Sans, sans-serif;
  font-size: 11px;
  color: #111827;
}

.pdf-page h1,
.pdf-page h2 {
  color: #0f766e;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.pdf-table th,
.pdf-table td {
  border: 1px solid #cbd5e1;
  padding: 6px;
  vertical-align: top;
}

.pdf-table th {
  background: #ecfdf5;
}

@media (max-width: 900px) {
  .landing-hero {
    min-height: auto;
    padding: 36px 0 48px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-main {
    min-height: 230px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .auth-visual {
    min-height: auto;
    gap: 34px;
  }

  .auth-visual-copy h1 {
    max-width: 520px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
  }

  .admin-sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 15px;
    background: #eef2f7;
  }

  .portal-nav {
    padding: 12px 0;
  }

  .portal-nav .container {
    align-items: flex-start !important;
  }

  .portal-brand {
    gap: 10px;
  }

  .portal-brand small {
    display: none;
  }

  .portal-admin-link {
    min-height: 40px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.86rem;
  }

  .landing-hero {
    padding: 26px 0 36px;
  }

  .landing-hero h1 {
    font-size: 2.08rem;
    line-height: 1.08;
  }

  .hero-copy {
    font-size: 0.96rem;
    line-height: 1.58;
    margin-bottom: 20px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .hero-support {
    display: grid;
    gap: 8px;
    margin-top: 20px;
  }

  .portal-preview {
    padding: 10px;
  }

  .portal-preview::before {
    inset: 12px -8px -8px 12px;
  }

  .preview-grid {
    gap: 10px;
    padding-top: 10px;
  }

  .preview-main,
  .preview-action {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  }

  .preview-main {
    min-height: auto;
    padding: 18px;
  }

  .preview-main h2 {
    margin-top: 16px;
    font-size: 1.22rem;
  }

  .preview-main p {
    margin-bottom: 18px;
  }

  .preview-action {
    min-height: 86px;
    padding: 14px;
  }

  .auth-page {
    padding: 14px;
  }

  .auth-shell {
    gap: 12px;
  }

  .auth-visual,
  .auth-card {
    border-radius: 8px;
  }

  .auth-visual {
    gap: 26px;
    padding: 20px;
  }

  .auth-visual::after {
    right: -120px;
    bottom: -130px;
  }

  .auth-visual-copy h1 {
    font-size: 1.7rem;
    line-height: 1.12;
  }

  .auth-visual-copy p {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .auth-note {
    align-items: flex-start;
    padding: 12px;
    font-size: 0.88rem;
  }

  .auth-card {
    padding: 20px;
  }

  .auth-card-head {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .auth-card-head h2 {
    font-size: 1.3rem;
  }

  .public-header {
    padding: 18px 0 20px;
  }

  .public-header .container {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: flex-start !important;
    gap: 12px !important;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 0.86rem;
  }

  .public-header h1 {
    font-size: 1.16rem;
    line-height: 1.25;
    margin-bottom: 6px !important;
  }

  .public-header p {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .form-wrap {
    margin-top: 10px;
    margin-bottom: 28px;
    padding: 0 8px;
  }

  .panel {
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  }

  .sticky-progress {
    position: sticky;
    top: 0;
    padding: 10px 10px 12px;
    border-radius: 8px 8px 0 0;
  }

  .sticky-progress .d-flex {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  .sticky-progress [data-autosave-indicator] {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .sticky-progress .progress {
    height: 8px !important;
    margin-bottom: 10px !important;
  }

  .stepper {
    gap: 8px;
    margin: 0 -4px;
    padding: 1px 4px 8px;
    scroll-snap-type: x proximity;
  }

  .step-pill {
    min-width: 96px;
    max-width: 112px;
    min-height: 58px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding: 8px 9px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
    scroll-snap-align: start;
  }

  .step-pill .num {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .form-step {
    padding: 16px 12px 18px;
    scroll-margin-top: 118px;
  }

  .section-title {
    font-size: 1.15rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .section-desc {
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 16px;
  }

  .row.g-3 {
    --bs-gutter-y: 0.85rem;
  }

  .row.g-4 {
    --bs-gutter-y: 1rem;
  }

  .form-label {
    font-size: 0.9rem;
  }

  .form-control,
  .form-select {
    min-height: 48px;
    font-size: 16px;
    padding-left: 12px;
    padding-right: 12px;
  }

  textarea.form-control {
    min-height: 92px;
  }

  .accordion-item + .accordion-item {
    margin-top: 10px;
  }

  .accordion-button {
    min-height: 48px;
    padding: 12px;
    font-size: 0.93rem;
  }

  .accordion-body {
    padding: 12px;
  }

  .repeat-card,
  .review-box {
    padding: 12px;
  }

  .repeat-card {
    border-left-width: 3px;
  }

  .form-step h3 {
    display: flex;
    width: 100%;
    min-height: 32px;
    font-size: 0.92rem;
  }

  .btn {
    min-height: 46px;
    font-size: 0.94rem;
  }

  .btn-sm {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .form-actions {
    display: grid !important;
    grid-template-columns: 0.9fr 1.25fr 0.9fr;
    gap: 6px;
    position: sticky;
    bottom: 0;
    z-index: 14;
    margin: 22px -12px -18px;
    padding: 10px;
    border-top: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08);
  }

  .form-actions .btn {
    width: 100%;
    min-height: 42px;
    padding: 7px 6px;
    font-size: 0.78rem;
    line-height: 1.15;
    white-space: normal;
  }

  .form-actions .btn-primary {
    order: 3;
  }

  .form-actions [data-save-draft] {
    order: 2;
  }

  .form-actions [data-prev-step] {
    order: 1;
  }

  .logged-in-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .public-header h1 {
    font-size: 1.04rem;
  }

  .public-header p {
    font-size: 0.82rem;
  }

  .step-pill {
    min-width: 88px;
    max-width: 98px;
    font-size: 0.68rem;
  }

  .form-wrap {
    padding: 0 6px;
  }

  .form-actions {
    grid-template-columns: 0.82fr 1.36fr 0.82fr;
    gap: 5px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .form-actions .btn {
    font-size: 0.72rem;
    padding-left: 4px;
    padding-right: 4px;
  }

}
