:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf2f4;
  color: #112f45;
  --navy: #112f45;
  --blue: #176b87;
  --cream: #fffdf7;
  --line: #cbd7dc;
  --danger: #9d281f;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, textarea, input { font: inherit; }
.topbar {
  min-height: 92px;
  padding: max(18px, env(safe-area-inset-top)) clamp(18px, 4vw, 48px) 18px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: var(--navy);
  color: white;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.55rem, 5vw, 2.2rem); }
h2 { margin-bottom: 8px; }
.eyebrow { margin-bottom: 4px; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; opacity: .72; }
main { width: min(760px, 100%); margin: 0 auto; padding: clamp(20px, 5vw, 40px) clamp(14px, 4vw, 28px) 80px; }
.panel, .notice, .ticket { background: var(--cream); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgb(17 47 69 / 8%); }
.panel { padding: clamp(20px, 5vw, 36px); }
textarea { width: 100%; border: 1px solid #8ca1aa; border-radius: 10px; padding: 12px 13px; background: white; color: #102b3c; }
textarea { min-height: 130px; resize: vertical; }
a { color: var(--blue); font-weight: 800; }
button { min-height: 44px; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--blue); color: white; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.danger-action { background: var(--danger); }
.notice { margin-bottom: 18px; padding: 14px 16px; border-left: 5px solid var(--blue); }
.notice.error { border-left-color: var(--danger); color: var(--danger); }
.ticket { overflow: hidden; }
.ticket-head { padding: 22px; color: white; background: linear-gradient(135deg, var(--navy), #245e72); }
.ticket-head p { margin-bottom: 4px; opacity: .8; }
.ticket-body { padding: clamp(18px, 5vw, 30px); display: grid; gap: 24px; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.meta { padding: 12px; border-radius: 10px; background: #edf4f6; }
.meta span { display: block; color: #4e6570; font-size: .78rem; font-weight: 700; }
.location { padding: 14px 0; border-top: 1px solid var(--line); }
.location:first-child { border-top: 0; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actions .wide { grid-column: 1 / -1; }
.phone-link { display: inline-flex; min-height: 28px; align-items: center; text-decoration: none; overflow-wrap: anywhere; }
.file-upload { display: grid; gap: 10px; margin-top: 12px; }
.file-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px dashed #8ca1aa; border-radius: 10px; padding: 10px 14px; color: var(--blue); background: #f6fafb; font-weight: 800; cursor: pointer; }
.file-list { display: grid; gap: 8px; }
.file-empty { margin: 0; color: #607782; font-size: .86rem; }
.file-row { min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #edf4f6; }
.file-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-remove { min-height: 34px; padding: 6px 10px; background: transparent; color: var(--danger); border: 1px solid rgb(157 40 31 / 30%); }
.offline { filter: grayscale(.3); }
.complete-panel { border-left: 5px solid var(--blue); }
.hidden { display: none !important; }
@media (max-width: 480px) {
  .topbar { align-items: flex-start; }
  .meta-grid, .actions { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: 1fr; }
  .file-remove { width: 100%; }
  .actions .wide { grid-column: auto; }
  main { padding-inline: 12px; }
}
