.mrc-card,
.mrc-tracking-result {
  background: linear-gradient(180deg, #eaf5ff 0%, #f7fbff 100%);
  border: 1px solid #cfe4fb;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 14px 35px rgba(24, 78, 145, 0.10);
  margin: 20px 0;
}

.mrc-card h2,
.mrc-tracking-result h3 {
  margin-top: 0;
  color: #0f172a;
}

.mrc-intake-card {
  background: linear-gradient(180deg, #dff1ff 0%, #eef7ff 45%, #f9fcff 100%);
  border-color: #bddcf9;
}

.mrc-intake-topbar,
.mrc-tracking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d2e7fb;
}

.mrc-form-badge,
.mrc-eyebrow {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.mrc-form-version {
  min-width: 70px;
  text-align: center;
  border-radius: 999px;
  background: #0f3f77;
  color: #fff;
  font-weight: 700;
  padding: 9px 14px;
}

.mrc-intake-title {
  margin: 0;
}

.mrc-form-grid,
.mrc-tracker-form,
.mrc-tracking-grid,
.mrc-photo-grid,
.mrc-photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mrc-photo-grid-three,
.mrc-photo-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mrc-full,
.mrc-tracker-form p:last-child,
.mrc-photo-help,
.mrc-legal-box,
.mrc-pattern-box,
.mrc-tracking-section {
  grid-column: 1 / -1;
}

.mrc-section-title {
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d6e8fb;
}

.mrc-section-title h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #0f172a;
}

.mrc-section-title p,
.mrc-card small,
.mrc-photo-help,
.mrc-acceptance-status,
.mrc-empty-inline,
.mrc-date,
.mrc-clause-copy li,
.mrc-modal-check {
  color: #4b6485;
}

.mrc-section-title p,
.mrc-acceptance-status,
.mrc-empty-inline,
.mrc-date,
.mrc-modal-check {
  margin: 0;
  font-size: 14px;
}

.mrc-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1e3a5f;
}

.mrc-card input,
.mrc-card textarea,
.mrc-card select {
  width: 100%;
  border: 1px solid #bfd8f5;
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  box-sizing: border-box;
  font-size: 15px;
}

.mrc-card input:focus,
.mrc-card textarea:focus,
.mrc-card select:focus,
.mrc-pattern-dot:focus,
.mrc-modal-close:focus,
.mrc-card button:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.mrc-intake-form > p,
.mrc-intake-form > div {
  margin: 0;
}

.mrc-card button,
.mrc-primary-button,
.mrc-secondary-button {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f3f77 0%, #1d4ed8 100%);
  color: #fff;
  padding: 14px 22px;
  font-weight: 700;
  cursor: pointer;
}

.mrc-secondary-button {
  background: #ffffff;
  color: #0f3f77;
  border: 1px solid #bfd8f5;
}

.mrc-camera-button {
  width: 100%;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mrc-camera-icon {
  font-size: 18px;
}

.mrc-upload-field,
.mrc-legal-box,
.mrc-pattern-box,
.mrc-tracking-section,
.mrc-photo-preview-card {
  border: 1px solid #d6e8fb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.mrc-image-preview {
  margin-top: 12px;
  min-height: 170px;
  border-radius: 16px;
  border: 1px solid #d4e7fb;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mrc-image-preview span {
  color: #6481a8;
  font-size: 14px;
}

.mrc-image-preview img,
.mrc-photo-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.mrc-damage-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mrc-damage-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d7e7fb;
  padding: 10px 12px;
  margin: 0;
  font-weight: 500;
}

.mrc-damage-checklist input {
  width: auto;
  margin: 0;
}

.mrc-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  gap: 14px;
  justify-content: start;
}

.mrc-pattern-dot {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 2px solid #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 100%);
  cursor: pointer;
}

.mrc-pattern-dot.is-active {
  background: linear-gradient(135deg, #0f3f77 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
}

.mrc-pattern-actions,
.mrc-signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.mrc-acceptance-status {
  margin-top: 12px;
  font-weight: 600;
}

.mrc-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.mrc-modal.is-visible {
  display: block;
}

.mrc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

.mrc-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 4vh auto;
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  max-height: 92vh;
  overflow: auto;
}

.mrc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
}

.mrc-clause-copy {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 16px;
  padding: 18px;
  margin: 16px 0;
}

.mrc-clause-copy h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.mrc-clause-copy ul {
  margin: 0;
  padding-left: 18px;
}

#mrc-signature-canvas {
  width: 100%;
  height: 220px;
  border: 2px dashed #93c5fd;
  border-radius: 16px;
  background: #fff;
  display: block;
  touch-action: none;
}

.mrc-alert {
  border-radius: 16px;
  padding: 14px 18px;
  margin: 0 0 18px;
  border: 1px solid transparent;
}

.mrc-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.mrc-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.mrc-mini-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5c7190;
  margin-bottom: 4px;
}

.mrc-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
}

.mrc-received { background: #e0f2fe; color: #075985; }
.mrc-waiting_review { background: #f3f4f6; color: #374151; }
.mrc-diagnosed { background: #ede9fe; color: #5b21b6; }
.mrc-waiting_approval { background: #fff7ed; color: #c2410c; }
.mrc-in_repair { background: #dbeafe; color: #1d4ed8; }
.mrc-ready { background: #dcfce7; color: #166534; }
.mrc-delivered { background: #ecfccb; color: #3f6212; }
.mrc-cancelled { background: #fee2e2; color: #991b1b; }

.mrc-extra-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 24px;
}

.mrc-extra-meta span,
.mrc-badge-list span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d9e9fb;
  padding: 10px 14px;
  font-size: 14px;
}

.mrc-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mrc-timeline {
  position: relative;
  margin-top: 10px;
}

.mrc-timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding-bottom: 18px;
}

.mrc-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #1d4ed8;
  margin-top: 5px;
}

@media (max-width: 900px) {
  .mrc-photo-grid-three,
  .mrc-photo-preview-grid,
  .mrc-damage-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mrc-form-grid,
  .mrc-tracker-form,
  .mrc-tracking-grid,
  .mrc-photo-grid,
  .mrc-photo-preview-grid,
  .mrc-damage-checklist {
    grid-template-columns: 1fr;
  }

  .mrc-pattern-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mrc-pattern-dot {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .mrc-intake-topbar,
  .mrc-tracking-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .mrc-modal-dialog {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }
}
