@import url("/fonts.css");
.searchbox input:not([type="checkbox"]) {
  padding-left: 32px;
}
@media (max-width: 760px) {
  .surface [data-field="spec"],
  .surface [data-field="unit"],
  .surface [data-field="owner"],
  .surface [data-field="lastCount"],
  .surface [data-field="node"],
  .surface [data-field="sourceName"],
  .surface [data-field="mode"],
  .surface [data-field="category"],
  .surface [data-field="type"] {
    display: none;
  }
  .surface td.name,
  .surface th.name {
    min-width: 110px;
    max-width: 125px;
  }
  .surface [data-field="location"] {
    max-width: 95px;
  }
  .surface [data-field="quantity"],
  .surface [data-field="remaining"] {
    padding-left: 8px;
    padding-right: 8px;
  }
  .surface [data-field="due"] {
    font-size: 10px;
  }
}
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #25312c;
  background: #f7f8f6;
  font-synthesis: none;
  --green: #285540;
  --muted: #7c8580;
  --line: #e4e8e2;
  --soft: #edf3ed;
  --orange: #b66b27;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  padding: 9px 13px;
  line-height: 1.3;
  min-height: 38px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #f1f4ef;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #9abd98;
  outline-offset: 2px;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover {
  background: #1e4432;
}
button.ghost {
  border-color: transparent;
  background: transparent;
}
button.danger {
  color: #ad4444;
}
button.small {
  padding: 5px 9px;
  min-height: 30px;
  font-size: 12px;
}
button.icon {
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg {
  margin-right: 6px;
}
button.icon svg {
  margin: 0;
}
.password-control {
  position: relative;
  min-width: 0;
}
.password-field .password-control input {
  width: 100%;
  padding-right: 48px;
}
.password-control .password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 8px;
  color: var(--muted);
}
.password-control .password-toggle:hover {
  background: var(--soft);
  color: var(--green);
}
.password-field input::-ms-reveal {
  display: none;
}
a {
  color: var(--green);
  text-decoration: none;
}
.sidebar {
  width: 216px;
  background: #f0f2ed;
  border-right: 1px solid var(--line);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 28px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 1px;
}
.brand-mark {
  background: var(--green);
  color: white;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav button {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 15px;
  color: #68746c;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar nav button svg {
  margin: 0;
}
.sidebar nav button.active {
  background: #e0e9dd;
  color: #254f38;
  font-weight: 650;
}
.sidebar nav button:hover {
  background: #e7ece3;
}
.navlabel {
  font-size: 11px;
  letter-spacing: 1px;
  color: #8e968e;
  margin: 24px 15px 10px;
}
.sidebar .bottom {
  margin-top: auto;
  padding-top: 24px;
}
.userline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 9px;
  border-top: 1px solid #dde2d8;
}
.avatar {
  width: 33px;
  height: 33px;
  background: #dde7d7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #4f684b;
  font-weight: 600;
}
.userline strong {
  font-size: 13px;
  font-weight: 600;
}
.userline small {
  display: block;
  font-size: 11px;
  color: #7d897b;
  margin-top: 4px;
}
.workspace {
  margin-left: 216px;
  min-height: 100vh;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 36px;
  background: #ffffffb8;
}
.project-name {
  font-size: 13px;
  color: #687568;
}
.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #779c75;
  display: inline-block;
  margin-right: 6px;
}
.sync-status {
  font-size: 11px;
  color: #879281;
}
.offline {
  color: #b75232;
}
.demo-tag {
  background: #faf0d8;
  color: #957027;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 20px;
}
.demo-select {
  width: auto !important;
  background: transparent !important;
  border-color: transparent !important;
  font-size: 12px !important;
}
.content {
  max-width: 1620px;
  margin: 0 auto;
  padding: 36px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #8f998e;
  margin-bottom: 8px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin: 0;
  font-weight: 620;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
p {
  line-height: 1.65;
}
.subheading {
  color: #7d887b;
  font-size: 12px;
  margin-top: 10px;
}
.heading-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.summary-strip {
  display: flex;
  gap: 28px;
  margin-bottom: 25px;
  font-size: 12px;
  color: #80897c;
}
.summary-strip strong {
  font-size: 22px;
  color: #384a37;
  font-weight: 550;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}
.summary-strip .warning strong {
  color: var(--orange);
}
.surface {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.tabs button {
  border: 0;
  font-size: 12px;
  padding: 7px 11px;
  min-height: 32px;
  background: transparent;
  color: #7c887b;
}
.tabs button.active {
  background: #eef3ec;
  color: #365332;
  font-weight: 600;
}
.toolbar-right {
  display: flex;
  gap: 7px;
  align-items: center;
}
.searchbox {
  position: relative;
}
.searchbox svg {
  position: absolute;
  left: 10px;
  top: 10px;
  color: #9aa292;
  width: 15px;
}
.searchbox input {
  padding-left: 32px;
  width: 185px;
  background: #fafbf8;
}
.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 320px);
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th {
  text-align: left;
  background: #fafbf8;
  color: #899182;
  font-weight: 500;
  font-size: 11px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
td {
  padding: 17px;
  border-bottom: 1px solid #eff1ec;
  font-size: 13px;
  color: #5d685b;
  max-width: 260px;
  text-overflow: ellipsis;
  overflow: hidden;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  cursor: pointer;
}
tbody tr:hover td {
  background: #f8faf6;
}
tbody tr.selected td {
  background: #edf4e9;
}
td.name {
  font-weight: 550;
  color: #354730;
}
td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
th.numeric {
  text-align: right;
}
.checkcell {
  width: 44px;
  padding-left: 20px;
  padding-right: 8px;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
}
td .secondary {
  display: block;
  font-size: 11px;
  color: #98a08f;
  margin-top: 5px;
}
.pill {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf3e9;
  color: #648454;
}
.pill.warning {
  background: #fbf1dc;
  color: #ae8139;
}
.pill.neutral {
  background: #f1f2ef;
  color: #909886;
}
.pill.red {
  background: #faece6;
  color: #b36b4d;
}
.urgent-mark {
  color: #b87c37;
  margin-left: 6px;
}
.table-footer {
  padding: 14px 20px;
  color: #929b8b;
  font-size: 11px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.selection-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #edf3e8;
  border-bottom: 1px solid #dce6d4;
  padding: 11px 18px;
  font-size: 12px;
}
.selection-bar span {
  margin-right: auto;
  color: #57704b;
}
.notice {
  padding: 13px 16px;
  background: #fff6e5;
  border: 1px solid #f0e4c7;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #987b46;
}
.notice button {
  margin-left: auto;
  flex-shrink: 0;
}
.filters {
  background: #fafbf8;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.filter-row select {
  max-width: 170px;
}
.filter-row input {
  max-width: 220px;
}
.filter-row .remove-filter {
  min-width: 34px;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: #8d9788;
}
.empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 15px;
  color: #afbda5;
}
.empty h3 {
  color: #5c7051;
  margin-bottom: 8px;
}
.empty p {
  font-size: 12px;
  max-width: 440px;
  margin: 8px auto 20px;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 80vh;
  color: #8a9781;
}
.split-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat-card .label {
  font-size: 12px;
  color: #85917c;
}
.stat-card .value {
  font-size: 27px;
  font-weight: 500;
  margin-top: 12px;
  color: #3b5034;
}
.stat-card small {
  font-size: 11px;
  color: #8c9885;
  display: block;
  margin-top: 9px;
}
.setting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.setting-tile {
  text-align: left;
  padding: 23px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  border-radius: 11px;
  min-height: 92px;
}
.setting-tile > svg {
  width: 24px;
  height: 24px;
  color: #6f8962;
  flex-shrink: 0;
}
.setting-tile p {
  font-size: 12px;
  color: #939e8a;
  margin: 6px 0 0;
}
.setting-tile span.arrow {
  margin-left: auto;
  color: #aeb6a6;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0;
}
.detail-item small {
  display: block;
  font-size: 11px;
  color: #89957f;
  margin-bottom: 6px;
}
.detail-item div {
  font-size: 13px;
  word-break: break-word;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.detail-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.log-entry {
  border-left: 2px solid #d9e4d1;
  padding: 0 0 15px 14px;
  margin-left: 5px;
  font-size: 12px;
  color: #6b7f5c;
}
.log-entry small {
  display: block;
  color: #a0aa94;
  margin-top: 5px;
}
.count-input {
  width: 95px !important;
  text-align: right;
  background: #f5f9ee !important;
}
.count-mode .surface {
  border-color: #92ad7d;
}
.count-mode td {
  padding-top: 10px;
  padding-bottom: 10px;
}
dialog {
  border: 1px solid #e1e7da;
  border-radius: 15px;
  width: min(620px, calc(100vw - 32px));
  max-height: 88vh;
  padding: 0;
  color: #35432e;
  box-shadow: 0 24px 100px #26372025;
}
dialog.wide {
  width: min(1030px, calc(100vw - 32px));
}
dialog::backdrop {
  background: #24341d42;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 5;
}
.dialog-body {
  padding: 24px 26px;
  max-height: calc(88vh - 160px);
  overflow: auto;
}
.dialog-foot {
  padding: 17px 26px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: #fafbf7;
  border-top: 1px solid var(--line);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #63755a;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  font-size: 11px;
  color: #99a68d;
  line-height: 1.5;
}
input:not([type="checkbox"]),
select,
textarea {
  border: 1px solid #dfe6d7;
  border-radius: 7px;
  min-height: 38px;
  padding: 9px 11px;
  width: 100%;
  background: white;
  color: #384932;
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 82px;
}
input::placeholder,
textarea::placeholder {
  color: #adb8a2;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
  font-size: 12px;
}
.dialog-body .hint {
  font-size: 12px;
  color: #8e9c82;
  line-height: 1.75;
  margin: 0 0 20px;
}
.dialog-body .table-scroll {
  max-height: 48vh;
}
.dialog-body td,
.dialog-body th {
  padding: 9px 10px;
}
.dialog-body .error {
  background: #fbefea;
  color: #a85536;
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 15px;
}
.column-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0e6;
}
.column-row span {
  flex: 1;
}
.permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
}
.field-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 14px;
}
.field-group h3 {
  margin-bottom: 14px;
}
.login {
  max-width: 430px;
  margin: 8vh auto;
  padding: 35px;
}
.login .brand {
  padding: 0 0 35px;
}
.login h1 {
  font-size: 27px;
  margin-bottom: 10px;
}
.login p {
  color: #89947f;
  font-size: 13px;
  margin-bottom: 30px;
}
.login .field {
  margin-bottom: 18px;
}
.login button.primary {
  width: 100%;
  margin-top: 8px;
}
.login .hint {
  font-size: 11px;
  color: #a0a993;
  margin-top: 22px;
}
.mobile-nav {
  display: none;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  background: #2f4531;
  color: white;
  z-index: 1000;
  border-radius: 9px;
  max-width: 90vw;
  box-shadow: 0 8px 24px #26382033;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf1e8;
}
.bar-label {
  width: 140px;
  font-size: 12px;
}
.bar-track {
  flex: 1;
  background: #eff3e9;
  border-radius: 3px;
  height: 9px;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #81a06a;
}
.bar-value {
  width: 130px;
  text-align: right;
  font-size: 12px;
  color: #7e906f;
}
.price-chart {
  width: 100%;
  height: 120px;
  stroke: #739d60;
  stroke-width: 2;
  fill: none;
}
.offline-banner {
  color: #ac6b42;
  font-size: 12px;
  margin-bottom: 15px;
}
.muted {
  color: #92a085;
}
.compact-table input {
  min-width: 80px;
}
.receipt-grid td:first-child {
  min-width: 140px;
}
@media (max-width: 600px) {
  .form-grid.batch-shared {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .batch-shared > .field:first-child {
    grid-column: 1 / -1;
  }
  .receipt-grid th:nth-child(2),
  .receipt-grid td:nth-child(2) {
    display: none;
  }
  .receipt-grid td:first-child {
    min-width: 115px;
  }
}
.compact-table td:first-child input {
  min-width: 160px;
}
.reference-table {
  table-layout: fixed;
}
.compact-table.reference-table td input {
  min-width: 0;
}
.dialog-body .reference-table td,
.dialog-body .reference-table th {
  padding: 9px 5px;
}
.reference-table th:last-child {
  width: 42px;
}
.reference-table [data-remove-reference] {
  padding: 6px;
}
.reference-table [data-remove-reference] svg {
  margin: 0;
}
.label-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8c9a7e;
}
.label-inline select {
  width: auto;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 1600px) {
  .content {
    padding: 42px 50px;
  }
  .topbar {
    padding: 0 50px;
  }
  .table-scroll {
    max-height: calc(100vh - 340px);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 185px;
  }
  .workspace {
    margin-left: 185px;
  }
  .content {
    padding: 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .summary-strip {
    gap: 20px;
  }
  .searchbox input {
    width: 155px;
  }
  .sync-status {
    display: none;
  }
  td,
  th {
    padding-left: 13px;
    padding-right: 13px;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 13px;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
    padding-bottom: 78px;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
  }
  .top-actions {
    gap: 1px;
  }
  .project-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }
  .demo-tag {
    display: none;
  }
  .demo-select {
    max-width: 130px;
    font-size: 11px !important;
  }
  .content {
    padding: 25px 16px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 21px;
    gap: 9px;
  }
  h1 {
    font-size: 26px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .heading-actions button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .heading-actions .desktop {
    display: none;
  }
  .subheading {
    font-size: 11px;
    max-width: 220px;
    line-height: 1.6;
  }
  .summary-strip {
    gap: 21px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .summary-strip strong {
    font-size: 20px;
  }
  .summary-strip span {
    font-size: 11px;
  }
  .table-toolbar {
    padding: 11px 12px;
    gap: 9px;
  }
  .toolbar-right {
    width: 100%;
    justify-content: flex-end;
  }
  .searchbox {
    flex: 1;
  }
  .searchbox input {
    width: 100%;
  }
  .tabs {
    gap: 0;
  }
  .tabs button {
    padding: 6px 9px;
    font-size: 11px;
  }
  table {
    font-size: 12px;
  }
  td {
    padding: 15px 11px;
    font-size: 12px;
  }
  th {
    padding: 11px;
    font-size: 10px;
  }
  .checkcell {
    padding-left: 13px;
    width: 30px;
    padding-right: 3px;
  }
  td.name,
  th.name {
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
    max-width: 160px;
    min-width: 125px;
  }
  .surface {
    border-radius: 10px;
  }
  .table-scroll {
    max-height: calc(100dvh - 320px);
  }
  .table-footer {
    padding: 12px;
    font-size: 10px;
  }
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 8px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid #e3e8dc;
    background: #fffffff5;
    backdrop-filter: blur(15px);
    z-index: 30;
  }
  .mobile-nav button {
    border: 0;
    background: transparent;
    color: #929f86;
    min-width: 60px;
    font-size: 10px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .mobile-nav button svg {
    width: 21px;
    height: 21px;
    margin: 0;
  }
  .mobile-nav button.active {
    color: #31572d;
    font-weight: 650;
  }
  .setting-grid {
    grid-template-columns: 1fr;
  }
  .setting-tile {
    padding: 18px;
  }
  .split-cards {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-card:last-child {
    grid-column: 1/-1;
  }
  .stat-card .value {
    font-size: 22px;
  }
  .stat-card .label {
    font-size: 11px;
  }
  .notice {
    font-size: 11px;
    align-items: flex-start;
  }
  .notice button {
    font-size: 11px;
    padding: 6px 9px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .dialog-head {
    padding: 20px;
  }
  .dialog-body {
    padding: 20px;
    max-height: calc(90dvh - 148px);
  }
  .dialog-foot {
    padding: 15px 20px;
  }
  dialog {
    max-height: 90dvh;
    width: calc(100vw - 20px);
    border-radius: 14px;
  }
  dialog.wide {
    width: calc(100vw - 20px);
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .filter-row {
    flex-wrap: wrap;
  }
  .filter-row select {
    max-width: none;
    flex: 1;
  }
  .filter-row input {
    max-width: none;
    flex: 1;
    min-width: 120px;
  }
  .selection-bar {
    padding: 11px 12px;
    gap: 6px;
  }
  .selection-bar button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .selection-bar span {
    width: 100%;
    margin-bottom: 4px;
  }
  .login {
    padding: 30px 25px;
    margin: 4vh auto;
  }
  .detail-grid {
    gap: 17px 12px;
  }
  .bar-label {
    width: 100px;
  }
  .bar-value {
    width: 92px;
    font-size: 10px;
  }
  .hide-mobile {
    display: none !important;
  }
  #toast {
    bottom: 95px;
  }
  .count-mode td:not(.name):not(.checkcell):not(.countcell),
  .count-mode th:not(.name):not(.checkcell):not(.countcell) {
    display: none;
  }
  .countcell {
    width: 135px;
  }
  .count-input {
    width: 110px !important;
  }
}
.money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.metric-button {
  text-align: left;
  width: 100%;
  background: #fff;
  color: inherit;
}
.metric-button .value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.metric-button .value small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.metric-button p {
  font-size: 12px;
  line-height: 1.6;
  min-height: 36px;
  color: var(--muted);
  margin: 8px 0;
}
.metric-link {
  font-size: 12px;
  color: var(--green);
}
.settlement-grid .value {
  font-size: 26px;
}
.settlement-grid .stat-card p {
  min-height: 0;
}
.overview-sections .table-toolbar select {
  width: auto;
  max-width: 100%;
  min-width: 130px;
}
.overview-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
  align-items: start;
}
.proportion-list {
  padding: 8px 20px 18px;
}
.proportion-row {
  display: block;
  width: 100%;
  border: 0;
  padding: 12px 0;
  background: transparent;
  text-align: left;
}
.proportion-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.proportion-row strong {
  font-size: 13px;
  font-weight: 500;
}
.proportion-row span {
  font-size: 13px;
}
.proportion-row small {
  display: inline-block;
  min-width: 60px;
  text-align: right;
  margin-left: 8px;
  color: var(--muted);
}
.thin-track {
  height: 5px;
  background: #edf0ed;
  border-radius: 4px;
  overflow: hidden;
}
.thin-track i {
  display: block;
  height: 5px;
  background: #476552;
  border-radius: 4px;
}
.summary-line {
  padding: 14px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.todo-list {
  padding: 4px 20px 12px;
}
.todo-list button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
  background: none;
  text-align: left;
}
.todo-list button span:first-child {
  flex: 1;
}
.todo-list strong {
  font-size: 20px;
}
.accounting-note {
  padding: 16px 20px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.financial-scroll {
  width: 100%;
  overflow-x: auto;
}
.financial-table {
  min-width: 820px;
}
.financial-table th {
  white-space: nowrap;
}
.financial-table th:nth-child(n + 3),
.financial-table td:nth-child(n + 3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.financial-table td {
  white-space: nowrap;
}
.financial-table td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}
.text-button small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.asset-totals {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 0;
  font-size: 13px;
}
.asset-toolbar #quick-search {
  width: 240px;
  max-width: 100%;
}
.label-inline {
  white-space: nowrap;
}
.label-inline input {
  width: 155px;
  max-width: 100%;
}
.asset-totals span {
  color: var(--muted);
}
.asset-totals b {
  color: #25312c;
  margin-left: 7px;
}
.pending-assets {
  margin-top: 20px;
  padding: 16px 20px;
}
.pending-assets summary {
  cursor: pointer;
  font-size: 14px;
}
.pending-asset {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.pending-asset span {
  flex: 1;
}
.pending-asset input {
  width: 18px;
}
.toolbar-spacer {
  flex: 1;
}
.preset-list td:last-child {
  text-align: right;
  white-space: nowrap;
}
.preset-list td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .overview-sections {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .page-heading {
    min-width: 0;
    flex-wrap: wrap;
  }
  .heading-actions {
    width: 100%;
    min-width: 0;
  }
  .heading-actions .label-inline {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .heading-actions select,
  .heading-actions input {
    max-width: 100%;
  }
  .money-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .money-grid .stat-card {
    padding: 17px 20px;
  }
  .metric-button p {
    min-height: 0;
  }
  .metric-button .value {
    font-size: 29px;
  }
  .asset-totals {
    gap: 12px;
    font-size: 12px;
  }
  .asset-totals strong {
    width: 100%;
  }
  .overview-sections .table-toolbar {
    flex-wrap: wrap;
  }
  .proportion-row > div:first-child {
    flex-wrap: wrap;
  }
}

.receipt-rule {
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.receipt-rules {
  margin: 14px 0;
}
.backup-panel {
  padding: 20px;
  margin-bottom: 16px;
}
.receipt-rule details {
  margin: 8px 0;
}
.sidebar > nav {
  max-height: calc(100vh - 300px);
  overflow: auto;
}
.table-footer > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-footer select {
  width: auto;
}
.backup-panel .actions,
.preset-list .actions {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .mobile-nav button {
    min-width: 0;
    font-size: 11px;
    padding: 8px 2px;
  }
  .table-footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .receipt-rule .form-grid {
    grid-template-columns: 1fr;
  }
  .table-toolbar .actions {
    flex-wrap: wrap;
  }
  .sidebar > nav {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .backup-due {
    font-size: 0 !important;
    gap: 0;
    padding: 7px;
  }
  .backup-due svg {
    width: 17px;
    height: 17px;
  }
}

.photo-cell {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--line, #dce3dd);
  border-radius: 6px;
}
.material-thumb {
  width: 44px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.photo-dialog {
  width: min(1080px, 94vw);
  max-height: 90dvh;
  padding: 0;
  border: 1px solid #dce3dd;
  border-radius: 12px;
}
.photo-dialog::backdrop {
  background: #12201970;
}
.photo-dialog .dialog-body {
  max-height: calc(90dvh - 85px);
  overflow: auto;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.photo-card {
  border: 1px solid #dce3dd;
  padding: 12px;
  border-radius: 8px;
  min-width: 0;
}
.photo-card small {
  display: block;
  color: #7a837d;
  font-size: 12px;
}
.photo-card .error:empty {
  display: none;
}
.work-consume-grid td > small {
  display: block;
}
.photo-frame {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f5f1;
  border-radius: 6px;
}
.photo-frame img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.photo-frame img[hidden] {
  display: none;
}
.photo-frame.zoomed {
  height: 65vh;
  overflow: auto;
  display: block;
}
.photo-frame.zoomed img {
  max-width: none;
  max-height: none;
  cursor: zoom-out !important;
}
.photo-controls {
  flex-wrap: wrap;
  gap: 8px;
}
.work-consume-grid {
  min-width: 1000px;
}
.work-consume-grid td input {
  max-width: 220px;
}
.work-consume-grid .field > span {
  display: none;
}
.work-consume-grid .work-picker input {
  min-width: 230px;
}
.work-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
#work-analysis-filter {
  padding: 16px 20px;
  border-bottom: 1px solid #dce3dd;
}
.work-analysis-note {
  padding: 4px 20px 12px;
  max-width: 100%;
}
[data-w-material] {
  cursor: pointer;
}
[data-w-material]:hover {
  background: #f3f6f2;
}
#analysis-columns .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}
#analysis-columns .checkbox-label button:first-of-type {
  margin-left: auto;
}
@media (max-width: 760px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .photo-dialog {
    width: 94vw;
  }
  .photo-dialog .dialog-head h2 {
    font-size: 18px;
  }
  .photo-controls button {
    white-space: normal;
  }
  .work-filter-grid {
    grid-template-columns: 1fr;
  }
  .work-filter-grid input {
    min-width: 0;
  }
  .photo-frame {
    height: 190px;
  }
}
