.report-shell {
  width: min(1320px, calc(100vw - 32px));
}

.report-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.report-form-panel,
.report-list-panel {
  grid-column: auto;
  min-height: 0;
}

.report-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
}

.report-field input,
.report-field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.48);
  color: var(--text-main);
  padding: 10px 11px;
  font: inherit;
  font-weight: 500;
  outline: none;
}

.report-field textarea {
  resize: vertical;
  min-height: 148px;
}

body.theme-light .report-field input,
body.theme-light .report-field textarea {
  background: #f8fafc;
  color: #0f172a;
}

.report-field input:focus,
.report-field textarea:focus {
  border-color: rgba(37, 99, 235, 0.62);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.report-toggle,
.report-actioned-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 750;
}

.report-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.report-slider {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.18);
  position: relative;
  flex: 0 0 auto;
}

.report-slider::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e5e7eb;
  position: absolute;
  left: 3px;
  top: 2px;
  transition: transform 0.16s ease, background 0.16s ease;
}

.report-toggle input:checked + .report-slider {
  border-color: rgba(34, 197, 94, 0.48);
  background: rgba(34, 197, 94, 0.22);
}

.report-toggle input:checked + .report-slider::after {
  transform: translateX(18px);
  background: #86efac;
}

.report-submit {
  align-self: flex-start;
  min-width: 142px;
}

.report-history-toggle {
  flex: 0 0 auto;
}

.report-list,
.report-hidden-wrap {
  margin-top: 14px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-hidden-wrap h3 {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.report-card {
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.32);
  padding: 12px;
}

body.theme-light .report-card {
  background: #f8fafc;
}

.report-card.is-hidden-entry {
  opacity: 0.84;
}

.report-card-head,
.report-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.report-card-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.report-card-head strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.report-card-head span,
.report-card-actions,
.report-card p {
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.report-card p {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-note-field {
  margin-top: 12px;
}

.report-note-field textarea {
  min-height: 86px;
}

.report-note-save {
  margin-top: 8px;
  min-height: 30px;
  padding: 0 10px;
}

.report-readonly-note {
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 9px 10px;
  background: rgba(15, 23, 42, 0.22);
}

body.theme-light .report-readonly-note {
  background: #ffffff;
}

.report-readonly-note strong {
  display: block;
  font-size: 0.75rem;
  color: var(--text-main);
}

.report-prompt {
  margin-top: 10px;
}

.report-prompt summary {
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 800;
}

.report-prompt textarea {
  width: 100%;
  min-height: 130px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.36);
  color: var(--text-main);
  padding: 9px;
  resize: vertical;
  font-size: 0.73rem;
  line-height: 1.35;
}

body.theme-light .report-prompt textarea {
  background: #ffffff;
  color: #0f172a;
}

.report-card-actions {
  margin-top: 12px;
  align-items: center;
}

.report-actioned-control input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.home-subline.ok {
  color: #86efac;
}

.home-subline.warn {
  color: #fbbf24;
}

.home-subline.bad {
  color: #fca5a5;
}

body.theme-light .home-subline.ok {
  color: #15803d;
}

body.theme-light .home-subline.warn {
  color: #a16207;
}

body.theme-light .home-subline.bad {
  color: #b91c1c;
}

@media (max-width: 900px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .report-shell {
    width: min(100vw - 20px, 720px);
  }

  .report-card-head,
  .report-card-actions {
    flex-direction: column;
  }
}
