:root {
  color-scheme: light;
  --ink: #1c3239;
  --muted: #52676d;
  --line: #d4dfdf;
  --paper: #fff;
  --teal: #08695c;
  --nav: #173641;
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f1f5f4;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, select, input, textarea {
  border: 1px solid #b8c9c9;
  border-radius: 5px;
  background: white;
  color: var(--ink);
}
button { padding: 8px 14px; font-size: 13px; font-weight: 600; }
button:hover { background: #edf4f2; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #269e88; outline-offset: 2px;
}
input, select { padding: 7px 9px; min-height: 34px; }
[hidden] { display: none !important; }
.primary { background: var(--teal); color: white; border-color: var(--teal); }
.primary:hover { background: #04574c; }
.mark { position: relative; width: 31px; height: 31px; border: 2px solid #83d4b8; border-radius: 5px; flex: none; }
.mark::before, .mark::after { content: ""; position: absolute; }
.mark::before { inset: 5px 6px 9px; border: 2px solid #a9f0ce; border-bottom: 0; }
.mark::after { left: 5px; right: 5px; bottom: 5px; height: 2px; background: #a9f0ce; }
.login-view { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 30px 20px; }
.login-card { width: min(860px,100%); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); background: white; border-radius: 15px; box-shadow: 0 22px 64px #21463d15; }
.login-art { position: relative; min-height: 476px; padding: 42px; overflow: hidden; background-color: var(--nav); color: #f5faf9; background-image: linear-gradient(#a5dfcc0d 1px,transparent 1px),linear-gradient(90deg,#a5dfcc0d 1px,transparent 1px); background-size: 24px 24px; }
.login-art h1 { margin-top: 29px; font-size: clamp(32px,4vw,48px); line-height: 1.24; letter-spacing: -.045em; }
.login-art p { margin-top: 12px; color: #bbd5d0; font-size: 13px; }
.login-art p span { margin-inline: 6px; color: #74ae9f; }
.drawing { position: absolute; bottom: 28px; right: 38px; width: 205px; height: 121px; opacity: .87; transform: skewY(-4deg); }
.drawing div { position: absolute; border: 1.5px solid #86b7b2; background: #1c3c46; }
.drawing .platform { left: 6%; right: 0; bottom: 16px; height: 17px; transform: skewX(-16deg); border-top: 5px solid #94c3b8; }
.drawing .foot { bottom: 5px; height: 12px; width: 13px; }
.drawing .foot.left { left: 15%; }.drawing .foot.right { right: 7%; }
.drawing .upright { top: 18px; bottom: 32px; width: 15px; }
.drawing .upright.left { left: 15%; }.drawing .upright.right { right: 11%; }
.drawing .crossbar { left: 12%; right: 9%; top: 12px; height: 17px; box-shadow: 3px -4px 0 #537878; }
.drawing .carriage { width: 23px; height: 28px; top: 9px; left: 46%; background: #577e7e; }
.drawing .probe { width: 6px; height: 33px; top: 36px; left: calc(46% + 8px); border-bottom: 6px solid #b8d9ab; }
.login-form { padding: 42px; align-self: center; }
.login-form h2 { font-size: 26px; letter-spacing: -.04em; }
.login-form > p { margin: 10px 0 27px; color: var(--muted); font-size: 14px; }
.login-form label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.login-form input, .login-form button { width: 100%; padding: 11px 13px; min-height: 44px; }
.login-form button { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; }
.login-form button span { font-size: 18px; line-height: 1; }
.login-message { min-height: 36px; padding-top: 11px; color: #a24627; font-size: 13px; }
.mast { background: var(--nav); color: white; }
.mast-inner, .room-tabs, .content { max-width: 1510px; margin-inline: auto; padding-inline: clamp(16px,3vw,48px); }
.mast-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.brand, .actions, .room-tabs, .sync, .filters, .section-head, .room-heading, .ledger-tools, .dialog-head, .dialog-foot, .status-counts { display: flex; align-items: center; }
.brand { gap: 12px; }.brand h1 { font-size: 19px; letter-spacing: .01em; }
.actions { gap: 9px; flex-wrap: wrap; }
.mast-primary { background: #abebc9; border-color: #abebc9; color: #123b33; }
.mast-primary:hover { background: #c0f4d8; }.mast-quiet { background: transparent; border-color: #567079; color: #e6efef; }.mast-quiet:hover { background: #32535c; }
.sync { font-size: 12px; color: #cee3de; gap: 6px; margin-right: 10px; }
.sync::before { content: ""; width: 7px; height: 7px; background: #9bd7b9; border-radius: 50%; }
.sync.warn::before { background: #efbc78; }
.room-band { background: var(--paper); border-bottom: 1px solid var(--line); }
.room-tabs { gap: 24px; overflow-x: auto; }.room-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 13px 1px 11px; background: transparent; color: var(--muted); }
.room-tabs button[aria-current="page"] { border-bottom-color: var(--teal); color: var(--teal); }
.content { padding-block: 27px 48px; }
.room-heading { justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.room-heading h2 { font-size: clamp(25px,3vw,34px); line-height: 1.2; letter-spacing: -.04em; }
.room-meta { font-size: 13px; margin-top: 7px; color: var(--muted); }
.date-field, .filters label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.date-value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.overview, .ledger { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.overview { padding: 16px 19px 12px; }.section-head, .ledger-tools { justify-content: space-between; gap: 10px; flex-wrap: wrap; }
h3 { font-size: 17px; }.status-counts { gap: 11px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.count { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #89969c; }
.s-normal { --sc: #086451; --sb: #daf2e9; --dot: #329873; }.s-install { --sc: #235c8a; --sb: #e1eef9; --dot: #4889b7; }
.s-fault { --sc: #963a2f; --sb: #fbe6e2; --dot: #c86252; }.s-debug { --sc: #80531a; --sb: #f8ecd4; --dot: #b6813e; }
.s-empty { --sc: #5b686b; --sb: #eaf0ef; --dot: #94a1a1; }
.dot { background: var(--dot,#89969c); }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(83px,1fr)); gap: 7px; margin-top: 14px; }
.machine-tile { text-align: left; padding: 8px 9px; border: 1px solid #dce5e3; background: #f6f9f8; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.machine-tile b { font-size: 17px; font-family: "IBM Plex Mono", Consolas, monospace; }
.machine-tile span { font-weight: 500; color: var(--sc); font-size: 11px; white-space: nowrap; }
#brand-summary { margin-top: 10px; color: var(--muted); font-size: 12px; }
summary { cursor: pointer; width: fit-content; }
#brand-counts { display: grid; gap: 7px; margin-top: 9px; } #brand-counts p { display: flex; gap: 14px; flex-wrap: wrap; }
.ledger { margin-top: 16px; overflow: hidden; }
.ledger-tools { padding: 13px 18px; }.filters { gap: 14px; flex-wrap: wrap; }.filters select { font-size: 12px; }
.table-scroller { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 800px; font-size: 13px; }
th { text-align: left; background: #eaf0ef; font-size: 12px; color: #445b60; letter-spacing: .02em; }
th,td { padding: 10px 12px; border-top: 1px solid #dfE7e5; } th:first-child, td:first-child { padding-left: 18px; }
td { vertical-align: middle; }td:first-child { width: 82px; }td:nth-child(2) { width: 87px; }td:nth-child(3) { width: 29%; }td:nth-child(4) { width: 110px; }td:last-child { min-width: 220px; }
.unit-id { display: block; font: 700 21px/1.1 "IBM Plex Mono",Consolas,monospace; }
.brand-name, .machine-details { margin-top: 4px; display: block; font-size: 11px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.model { font-size: 13px; font-weight: 650; line-height: 1.4; }.thumb { background: #eef2f1; padding: 0; border: 0; display: block; overflow: hidden; border-radius: 4px; }
.thumb img { width: 63px; height: 47px; object-fit: cover; display: block; }.status-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; padding: 4px 8px; font-size: 12px; background: var(--sb); color: var(--sc); font-weight: 600; }
.status-select { font-size: 13px; min-width: 75px; }.row-focus { background: #e8f5ed; }
.preview-line { margin-block: 2px 5px; display: flex; align-items: baseline; gap: 7px; line-height: 1.45; }
.rec-meta, .secondary { color: var(--muted); font-size: 12px; }.rec-meta { flex: none; }
.record-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-action { color: var(--teal); font-size: 12px; padding: 3px 0; border: 0; background: none; }.text-action:hover { text-decoration: underline; background: none; }
.notice, .conflicts { padding: 13px 15px; border: 1px solid #c0ddd4; background: #e8f5ef; color: #175e50; border-radius: 6px; margin-bottom: 16px; font-size: 13px; line-height: 1.5; }
.notice.error, .conflicts { border-color: #e6ca9f; background: #fff3e1; color: #74461e; }
.conflict { border-top: 1px solid #e9d8ba; padding-block: 10px 4px; margin-top: 9px; }.conflict pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; font: inherit; background: #fff9ed; border-radius: 3px; padding: 5px 8px; }.conflict button { margin: 0 6px 5px 0; }
dialog { padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); width: min(680px,94vw); max-height: 88vh; overflow: auto; box-shadow: 0 20px 75px #0d272e40; }
dialog::backdrop { background: #102e38a8; }.dialog-head,.dialog-foot { justify-content: space-between; gap: 12px; padding: 16px 19px; }.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }.dialog-head p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.dialog-head button { min-width: 34px; padding: 3px; font-size: 20px; }.dialog-scroll { padding: 16px 19px; max-height: 55vh; overflow-y: auto; }
.dialog-foot { border-top: 1px solid var(--line); }.dialog-foot .primary { margin-left: auto; }
.record-card { padding: 12px; border: 1px solid var(--line); border-radius: 5px; margin-bottom: 8px; }
.record-card p { margin-top: 5px; }.record-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.record-fields label, .record-text { color: var(--muted); font-size: 12px; display: flex; gap: 5px; align-items: center; }.record-fields button { margin-left: auto; color: #923c32; }
.record-text { align-items: stretch; flex-direction: column; margin-top: 9px; }
.record-text textarea { min-height: 58px; font-size: 14px; padding: 9px; resize: vertical; }
#photo-dialog { width: fit-content; max-width: 94vw; }#photo-large { display: block; max-width: 100%; max-height: 70vh; margin: auto; }
@media(max-width:760px) {
  .mast-inner { align-items: flex-start; flex-direction: column; padding-block: 12px; gap: 9px; }
  .actions { gap: 7px; }.sync { margin-right: 2px; }.login-art,.login-form { padding: 28px; }
  .ledger-tools { align-items: flex-start; } .overview-grid { grid-template-columns: repeat(auto-fit,minmax(78px,1fr)); }
}
@media(max-width:590px) {
  .login-card { grid-template-columns: 1fr; max-width: 410px; }.login-art { min-height: 186px; }.login-art h1 { margin-top: 14px; font-size: 30px; }.login-art h1 br { display: none; }.login-art p { font-size: 12px; }
  .drawing { right: 17px; bottom: -11px; transform: scale(.45) skewY(-4deg); transform-origin: right bottom; }
  .room-heading { align-items: flex-start; flex-direction: column; gap: 10px; }.overview { padding-inline: 12px; }.ledger-tools { padding-inline: 12px; }.filters { gap: 8px; }.filters label { gap: 4px; }
}
