:root {
  --yellow: #fbe000;
  --ink: #1a1a1a;
  --muted: #5b5b5b;
  --blue: #0a4aa0;
  --line: #dedede;
  --danger: #8a1f1f;
  --danger-bg: #fff6f6;
  --ok: #145c32;
  --ok-bg: #ecfff2;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--yellow);
  color: var(--ink);
}

.shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.card {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  align-self: flex-start;
}

.banner {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
}

h1 {
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0 0 4px;
  letter-spacing: 0;
}

.sub {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
}

form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.split,
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.date-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.date-actions button {
  min-height: 42px;
  padding: 9px;
  font-size: 0.94rem;
}

label,
legend {
  font-weight: 700;
  font-size: 0.9rem;
}

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

textarea {
  resize: vertical;
  line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.choice-box {
  margin: 0;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
}

.radio-line input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
}

.micro {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.turnstile-wrap {
  min-height: 1px;
  overflow: hidden;
}

button,
.link-button {
  min-height: 46px;
  padding: 12px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

button:active,
.link-button:active {
  transform: translateY(1px);
}

.hint {
  margin: 0;
  padding: 12px;
  background: var(--danger-bg);
  border: 1px solid #f3c2c2;
  border-radius: 10px;
  color: var(--danger);
  font-weight: 650;
}

.success {
  margin-top: 16px;
  padding: 16px;
  background: var(--ok-bg);
  border: 2px solid #8bd4a5;
  border-radius: 12px;
  text-align: center;
}

.success-label {
  margin: 0 0 4px;
  color: var(--ok);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.success h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.disclaimer {
  margin: 18px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-body {
  background:
    radial-gradient(circle at top left, rgba(42, 88, 255, 0.09), transparent 32rem),
    #f6f7f9;
  color: #172033;
}

.admin-body input,
.admin-body select,
.admin-body textarea {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  box-shadow: 0 1px 0 rgba(12, 18, 31, 0.03);
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  border-color: #3157d5;
  box-shadow: 0 0 0 3px rgba(49, 87, 213, 0.13);
}

.admin-body button,
.admin-body .link-button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #cfd6e3;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 0.92rem;
  font-weight: 750;
  box-shadow: 0 1px 2px rgba(12, 18, 31, 0.06);
}

.admin-body button:hover,
.admin-body .link-button:hover {
  border-color: #aeb8c9;
  background: #f8fafc;
}

.admin-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-header h1 {
  font-size: 1.6rem;
  line-height: 1.05;
  margin: 0;
  color: #101828;
}

.admin-sub {
  margin: 6px 0 0;
  color: #667085;
  font-size: 0.9rem;
}

.admin-body .eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 850;
  color: #3157d5;
}

.admin-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 48px rgba(22, 34, 51, 0.08);
}

.filters {
  display: grid;
  grid-template-columns: 160px minmax(170px, 1fr) 150px 150px 150px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.filters label,
.admin-edit label {
  display: grid;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 750;
  color: #667085;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-actions button:first-child,
.admin-edit button {
  background: #2446c7;
  border-color: #2446c7;
  color: #fff;
}

.filter-actions button:first-child:hover,
.admin-edit button:hover {
  background: #1f3cad;
  border-color: #1f3cad;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) 1fr;
  gap: 14px;
}

.login-panel {
  width: min(420px, 100%);
  margin: min(12vh, 90px) auto 0;
  padding: 24px;
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(22, 34, 51, 0.1);
}

.login-mark {
  width: 44px;
  height: 44px;
  display: block;
  margin-bottom: 14px;
}

.login-panel h1 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  color: #101828;
}

.login-form {
  display: grid;
  gap: 10px;
}

.report-list {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding-right: 4px;
}

.report-card {
  width: 100%;
  text-align: left;
  border: 1px solid #e1e6ef;
  background: #fff;
  border-radius: 10px;
  padding: 11px 12px;
  min-height: auto;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.report-card:hover {
  border-color: #b9c3d4;
  background: #fbfcff;
}

.report-card.active {
  border-color: #9fb3ff;
  background: #f5f7ff;
  box-shadow: inset 3px 0 0 #3157d5;
}

.report-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 850;
  color: #101828;
}

.report-location {
  display: block;
  margin-top: 5px;
  color: #344054;
  font-weight: 650;
}

.report-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #667085;
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.status-new { background: #eef4ff; border-color: #c7d7fe; color: #2446c7; }
.status-reviewing { background: #fff7e6; border-color: #ffd99a; color: #9a5a00; }
.status-needs-follow-up { background: #fff1f3; border-color: #ffc9d2; color: #b4233a; }
.status-verified { background: #ecfdf3; border-color: #b7ebc6; color: #067647; }
.status-duplicate { background: #f4f3ff; border-color: #d9d6fe; color: #5925dc; }
.status-closed { background: #f2f4f7; border-color: #d0d5dd; color: #475467; }

.report-detail {
  min-height: 520px;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e1e6ef;
}

.detail-head h2 {
  margin: 0 0 5px;
  font-size: 1.35rem;
  line-height: 1.1;
  color: #101828;
  letter-spacing: 0;
}

.detail-location {
  margin: 0;
  color: #667085;
  font-weight: 650;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.kv {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e1e6ef;
  border-radius: 9px;
  color: #172033;
  font-weight: 700;
}

.kv span {
  display: block;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

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

.detail-section h3,
.review-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #101828;
}

.description-box {
  padding: 13px 14px;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  line-height: 1.45;
  white-space: pre-wrap;
}

.review-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  background: #f7f9ff;
}

.review-panel p {
  margin: 0;
  color: #667085;
  font-size: 0.86rem;
}

.admin-edit {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 10px;
  align-items: end;
}

.evidence-list,
.audit-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.evidence-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe4ff;
  border-radius: 10px;
  background: #f7f9ff;
}

.evidence-thumb {
  width: 112px;
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eefc;
  border: 1px solid #d5def2;
}

.evidence-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.evidence-card strong,
.evidence-card small {
  display: block;
}

.evidence-card strong {
  color: #172033;
  overflow-wrap: anywhere;
}

.evidence-card small {
  margin-top: 3px;
  color: #667085;
}

.evidence-download {
  display: inline-flex;
  margin-top: 8px;
  color: #2446c7;
  font-weight: 800;
  text-decoration: none;
}

.evidence-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe4ff;
  border-radius: 9px;
  color: #2446c7;
  background: #f7f9ff;
  font-weight: 800;
  text-decoration: none;
}

.evidence-link small {
  color: #667085;
  font-weight: 650;
}

.audit-section {
  color: #667085;
}

.audit-box {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f6;
  background: transparent;
  white-space: normal;
}

.audit-box strong {
  color: #344054;
}

.audit-box span {
  font-size: 0.82rem;
}

.empty-state {
  margin: 0;
  padding: 14px;
  color: #667085;
  background: #f8fafc;
  border: 1px dashed #d0d5dd;
  border-radius: 10px;
}

@media (max-width: 820px) {
  .filters,
  .admin-grid,
  .admin-edit,
  .detail-grid,
  .review-panel {
    grid-template-columns: 1fr;
  }

  .report-list {
    max-height: none;
  }

  .admin-header {
    align-items: flex-start;
  }

  .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .shell,
  .admin-shell {
    padding: 10px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .admin-panel,
  .report-detail,
  .login-panel {
    border-radius: 12px;
    padding: 12px;
  }

  .split,
  .contact-grid,
  .admin-header,
  .admin-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .title-row {
    display: grid;
  }

  .detail-head,
  .report-foot,
  .evidence-link,
  .evidence-card {
    display: grid;
  }

  .evidence-card {
    grid-template-columns: 1fr;
  }

  .evidence-thumb {
    width: 100%;
  }
}
