body {
  background: #eef3f1;
}
.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 94vw);
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 24px 70px #12372b1c;
}
.login-card h1 {
  font:
    500 34px Georgia,
    serif;
  margin: 34px 0 8px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.6;
}
.login-card > input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 12px 0;
}
.login-password-field {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: var(--ink);
  font-weight: 800;
}
.login-password-field > input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}
.login-password-field > input:focus {
  border-color: var(--green);
  outline: 3px solid #d8ece7;
}
.login-card > button {
  width: 100%;
  margin-top: 8px;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}
.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  background: #0c3f41;
  color: white;
  display: flex;
  flex-direction: column;
}
.brand.inverse {
  color: white;
}
.brand.inverse > span {
  border: 1px solid #82a9a5;
  background: #174f50;
}
.brand.inverse small {
  color: #a7c0bd;
  border-color: #477172;
}
.side-nav nav {
  display: grid;
  gap: 8px;
  margin-top: 50px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #abc2bf;
  text-align: left;
  font-weight: 800;
}
.nav-item > span {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #477372;
  border-radius: 7px;
}
.nav-item i {
  margin-left: auto;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 20px;
  background: #dca64b;
  color: #153d3b;
  font-style: normal;
}
.nav-item.active,
.nav-item:hover {
  background: #205e62;
  color: white;
  border-left: 4px solid #dda84a;
  padding-left: 9px;
}
.side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #386361;
}
.side-user > div {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dca64b;
  color: #133e3c;
  font-weight: 900;
}
.side-user p {
  margin: 0;
}
.side-user small {
  display: block;
  color: #9eb9b5;
  margin-top: 3px;
}
.main-shell {
  min-width: 0;
}
.topbar {
  height: 70px;
  padding: 0 34px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar p {
  margin: 0;
  color: #7c8b85;
}
.test-identity {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 800;
}
.dashboard-page {
  max-width: 1800px;
  margin: auto;
  padding: 42px;
}
.dash-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.dash-title h1 {
  font:
    600 38px Georgia,
    'Noto Serif TC',
    serif;
  margin: 0 0 12px;
  color: #103f42;
}
.dash-title > div > p:last-child {
  margin: 0;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-card.alert {
  border-top: 4px solid #c44e40;
}
.stat-card label {
  font-size: 12px;
  font-weight: 800;
  color: #708079;
}
.stat-card b {
  display: block;
  margin: 12px 0 5px;
  font:
    600 30px Georgia,
    serif;
  color: #0e4142;
}
.stat-card.alert b {
  color: #b13c31;
}
.stat-card small {
  color: #97a29d;
}
.case-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 42%) 1fr;
  min-height: 620px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.case-panel {
  border-right: 1px solid var(--line);
}
.case-panel > header {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.case-panel h2 {
  margin: 0;
  font-size: 19px;
}
.case-panel h2 small {
  font-weight: 400;
  color: #9aa59f;
}
.case-panel header input {
  width: 46%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filters {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  background: #f8faf9;
  border-bottom: 1px solid var(--line);
}
.filters select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
.case-panel .case-list {
  gap: 0;
}
.case-panel .case-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 22px;
}
.case-panel .case-card.active {
  border-left: 4px solid #198278;
  padding-left: 18px;
  background: #eaf4f1;
}
.case-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #b9d4ce;
  border-radius: 7px;
  color: #18756e;
  font-weight: 900;
}
.case-main h3 {
  margin: 0 0 5px;
}
.case-main p,
.case-side p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 12px;
}
.case-side {
  text-align: right;
}
.status-pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  background: #eef2ef;
  color: #68756f;
  font-size: 11px;
  font-weight: 800;
}
.status-pill.review {
  background: #fff0d9;
  color: #a06515;
}
.status-pill.pending {
  background: #fde4e1;
  color: #a33b31;
}
.status-pill.done {
  background: #dff0e9;
  color: #166d59;
}
.case-detail {
  padding: 0;
}
.case-detail.empty {
  padding: 36px;
}
.case-detail-head {
  display: flex;
  height: auto;
  min-height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}
.case-detail-head > div:first-child {
  flex: 1 1 260px;
  min-width: 0;
}
.case-detail-head h2 {
  font:
    500 30px Georgia,
    serif;
  margin: 8px 0;
}
.case-detail-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: flex;
  flex: 1 1 420px;
  min-width: 0;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.finalized-status {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 7px 10px;
  border: 1px solid #b9d8cc;
  border-radius: 8px;
  background: #e7f3ee;
  color: #166d59;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.finalized-status.pending-notice {
  border-color: #ecd2a9;
  background: #fff4e2;
  color: #946019;
}
.file-history,
.activity {
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}
.section-title h3 {
  margin: 0 0 5px;
}
.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.version-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #edf0ee;
}
.version-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e4f1ed;
  color: #167368;
  font-weight: 900;
}
.version-row h4 {
  margin: 0 0 6px;
}
.version-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.version-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.mini-tag {
  display: inline-block;
  margin-top: 7px;
  margin-right: 5px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf2ef;
  color: #62726b;
  font-size: 10px;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 24px 28px;
}
.timeline li:before {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 3px solid #d8ece6;
  border-radius: 50%;
  background: #278879;
}
.timeline li:after {
  content: '';
  position: absolute;
  left: 9px;
  top: 17px;
  bottom: 0;
  border-left: 1px solid #c7dbd5;
}
.timeline li:last-child:after {
  display: none;
}
.timeline strong {
  display: block;
  font-size: 13px;
}
.timeline small {
  color: var(--muted);
}
.approval-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 18px;
}
.approval-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 24px;
}
.approval-card h2 {
  margin-top: 0;
}
.request-add {
  display: flex;
  gap: 8px;
  margin: 15px 0 24px;
}
.request-add input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.request-row,
.user-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.request-row p,
.user-row p {
  margin: 0;
}
.request-row small,
.user-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.row-actions {
  display: flex;
  gap: 6px;
}
.danger-button {
  border: 1px solid #c85d51;
  color: #a33b31;
  background: white;
  border-radius: 8px;
  padding: 8px 11px;
}
.compact {
  padding: 8px 11px;
}
.notice {
  position: fixed;
  right: 24px;
  top: 84px;
  z-index: 20;
  max-width: 420px;
  box-shadow: 0 8px 30px #0002;
}
@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 86px 1fr;
  }
  .side-nav .brand b,
  .side-nav .brand small,
  .nav-item:not(.active) {
    font-size: 0;
  }
  .nav-item {
    justify-content: center;
  }
  .nav-item i {
    position: absolute;
    margin: 0 0 30px 30px;
  }
  .side-user p {
    display: none;
  }
  .case-workspace {
    grid-template-columns: 1fr;
  }
  .case-panel {
    border-right: 0;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .approval-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .dashboard-page {
    padding: 22px;
  }
  .topbar {
    padding: 0 18px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .dash-title {
    align-items: flex-start;
    gap: 18px;
  }
  .case-panel > header {
    display: block;
  }
  .case-panel header input {
    width: 100%;
    margin-top: 12px;
  }
  .case-detail-head {
    display: block;
  }
  .detail-actions {
    margin-top: 15px;
  }
  .version-row {
    grid-template-columns: 40px 1fr;
  }
  .version-actions {
    grid-column: 2;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .side-nav {
    position: static;
    height: auto;
    display: block;
  }
  .side-nav nav {
    margin-top: 18px;
    grid-template-columns: 1fr 1fr;
  }
  .side-user {
    display: none;
  }
}
