:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-muted: #f2f6f8;
  --border: #d9e1e7;
  --border-strong: #b8c7d1;
  --text: #152333;
  --muted: #667789;
  --teal: #008a92;
  --teal-dark: #006d74;
  --teal-soft: #e8f7f7;
  --blue: #0b5bd3;
  --green: #168a3a;
  --green-soft: #eaf8ee;
  --amber: #b26a00;
  --amber-soft: #fff6e4;
  --red: #c93535;
  --red-soft: #fff0f0;
  --nav: #062f36;
  --nav-2: #005e64;
  --shadow: 0 10px 28px rgba(14, 32, 48, 0.08);
  --radius: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

a {
  color: var(--teal);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hidden {
  display: none !important;
}

.applicant-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 29px;
  font-weight: 800;
  color: #121a25;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand small {
  margin-left: 12px;
  font-size: 21px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
}

.applicant-page {
  padding: 36px 24px 80px;
}

.applicant-container {
  max-width: 1180px;
  margin: 0 auto;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0 auto 34px;
}

.applicant-stepper {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.stepper-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stepper-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 34px);
  right: calc(-50% + 34px);
  height: 1px;
  background: var(--border-strong);
}

.stepper-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  z-index: 1;
}

.stepper-item.active {
  color: var(--teal);
}

.stepper-item.active .stepper-circle,
.stepper-item.done .stepper-circle {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(20, 40, 56, 0.03);
}

.applicant-panel {
  padding: 36px 40px 28px;
}

.panel-title {
  margin: 0 0 10px;
  font-size: 31px;
  line-height: 1.25;
}

.panel-lead {
  margin: 0 0 30px;
  color: #485766;
  line-height: 1.75;
}

.form-section {
  margin-top: 30px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.35;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chip.required {
  border-color: var(--teal);
  color: var(--teal);
  background: #f4ffff;
}

.chip.success,
.badge.success {
  border-color: #9dd9ad;
  background: var(--green-soft);
  color: var(--green);
}

.chip.warning,
.badge.warning {
  border-color: #f1c36d;
  background: var(--amber-soft);
  color: var(--amber);
}

.chip.danger,
.badge.danger {
  border-color: #f0a7a7;
  background: var(--red-soft);
  color: var(--red);
}

.chip.info,
.badge.info {
  border-color: #9ac7e6;
  background: #eff8ff;
  color: #176899;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

/* 縦型カード: ロゴ帯を上段・名称を中央下段に置くことで、ロゴ幅が
   ばらついても名称の位置が全カードで揃う（横ずれを解消）。 */
.channel-card {
  min-height: 134px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: center;
  position: relative;
  padding: 22px 14px 16px;
  transition: border-color 120ms ease, background 120ms ease;
}

.channel-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.channel-card input {
  position: absolute;
  opacity: 0;
}

.channel-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #b8c0c8;
  position: absolute;
  top: 12px;
  left: 12px;
  flex: 0 0 auto;
  background: white;
}

.channel-card.selected {
  border: 2px solid var(--teal);
  background: #f6ffff;
}

.channel-card.selected .channel-radio::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.channel-icon {
  flex: 0 0 auto;
  width: 100%;
  height: 44px;
  font-size: 30px;
  font-weight: 800;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-logo {
  max-height: 34px;
  max-width: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.channel-logo-frame {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-logo-fallback {
  display: none;
  max-width: 150px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.channel-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}

.channel-logo-icon-svg {
  width: 32px;
  height: 32px;
}

.channel-logo-frame.missing .channel-logo {
  display: none;
}

.channel-logo-frame.missing .channel-logo-fallback {
  display: block;
}

.channel-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 6px;
  border: 1px solid #afd3e8;
  background: #eff8ff;
  padding: 13px 16px;
  color: #29566f;
  line-height: 1.65;
}

.notice.warning {
  border-color: #f0c46e;
  background: var(--amber-soft);
  color: #684100;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #c7d1d9;
  border-radius: 6px;
  padding: 12px 14px;
  background: white;
  color: var(--text);
}

.field textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 138, 146, 0.14);
}

.helper {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.channel-helper-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.error-text {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.upload-zone {
  border: 2px dashed #1b7f88;
  border-radius: var(--radius);
  background: #fbfeff;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: center;
}

.upload-main {
  text-align: center;
  padding: 18px;
}

.upload-icon {
  font-size: 54px;
  color: var(--teal);
  line-height: 1;
}

.upload-guidance {
  border-left: 1px solid var(--border);
  padding-left: 26px;
  color: #303b46;
  line-height: 1.85;
}

.upload-guidance-card {
  background: var(--surface-subtle, #f5f7f9);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 16px;
  line-height: 1.7;
}

.upload-guidance-card > strong {
  display: block;
  margin-bottom: 6px;
}

.upload-points {
  margin: 0 0 8px;
  padding-left: 20px;
}

.upload-points li {
  margin: 2px 0;
}

.media-privacy-note {
  margin: 14px 0 0;
  line-height: 1.7;
}

.address-use-note {
  margin: 0 0 16px;
}

.file-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.proof-eligibility-fields {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.proof-eligibility-fields h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.file-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.file-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.past-exchange-panel {
  display: grid;
  gap: 18px;
}

.past-exchange-list {
  display: grid;
  gap: 12px;
}

.past-exchange-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(128px, auto);
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.past-exchange-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.past-exchange-row:focus,
.past-exchange-row:focus-within {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 138, 146, 0.14);
}

.past-exchange-row.selected {
  border: 2px solid var(--teal);
  background: var(--teal-soft);
}

.past-exchange-row.disabled {
  cursor: not-allowed;
  background: #f7f9fb;
}

.past-exchange-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: white;
  font-size: 13px;
  font-weight: 900;
}

.past-exchange-row.selected .past-exchange-check {
  border-color: var(--teal);
  background: var(--teal);
}

.past-exchange-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.past-exchange-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.past-exchange-title strong,
.past-exchange-product {
  overflow-wrap: anywhere;
}

.past-exchange-product {
  color: #2d3a46;
  line-height: 1.55;
  font-weight: 700;
}

.past-exchange-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.past-exchange-meta strong {
  color: var(--text);
  font-size: 13px;
}

.original-exchange-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

.original-exchange-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.original-exchange-summary strong {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.button {
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  background: white;
  color: var(--text);
}

.button.primary {
  min-width: 260px;
  min-height: 58px;
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  font-size: 18px;
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.blue {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.button.green {
  background: #009b43;
  border-color: #009b43;
  color: white;
}

/* Disabled buttons (e.g. submit while ineligible) must read as inactive, not
   as an inviting green. Overrides .button.primary / .button.green. */
.button:disabled,
.button[disabled] {
  background: #cdd4db !important;
  border-color: #cdd4db !important;
  color: #ffffff !important;
  cursor: not-allowed;
  opacity: 0.9;
  box-shadow: none;
}

.button.danger {
  color: var(--red);
  border-color: #e8b0b0;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.completion-wrap {
  max-width: 760px;
  margin: 52px auto 0;
}

.completion-panel {
  padding: 40px 30px 34px;
  text-align: center;
}

.success-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 8px solid var(--green);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 900;
}

.completion-title {
  margin: 0 0 30px;
  font-size: 31px;
}

.completion-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  text-align: left;
}

.completion-value {
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  background: #fbfcfd;
}

.completion-value.status {
  border-color: #c7e7cf;
  background: var(--green-soft);
  color: var(--green);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 4px 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #2a3340;
  font-weight: 700;
  text-align: left;
  line-height: 1.5;
}

.timeline-step .helper {
  font-weight: 500;
}

.timeline-step.highlight {
  background: var(--teal-soft, #e2f3ef);
  border-radius: 10px;
  padding: 10px 12px;
  margin: -4px 0;
}

.next-step-lead {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--teal-soft, #e2f3ef);
  color: #1f6f60;
  font-weight: 700;
  line-height: 1.6;
  text-align: left;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  border-radius: 50%;
  border: 4px solid var(--teal-soft, #e2f3ef);
  background: var(--teal);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f3f5f7;
}

.login-panel {
  width: min(500px, calc(100vw - 32px));
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 44px 42px 36px;
}

.login-panel h1 {
  text-align: center;
  margin: 0 0 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  font-size: 32px;
}

.security-note {
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.admin-login-button {
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--bg);
}

.admin-nav {
  background: linear-gradient(180deg, var(--nav), var(--nav-2));
  color: white;
  min-height: 100vh;
  padding: 22px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admin-nav .brand {
  display: block;
  color: white;
  font-size: 21px;
  padding: 0 10px;
}

.admin-nav .brand small {
  white-space: nowrap;
}

.ops-state-value {
  margin: 2px 0 4px;
}

.kpi-scope-note {
  margin: -8px 0 16px;
}

.nav-items {
  display: grid;
  gap: 4px;
}

.nav-item {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.16);
}

.nav-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.admin-nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  height: 58px;
  border-bottom: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: var(--muted);
  font-weight: 700;
}

.admin-topbar-left,
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.admin-menu-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 900;
}

.topbar-notification {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid transparent;
}

.topbar-notification span {
  position: absolute;
  top: -5px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.admin-content {
  padding: 22px 20px 32px;
}

.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-title-row h1 {
  margin: 0;
  font-size: 25px;
}

.admin-title-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button.admin-csv-button {
  min-width: 128px;
  min-height: 44px;
  font-size: 15px;
}

.button.shipment-poll-button {
  min-width: 174px;
}

.shipment-poll-feedback {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-weight: 700;
}

.shipment-poll-feedback strong {
  color: var(--text);
}

.shipment-poll-feedback span {
  color: var(--muted);
}

.shipment-poll-feedback.success {
  border-color: #b9dfc3;
  background: #f2fbf4;
}

.shipment-poll-feedback.neutral {
  border-color: #cbdde8;
  background: #f5f9fc;
}

.shipment-poll-feedback.danger {
  border-color: #f0b8b8;
  background: #fff6f6;
}

.shipment-poll-message {
  display: grid;
  gap: 3px;
}

.shipment-poll-metrics {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.shipment-poll-metric {
  min-width: 128px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 10px;
  display: grid;
  gap: 2px;
}

.shipment-poll-metric span {
  font-size: 12px;
}

.shipment-poll-metric strong {
  font-size: 18px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-tile {
  min-height: 84px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--teal);
}

.kpi-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.kpi-value {
  font-size: 27px;
  color: var(--teal-dark);
  font-weight: 900;
}

.filter-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  padding: 14px;
  margin-bottom: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr 0.9fr 0.9fr 0.9fr auto auto;
  gap: 12px;
  align-items: end;
}

.filter-grid.notifications {
  grid-template-columns: 1.2fr 1fr 1fr 0.9fr 0.9fr auto auto;
}

.filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filter-field label {
  font-size: 13px;
  font-weight: 800;
}

.filter-field input,
.filter-field select {
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 8px 10px;
  background: white;
}

.table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: auto;
}

.notification-table table {
  min-width: 1240px;
}

.notification-subject {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #fbfcfd;
  color: #293847;
  font-weight: 900;
  z-index: 1;
}

tr:hover td {
  background: #fbfeff;
}

.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: white;
  font-size: 12px;
  font-weight: 800;
}

.badge.teal {
  border-color: #8ccad0;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.badge.gray {
  border-color: #cfd7df;
  background: #f6f7f8;
  color: #4f5d6c;
}

.admin-status-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mixed-eligibility-badge {
  white-space: normal;
  text-align: center;
}

.admin-muted {
  color: var(--muted);
  font-weight: 700;
}

.duplicate-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.duplicate-link {
  color: var(--teal-dark);
  font-weight: 800;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  color: var(--muted);
  text-align: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 12px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 0;
  color: var(--muted);
  font-weight: 700;
}

.settings-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-section-header h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.placeholder-reference {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

.placeholder-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.placeholder-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: white;
  color: #334150;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.settings-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.auto-memo-template-settings {
  margin-top: 20px;
}

.auto-memo-template-field label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.template-key {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fbfcfd;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.auto-memo-live-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 14px;
}

.template-tab {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
  color: #334150;
  font-weight: 800;
  cursor: pointer;
}

.template-tab.active {
  border-color: var(--teal);
  background: #edfdfa;
  color: var(--teal-dark);
}

.template-tab:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.email-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.customer-email-template-form {
  margin-top: 0;
}

.customer-email-template-form textarea {
  min-height: 320px;
}

.email-placeholder-reference {
  margin: 0;
}

.email-template-live-status {
  align-self: center;
  margin-right: auto;
  font-weight: 800;
}

.auto-memo-template-settings textarea {
  min-height: 176px;
}

.manual-memo-template-settings {
  margin-top: 20px;
}

.manual-template-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.manual-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

.manual-template-main {
  min-width: 0;
}

.manual-template-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.manual-template-title strong {
  color: #1f2a37;
  overflow-wrap: anywhere;
}

.manual-template-row p {
  display: -webkit-box;
  margin: 0;
  color: #3d4a58;
  line-height: 1.6;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.manual-template-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.manual-template-form {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.manual-template-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manual-template-form-header h3 {
  margin: 0;
  font-size: 16px;
}

.manual-template-form textarea {
  min-height: 142px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.notice.compact {
  padding: 10px 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 20px;
}

.detail-header h1 {
  margin: 0;
  font-size: 28px;
}

.admin-status-select {
  min-width: 180px;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: white;
  padding: 8px 10px;
  font-weight: 800;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.re-exchange-context-banner {
  margin: -4px 0 16px;
  align-items: center;
  flex-wrap: wrap;
}

.re-exchange-context-banner > strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #9ac7e6;
  border-radius: 5px;
  background: #eff8ff;
  color: #176899;
  font-size: 12px;
}

.re-exchange-banner-link,
.re-exchange-app-link,
.re-exchange-chain-link {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.re-exchange-missing-parent {
  font-weight: 900;
  color: #5d6670;
}

.re-exchange-chain-error {
  margin-left: 4px;
}

.admin-product-summary,
.admin-product-detail-row,
.product-summary-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-product-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.admin-product-summary strong,
.admin-product-detail-row strong,
.product-summary-inline strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.admin-product-detail-row code {
  display: inline-block;
  margin-top: 6px;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f7fafb;
  color: #334150;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.review-product-image,
.admin-detail-product-image {
  width: 68px;
  height: 82px;
}

.info-panel,
.ops-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.info-panel {
  padding: 20px;
}

.info-section {
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--border);
}

.info-section:last-child {
  border-bottom: 0;
}

.info-section h2,
.ops-panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
}

.kv-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kv {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.kv dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kv dd {
  margin: 0;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.upload-groups {
  display: grid;
  gap: 18px;
}

.upload-group {
  display: grid;
  gap: 10px;
}

.upload-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.upload-group-header h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.upload-group-header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.upload-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fbfcfd;
  display: grid;
  grid-template-rows: auto 1fr;
}

.upload-thumb {
  aspect-ratio: 4 / 3;
  background: #f8fbfc;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: var(--teal);
  font-weight: 900;
  font-size: 24px;
  text-align: center;
  text-decoration: none;
}

.upload-thumb:focus-visible,
.upload-open-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: white;
}

.upload-thumb.failed img {
  display: none;
}

.upload-thumb-file,
.upload-thumb-error {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #dbe7ea, #f8fbfc);
}

.upload-thumb-error {
  display: none;
  color: var(--red);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.upload-thumb.failed .upload-thumb-error {
  display: grid;
}

.upload-card-body {
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.upload-card-body strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.upload-open-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 100%;
  color: var(--teal);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.upload-open-link:hover {
  text-decoration: underline;
}

.upload-empty {
  min-height: 120px;
  margin-top: 0;
}

.admin-long-text {
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
  color: #334150;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.65;
}

.re-exchange-chain-section {
  padding-top: 0;
}

.re-exchange-chain {
  display: grid;
  gap: 10px;
}

.re-exchange-chain-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  margin-left: calc(var(--chain-depth, 0) * 18px);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

.re-exchange-chain-item.current {
  border-color: #8ccad0;
  background: #f6ffff;
}

.re-exchange-chain-marker {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  background: white;
}

.re-exchange-chain-item.current .re-exchange-chain-marker {
  background: var(--teal);
}

.re-exchange-chain-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.re-exchange-chain-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.re-exchange-chain-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.8fr) minmax(110px, 0.6fr);
  gap: 8px 14px;
  margin: 0;
}

.re-exchange-chain-meta div {
  min-width: 0;
}

.re-exchange-chain-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.re-exchange-chain-meta dd {
  margin: 2px 0 0;
  color: #263442;
  overflow-wrap: anywhere;
}

.ops-panel {
  position: sticky;
  top: 74px;
  padding: 20px;
}

.ops-panel .field textarea {
  min-height: 92px;
}

.manual-memo-template-picker {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.customer-memo-helper {
  margin-bottom: 2px;
}

.memo-template-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.memo-template-controls > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.memo-template-controls label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ops-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ops-actions-separated {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.return-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #354554;
  font-size: 13px;
  font-weight: 800;
}

.return-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.feedback {
  min-height: 24px;
  margin-top: 10px;
  color: var(--green);
  font-weight: 800;
}

.notification-summary {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.notification-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  color: var(--text);
}

.notification-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  color: #425160;
}

.notification-mini-list {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.notification-mini-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 62px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.notification-mini-row > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-mini-empty {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.auto-memo-summary {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.auto-memo-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auto-memo-summary-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auto-memo-summary-list {
  display: grid;
  gap: 8px;
}

.auto-memo-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

.auto-memo-summary-row.muted {
  background: #f7f9fa;
}

.auto-memo-summary-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.auto-memo-summary-row strong {
  font-size: 13px;
}

.auto-memo-summary-row span,
.auto-memo-summary-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auto-memo-badge {
  gap: 5px;
  white-space: normal;
  text-align: center;
}

.auto-memo-badge span {
  color: inherit;
  font-size: inherit;
}

.event-history-section {
  padding-bottom: 0;
}

.event-history-list {
  display: grid;
  gap: 8px;
}

.event-history-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.event-history-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.event-history-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-history-main {
  min-width: 0;
}

.event-history-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.event-history-title strong {
  font-size: 13px;
}

.event-history-main p {
  margin: 0;
  color: #425160;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.notification-empty {
  min-height: 168px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 260px;
  max-width: 420px;
  border-radius: 6px;
  border: 1px solid #9dd9ad;
  background: var(--green-soft);
  color: var(--green);
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 10;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 0;
  font-weight: 800;
  min-height: 32px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.applicant-container.wide {
  max-width: 1330px;
}

.applicant-page-full {
  padding-top: 24px;
}

.stepper-six {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-bottom: 28px;
}

.stepper-progress-label {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 auto 10px;
}

.page-title {
  margin: 0 0 10px;
  font-size: 29px;
  line-height: 1.3;
}

.center {
  text-align: center;
}

.strong {
  font-weight: 900;
  color: var(--text);
}

.notice.info {
  border-color: #afd3e8;
  background: #eff8ff;
  color: #29566f;
}

.notice.success {
  border-color: #9dd9ad;
  background: var(--green-soft);
  color: var(--green);
}

.notice.danger {
  border-color: #f0a7a7;
  background: var(--red-soft);
  color: var(--red);
}

.action-note {
  color: var(--muted);
  font-weight: 700;
}

.sms-screen {
  max-width: 760px;
  margin: 0 auto;
}

.sms-title {
  margin: 18px 0 18px;
  text-align: center;
  font-size: 38px;
}

.sms-card {
  padding: 28px 30px;
}

.sms-phone-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.sms-phone {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
}

.sms-divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 70px);
  gap: 16px;
}

.code-box {
  width: 70px;
  height: 70px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
}

.code-box:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 138, 146, 0.14);
}

.resend-row {
  display: grid;
  place-items: center;
  min-height: 72px;
  color: var(--muted);
}

.resend-button:disabled {
  color: var(--muted);
}

.sms-actions {
  justify-content: center;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.compact-panel {
  padding: 20px;
  margin-top: 16px;
}

.section-heading-row,
.source-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading-row h2,
.upload-section h2 {
  margin: 0;
  font-size: 18px;
}

.order-table-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: auto;
}

.order-table {
  min-width: 780px;
}

.order-table tr {
  cursor: pointer;
}

.order-table tr.selected td {
  background: #f6ffff;
  border-top: 1px solid var(--teal);
  border-bottom: 1px solid var(--teal);
}

.product-image-frame {
  width: 54px;
  height: 64px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f7fafb;
  overflow: hidden;
  vertical-align: middle;
}

.product-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.product-image-fallback {
  display: none;
  padding: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.product-image-frame.missing img {
  display: none;
}

.product-image-frame.missing .product-image-fallback {
  display: grid;
  place-items: center;
}

.order-product-image,
.admin-list-product-image {
  width: 46px;
  height: 56px;
}

.order-warning {
  margin-top: 12px;
}

.retry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.external-error b {
  color: inherit;
}

.proof-panel .upload-zone {
  margin-top: 8px;
}

.proof-upload-zone {
  cursor: pointer;
}

.segmented,
.category-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segment {
  min-height: 42px;
  min-width: 104px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-weight: 800;
  padding: 0 18px;
}

.segment.active,
.segment.category.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.summary-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.summary-panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.summary-panel hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
}

.summary-kv {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 32px;
}

.summary-kv span {
  color: var(--muted);
  font-weight: 800;
}

.summary-kv strong {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.mini-timeline {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mini-timeline span {
  color: #425160;
  font-weight: 800;
}

.loading-box {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  background: #fbfcfd;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
}

.proof-catalog-loading {
  min-height: 72px;
}

.block-reason {
  margin-top: 14px;
}

.breadcrumb {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.form-section.flush {
  margin-top: 0;
}

.product-list {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.defect-option-list {
  margin-top: 12px;
}

.selected-shipment-band {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

.selected-shipment-band > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.selected-shipment-band strong {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-product-panel .section-heading-row {
  margin-bottom: 10px;
}

.order-product-exclusion {
  margin-bottom: 12px;
}

.order-product-row input[type="checkbox"],
.product-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.selected-product-confirmation {
  margin-top: 12px;
}

.product-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: 24px 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

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

.product-row.selected {
  background: #f6ffff;
  outline: 1px solid var(--teal);
  outline-offset: -1px;
}

.product-row.disabled,
.product-row.unselectable {
  cursor: not-allowed;
  background: #f5f7f8;
  color: #4c5965;
}

.product-row.disabled input[type="checkbox"],
.product-row.unselectable input[type="checkbox"] {
  accent-color: #8a949e;
}

.product-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  font-weight: 800;
}

.product-selectability-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.product-selectability-badge.selectable {
  color: #16795f;
  background: #e8f7f2;
}

.product-selectability-badge.unselectable {
  color: #596673;
  background: #eef1f3;
}

.product-unselectable-reason {
  color: #394653;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.warranty-info-link {
  font-size: 12px;
  margin-left: 6px;
  white-space: nowrap;
}

.warranty-info-panel {
  margin-top: 16px;
}

.warranty-info-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.warranty-info-list li {
  margin-bottom: 10px;
  line-height: 1.65;
}

.defect-product-image {
  width: 52px;
  height: 64px;
}

.proof-selection {
  display: grid;
  gap: 14px;
}

.proof-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.proof-category-card {
  position: relative;
  min-height: 296px;
  display: grid;
  grid-template-rows: 198px minmax(0, auto);
  gap: 12px;
  padding: 16px;
  padding-top: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.proof-category-card input {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.proof-category-card:focus-within {
  outline: 3px solid rgba(0, 138, 146, 0.14);
  outline-offset: 2px;
}

.proof-category-card.selected {
  border: 2px solid var(--teal);
  background: #f6ffff;
}

.proof-category-check {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.proof-category-card.selected .proof-category-check {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.proof-category-image {
  width: 100%;
  height: 198px;
  background: #fbfcfd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proof-category-image img {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

.proof-category-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.proof-category-copy strong {
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.proof-product-layer {
  display: grid;
  gap: 14px;
}

.proof-product-sections {
  display: grid;
  gap: 14px;
}

.proof-product-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.proof-product-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.proof-product-section-head h3 {
  margin: 0;
  font-size: 17px;
}

.proof-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.proof-product-grid.device {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-product-option {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.proof-product-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.proof-product-option:focus-within {
  outline: 3px solid rgba(0, 138, 146, 0.14);
  outline-offset: 2px;
}

.proof-product-option.selected {
  border: 2px solid var(--teal);
  background: #f6ffff;
}

.proof-product-option.disabled,
.proof-product-option.unselectable {
  cursor: not-allowed;
  border-color: var(--border);
  background: #f5f7f8;
  color: #4c5965;
}

.proof-product-option.disabled input[type="checkbox"],
.proof-product-option.unselectable input[type="checkbox"] {
  accent-color: #8a949e;
}

.proof-product-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.proof-product-label strong {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.review-product-list {
  display: grid;
  gap: 12px;
}

.per-product-defect-list,
.admin-product-defect-list {
  display: grid;
  gap: 14px;
}

.per-product-defect-section,
.product-defect-review-item,
.admin-product-defect-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.per-product-defect-section {
  display: grid;
  gap: 14px;
}

.per-product-defect-section textarea {
  min-height: 112px;
}

.product-defect-review-item {
  display: grid;
  gap: 12px;
}

.review-kv.compact {
  margin-top: 0;
}

.review-kv.compact dd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-product-defect-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.admin-product-defect-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.admin-product-defect-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-product-defect-main strong,
.admin-product-defect-kv dd {
  overflow-wrap: anywhere;
}

.admin-product-defect-kv {
  margin: 0;
}

.issue-fields {
  max-width: 420px;
}

.question-matrix {
  border-top: 1px solid var(--border);
  max-width: 780px;
}

.question-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
  min-height: 38px;
}

.question-label {
  background: #fbfcfd;
  padding: 8px 10px;
  font-weight: 800;
}

.question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  padding: 8px 12px;
}

.question-options label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  margin: 8px 0;
}

.progress-summary strong {
  grid-column: 1 / -1;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e7ebef;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.media-layout {
  max-width: 1210px;
  margin: 0 auto;
}

.media-upload-zone {
  min-height: 155px;
  cursor: pointer;
}

.upload-section {
  margin-top: 22px;
}

.progress-list,
.video-list,
.media-error-list {
  display: grid;
  gap: 10px;
}

.upload-progress-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: 28px minmax(160px, 1fr) 90px minmax(160px, 280px) 50px 26px 36px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  padding: 10px 12px;
}

.file-kind-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.spinner {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 3px solid #dbe6ea;
  border-top-color: var(--teal);
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: white;
  display: grid;
  place-items: center;
  color: #334150;
  font-weight: 900;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.media-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.media-card .delete {
  position: absolute;
  top: 10px;
  right: 10px;
}

.media-thumb {
  aspect-ratio: 4 / 3;
  background: #e7eef2;
  border-radius: 5px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-weight: 900;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto 36px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  padding: 10px 12px;
}

.video-thumb {
  width: 96px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #2f3b45;
  color: white;
  display: grid;
  place-items: center;
}

.upload-error-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 90px minmax(0, 1.2fr) 36px;
  gap: 12px;
  align-items: center;
  border: 1px solid #f0a7a7;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 6px;
  padding: 10px 12px;
}

.address-screen {
  max-width: 1180px;
  margin: 0 auto;
}

.address-panel {
  padding: 28px 36px;
  display: grid;
  gap: 20px;
}

.address-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.address-row > label {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
}

.address-row input,
.address-row select,
.address-row textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #c7d1d9;
  border-radius: 6px;
  padding: 12px 14px;
  background: white;
  color: var(--text);
}

.address-row textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.65;
}

.address-row input:focus,
.address-row select:focus,
.address-row textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 138, 146, 0.14);
}

.postal-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) 140px;
  gap: 12px;
}

.review-screen {
  display: grid;
  gap: 22px;
}

.eligibility-banner {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid #9dd9ad;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 28px;
}

.eligibility-banner.ng {
  border-color: #f0c46e;
  background: var(--amber-soft);
}

.eligibility-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-size: 46px;
  font-weight: 900;
}

.eligibility-banner.ng .eligibility-icon {
  background: var(--amber);
}

.eligibility-banner h2 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 32px;
}

.eligibility-banner.ng h2 {
  color: var(--amber);
}

.eligibility-banner p {
  margin: 0;
  line-height: 1.7;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.review-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  padding: 18px 22px;
}

.review-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.review-section h2 {
  margin: 0;
  font-size: 20px;
}

.product-eligibility-section {
  display: grid;
  gap: 12px;
}

.product-eligibility-list {
  display: grid;
  gap: 10px;
}

.product-eligibility-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}

.product-eligibility-item.accepted {
  border-color: #9dd9ad;
  background: var(--green-soft);
}

.product-eligibility-item.rejected {
  border-color: #f0a7a7;
  background: var(--red-soft);
}

.product-eligibility-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.product-eligibility-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-eligibility-title strong {
  overflow-wrap: anywhere;
}

.shipment-target-preview {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.shipment-target-codes,
.shipment-target-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shipment-target-preview code {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  padding: 2px 5px;
  font-size: 12px;
}

.shipment-content-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 2px 7px;
  line-height: 1.5;
}

.product-eligibility-reasons {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
  color: var(--red);
}

.review-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.review-kv div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
}

.review-kv dt {
  color: var(--muted);
  font-weight: 800;
}

.review-kv dd {
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.file-summary-list {
  display: grid;
  gap: 8px;
}

.file-summary-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

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

.submit-band {
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 20px;
  align-items: center;
  margin: 24px -24px 0;
  padding: 20px 52px;
  background: white;
  border-top: 1px solid var(--border);
}

.submit-note {
  display: grid;
  gap: 6px;
}

.duplicate-review-warning {
  grid-column: 1 / -1;
  margin: 0;
}

.next-step-block {
  padding: 18px 0 0;
  text-align: left;
}

.next-step-block h2 {
  margin: 0 0 14px;
  font-size: 19px;
}

@media (max-width: 1100px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }

  .media-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proof-category-grid,
  .proof-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-progress-row {
    grid-template-columns: 28px minmax(160px, 1fr) 80px;
  }

  .upload-progress-row .progress-track,
  .upload-progress-row .spinner {
    grid-column: 2 / -1;
  }

  .submit-band {
    grid-template-columns: 1fr;
    margin-left: -20px;
    margin-right: -20px;
    padding: 18px 24px;
  }

  .submit-band .button.primary {
    width: 100%;
  }

  .admin-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .admin-nav .brand,
  .nav-label {
    display: none;
  }

  .nav-item {
    justify-content: center;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid,
  .filter-grid.notifications {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ops-panel {
    position: static;
  }

  .event-history-row {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .memo-template-controls {
    grid-template-columns: 1fr;
  }

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

  .customer-email-template-form textarea {
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .applicant-header {
    height: auto;
    padding: 18px 16px;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    font-size: 24px;
  }

  .brand-logo {
    height: 28px;
  }

  .auto-memo-summary-row,
  .event-history-row,
  .re-exchange-chain-meta {
    grid-template-columns: 1fr;
  }

  .auto-memo-summary-row .badge {
    justify-self: start;
  }

  .re-exchange-context-banner {
    align-items: flex-start;
  }

  .re-exchange-chain-item {
    margin-left: 0;
  }

  .event-history-meta {
    grid-template-columns: 1fr 1fr;
  }

  .brand small {
    display: block;
    margin: 4px 0 0;
    font-size: 16px;
  }

  .applicant-page {
    padding: 24px 14px 112px;
  }

  .applicant-panel {
    padding: 22px 16px 18px;
  }

  .panel-title,
  .completion-title {
    font-size: 24px;
  }

  .stepper {
    grid-template-columns: repeat(4, minmax(86px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .channel-grid,
  .field-grid,
  .upload-zone,
  .completion-grid,
  .timeline,
  .kv-grid,
  .kv-grid.two,
  .upload-grid,
  .review-grid,
  .address-row,
  .summary-kv,
  .review-kv div,
  .eligibility-banner,
  .file-summary-row,
  .video-row,
  .upload-error-row {
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .stepper-six {
    grid-template-columns: repeat(6, minmax(96px, 1fr));
    overflow-x: auto;
  }

  .sms-title {
    font-size: 30px;
  }

  .sms-card {
    padding: 22px 16px;
  }

  .sms-phone-row,
  .section-heading-row,
  .source-row,
  .review-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-inputs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
  }

  .code-box {
    width: 100%;
    height: 52px;
    font-size: 24px;
  }

  .compact-panel,
  .address-panel,
  .review-section {
    padding: 16px;
  }

  .product-row {
    grid-template-columns: 24px 54px minmax(0, 1fr);
  }

  .selected-shipment-band {
    grid-template-columns: 1fr;
  }

  .proof-category-grid,
  .proof-product-grid,
  .proof-product-grid.device {
    grid-template-columns: 1fr;
  }

  .proof-category-card {
    min-height: 216px;
    grid-template-rows: 120px minmax(0, auto);
  }

  .proof-category-image {
    height: 120px;
  }

  .proof-product-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-row .helper {
    grid-column: auto;
  }

  .question-row {
    grid-template-columns: 1fr;
  }

  .question-options {
    gap: 10px 14px;
  }

  .textarea-footer,
  .progress-summary {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .postal-row {
    grid-template-columns: 1fr;
  }

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

  .upload-progress-row {
    grid-template-columns: 28px minmax(0, 1fr) 38px;
  }

  .upload-progress-row > span:nth-of-type(2),
  .upload-progress-row .progress-track {
    grid-column: 2 / -1;
  }

  .upload-progress-row .spinner {
    grid-column: auto;
  }

  .eligibility-banner {
    padding: 20px 16px;
  }

  .eligibility-icon {
    width: 66px;
    height: 66px;
    font-size: 36px;
  }

  .eligibility-banner h2 {
    font-size: 26px;
  }

  .submit-band {
    margin: 20px -14px 0;
    padding: 16px 14px 24px;
  }

  .upload-guidance {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 16px 0 0;
  }

  .actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    margin: 0;
    z-index: 5;
    flex-direction: column-reverse;
  }

  .completion-actions {
    position: static;
    border-top: 1px solid var(--border);
    padding: 18px 0 0;
    margin-top: 22px;
  }

  .button,
  .button.primary {
    width: 100%;
    min-width: 0;
  }

  .completion-wrap {
    margin-top: 28px;
  }

  .completion-panel {
    padding: 28px 18px;
  }

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

  .admin-topbar {
    height: auto;
    min-height: 58px;
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
    padding: 12px;
  }

  .admin-topbar-left,
  .admin-topbar-actions {
    width: 100%;
  }

  .admin-topbar-actions {
    justify-content: space-between;
  }

  .admin-topbar-left span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-nav {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 10px;
  }

  .admin-nav .brand {
    display: block;
  }

  .nav-items,
  .nav-bottom {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    display: grid;
  }

  .nav-item {
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
  }

  .nav-label {
    display: inline;
    font-size: 12px;
  }

  .admin-content {
    padding: 16px 12px 26px;
  }

  .admin-title-row,
  .detail-header,
  .settings-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-title-actions,
  .admin-title-actions .button,
  .shipment-poll-feedback,
  .shipment-poll-metrics,
  .shipment-poll-metric {
    width: 100%;
  }

  .admin-title-actions {
    justify-content: stretch;
  }

  .shipment-poll-feedback {
    align-items: stretch;
  }

  .settings-actions,
  .settings-actions .button {
    width: 100%;
  }

  .template-tab-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .template-tab {
    padding: 8px 6px;
  }

  .email-template-live-status {
    width: 100%;
    margin-right: 0;
  }

  .manual-template-row,
  .manual-template-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-grid,
  .filter-grid,
  .filter-grid.notifications {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 940px;
  }

  .login-panel {
    padding: 34px 22px 28px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .applicant-header {
    flex-direction: column;
    padding: 14px 16px;
  }

  .applicant-header .header-actions {
    width: 100%;
    gap: 8px 16px;
  }

  .applicant-header .link-button,
  .applicant-page .link-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .applicant-page {
    padding: 18px 12px calc(150px + env(safe-area-inset-bottom));
  }

  .applicant-page .panel,
  .applicant-page .main-column,
  .applicant-page .compact-panel,
  .applicant-page .review-section,
  .applicant-page .upload-zone,
  .applicant-page .field,
  .applicant-page .address-row > div {
    min-width: 0;
  }

  .applicant-container,
  .applicant-container.wide {
    width: 100%;
    max-width: 100%;
  }

  .panel-lead {
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.7;
  }

  .page-title {
    font-size: 24px;
  }

  .section-title {
    flex-wrap: wrap;
    font-size: 18px;
  }

  .stepper {
    width: 100%;
    gap: 6px;
    margin-bottom: 22px;
    padding-bottom: 2px;
    overflow: visible;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stepper-six {
    display: flex;
    gap: 8px;
    margin-inline: -2px;
    padding: 0 2px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .stepper-six::-webkit-scrollbar {
    display: none;
  }

  .stepper-six {
    scrollbar-width: none;
  }

  .stepper-six .stepper-item {
    flex: 0 0 92px;
    scroll-snap-align: start;
  }

  .stepper-item {
    gap: 6px;
    padding-bottom: 5px;
    text-align: center;
    font-size: 11px;
    line-height: 1.25;
  }

  .stepper-item:not(:last-child)::after {
    display: none;
  }

  .stepper-circle {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .stepper-item.active {
    border-bottom: 3px solid var(--teal);
  }

  .stepper-item.active .stepper-circle {
    box-shadow: 0 0 0 4px var(--teal-soft);
  }

  .stepper-label {
    overflow-wrap: anywhere;
  }

  .applicant-panel,
  .compact-panel,
  .address-panel,
  .review-section {
    padding: 16px;
  }

  .form-section {
    margin-top: 24px;
  }

  .field-grid,
  .field-grid.three {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .field input,
  .field select,
  .field textarea,
  .address-row input,
  .address-row select,
  .address-row textarea {
    min-height: 52px;
    font-size: 16px;
  }

  .channel-grid {
    gap: 12px;
  }

  .channel-card {
    min-height: 120px;
    gap: 8px;
    padding: 20px 14px 14px;
  }

  .channel-logo {
    max-width: 132px;
    max-height: 30px;
  }

  .channel-logo-frame {
    min-height: 40px;
  }

  .channel-logo-fallback {
    max-width: 132px;
    font-size: 14px;
  }

  .channel-radio {
    width: 22px;
    height: 22px;
  }

  .channel-icon {
    height: 40px;
    font-size: 28px;
    line-height: 1;
  }

  .channel-name {
    font-size: 16px;
  }

  .notice {
    padding: 12px;
  }

  .notice strong {
    flex: 0 0 auto;
  }

  .sms-title {
    margin-top: 4px;
    font-size: 28px;
  }

  .sms-card {
    padding: 18px 16px;
  }

  .sms-phone-row {
    gap: 8px;
  }

  .sms-phone {
    font-size: 23px;
    overflow-wrap: anywhere;
  }

  .code-inputs {
    justify-content: center;
    gap: 6px;
  }

  .code-box {
    min-width: 0;
    height: 54px;
    font-size: 24px;
  }

  .resend-row {
    min-height: 58px;
  }

  .resend-button {
    justify-content: center;
    width: 100%;
  }

  .section-heading-row,
  .source-row {
    gap: 10px;
  }

  .source-row .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .segment {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .order-table-wrap {
    border: 0;
    overflow: visible;
  }

  .order-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .order-table thead {
    display: none;
  }

  .order-table tbody,
  .order-table tr,
  .order-table td {
    display: block;
    width: 100%;
  }

  .order-table tr {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
  }

  .order-table tr.selected {
    border-color: var(--teal);
    background: #f6ffff;
    box-shadow: inset 4px 0 0 var(--teal);
  }

  .order-table tr.selected td {
    border: 0;
    background: transparent;
  }

  .order-table td {
    min-height: 34px;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 0;
    padding: 4px 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 14px;
  }

  .order-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .order-table input[type="radio"],
  .product-row input[type="radio"],
  .product-row input[type="checkbox"],
  .question-options input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--teal);
  }

  .upload-zone {
    gap: 16px;
    padding: 16px;
  }

  .upload-main {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 10px 6px;
  }

  .upload-icon {
    font-size: 40px;
  }

  .upload-main strong {
    text-align: center;
    line-height: 1.45;
  }

  .upload-guidance {
    line-height: 1.7;
  }

  .file-row {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 12px;
  }

  .file-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .file-row-actions .badge,
  .file-row-actions .button {
    flex: 1 1 120px;
  }

  .proof-eligibility-fields {
    margin-top: 16px;
  }

  .summary-panel {
    padding: 16px;
  }

  .summary-kv {
    gap: 4px;
  }

  .product-row {
    min-height: 60px;
    grid-template-columns: 28px 54px minmax(0, 1fr);
    padding: 14px;
  }

  .category-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .category-row .segment {
    width: 100%;
  }

  .issue-fields {
    max-width: none;
  }

  .question-row {
    min-height: 0;
  }

  .question-label {
    padding: 10px 12px;
  }

  .question-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .question-options label {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    white-space: normal;
  }

  .textarea-footer {
    align-items: flex-start;
  }

  .upload-section {
    margin-top: 18px;
  }

  .upload-progress-row {
    grid-template-columns: 32px minmax(0, 1fr) 44px 36px;
    gap: 8px 10px;
    padding: 12px;
  }

  .upload-progress-row strong {
    grid-column: 2 / -1;
    overflow-wrap: anywhere;
  }

  .upload-progress-row > span:nth-of-type(2) {
    grid-column: 2;
  }

  .upload-progress-row .progress-track {
    grid-column: 2 / 4;
  }

  .upload-progress-row > span:nth-of-type(3) {
    grid-column: 4;
    text-align: right;
  }

  .upload-progress-row .spinner {
    grid-column: 3;
  }

  .upload-progress-row .icon-button {
    grid-column: 4;
  }

  .media-card strong,
  .video-row strong,
  .upload-error-row strong {
    overflow-wrap: anywhere;
  }

  .video-row {
    grid-template-columns: 84px minmax(0, 1fr) 36px;
    gap: 8px 12px;
  }

  .video-thumb {
    grid-row: 1 / span 2;
    width: 84px;
  }

  .video-row strong,
  .video-row .helper {
    grid-column: 2;
  }

  .video-row .icon-button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .upload-error-row {
    grid-template-columns: 32px minmax(0, 1fr) 36px;
    gap: 8px 10px;
  }

  .upload-error-row strong,
  .upload-error-row span:nth-child(3),
  .upload-error-row span:nth-child(4) {
    grid-column: 2;
  }

  .upload-error-row .icon-button {
    grid-column: 3;
    grid-row: 1 / span 3;
  }

  .address-panel {
    gap: 18px;
  }

  .address-row {
    gap: 8px;
  }

  .address-row > label {
    min-height: 0;
    font-size: 14px;
  }

  .postal-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 128px);
    gap: 8px;
  }

  .postal-row .button {
    padding: 0 8px;
    font-size: 13px;
  }

  .review-screen {
    gap: 16px;
  }

  .eligibility-banner {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .eligibility-icon {
    width: 56px;
    height: 56px;
    font-size: 30px;
  }

  .eligibility-banner h2 {
    font-size: 24px;
  }

  .review-section-head {
    flex-direction: row;
    align-items: center;
  }

  .review-kv div {
    gap: 4px;
  }

  .file-summary-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .file-summary-row > .helper {
    grid-column: 2;
  }

  .submit-band {
    margin: 0 -12px calc(-150px - env(safe-area-inset-bottom));
    box-shadow: 0 -8px 20px rgba(14, 32, 48, 0.08);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }

  .submit-note {
    font-size: 13px;
    line-height: 1.5;
  }

  .submit-band .button.primary {
    min-height: 54px;
    font-size: 16px;
  }

  .applicant-page .actions {
    align-items: stretch;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 20px rgba(14, 32, 48, 0.08);
    flex-direction: column;
  }

  .applicant-page .actions .button.primary {
    order: -1;
  }

  .applicant-page .actions .action-note {
    order: 2;
    min-height: 0;
    text-align: center;
  }

  .completion-value {
    min-height: 48px;
    padding: 8px 10px;
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .timeline-step {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .brand {
    font-size: 22px;
  }

  .brand small {
    font-size: 15px;
  }

  .applicant-page {
    padding-inline: 10px;
  }

  .panel-title,
  .page-title,
  .completion-title {
    font-size: 23px;
  }

  .applicant-stepper .stepper-item {
    font-size: 10px;
  }

  .stepper-six .stepper-item {
    flex-basis: 88px;
  }

  .stepper-circle {
    width: 28px;
    height: 28px;
  }

  .sms-phone {
    font-size: 21px;
  }

  .code-inputs {
    gap: 5px;
  }

  .code-box {
    height: 52px;
  }

  .postal-row {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .submit-band {
    margin-inline: -10px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .applicant-page,
  .applicant-page * {
    box-sizing: border-box;
  }

  .applicant-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .applicant-page .applicant-container,
  .applicant-page .applicant-container.wide,
  .applicant-page .applicant-panel,
  .applicant-page .start-panel,
  .applicant-page .two-column-layout,
  .applicant-page .main-column,
  .applicant-page .media-layout,
  .applicant-page .address-screen,
  .applicant-page .review-screen,
  .applicant-page .review-grid,
  .applicant-page .compact-panel,
  .applicant-page .summary-panel,
  .applicant-page .upload-zone,
  .applicant-page .field,
  .applicant-page .product-list,
  .applicant-page .question-matrix,
  .applicant-page .review-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .applicant-page .two-column-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .applicant-page .summary-panel {
    position: static;
    top: auto;
    align-self: stretch;
  }

  .applicant-page .stepper {
    max-width: 100%;
    min-width: 0;
  }

  .applicant-page .stepper-six {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    grid-template-columns: none;
  }

  .applicant-page .stepper-six .stepper-item {
    min-width: 0;
  }

  .applicant-page .channel-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .applicant-page .channel-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
  }

  .applicant-page .channel-card.selected {
    border: 1px solid var(--teal);
    background: var(--teal-soft);
    box-shadow: inset 0 0 0 1px var(--teal);
  }

  .applicant-page .channel-radio {
    position: absolute;
    top: 12px;
    left: 12px;
    flex: 0 0 auto;
    overflow: hidden;
    transform: none;
    border-color: #b8c0c8;
    border-radius: 50%;
    background: white;
  }

  .applicant-page .channel-card.selected .channel-radio {
    border-color: var(--teal);
  }

  .applicant-page .channel-card.selected .channel-radio::after {
    inset: 5px;
    border-radius: 50%;
    background: var(--teal);
  }

  .applicant-page .channel-icon,
  .applicant-page .channel-name,
  .applicant-page .channel-card .helper,
  .applicant-page .past-exchange-title,
  .applicant-page .past-exchange-product,
  .applicant-page .past-exchange-meta,
  .applicant-page .original-exchange-summary,
  .applicant-page .panel-lead,
  .applicant-page .notice span,
  .applicant-page .summary-kv strong,
  .applicant-page .review-kv dd,
  .applicant-page .file-summary-row strong,
  .applicant-page .file-row strong {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .applicant-page .review-section-head {
    flex-wrap: wrap;
  }

  .applicant-page .past-exchange-row {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
  }

  .applicant-page .past-exchange-meta {
    grid-column: 2;
    justify-items: start;
  }

  .applicant-page .original-exchange-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
