:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #18201b;
  background: #f4f6f4;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f6f4; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
.app-shell { min-height: 100vh; }
.topbar { height: 58px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #dfe5e0; }
.brand { font-size: 17px; font-weight: 700; }
.account { display: flex; align-items: center; gap: 12px; color: #59635c; }
.workspace { min-height: calc(100vh - 58px); }
.tabs { height: 50px; padding: 0 24px; display: flex; gap: 24px; align-items: end; background: #fff; border-bottom: 1px solid #dfe5e0; }
.tab { height: 50px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #667069; }
.tab.active { color: #176b42; border-color: #176b42; font-weight: 700; }
.content-grid { display: grid; grid-template-columns: minmax(660px, 1fr) 360px; min-height: calc(100vh - 108px); }
.list-pane { min-width: 0; padding: 20px 22px 40px; }
.detail-pane { padding: 22px; background: #fff; border-left: 1px solid #dfe5e0; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 88px; gap: 10px; margin-bottom: 16px; }
input, select { min-height: 38px; padding: 8px 10px; border: 1px solid #cdd5cf; border-radius: 4px; background: #fff; }
input:focus, select:focus { border-color: #2c7d55; outline: 2px solid rgba(44,125,85,.12); }
.primary-button, .danger-button, .quiet-button { min-height: 36px; padding: 7px 13px; border-radius: 4px; border: 1px solid transparent; }
.primary-button { color: #fff; background: #176b42; }
.danger-button { color: #fff; background: #b4232c; }
.quiet-button { color: #314039; background: #fff; border-color: #cdd5cf; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid #dfe5e0; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf0ed; text-align: left; vertical-align: top; font-size: 13px; }
th { color: #657068; background: #f8faf8; font-weight: 600; }
tbody tr:hover, tbody tr.selected { background: #f0f7f3; }
th:nth-child(1), td:nth-child(1) { width: 78px; }
th:nth-child(3), td:nth-child(3) { width: 130px; }
th:nth-child(4), td:nth-child(4) { width: 90px; }
th:nth-child(5), td:nth-child(5) { width: 70px; }
th:nth-child(6), td:nth-child(6) { width: 150px; }
.content-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; }
.danger-text, .form-error { color: #b4232c; }
.pagination { display: flex; gap: 8px; padding: 12px; }
.detail-content h2 { margin: 0 0 18px; font-size: 18px; overflow-wrap: anywhere; }
.detail-content h3 { margin: 22px 0 8px; font-size: 14px; }
.detail-row { display: grid; grid-template-columns: 82px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid #edf0ed; font-size: 13px; }
.detail-label { color: #6a746d; }
.body-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.report-line { padding: 9px; background: #fff4f4; border-left: 3px solid #b4232c; overflow-wrap: anywhere; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.media-preview { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid #dfe5e0; border-radius: 4px; background: #f4f6f4; }
.detail-actions { display: flex; gap: 10px; margin-top: 24px; }
.empty-state { padding: 28px 16px; color: #7a847d; text-align: center; }
.login-panel { width: min(390px, calc(100vw - 32px)); margin: 12vh auto 0; padding: 28px; background: #fff; border: 1px solid #dfe5e0; border-radius: 6px; }
.login-panel h1 { margin: 0 0 24px; font-size: 20px; }
.login-form { display: grid; gap: 12px; }
.login-form .form-error { min-height: 20px; margin: 0; font-size: 13px; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .detail-pane { border-left: 0; border-top: 1px solid #dfe5e0; }
  .filters { grid-template-columns: 1fr; }
}
