:root {
  color-scheme: dark;
  --bg: #131513;
  --panel: #191c19;
  --raised: #222622;
  --line: #303630;
  --text: #e8ece7;
  --muted: #9ca69b;
  --green: #7fff7f;
  --danger: #ffb391;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #303830;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.primary {
  background: var(--green);
  color: #112311;
  border-color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}
.primary:hover {
  background: #a2ff9d;
}
.primary span {
  float: right;
}
input,
select,
textarea {
  background: #161916;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 11px;
  width: 100%;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
}
textarea {
  min-height: 90px;
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  color: #c0c8be;
  margin: 14px 0 6px;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 7px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
  font-weight: 600;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}
.eyebrow {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.sidebar {
  width: 218px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #101210;
  border-right: 1px solid #262d25;
  padding: 33px 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 1.3px;
  color: var(--text);
  padding: 0 10px;
}
.brand span {
  display: flex;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 10px;
  gap: 14px;
}
.brand i {
  font-style: normal;
  color: var(--green);
  font-size: 10px;
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #788475;
  padding: 0 12px;
  margin: 45px 0 13px;
}
.nav {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #98a293;
  gap: 13px;
  margin: 4px 0;
  padding: 12px;
  font-size: 16px;
}
.nav span {
  font-size: 13px;
}
.nav b {
  font-size: 10px;
  margin-left: auto;
  background: #30392d;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 400;
}
.nav.active {
  color: var(--green);
  background: #253022;
}
.nav-divider {
  height: 1px;
  background: #262e24;
  margin: 24px 12px;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 10px;
  color: #9ba995;
  padding: 12px 10px 0;
}
.sidebar-bottom small {
  display: block;
  font-size: 10px;
  line-height: 1.8;
  color: #6f7b6b;
  margin-top: 12px;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
}
main {
  margin-left: 218px;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid #292e28;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: #5b6757;
}
.breadcrumb b {
  font-weight: 400;
  color: var(--text);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}
.icon-btn,
.text-btn {
  border: 0;
  background: transparent;
  padding: 6px 9px;
  font-size: 20px;
}
.text-btn {
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  max-width: 1550px;
  margin: auto;
  padding: 35px 36px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.page-heading .muted {
  margin-top: 9px;
}
.page-heading .primary {
  font-size: 12px;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  border: 1px solid #53604d;
  border-radius: 3px;
  padding: 1px 4px;
  color: #677e5e;
  margin-left: 18px;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-top: 30px;
  padding: 0 0 14px;
}
.searchbar > span {
  font-size: 26px;
  color: var(--muted);
}
.searchbar input {
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 13px;
}
.searchbar kbd {
  color: var(--muted);
  margin: 0;
}
.metrics {
  display: flex;
  margin: 25px 0 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  gap: 0;
}
.metric {
  flex: 1;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 0;
  padding: 0 20px;
  border-right: 1px solid var(--line);
}
.metric:first-child {
  padding-left: 0;
}
.metric:last-child {
  border-right: 0;
}
.metric:hover {
  background: transparent;
  color: var(--green);
}
.metric small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}
.metric strong {
  display: block;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.metric em {
  font-size: 11px;
  color: #93a58a;
  font-style: normal;
  margin-left: 8px;
}
.view-tabs {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.view-tabs button {
  border: 0;
  background: transparent;
  padding: 10px 0 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 12px;
}
.view-tabs button.active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.filter-row select,
.filter-row input {
  width: auto;
  max-width: 160px;
  font-size: 11px;
  padding: 8px;
}
.filter-row .text-btn {
  margin-left: auto;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 14px;
}
.section-title p {
  color: var(--muted);
  font-size: 11px;
}
.table-wrap {
  width: 100%;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  letter-spacing: 0.2px;
  color: #96a18e;
  font-weight: 400;
  background: #191d18;
  height: 42px;
  white-space: nowrap;
  padding: 12px;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid #292f26;
  vertical-align: middle;
  max-width: 240px;
}
tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
tbody tr:hover {
  background: #20271e;
}
td strong {
  font-size: 13px;
  font-weight: 500;
  color: #e1e9dc;
  display: block;
}
td small {
  display: block;
  color: #84927d;
  font-size: 10px;
  margin-top: 5px;
}
.amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.badge {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 4px;
  background: #283322;
  color: #c0dab0;
  white-space: nowrap;
  display: inline-block;
}
.badge.gray {
  background: #2b3029;
  color: #a9b2a3;
}
.badge.warn {
  background: #3b3024;
  color: #e2bc8d;
}
.overdue {
  color: var(--danger);
}
.task-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 4px;
  border-bottom: 1px solid #2c3229;
}
.task-row .task-body {
  flex: 1;
  min-width: 0;
}
.task-row h3 {
  line-height: 1.7;
  font-size: 13px;
  font-weight: 500;
}
.task-row small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.task-row .task-actions {
  display: flex;
  gap: 5px;
}
.task-row button {
  font-size: 11px;
  padding: 7px 10px;
}
.task-index {
  font-size: 10px;
  color: #6c7f62;
  width: 25px;
}
.empty {
  padding: 55px 20px;
  text-align: center;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.empty strong {
  display: block;
  font-size: 16px;
  color: #d3decf;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  margin: 8px 0 20px;
}
.notice {
  border-left: 2px solid #789c62;
  background: #1d261a;
  padding: 13px 16px;
  font-size: 12px;
  line-height: 1.8;
  color: #b5c7a9;
  margin: 20px 0;
}
.data-footer {
  margin-top: 35px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #708169;
  font-size: 10px;
}
.shade {
  position: fixed;
  inset: 0;
  background: #0008;
  z-index: 10;
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 620px;
  max-width: 100%;
  background: #191d18;
  z-index: 11;
  padding: 28px;
  overflow-y: auto;
  box-shadow: -10px 0 40px #0005;
  animation: slide 0.2s ease-out;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.drawer-head h2 {
  font-size: 25px;
  margin-top: 10px;
}
.drawer .view-tabs {
  position: sticky;
  top: -28px;
  background: #191d18;
  z-index: 2;
  margin-top: 25px;
  gap: 15px;
}
.drawer-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}
.detail-grid dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 7px;
}
.detail-grid dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.8;
  color: #c2cdbd;
}
.timeline {
  border-left: 1px solid #3b4e32;
  margin: 20px 4px;
  padding-left: 20px;
}
.timeline > div {
  position: relative;
  margin-bottom: 23px;
}
.timeline > div:before {
  content: "";
  position: absolute;
  left: -24px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.timeline small {
  font-size: 10px;
  color: var(--muted);
}
.timeline p {
  margin-top: 10px;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.8;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.actions button {
  font-size: 11px;
}
dialog {
  background: #1c211a;
  color: var(--text);
  border: 1px solid #3b4933;
  border-radius: 12px;
  width: 590px;
  max-width: calc(100% - 24px);
  padding: 26px;
  max-height: 92svh;
  overflow: auto;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  font-size: 19px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.dialog-foot button {
  font-size: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.wide {
  grid-column: 1/-1;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.8;
  margin-top: 12px;
}
.footnote {
  font-size: 10px;
  color: var(--muted);
  margin-top: 20px;
}
.duplicate {
  background: #343122;
  color: #dfc994;
  font-size: 12px;
  padding: 12px;
  border-radius: 5px;
  margin-top: 12px;
  line-height: 1.9;
}
.duplicate button {
  font-size: 11px;
  padding: 3px 7px;
  margin: 3px;
}
.login {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(ellipse at 0 0, #263621, transparent 60%);
  padding: 30px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 1px;
  margin-bottom: 45px;
}
.login-brand small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 8px;
}
.mark {
  font-size: 45px;
  color: var(--green);
}
.login form {
  width: 360px;
  max-width: 100%;
  padding: 25px 0;
}
.login h1 {
  font-size: 26px;
  margin-bottom: 10px;
}
.login label {
  margin-top: 22px;
}
.login .primary {
  width: 100%;
  margin-top: 18px;
  text-align: left;
}
.login-footer {
  position: absolute;
  bottom: 25px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #73846b;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: #d6f3ca;
  color: #143009;
  max-width: 90%;
  padding: 13px 22px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 5px 30px #0006;
}
.board {
  display: flex;
  gap: 14px;
  overflow: auto;
  min-height: 300px;
}
.board-col {
  min-width: 230px;
  flex: 1;
  background: #171c16;
  border-top: 2px solid #3b4a32;
  padding: 12px;
}
.board-col h3 {
  font-size: 12px;
  margin-bottom: 15px;
}
.op-tile {
  background: #252d21;
  border: 1px solid #3b4933;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 6px;
  cursor: pointer;
}
.op-tile p {
  font-size: 11px;
  margin: 9px 0;
  color: var(--muted);
}
.op-tile button {
  padding: 5px;
  font-size: 10px;
}
.report-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.report-row strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.report-row span {
  font-size: 12px;
}
.report-row small {
  font-size: 10px;
  color: var(--muted);
}
.report-row button {
  font-size: 11px;
}
.import-box {
  padding: 28px 0;
  max-width: 700px;
}
.import-box input {
  margin: 18px 0;
}
.preview-table td {
  font-size: 11px;
}
.preview-table input {
  width: auto;
}
.audit-entry {
  font-size: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.audit-entry summary {
  cursor: pointer;
}
.audit-entry pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.density-compact td {
  padding-top: 10px;
  padding-bottom: 10px;
}
.skeleton {
  padding: 50px 0;
  color: var(--muted);
  animation: pulse 1s infinite;
}
.field-check {
  display: flex;
  gap: 10px;
  align-items: center;
}
.field-check input {
  width: auto;
}
.tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.match {
  color: #b2d2a2;
  font-size: 10px;
  margin-top: 5px;
}
.mobile-only {
  display: none;
}
@keyframes slide {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (min-width: 1600px) {
  .workspace {
    padding-top: 45px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 185px;
    padding: 25px 12px;
  }
  .brand {
    font-size: 16px;
  }
  main {
    margin-left: 185px;
  }
  .workspace {
    padding: 28px 23px;
  }
  .topbar {
    padding: 0 23px;
  }
  th:nth-child(3),
  td:nth-child(3) {
    display: none;
  }
  .metric {
    padding: 0 12px;
  }
  .metric strong {
    font-size: 25px;
  }
}
@media (max-width: 740px) {
  .sidebar {
    inset: auto 0 0;
    width: auto;
    height: 63px;
    padding: 0;
    background: #11170f;
    border-top: 1px solid var(--line);
    border-right: 0;
    display: block;
  }
  .sidebar .brand,
  .workspace-label,
  .sidebar-bottom,
  .nav-divider,
  .sidebar .admin {
    display: none;
  }
  .sidebar nav {
    display: flex;
    height: 100%;
    justify-content: space-around;
  }
  .nav {
    margin: 0;
    padding: 7px 8px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: auto;
    min-width: 56px;
    border-radius: 0;
  }
  .nav span {
    font-size: 9px;
  }
  .nav b {
    display: none;
  }
  main {
    margin: 0 0 63px;
  }
  .topbar {
    height: 53px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .top-actions {
    gap: 5px;
  }
  .workspace {
    padding: 25px 17px;
  }
  .page-heading {
    align-items: start;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading .primary {
    font-size: 11px;
    padding: 10px;
  }
  .page-heading kbd {
    display: none;
  }
  .eyebrow {
    font-size: 9px;
  }
  .searchbar {
    margin-top: 22px;
  }
  .metrics {
    flex-wrap: wrap;
    row-gap: 22px;
    margin-bottom: 22px;
  }
  .metric {
    min-width: 50%;
    flex-basis: 50%;
    padding: 0 14px;
  }
  .metric:nth-child(3) {
    padding-left: 0;
  }
  .metric:nth-child(even) {
    border-right: 0;
  }
  .metric strong {
    font-size: 26px;
  }
  .metric small {
    font-size: 10px;
  }
  .filter-row select,
  .filter-row input {
    max-width: calc(50% - 5px);
    flex: 1 1 40%;
  }
  .filter-row .text-btn {
    margin-left: 0;
  }
  .table-wrap {
    overflow: visible;
  }
  table,
  tbody {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    column-gap: 10px;
  }
  td {
    display: block;
    border: 0;
    padding: 4px 0;
    max-width: none;
  }
  td:nth-child(n + 5) {
    display: none;
  }
  td:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  td:nth-child(4) {
    grid-column: 1/-1;
    font-size: 11px;
    color: var(--muted);
  }
  .task-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .task-actions {
    padding-left: 32px;
    width: 100%;
  }
  .task-row .task-body {
    min-width: calc(100% - 50px);
  }
  .drawer {
    padding: 22px 18px;
    width: 100%;
  }
  .drawer .view-tabs {
    top: -22px;
    gap: 17px;
  }
  .drawer .view-tabs button {
    font-size: 11px;
  }
  .detail-grid {
    gap: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  dialog {
    padding: 20px;
    max-width: 100%;
    width: 100%;
    max-height: 100svh;
    height: 100svh;
    border-radius: 0;
    border: 0;
  }
  .dialog-foot {
    position: sticky;
    bottom: -20px;
    background: #1c211a;
    padding-bottom: 20px;
    margin-bottom: -20px;
  }
  .data-footer {
    flex-direction: column;
    font-size: 9px;
  }
  .report-row {
    flex-wrap: wrap;
  }
  .login-footer {
    display: none;
  }
  .login-brand {
    margin-bottom: 20px;
  }
  .preview-table tr {
    display: block;
  }
  .preview-table td {
    display: block !important;
  }
  .admin-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

.mobile-filter {
  display: none;
}
@media (max-width: 740px) {
  .mobile-filter {
    display: block;
    width: 100%;
    font-size: 12px;
    text-align: left;
    margin-bottom: 16px;
    background: #1d251a;
  }
  .filter-row {
    display: none;
  }
  .filter-row.filters-open {
    display: flex;
  }
  .view-tabs {
    flex-wrap: nowrap;
    overflow: auto;
    gap: 20px;
  }
  .view-tabs button {
    white-space: nowrap;
  }
  .drawer .view-tabs {
    overflow: auto;
  }
  .page-heading .muted {
    max-width: 220px;
  }
}
