:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #fffefa;
  --ink: #243532;
  --muted: #65716b;
  --border: #dcded5;
  --teal: #176457;
  --light: #e5eee5;
  --red: #a6402d;
  --amber: #976119;
  --shadow: 0 14px 50px #2435320c;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--teal);
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #6d9984;
  outline-offset: 3px;
}
button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 13px;
  font-weight: 600;
}
button:hover {
  background: #eceee5;
}
.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.primary:hover {
  background: #124d43;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.danger {
  color: var(--red);
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #eeeee6;
  border-right: 1px solid var(--border);
  padding: 30px 18px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 8px 32px;
}
.brand img {
  width: 43px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
  border: 1px solid #d7d8cc;
}
.wordmark {
  font:
    29px/1.1 Georgia,
    serif;
  letter-spacing: -1px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  background: none;
  font-weight: 500;
}
.nav button.active {
  background: #dce7da;
  color: #174d40;
  font-weight: 700;
}
.nav button:hover {
  background: #e1e5d9;
}
.nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  flex-shrink: 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 9px 0;
}
.private-note {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-bottom: 20px;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dfe6dc;
  color: #335a49;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.account-name {
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.account small {
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  padding: 0 38px 48px;
  min-width: 0;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  gap: 12px;
}
.server {
  display: flex;
  gap: 8px;
  align-items: center;
}
.server strong {
  font-weight: 600;
  color: var(--ink);
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #548b65;
  margin-right: 6px;
}
.dot.offline {
  background: #b88b3c;
}
.page-head {
  padding: 30px 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
h1 {
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 0 0 8px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 12px;
}
.subtle {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}
.stat {
  padding: 18px 22px;
  border-right: 1px solid var(--border);
}
.stat:last-child {
  border: 0;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.stat-value {
  font-size: 30px;
  line-height: 1.3;
  margin: 7px 0 2px;
  font-weight: 600;
  letter-spacing: -1px;
}
.stat-note {
  font-size: 11px;
  color: var(--muted);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.toolbar {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
input,
select,
textarea {
  border: 1px solid #ccd2c8;
  border-radius: 6px;
  background: #fffefa;
  color: var(--ink);
  padding: 9px 11px;
  max-width: 100%;
}
input::placeholder {
  color: #899189;
}
.search {
  min-width: 220px;
  flex: 1;
}
.tabs {
  display: flex;
  gap: 3px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted);
}
.tabs .active {
  background: #e8eee3;
  color: #245b47;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 20px;
  background: #f9f9f3;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid #e9eae3;
  vertical-align: top;
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
.case-link {
  display: block;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}
.case-link:hover {
  background: none;
  color: var(--teal);
  text-decoration: underline;
}
.member-cell {
  display: flex;
  gap: 10px;
  min-width: 140px;
}
.member-cell strong {
  display: block;
  font-size: 12px;
}
.case-ref {
  font-size: 10px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  display: block;
  margin-top: 3px;
}
.signal {
  max-width: 360px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 650;
  padding: 3px 7px;
  white-space: nowrap;
  background: #eceee7;
  color: #5d685e;
}
.badge.high {
  background: #f7e8e0;
  color: #9b3c2d;
}
.badge.medium,
.badge.open {
  background: #f8edd8;
  color: #8e5e16;
}
.badge.in_review {
  background: #e2ece6;
  color: #29614e;
}
.badge.resolved {
  background: #e3eee2;
  color: #3d6841;
}
.badge.dismissed {
  background: #edeee9;
  color: #65716b;
}
.badge.safety {
  background: #eeebe1;
  color: #726047;
}
.table-foot {
  padding: 13px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.table-foot div {
  display: flex;
  gap: 8px;
}
.empty {
  text-align: center;
  padding: 62px 22px 70px;
  max-width: 540px;
  margin: auto;
}
.empty .empty-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8eee2;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 25px;
}
.empty h2 {
  font-size: 20px;
  margin-bottom: 9px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
}
.notice {
  border-left: 3px solid #b39152;
  padding: 12px 15px;
  background: #f8f1df;
  color: #726140;
  font-size: 12px;
  margin: 18px 0;
}
.coverage {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 17px;
}
.coverage strong {
  font-weight: 600;
  color: #586455;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-art {
  background: #e3e8dc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
  position: relative;
  overflow: hidden;
}
.login-art::before {
  content: "";
  position: absolute;
  border: 1px solid #c8d1bf;
  width: 540px;
  height: 540px;
  border-radius: 50%;
}
.login-art img {
  position: relative;
  max-width: 300px;
  max-height: 60vh;
  mix-blend-mode: multiply;
  object-fit: contain;
}
.login-art .login-caption {
  position: absolute;
  bottom: 42px;
  left: 42px;
  font-size: 12px;
  color: #5b6f5b;
}
.login-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vw;
  max-width: 650px;
}
.login-content .wordmark {
  font-size: 38px;
  margin-bottom: 55px;
}
.login-content h1 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.login-content p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}
.command {
  font:
    14px ui-monospace,
    monospace;
  background: #e8eee4;
  padding: 5px 10px;
  border-radius: 5px;
  color: #225d49;
}
.login-foot {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  font-size: 12px;
  color: var(--muted);
}
.loading-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 20px;
}
.loading-screen img {
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.detail-main {
  min-width: 0;
}
.detail-sidebar .panel {
  margin-bottom: 18px;
}
.panel-body {
  padding: 20px;
}
.metadata {
  display: grid;
  gap: 12px;
  font-size: 12px;
}
.metadata dt {
  color: var(--muted);
  font-size: 11px;
}
.metadata dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.timeline {
  padding: 8px 22px;
}
.event {
  padding: 17px 0;
  border-bottom: 1px solid #e6e8df;
}
.event:last-child {
  border: 0;
}
.event-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 11px;
  flex-wrap: wrap;
}
.event-head strong {
  font-size: 12px;
}
.event-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.event-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  padding-left: 0;
  color: #34443e;
}
.event-meta {
  color: #879086;
  font-size: 10px;
  font-family: ui-monospace, monospace;
  margin-top: 6px;
}
.deleted {
  background: #faf3ee;
  border-radius: 5px;
  padding: 9px 12px;
  color: #875748;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
textarea {
  resize: vertical;
  min-height: 105px;
  font-size: 12px;
}
.full {
  width: 100%;
}
.note {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.note:first-child {
  border-top: 0;
}
.note strong {
  font-size: 12px;
}
.note p {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 7px 0;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0 0;
  font-size: 12px;
}
.breadcrumbs button {
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--teal);
}
.detail-heading {
  padding-top: 18px;
}
.log-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}
.log-filters .field {
  margin: 0;
}
.log-filters button {
  align-self: end;
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.error {
  color: #9f392f;
  background: #faeee8;
  border: 1px solid #e6c8bc;
  border-radius: 7px;
  padding: 14px 18px;
  font-size: 13px;
}
.empty-inline {
  padding: 26px 20px;
  color: var(--muted);
  font-size: 13px;
}
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--teal);
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}
.status-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.count-label {
  font:
    11px ui-monospace,
    monospace;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #233f33;
  color: #fff;
  padding: 12px 20px;
  border-radius: 7px;
  box-shadow: 0 5px 25px #0002;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.show {
  opacity: 1;
}
.busy {
  opacity: 0.5;
  pointer-events: none;
}
@media (min-width: 1500px) {
  .workspace {
    padding-left: 55px;
    padding-right: 55px;
  }
  .panel-head,
  .toolbar {
    padding-left: 26px;
    padding-right: 26px;
  }
  td,
  th {
    padding-left: 26px;
    padding-right: 26px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 12px;
  }
  .workspace {
    padding: 0 24px 35px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stat {
    padding: 15px;
  }
  .stats {
    margin-bottom: 20px;
  }
  .log-filters {
    grid-template-columns: 1fr 1fr;
  }
  .table-wrap {
    overflow: auto;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    padding: 0;
    gap: 9px;
  }
  .brand img {
    width: 31px;
    height: 35px;
    border-radius: 10px;
  }
  .wordmark {
    font-size: 24px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .nav {
    display: flex;
    margin-top: 14px;
    overflow: auto;
    gap: 4px;
  }
  .nav button {
    padding: 9px 11px;
    white-space: nowrap;
    font-size: 12px;
  }
  .nav svg {
    width: 15px;
    height: 15px;
  }
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    padding: 0 16px 25px;
  }
  .topbar {
    height: 54px;
    font-size: 11px;
  }
  .page-head {
    padding: 24px 0 18px;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .page-head > button {
    padding: 7px 10px;
  }
  .page-head .subtle {
    font-size: 12px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:nth-child(2) {
    border: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
  .stat-value {
    font-size: 25px;
  }
  .toolbar {
    padding: 13px;
    gap: 8px;
  }
  .toolbar .search {
    min-width: 100%;
    order: -1;
  }
  .tabs {
    overflow: auto;
    width: 100%;
  }
  .tabs button {
    padding: 7px 9px;
  }
  .panel-head {
    padding: 15px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .detail-sidebar {
    display: block;
  }
  .detail-layout {
    gap: 16px;
  }
  .login {
    display: block;
  }
  .login-art {
    height: 220px;
    padding: 15px;
  }
  .login-art img {
    height: 200px;
    width: auto;
  }
  .login-art::before {
    width: 300px;
    height: 300px;
  }
  .login-caption {
    display: none;
  }
  .login-content {
    padding: 32px 26px;
  }
  .login-content .wordmark {
    margin-bottom: 25px;
  }
  .login-content h1 {
    font-size: 30px;
  }
  .log-filters {
    display: flex;
    flex-wrap: wrap;
  }
  .log-filters .field {
    flex: 1;
    min-width: 130px;
  }
  .table-foot {
    font-size: 10px;
    padding: 11px;
  }
  .topbar .server {
    max-width: 70%;
  }
  .event-time {
    margin-left: 0;
  }
  .event {
    padding: 15px 0;
  }
  .timeline {
    padding: 5px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.event.trigger {
  border-left: 3px solid #b39152;
  padding-left: 13px;
  background: #fbf5e9;
}
