.home-order-hero {
  align-items: start;
  grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
  gap: 64px;
  padding-top: 54px;
  padding-bottom: 54px;
}
.home-order-hero .hero-copy { padding-top: 100px; }
.home-upload-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe7f5;
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(31, 64, 112, .16);
}
.home-upload-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: #13233b;
  color: #fff;
}
.customer-logo b { font-size: 23px; line-height: 1.1; }
.customer-logo small { margin-top: 4px; font-size: 13px; }
.home-upload-head > div { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.home-upload-head small { color: #86bafc; font-size: 10px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.home-upload-head h2 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; }
.home-upload-head > span { padding: 6px 10px; border-radius: 99px; background: #fff; color: #1769e0; font-size: 11px; font-weight: 900; }
.home-upload-form { display: grid; gap: 17px; padding: 22px 24px 24px; }
.home-basic-grid, .home-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-wide { grid-column: 1 / -1; }
.home-upload-form label { display: grid; gap: 6px; color: #3e526a; font-size: 12px; font-weight: 800; }
.home-upload-form input, .home-upload-form select, .home-upload-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #cfd9e5;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}
.school-memory-field { display: grid; gap: 8px; min-width: 0; }
.school-memory-choice,
.home-upload-form .school-memory-choice {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid #d9e7f7;
  border-radius: 9px;
  background: #f5f9ff;
  color: #335574;
  font-size: 11px;
  font-weight: 800;
}
.school-memory-choice input[type="checkbox"],
.home-upload-form .school-memory-choice input[type="checkbox"] {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: #1769e0;
}
.school-memory-choice span { white-space: nowrap; }
.school-memory-choice small {
  min-width: 0;
  margin-left: auto;
  color: #6f86a0;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}
.home-upload-zones { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; }
.home-dropzone {
  position: relative;
  display: grid !important;
  align-content: center;
  justify-items: center;
  gap: 5px;
  min-height: 126px;
  padding: 15px;
  border: 1.5px dashed #98b9e6;
  border-radius: 13px;
  background: #f7fbff;
  text-align: center;
  cursor: pointer;
}
.home-dropzone:hover { border-color: #1769e0; background: #eef6ff; }
.home-dropzone i { position: absolute; top: 9px; left: 10px; color: #1769e0; font-size: 10px; font-style: normal; font-weight: 900; }
.home-dropzone strong { color: #183550; font-size: 14px; }
.home-dropzone span { color: #7d8fa2; font-size: 10px; font-weight: 500; }
.home-dropzone em { display: block; max-width: 100%; overflow: hidden; color: #1769e0; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.home-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.allocation-zone { border-color: #91c8b3; background: #f5fbf8; }
.allocation-zone:hover { border-color: #1d8a60; background: #edf9f3; }
.allocation-zone i, .allocation-zone em { color: #18805a; }
.home-more { border: 1px solid #e1e7ef; border-radius: 10px; background: #fafcff; }
.home-more summary { padding: 11px 13px; color: #667a91; font-size: 11px; font-weight: 800; cursor: pointer; }
.home-more > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 2px 13px 13px; }
.home-submit { border: 0; border-radius: 11px; padding: 13px; background: #1769e0; color: #fff; font: inherit; font-weight: 900; cursor: pointer; box-shadow: 0 10px 22px rgba(23, 105, 224, .18); }
.home-submit-note { margin: -9px 0 0; text-align: center; color: #8493a5; font-size: 10px; }
.split-upload-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 20px; }
.split-upload-grid .upload-drop { margin-top: 0; min-height: 190px; }
.split-upload-grid .upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.single-upload-grid { margin-top: 20px; }
.single-upload-grid .upload-drop { margin-top: 0; min-height: 220px; }
.single-upload-grid .upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.single-upload-grid .upload-drop em { color: #4b7899; font-size: 12px; font-style: normal; font-weight: 800; }
.single-roster-preview { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid #cce1d5; border-radius: 14px; background: #f5fbf7; }
.single-roster-preview[hidden] { display: none; }
.single-roster-preview > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.single-roster-preview > div:first-child b { color: #173d2e; font-size: 15px; }
.single-roster-preview > div:first-child span { color: #4f7565; font-size: 11px; }
.single-roster-classes { display: flex; flex-wrap: wrap; gap: 8px; }
.single-roster-classes > label { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #cce4d6; border-radius: 10px; background: #fff; color: #245641; }
.single-roster-classes b { font-size: 12px; }
.single-roster-classes em { color: #16845a; font-size: 11px; font-style: normal; font-weight: 800; }
.single-roster-classes input { box-sizing: border-box; width: 58px; height: 30px; padding: 5px 7px; border: 1px solid #bdd8c8; border-radius: 7px; background: #fbfffc; color: #173e2e; font: inherit; font-size: 12px; font-weight: 800; text-align: center; }
.single-roster-classes input:focus { border-color: #16845a; outline: 3px solid #16845a18; }
.single-roster-classes .teacher-pending { border-color: #efcf9a; background: #fff9ee; color: #815812; }
.single-roster-classes .teacher-pending em { color: #b17006; }
.single-roster-preview > p { margin: 0; color: #6b7f75; font-size: 11px; }
.upload-drop i { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #e4f1fb; color: #126da3; font-style: normal; font-size: 11px; font-weight: 900; }
.allocation-drop { border-color: #86c5a9; background: #f5fbf8; }
.allocation-drop:hover { border-color: #1d8a60; background: #edf9f3; }
.allocation-drop i { background: #e1f3ea; color: #177955; }
.allocation-summary { background: #eff8f3; color: #177050; }
.upload-progress-panel { display: grid; gap: 12px; padding: 16px; border: 1px solid #cfdeef; border-radius: 14px; background: #f7fbff; }
.upload-progress-panel[hidden] { display: none; }
.upload-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.upload-progress-head > div { display: grid; gap: 4px; min-width: 0; }
.upload-progress-title { color: #163653; font-size: 14px; }
.upload-progress-status { color: #73879b; font-size: 11px; }
.upload-progress-total { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 12px; background: #1769e0; color: #fff; font-size: 12px; }
.upload-progress-files { display: grid; gap: 8px; max-height: 230px; overflow-y: auto; }
.upload-progress-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) 42px; align-items: center; gap: 10px; padding: 10px; border: 1px solid #dde7f1; border-radius: 11px; background: #fff; }
.upload-file-type { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: #e8f1ff; color: #1769e0; font-size: 9px; font-style: normal; font-weight: 900; }
.upload-file-info { display: grid; gap: 3px; min-width: 0; }
.upload-file-info b { overflow: hidden; color: #203a55; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-info small { color: #8291a2; font-size: 9px; }
.upload-progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #e5ecf4; }
.upload-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1769e0, #46a6ff); transition: width .18s ease; }
.upload-progress-item > strong { color: #1769e0; font-size: 10px; text-align: right; }
.upload-progress-item.is-complete .upload-file-type { background: #e2f5eb; color: #167654; }
.upload-progress-item.is-complete .upload-progress-track span { background: #1ba36d; }
.upload-progress-panel > p { margin: 0; color: #8795a5; font-size: 10px; }
.upload-progress-panel.is-analyzing { border-color: #a9c9ef; background: #f2f8ff; }
.upload-progress-panel.is-analyzing .upload-progress-total { animation: uploadPulse 1.2s ease-in-out infinite; }
.upload-progress-panel.is-analyzing .upload-progress-track span { position: relative; overflow: hidden; }
.upload-progress-panel.is-analyzing .upload-progress-track span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #ffffffcc, transparent); animation: uploadShimmer 1.15s linear infinite; transform: translateX(-100%); }
.upload-progress-panel.is-error { border-color: #efb9b2; background: #fff7f5; }
.upload-progress-panel.is-error .upload-progress-total { background: #c84d40; }
.home-submit:disabled, .submit-row button:disabled { cursor: wait; opacity: .78; }
@keyframes uploadPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(23, 105, 224, .09); } }
@keyframes uploadShimmer { to { transform: translateX(100%); } }
@media (max-width: 1050px) {
  .home-order-hero { grid-template-columns: 1fr; gap: 36px; }
  .home-order-hero .hero-copy { padding-top: 20px; }
  .home-upload-card { max-width: 680px; width: 100%; margin: auto; }
}
@media (max-width: 760px) { .split-upload-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .home-upload-zones, .home-basic-grid, .home-contact-grid, .home-more > div { grid-template-columns: 1fr; }
  .home-wide { grid-column: auto; }
  .home-upload-form { padding: 18px; }
  .home-upload-head { padding: 18px; }
  .home-upload-head > div { display: grid; gap: 4px; }
  .home-upload-head h2 { font-size: 27px; }
  .home-order-hero { padding-top: 30px; }
  .home-dropzone { min-height: 116px; }
  .upload-progress-item { grid-template-columns: 34px minmax(0, 1fr) 38px; }
}

/* Desktop browser workspace: customer pages intentionally favor a wide canvas. */
.customer-nav {
  box-sizing: border-box;
  width: calc(100% - 56px);
  max-width: 1680px;
  min-width: 1180px;
  padding-left: 0;
  padding-right: 0;
}

.customer-logo.business-logo {
  flex: 0 0 auto;
  width: 520px;
  height: 64px;
  overflow: hidden;
}

.customer-logo.business-logo > img {
  display: block;
  width: 520px;
  height: 64px;
  object-fit: contain;
  object-position: left center;
}

.review-page {
  box-sizing: border-box;
  width: calc(100% - 56px);
  max-width: 1680px;
  min-width: 1180px;
  padding: 36px 0 126px;
}

.review-hero {
  align-items: center;
  margin-bottom: 20px;
}

.review-hero h1 {
  margin: 8px 0 6px;
  font-size: 40px;
}

.review-warning,
.requirement-strip,
.review-toolbar {
  margin-bottom: 18px;
}

.supplement-notice {
  margin: 0 0 16px;
  padding: 13px 18px;
  border: 1px solid #a8dfc5;
  border-radius: 14px;
  background: #effbf5;
  color: #14714f;
  font-weight: 750;
}

.missing-material-panel {
  margin: 0 0 16px;
  padding: 20px 22px;
  border: 1px solid #f0be83;
  border-radius: 18px;
  background: #fff9ef;
  box-shadow: 0 10px 28px rgba(133, 82, 21, .08);
}

.missing-panel-head,
.supplement-upload,
.supplement-upload label,
.supplement-progress > div {
  display: flex;
  align-items: center;
}

.missing-panel-head { justify-content: space-between; gap: 18px; }
.missing-panel-head > div { display: grid; gap: 4px; }
.missing-panel-head b { color: #8b4f12; font-size: 18px; }
.missing-panel-head span { color: #9a6c36; font-size: 13px; }
.missing-count { padding: 7px 12px; border-radius: 999px; background: #ffe5bd; color: #97530c!important; font-weight: 800; white-space: nowrap; }
.missing-material-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.missing-material-list > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #fff; }
.missing-material-list strong { color: #27384b; }
.missing-material-list span { color: #bd4b36; font-size: 13px; }

.supplement-upload {
  position: relative;
  gap: 14px;
  margin: 0 0 18px;
  padding: 15px 18px;
  border: 1px solid #cbddef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 38, 56, .06);
}

.supplement-upload label { min-width: 0; flex: 1; gap: 18px; cursor: pointer; }
.supplement-upload label > span { display: grid; min-width: 330px; gap: 4px; }
.supplement-upload label b { color: #163452; font-size: 16px; }
.supplement-upload label small { color: #74869a; }
.supplement-upload input[type=file] { flex: 1; min-width: 320px; padding: 10px; border: 1px dashed #9db9d5; border-radius: 11px; background: #f7fbff; }
.supplement-upload button { min-width: 150px; }
.supplement-upload button:disabled { opacity: .65; cursor: wait; }
.supplement-progress { position: absolute; inset: 0; z-index: 2; padding: 13px 18px; border-radius: 18px; background: rgba(255,255,255,.97); }
.supplement-progress > div { justify-content: space-between; margin-bottom: 8px; color: #1c4f7e; }
.supplement-progress progress { width: 100%; height: 12px; accent-color: #1769e0; }

.material-board { gap: 20px; }

.material-review-card {
  padding: 24px 28px 26px;
  border-radius: 22px;
}

.material-card-head {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
}

.material-index {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.title-field input {
  min-height: 42px;
  font-size: 22px;
}

.material-meta {
  grid-template-columns: repeat(11, minmax(86px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.material-meta label {
  font-size: 12px;
}

.material-meta input,
.material-meta select {
  min-height: 40px;
  padding: 9px 10px;
  font-size: 14px;
}
.material-meta input[readonly],
.material-meta select:disabled {
  border-color: #dce3eb;
  background: #f1f4f7;
  color: #506174;
  cursor: not-allowed;
  opacity: 1;
}

.production-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 16px;
}

.production-rules:empty { display: none; }

.production-rule {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #c9def7;
  border-radius: 10px;
  background: #f2f8ff;
  color: #245078;
  font-size: 12px;
}

.production-rule b { color: #0f5ea8; font-size: 13px; }
.production-rule.binding-rule { border-color: #efc975; background: #fff8e9; color: #755011; }
.production-rule.binding-rule b { color: #a86100; }
.production-rule.ready-rule { border-color: #bfe1cd; background: #f1faf5; color: #286447; }
.production-rule.ready-rule b { color: #137443; }
.production-rule.pcount-ready-rule { border-color: #bfe1cd; background: #f1faf5; color: #286447; }
.production-rule.pcount-ready-rule b { color: #137443; }
.production-rule.pcount-warning-rule { border-color: #efb1aa; background: #fff3f1; color: #8c342b; }
.production-rule.pcount-warning-rule b { color: #c03f32; }
.production-rule.pcount-pending-rule { border-color: #d8e0e9; background: #f7f9fc; color: #5d6d80; }
.production-rule.pcount-pending-rule b { color: #3d536a; }
.production-rule.whole-pages-rule { border-color: #a9d5c0; background: #f0faf5; color: #286447; }
.production-rule.whole-pages-rule b { color: #137443; }

.material-special-note {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 2px 0 16px;
  padding: 12px 14px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #f8fafc;
}

.material-special-note > span { display: grid; gap: 3px; }
.material-special-note b { color: #15283e; font-size: 14px; }
.material-special-note em { color: #7c8b9d; font-size: 11px; font-style: normal; }
.material-special-note textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #cfd9e4;
  border-radius: 10px;
  background: #fff;
  color: #14243a;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.material-special-note textarea:focus { border-color: #2580df; outline: 3px solid #2580df18; }
.customer-special-note { color: #a04b00; }

.file-tile .production-spec {
  display: block;
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff3df;
  color: #9b5900;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.material-workspace {
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(590px, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.material-files-panel,
.material-counts-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e0e8f1;
  border-radius: 16px;
  background: #fbfdff;
}

.material-workspace .card-section-title {
  min-height: 42px;
  margin: 0 0 12px;
}

.material-workspace .card-section-title b { font-size: 16px; }
.material-workspace .card-section-title span { font-size: 11px; }

.card-file-actions { flex: 0 0 auto; }
.card-file-actions .file-add {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #bad6f3;
  border-radius: 10px;
  background: #edf6ff;
  color: #1871c9;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.card-file-actions .file-add:hover { border-color: #2282df; background: #e4f2ff; }
.card-file-actions .file-add:disabled { cursor: wait; opacity: .55; }
.card-upload-progress {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid #b8d8f7;
  border-radius: 11px;
  background: #eff7ff;
}
.card-upload-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #145d9e; font-size: 12px; font-weight: 800; }
.card-upload-progress progress { width: 100%; height: 9px; margin-top: 7px; accent-color: #1f7be0; }
.card-upload-progress small { display: block; overflow: hidden; margin-top: 4px; color: #69819b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.material-workspace .file-zone {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  align-content: start;
  min-height: 254px;
  padding: 12px;
}

.material-workspace .file-tile {
  position: relative;
  min-width: 0;
  padding: 12px;
}

.material-workspace .file-tile.order-drop-target {
  border-color: #1877df;
  background: #eef6ff;
  box-shadow: 0 0 0 3px #1877df1a;
}

.binding-order {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: 8px;
  background: #10243c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 4px 12px #10243c26;
}

.order-position {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 8px;
  background: #eaf4ff;
  color: #176bc0;
  font-size: 10px;
  font-weight: 900;
}

.file-icon.has-preview { width: 100%; height: 270px; overflow: hidden; border: 1px solid #d9e2ec; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px #27394d1a; }
.file-icon.has-preview::after { display: none; }
.file-preview { display: block; box-sizing: border-box; width: 100%; height: 100%; border: 0; background: #fff; object-fit: contain; pointer-events: auto; }
.file-icon.has-preview { cursor: default; }
.file-tile > .role-cap,
.file-tile > b,
.file-tile > small,
.file-tile > .binding-order,
.file-tile > .order-position { cursor: grab; }
.file-tile:active > .role-cap,
.file-tile:active > b,
.file-tile:active > small { cursor: grabbing; }

.material-workspace .file-tile b {
  font-size: 12px;
  line-height: 1.45;
}

.material-counts-panel .class-counts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  max-height: 300px;
  padding-right: 5px;
  overflow-y: auto;
}

.material-counts-panel .class-row {
  display: block;
  min-width: 0;
  min-height: 66px;
  padding: 7px;
}

.material-counts-panel .class-fields {
  display: grid;
  grid-template-columns: minmax(62px, 1fr) 48px 16px 20px;
  align-items: center;
  gap: 4px;
}

.material-counts-panel .class-row input,
.material-counts-panel .class-row select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px;
  border: 1px solid #d5e0ec;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.material-counts-panel .class-fields > span { font-size: 11px; text-align: center; }
.material-counts-panel .class-fields > button { width: 20px; height: 30px; padding: 0; font-size: 14px; }

.single-order-review .review-toolbar #add-material,
.single-order-review .card-remove { display: none; }
.single-order-review .material-workspace { grid-template-columns: 1fr; }
.single-order-review .material-files-panel { padding: 20px; }
.single-order-review .material-workspace .file-zone {
  grid-template-columns: repeat(5, minmax(170px, 220px));
  justify-content: start;
  min-height: 440px;
  padding: 18px;
}
.single-order-review .material-workspace .file-tile { min-height: 390px; }
.single-order-review .material-counts-panel { display: block; }

.roster-compare {
  display: block;
  min-height: 16px;
  margin-top: 5px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-compare.is-match { color: #198754; }
.roster-compare.is-different { color: #c04436; }
.roster-compare.is-missing { color: #a56a12; }
.roster-compare.is-muted { color: #7b8b9d; }

.review-submit {
  box-sizing: border-box;
  width: min(1624px, calc(100% - 56px));
  min-width: 1180px;
}

.home-order-hero,
.customer-steps,
.customer-footer,
.order-page.simple-order {
  max-width: 1540px;
}

@media (max-width: 1200px) {
  .customer-nav,
  .review-page,
  .review-submit {
    margin-left: 28px;
    margin-right: 28px;
  }
}
