.dsr-portal-app {
  --navy: #142c3d;
  --orange: #ff6b2c;
  --cream: #f7f5f0;
  --line: #dce2e5;
  --muted: #5f6e77;
  max-width: 920px;
  margin: 55px auto;
  padding: 0 20px;
  color: var(--navy);
}

.dsr-portal-app * { box-sizing: border-box; }
.dsr-portal-head { margin-bottom: 20px; }
.dsr-portal-head h1 { font-size: clamp(2rem, 6vw, 4rem); line-height: 1; margin: 0 0 12px; }
.dsr-status { display: inline-block; border-radius: 999px; background: #eaf1f4; padding: 6px 12px; font-size: .82rem; font-weight: 800; text-transform: capitalize; }
.dsr-portal-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 28px 0; }
.dsr-portal-progress span { border-top: 4px solid var(--line); padding-top: 8px; color: var(--muted); font-weight: 700; font-size: .85rem; }
.dsr-portal-progress .is-active { border-color: var(--orange); color: var(--navy); }
.dsr-portal-card { background: #fff; border-radius: 20px; box-shadow: 0 16px 50px rgba(20, 44, 61, .1); padding: clamp(20px, 5vw, 36px); margin: 20px 0; }
.dsr-portal-card h2 { font-size: clamp(1.55rem, 4vw, 2.3rem); margin: 0 0 12px; }
.dsr-portal-card__top { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.dsr-portal-total { font-size: clamp(2rem, 6vw, 3.2rem); color: var(--orange); white-space: nowrap; }
.dsr-portal-lines { list-style: none; padding: 0; margin: 20px 0; }
.dsr-portal-lines li { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.dsr-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 24px; }
.dsr-photo-task { border: 1px solid var(--line); border-radius: 15px; padding: 17px; background: #fff; }
.dsr-photo-task.is-done { border-color: #8ac3a1; background: #f1faf4; }
.dsr-photo-task.is-approved { border-color: #4a9b6a; background: #eef8f2; }
.dsr-photo-task.needs-replacement { border-color: #e67e4c; background: #fff5ef; }
.dsr-photo-task__heading { display: flex; justify-content: space-between; gap: 10px; }
.dsr-photo-task__heading span { color: var(--muted); font-size: .72rem; }
.dsr-photo-task p { margin: 9px 0; color: var(--muted); }
.dsr-photo-task input[type=file] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.dsr-photo-preview { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin: 12px 0; }
.dsr-photo-state { font-weight: 700; }
.dsr-photo-feedback { border-left: 3px solid var(--orange); padding-left: 10px; color: #7b2d12 !important; }
.dsr-upload-button,
.dsr-portal-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 0; border-radius: 11px; background: var(--orange); color: #fff; font: inherit; font-weight: 800; padding: 11px 18px; cursor: pointer; }
.dsr-upload-button { width: 100%; background: var(--navy); }
.dsr-upload-button.is-loading { opacity: .55; pointer-events: none; }
.dsr-portal-primary { margin-top: 18px; }
.dsr-portal-primary:disabled { opacity: .45; cursor: not-allowed; }
.dsr-portal-card textarea { width: 100%; min-height: 110px; margin-top: 8px; border: 1px solid #b9c4ca; border-radius: 11px; padding: 13px; font: inherit; font-size: 16px; }
.dsr-portal-message { margin-top: 15px; border-radius: 10px; background: #fff0ea; color: #7b2d12; padding: 13px; }
.dsr-window-section { margin: 30px 0 38px; padding-top: 22px; border-top: 2px solid var(--line); }
.dsr-window-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 16px; }
.dsr-window-heading h3 { font-size: 1.45rem; margin: 3px 0 0; }
.dsr-window-count { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.dsr-window-heading label { font-weight: 700; min-width: min(310px, 100%); }
.dsr-window-heading input { display: block; width: 100%; min-height: 44px; margin-top: 5px; border: 1px solid #b9c4ca; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 16px; }
.dsr-accept-check { display: flex; gap: 11px; align-items: flex-start; margin: 20px 0; }
.dsr-accept-check input { margin-top: 5px; }
.dsr-success-card { background: #eef8f2; color: #14532d; }

@media (max-width: 640px) {
  .dsr-portal-app { padding: 0 14px; margin: 28px auto; }
  .dsr-portal-card { border-radius: 16px; padding: 20px; }
  .dsr-portal-card__top,
  .dsr-window-heading { display: block; }
  .dsr-portal-total { display: block; margin-top: 8px; }
  .dsr-window-heading label { display: block; margin-top: 14px; }
  .dsr-photo-grid { grid-template-columns: 1fr; }
  .dsr-photo-preview { height: 190px; }
  .dsr-portal-lines li { font-size: .9rem; }
  .dsr-portal-primary { width: 100%; position: sticky; bottom: 12px; box-shadow: 0 10px 28px rgba(255, 107, 44, .28); }
}
