:root {
  --ink: #101820;
  --muted: #62707c;
  --paper: #f5f7f8;
  --white: #fff;
  --teal: #39c5bb;
  --blue: #3381b0;
  --pink: #f06b9f;
  --line: #dce2e5;
  --danger: #d9485f;
  --warning: #d89819;
  --quiet: #6f8290;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }

.site-header {
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 8px; }
.service-label, .section-kicker, .hero-index { font-size: 12px; font-weight: 800; color: var(--blue); }
main { min-height: calc(100vh - 144px); }
footer {
  min-height: 72px;
  padding: 20px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.report-hero {
  padding: clamp(64px, 9vw, 124px) clamp(20px, 8vw, 140px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.report-hero h1 { max-width: 900px; margin: 20px 0; font-size: clamp(44px, 7vw, 94px); line-height: .98; }
.report-hero h1 span { display: block; }
.report-hero p { max-width: 640px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.75; overflow-wrap: anywhere; word-break: break-all; }
.report-layout { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.4fr); }
.guide-panel { padding: clamp(42px, 6vw, 84px); background: #101820; color: white; }
.guide-panel .section-kicker { color: var(--teal); }
.guide-panel h2 { margin: 14px 0 38px; max-width: 380px; font-size: 32px; }
.guide-panel ol { margin: 0; padding: 0; list-style: none; }
.guide-panel li { padding: 22px 0; display: grid; grid-template-columns: 42px 1fr; gap: 12px; border-top: 1px solid #30404c; }
.guide-panel li > span { color: var(--teal); font-weight: 800; }
.guide-panel p { margin: 0; color: #b8c3ca; line-height: 1.6; }
.guide-panel strong { display: block; margin-bottom: 4px; color: white; }
.form-panel { padding: clamp(42px, 7vw, 96px); background: white; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 38px; border-bottom: 2px solid var(--ink); }
.panel-heading span { padding-bottom: 14px; font-size: 12px; font-weight: 800; color: var(--blue); }
.panel-heading h2 { margin: 0 0 10px; font-size: 36px; }

.field { display: grid; gap: 9px; margin: 0 0 24px; }
.field > span, .field legend { font-weight: 750; }
.field em { color: var(--pink); font-style: normal; font-size: 12px; }
.field input, .field textarea, .field select, .filter-bar input, .filter-bar select {
  width: 100%; min-height: 50px; padding: 13px 14px;
  color: var(--ink); background: #f7f9fa; border: 1px solid #cad3d8; border-radius: 6px; outline: none;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 129, 176, .12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
fieldset.field { padding: 0; border: 0; }
.field legend { margin-bottom: 12px; }
.priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.priority-option { position: relative; display: block; }
.priority-option input { position: absolute; opacity: 0; }
.priority-copy { min-height: 106px; padding: 15px; display: block; border: 1px solid var(--line); border-radius: 6px; background: #fafbfc; }
.priority-copy strong, .priority-copy small { display: block; }
.priority-copy strong { margin-bottom: 8px; }
.priority-copy small { color: var(--muted); line-height: 1.45; }
.priority-option input:checked + .priority-copy { border-width: 2px; padding: 14px; }
.priority-urgent input:checked + .priority-copy { border-color: var(--danger); background: #fff5f6; }
.priority-important input:checked + .priority-copy { border-color: var(--warning); background: #fffbef; }
.priority-nonurgent input:checked + .priority-copy { border-color: var(--quiet); background: #f4f7f8; }
.upload-field input { padding: 16px; border-style: dashed; background: #f5fbfb; }
.upload-field small, .privacy-note { color: var(--muted); line-height: 1.5; }
.primary-button {
  width: 100%; min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
  color: #071f1d; background: var(--teal); border: 0; border-radius: 6px; font-weight: 850; text-decoration: none;
}
.primary-button b { font-size: 24px; }
.privacy-note { margin: 14px 0 0; font-size: 12px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { margin: 0 0 22px; padding: 13px 15px; border-radius: 6px; line-height: 1.5; }
.alert-error { color: #8f2437; background: #fff0f3; border: 1px solid #f3bdc8; }
.alert-success { color: #165d57; background: #eafaf8; border: 1px solid #a6dfda; }

.result-page { max-width: 760px; min-height: calc(100vh - 144px); margin: auto; padding: 100px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.result-mark { width: 68px; height: 68px; display: grid; place-items: center; color: #073b37; background: var(--teal); border-radius: 50%; font-size: 30px; font-weight: 900; }
.result-mark.error { color: white; background: var(--danger); }
.result-page h1 { margin: 16px 0; font-size: clamp(38px, 6vw, 68px); }
.result-page > p:not(.section-kicker) { color: var(--muted); }
.ticket-number { margin: 32px 0; padding: 18px 24px; background: white; border: 1px solid var(--line); font-size: clamp(20px, 4vw, 32px); font-weight: 900; }
.result-page .primary-button { max-width: 320px; }

.admin-area { color: #eef4f6; background: #0b1118; color-scheme: dark; }
.admin-area .site-header { background: #0b1118; border-color: #26313a; }
.admin-area footer { border-color: #26313a; color: #82919b; }
.admin-area .brand img { box-shadow: 0 0 0 1px #30404c; }
.login-shell { min-height: calc(100vh - 144px); padding: 40px 20px; display: grid; place-items: center; }
.login-panel { width: min(480px, 100%); padding: clamp(28px, 6vw, 54px); background: #121b23; border: 1px solid #2c3943; border-radius: 8px; }
.login-panel h1 { margin: 10px 0; font-size: 48px; }
.login-panel > p:not(.section-kicker) { margin: 0 0 32px; color: #9caab3; line-height: 1.6; }
.admin-area .field input, .admin-area .field textarea, .admin-area .field select, .admin-area .filter-bar input, .admin-area .filter-bar select { color: white; background: #0c141b; border-color: #35444f; }
.admin-area .field > span { color: #cbd5da; }
.admin-head { padding: 72px clamp(20px, 6vw, 90px) 34px; display: flex; align-items: start; justify-content: space-between; gap: 30px; }
.admin-head h1 { margin: 8px 0; font-size: clamp(44px, 6vw, 76px); }
.admin-head p:not(.section-kicker) { color: #91a0a9; }
.text-button { padding: 10px 14px; color: #c8d2d8; background: transparent; border: 1px solid #3b4953; border-radius: 5px; }
.stats-grid { padding: 0 clamp(20px, 6vw, 90px) 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { min-height: 150px; padding: 22px; display: grid; grid-template-columns: 1fr auto; background: #121b23; border-top: 3px solid; }
.stat strong { font-size: 48px; }
.stat small { align-self: end; grid-column: 1 / -1; color: #83929c; }
.stat.urgent { border-color: var(--danger); }.stat.important { border-color: var(--warning); }.stat.nonurgent { border-color: var(--quiet); }
.filter-bar { margin: 0 clamp(20px, 6vw, 90px) 28px; padding: 14px; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; background: #121b23; border: 1px solid #26343e; }
.filter-bar button { padding: 0 22px; color: #061b19; background: var(--teal); border: 0; border-radius: 5px; font-weight: 800; }
.ticket-list { padding: 0 clamp(20px, 6vw, 90px) 80px; display: grid; gap: 14px; }
.ticket-card { padding: 24px; background: #121b23; border: 1px solid #283640; border-left-width: 4px; }
.priority-border-urgent { border-left-color: var(--danger); }.priority-border-important { border-left-color: var(--warning); }.priority-border-nonurgent { border-left-color: var(--quiet); }
.ticket-card-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.ticket-id { color: var(--teal); font-size: 12px; font-weight: 800; }
.ticket-card h2 { margin: 8px 0 0; font-size: 24px; }
.badges { display: flex; gap: 7px; }
.badge { padding: 5px 8px; border-radius: 4px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.badge-urgent { color: #ffc4cd; background: #672335; }.badge-important { color: #ffe2a4; background: #604716; }.badge-nonurgent { color: #d5e0e6; background: #34434e; }
.status-open { color: #b7dff3; background: #183752; }.status-processing { color: #bceae5; background: #1b514c; }.status-resolved { color: #d6edbc; background: #365020; }.status-closed { color: #c4cbd0; background: #343b40; }
.ticket-meta { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #81919b; font-size: 13px; }
.ticket-description, .full-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.ticket-description { max-height: 5.25em; overflow: hidden; color: #c4ced3; }
.ticket-contact { display: flex; gap: 12px; font-size: 13px; }.ticket-contact span { color: #9cabb4; }
.detail-link { margin-top: 22px; padding-top: 16px; display: flex; justify-content: space-between; color: var(--teal); border-top: 1px solid #2b3943; text-decoration: none; font-weight: 800; }
.empty-state { padding: 80px 20px; color: #83919a; text-align: center; border: 1px dashed #36434d; }
.detail-head { padding: 54px clamp(20px, 6vw, 90px) 30px; border-bottom: 1px solid #28343d; }
.back-link { color: #90a0a9; text-decoration: none; }
.detail-title { margin-top: 34px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.detail-title h1 { margin: 8px 0 0; font-size: clamp(34px, 5vw, 64px); }
.detail-grid { padding: 38px clamp(20px, 6vw, 90px) 80px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); gap: 24px; align-items: start; }
.detail-main { display: grid; gap: 20px; }
.detail-block, .manage-panel { padding: clamp(22px, 4vw, 36px); background: #121b23; border: 1px solid #293741; }
.detail-block h2, .manage-panel h2 { margin: 8px 0 24px; }
.full-description { color: #d0d9dd; }
.manage-panel { position: sticky; top: 20px; }
.manage-panel dl { margin: 0 0 28px; display: grid; grid-template-columns: 86px 1fr; gap: 11px; font-size: 14px; }
.manage-panel dt { color: #7f909a; }.manage-panel dd { margin: 0; overflow-wrap: anywhere; }
.attachments { display: grid; gap: 16px; }
.attachment { padding: 12px; display: grid; grid-template-columns: minmax(160px, 300px) 1fr; gap: 18px; background: #0b131a; border: 1px solid #2b3943; }
.media-preview { width: 100%; max-height: 280px; display: block; object-fit: contain; background: black; }
.media-preview img { width: 100%; max-height: 280px; display: block; object-fit: contain; }
.attachment > div { align-self: center; min-width: 0; }.attachment strong, .attachment span, .attachment a { display: block; overflow-wrap: anywhere; }.attachment span { margin: 8px 0 14px; color: #82929c; font-size: 13px; }.attachment a { color: var(--teal); }
.empty-evidence { padding: 34px; color: #81919b; text-align: center; border: 1px dashed #35434d; }

@media (max-width: 820px) {
  .service-label { display: none; }
  .report-hero { padding-top: 58px; padding-bottom: 58px; }
  .report-hero h1 { font-size: clamp(38px, 9.5vw, 42px); line-height: 1.04; }
  .report-hero h1 span { white-space: nowrap; }
  .report-layout, .detail-grid { grid-template-columns: 1fr; }
  .guide-panel { padding: 44px 24px; }
  .form-panel { padding: 44px 20px; }
  .priority-grid, .field-row, .stats-grid { grid-template-columns: 1fr; }
  .priority-copy { min-height: 0; }
  .admin-head { padding-top: 44px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar button { min-height: 48px; }
  .ticket-card-top, .detail-title { align-items: start; flex-direction: column; }
  .manage-panel { position: static; }
  .attachment { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
