:root {
  --nav: #343438;
  --brand: #007b77;
  --ink: #27272a;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f4f7f7;
  --success: #178a52;
  --danger: #c43743;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}
button,
input {
  font: inherit;
}
.case-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 72px minmax(620px, 1fr) 340px;
  overflow: hidden;
}
.case-nav {
  background: var(--nav);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.case-nav a {
  height: 58px;
  border-radius: 9px;
  color: #b8c2d0;
  text-decoration: none;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
}
.case-nav a:hover,
.case-nav .active {
  background: #1c3761;
  color: #fff;
}
.case-nav small {
  font-size: 9px;
}
.case-nav .brand {
  height: 42px;
  width: 42px;
  margin: 0 auto 10px;
  background: #fff;
  color: var(--nav);
  font-weight: 800;
}
.nav-bottom {
  margin-top: auto;
}
main {
  overflow: auto;
  padding: 26px 28px;
  background: #fff;
}
main > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
}
h1 {
  font-size: 27px;
  margin: 0;
}
h1 span {
  font-size: 11px;
  color: var(--brand);
  background: #edf1ff;
  border-radius: 99px;
  padding: 3px 7px;
}
.search {
  width: 270px;
  height: 40px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0 11px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
}
.case-tabs {
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
}
.case-tabs button {
  border: 0;
  background: transparent;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.case-tabs .active {
  border-bottom: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 650;
}
.case-table {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.case-head,
.case-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(
      130px,
      1fr
    ) 100px 70px 110px 110px;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
}
.case-head {
  height: 44px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 10px;
}
.case-row {
  min-height: 68px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.case-row:hover,
.case-row.selected {
  background: #f6f8ff;
}
.case-row b {
  font-size: 12px;
}
.case-row span {
  font-size: 10px;
  color: var(--muted);
}
.pill {
  width: max-content;
  padding: 4px 8px;
  border-radius: 99px;
  background: #eef1f5;
  color: #475467;
}
:root {
  --success: #17613e;
  --danger: #a01f2a;
}
.pill.active {
  background: #edf1ff;
  color: var(--brand);
}
.pill.completed {
  background: #e8f6ed;
  color: var(--success);
}
.pill.failed {
  background: #fff0f1;
  color: var(--danger);
}
#case-detail {
  border-left: 1px solid var(--line);
  background: #fafbfc;
  padding: 18px;
  overflow: auto;
}
.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 12px;
}
.detail-card h2 {
  font-size: 17px;
  margin: 0 0 5px;
}
.detail-card h3 {
  font-size: 12px;
  margin: 0 0 12px;
}
.detail-card dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  font-size: 10px;
  margin: 0;
}
.detail-card dt {
  color: var(--muted);
}
.detail-card dd {
  margin: 0;
}
.activity {
  border-left: 1px solid #cfd5df;
  padding: 0 0 14px 16px;
  position: relative;
  font-size: 10px;
}
.activity:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 2px;
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
}
.activity strong {
  display: block;
}
.activity time {
  color: var(--muted);
}
.task-chip {
  display: flex;
  justify-content: space-between;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 9px 0;
  font-size: 10px;
  width: 100%;
  background: transparent;
  text-align: left;
}
.linked-case {
  cursor: pointer;
  color: var(--brand);
}
.linked-case:hover {
  text-decoration: underline;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 50px 18px;
}
.empty h2 {
  color: var(--ink);
  font-size: 15px;
}
#case-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  opacity: 0;
  background: #142033;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  transform: translate(-50%, 15px);
  transition: 0.2s;
}
#case-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 1000px) {
  .case-shell {
    grid-template-columns: 62px 1fr;
  }
  #case-detail {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(360px, 92vw);
    transform: translateX(100%);
    transition: 0.18s;
    box-shadow: -10px 0 30px #0002;
  }
  .case-shell.detail-open #case-detail {
    transform: none;
  }
  .case-head,
  .case-row {
    grid-template-columns: minmax(190px, 1.5fr) minmax(110px, 1fr) 90px;
  }
  .case-head span:nth-child(n + 4),
  .case-row > span:nth-child(n + 4) {
    display: none;
  }
}
@media (max-width: 640px) {
  main {
    padding: 20px 12px;
  }
  .search {
    width: 180px;
  }
  .case-head,
  .case-row {
    grid-template-columns: 1fr 80px;
  }
  .case-head span:nth-child(n + 3),
  .case-row > span:nth-child(n + 3) {
    display: none;
  }
  .case-shell {
    grid-template-columns: 54px 1fr;
  }
  .case-nav small {
    display: none;
  }
}
.case-nav a[aria-disabled="true"]{opacity:.42;cursor:not-allowed;pointer-events:none}
