/* =========================================================
   MITCHPATH LOGISTIC LLC
   CONTRACT CARRIER APPLICATION
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.contract-page {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: #2f2622;
  background: #ffffff;
  position: relative;
  overflow-x: hidden;
}

body.contract-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: -3;
}

.page-bg {
  position: fixed;
  top: calc(50% + 80px);
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: url("../assets/mitchpathlogo.png") no-repeat center center;
  background-size: contain;
  opacity: 0.72;
  z-index: -2;
  pointer-events: none;
}

.app-shell {
  width: min(1320px, calc(100% - 60px));
  margin: 0 auto;
  padding: 34px 0 40px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.sidebar,
.main-panel {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 24px;
}

.sidebar-brand,
.progress-panel,
.topbar,
.section-card,
.form-actions {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(171, 134, 110, 0.14);
  border-radius: 28px;
  box-shadow: 0 10px 24px rgba(91, 62, 49, 0.05);
}

.sidebar-brand {
  padding: 28px 24px 22px;
  margin-bottom: 20px;
  text-align: center;
}

.sidebar-brand img {
  width: 100%;
  max-width: 160px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

.sidebar-brand-text h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
  color: #2f2622;
}

.sidebar-brand-text p {
  margin: 10px 0 0;
  color: #5d4b43;
  font-size: 0.98rem;
  line-height: 1.6;
}

.progress-panel {
  padding: 24px;
  min-height: 760px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  color: #6f4f42;
  font-size: 0.95rem;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(185, 125, 98, 0.14);
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-fill {
  width: 12.5%;
  height: 100%;
  border-radius: 999px;
  background: #8c5a45;
  transition: width 0.25s ease;
}

.step-list {
  margin: 0;
  padding-left: 20px;
}

.step-list li {
  margin-bottom: 12px;
  color: #6a564e;
  line-height: 1.5;
  font-size: 1rem;
}

.step-list li.active {
  color: #8a5d47;
  font-weight: 700;
}

.step-list li.complete {
  color: #5d4b43;
}

.topbar {
  padding: 28px 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.15;
  color: #2f2622;
}

.topbar p {
  margin: 0;
  color: #5f4d46;
  line-height: 1.7;
  font-size: 1rem;
}

.return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.88);
  color: #6f4f42;
  border: 1px solid rgba(185, 125, 98, 0.3);
  white-space: nowrap;
}

.return-link:hover {
  background: rgba(248, 238, 232, 0.95);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.section-card {
  padding: 30px 28px;
  margin-bottom: 22px;
  min-height: 680px;
}

.section-head h3 {
  margin: 0 0 10px;
  font-size: 1.95rem;
  line-height: 1.15;
  color: #2f2622;
}

.section-head p {
  margin: 0 0 22px;
  color: #5f4d46;
  font-size: 1rem;
  line-height: 1.8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px 20px;
  align-content: start;
}

.field {
  display: flex;
  flex-direction: column;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  margin-bottom: 8px;
  font-weight: 700;
  color: #4e3b34;
  font-size: 1rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(171, 134, 110, 0.24);
  border-radius: 16px;
  background: #ffffff;
  color: #2f2622;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(140, 90, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(140, 90, 69, 0.10);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.checkbox-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #5f4d46;
  line-height: 1.7;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.review-box {
  margin-top: 18px;
  padding: 22px 20px;
  border-radius: 22px;
  background: rgba(250, 246, 243, 0.92);
  border: 1px solid rgba(185, 125, 98, 0.12);
  color: #5f4d46;
  line-height: 1.8;
}

.review-box h4 {
  margin: 0 0 12px;
  color: #342722;
  font-size: 1.05rem;
}

.review-box p {
  margin: 0 0 10px;
}

.signature-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px 20px;
  margin-top: 22px;
}

.form-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 22px;
  min-height: 118px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary,
.btn-secondary {
  background: rgba(255, 255, 255, 0.88);
  color: #6f4f42;
  border: 1px solid rgba(185, 125, 98, 0.3);
}

.btn-primary:hover,
.btn-secondary:hover {
  background: rgba(248, 238, 232, 0.95);
}

.hidden {
  display: none !important;
}

.field-error {
  border-color: #b24b4b !important;
  box-shadow: 0 0 0 3px rgba(178, 75, 75, 0.10) !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .progress-panel,
  .section-card {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100%, calc(100% - 30px));
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid,
  .signature-wrap {
    grid-template-columns: 1fr;
  }

  .page-bg {
    width: 520px;
    height: 520px;
    top: calc(50% + 60px);
  }
}

@media (max-width: 768px) {
  .app-shell {
    padding: 20px 0 28px;
  }

  .sidebar-brand,
  .progress-panel,
  .topbar,
  .section-card,
  .form-actions {
    border-radius: 22px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .topbar h2 {
    font-size: 1.75rem;
  }

  .section-head h3 {
    font-size: 1.6rem;
  }

  .page-bg {
    width: 430px;
    height: 430px;
    top: calc(50% + 60px);
  }
}

@media (max-width: 480px) {
  .page-bg {
    width: 320px;
    height: 320px;
    top: calc(50% + 50px);
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}