:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #182126;
  --muted: #60717d;
  --line: #d7e0e5;
  --accent: #126b62;
  --accent-strong: #0b4f49;
  --warn-bg: #fff6d8;
  --warn-text: #69500a;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.intro {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
}

.intro p:last-child {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.form, .success {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(16, 34, 40, 0.08);
}

.grid {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}

label span {
  font-size: 0.95rem;
}

strong {
  color: var(--danger);
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:disabled, select:disabled, textarea:disabled, button:disabled {
  background: #eef2f4;
  color: #87949c;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(18, 107, 98, 0.18);
  border-color: var(--accent);
}

.notice {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--muted);
  background: #f9fbfc;
  line-height: 1.45;
}

.notice.warning {
  border-color: #f3d37c;
  background: var(--warn-bg);
  color: var(--warn-text);
}

.evidence-panel, .issue-panel {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.panel-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfc;
}

.panel-head h2 {
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.evidence-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.evidence-list.empty {
  color: var(--muted);
}

.issue-options {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.issue-options.empty {
  color: var(--muted);
}

.issue-options.selected {
  padding: 16px;
}

.selected-issue-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fbfc;
}

.secondary-button {
  width: fit-content;
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
  color: var(--accent-strong);
}

.issue-option {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.issue-option:hover,
.issue-option:focus {
  outline: 3px solid rgba(18, 107, 98, 0.18);
  border-color: var(--accent);
}

.issue-option.active {
  border-color: var(--accent);
  background: #eef8f6;
}

.issue-option img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.issue-option .code-chip {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #182126;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.issue-option-title {
  display: block;
  font-weight: 700;
}

.issue-option-help {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.requirement {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.requirement.locked {
  background: #f7fafb;
}

.sn-photo-template {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f9fbfc;
}

.sn-photo-template h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.sn-photo-template p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.sn-photo-template img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.troubleshooting-panel {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.troubleshooting-body {
  padding: 16px;
}

.troubleshooting-body p {
  color: var(--muted);
  line-height: 1.45;
}

.guide-block {
  display: block;
  margin-bottom: 12px;
  color: var(--text);
}

.guide-block strong {
  display: block;
  margin-bottom: 4px;
}

.guide-block span {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.requirement h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 6px;
  font-size: 1rem;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e9f3f1;
  color: var(--accent-strong);
  font-size: 0.75rem;
}

.requirement p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.file-input {
  margin-bottom: 0;
}

.native-file-control {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-picker-button {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.lock-note {
  width: fit-content;
  border-radius: 6px;
  padding: 7px 10px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.file-input:has(.native-file-control:disabled) .file-picker-button {
  border-color: var(--line);
  background: #eef2f4;
  color: #87949c;
  cursor: not-allowed;
}

.file-selected-text {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.file-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: max-content;
  justify-self: start;
  align-self: start;
  pointer-events: none;
}

.file-complete-text {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e9f3f1;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.file-remove-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  box-sizing: border-box;
  flex: 0 0 28px;
  justify-self: start;
  align-self: center;
  border: 1px solid #e2b7b2;
  border-radius: 6px;
  padding: 0;
  background: #fff;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1;
  pointer-events: auto;
  cursor: pointer;
}

.file-remove-button::before {
  content: "\1F5D1";
}

.file-progress {
  margin-top: 10px;
}

.file-progress-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebee;
}

.file-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.file-progress p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.file-progress.ready p {
  color: var(--accent-strong);
  font-weight: 700;
}

.error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.field-error {
  min-height: 18px;
  margin: -8px 0 12px;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.3;
}

.field-error:empty {
  display: none;
}

.invalid-field {
  border-color: var(--danger);
}

.calendar-popover {
  position: absolute;
  z-index: 20;
  width: min(320px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 34, 40, 0.18);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-title {
  font-weight: 700;
}

.calendar-nav {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: #fff;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
}

.calendar-day:hover,
.calendar-day:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(18, 107, 98, 0.14);
}

.calendar-day.selected {
  background: var(--accent);
  color: #fff;
}

.calendar-day.muted,
.calendar-day:disabled {
  color: #a2adb4;
  background: #f4f7f8;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.time-row select {
  min-height: 38px;
}

.progress {
  margin: 18px 0;
}

.progress-bar {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebee;
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.progress p {
  margin: 8px 0 0;
  color: var(--muted);
}

.progress-steps {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-steps li::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.progress-steps li.active {
  color: var(--accent-strong);
  font-weight: 700;
}

.progress-steps li.active::before {
  border-color: var(--accent);
  background: var(--accent);
}

.progress-steps li.done {
  color: var(--text);
}

.progress-steps li.done::before {
  border-color: var(--accent);
  background: #e9f3f1;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

textarea[readonly] {
  background: #eef4f6;
  color: var(--muted);
  cursor: default;
}

.success {
  margin-top: 22px;
  border-color: #b6d9d4;
}

.success h2 {
  color: var(--accent-strong);
}

.ticket-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #b6d9d4;
  border-radius: 6px;
  background: #f4fbfa;
}

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

.ticket-id {
  color: var(--accent-strong);
  font-size: 1.2rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.copy-ticket-button {
  min-height: 50px;
  margin-left: auto;
  padding: 0 28px;
  font-size: 1.05rem;
}

.copy-ticket-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--accent-strong);
  font-weight: 700;
}

.warning-text {
  color: var(--warn-text);
}

.cs-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.cs-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.cs-section h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.05rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding-top: 18px;
  }

  .form, .success {
    padding: 16px;
  }

  .grid.two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .actions {
    display: block;
  }

  button {
    width: 100%;
  }

  .copy-ticket-button {
    width: auto;
    margin-left: 0;
  }

  .file-remove-button {
    width: 28px;
    min-width: 28px;
  }

  .secondary-button {
    width: fit-content;
  }

  .sn-photo-template {
    grid-template-columns: 1fr;
  }
}
