:root {
  --bg: #edf2f4;
  --surface: #ffffff;
  --surface-soft: #f6f8f9;
  --ink: #16232b;
  --muted: #60717b;
  --line: #d7e0e4;
  --brand: #0c6071;
  --brand-dark: #084a57;
  --brand-soft: #d9eef1;
  --accent: #d87812;
  --danger: #b02a24;
  --success: #16734b;
  --shadow: 0 10px 30px rgb(18 45 57 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 75%), transparent 260px),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  background: linear-gradient(120deg, #0b5261, #0c6373);
  box-shadow: 0 6px 20px rgb(13 58 69 / 18%);
  color: #fff;
}

.brand {
  display: flex;
  min-width: 300px;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 55%);
  border-radius: 10px;
  background: rgb(255 255 255 / 12%);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 750;
  letter-spacing: 0.03em;
}

.brand p {
  margin-top: 4px;
  color: rgb(255 255 255 / 72%);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.operator-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-user {
  display: flex;
  min-width: 138px;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.3;
}

.current-user strong {
  font-size: 14px;
}

.current-user span {
  color: rgb(255 255 255 / 72%);
  font-size: 12px;
}

.connection {
  display: inline-flex;
  min-width: 88px;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.connection-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f6b44e;
  box-shadow: 0 0 0 4px rgb(246 180 78 / 18%);
}

.connection.is-online .connection-dot {
  background: #78e1a3;
  box-shadow: 0 0 0 4px rgb(120 225 163 / 18%);
}

.connection.is-offline .connection-dot {
  background: #ff8f86;
  box-shadow: 0 0 0 4px rgb(255 143 134 / 18%);
}

.button {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.button:hover {
  border-color: #9fb2ba;
  background: #f9fbfb;
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.tab:focus-visible {
  outline: 3px solid rgb(216 120 18 / 38%);
  outline-offset: 2px;
}

.button-primary {
  border-color: #e59949;
  background: #f0a04a;
  color: #17242a;
}

.button-primary:hover {
  border-color: #ffca8d;
  background: #ffb865;
}

.button-export {
  border-color: #a8c7cc;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.button-danger {
  border-color: #a52d27;
  background: var(--danger);
  color: #fff;
}

.button-danger:hover {
  border-color: #8f211c;
  background: #95231e;
}

.button-logout {
  border-color: rgb(255 255 255 / 48%);
  background: rgb(255 255 255 / 10%);
  color: #fff;
}

.button-logout:hover {
  border-color: rgb(255 255 255 / 75%);
  background: rgb(255 255 255 / 18%);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.topbar,
.page {
  transition: visibility 120ms ease;
}

.is-auth-loading .topbar,
.is-auth-loading .page,
.is-signed-out .topbar,
.is-signed-out .page,
.is-access-denied .topbar,
.is-access-denied .page {
  visibility: hidden;
}

.login-screen,
.access-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow: auto;
  padding: 24px;
  place-items: center;
  background:
    radial-gradient(circle at 15% 12%, rgb(240 160 74 / 24%), transparent 32%),
    linear-gradient(140deg, #073f4b, #0c6373 58%, #0b4d59);
}

.login-screen[hidden],
.access-screen[hidden] {
  display: none;
}

.login-card,
.access-card {
  width: min(440px, 100%);
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgb(0 28 36 / 34%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand .brand-mark {
  border-color: #87b7c0;
  background: #e4f3f5;
  color: var(--brand);
}

.login-brand h1,
.login-brand p {
  margin: 0;
}

.login-brand h1 {
  margin-top: 4px;
  font-size: 25px;
}

.login-intro {
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 17px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #344b55;
  font-size: 14px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  border: 1px solid #bdcbd0;
  border-radius: 8px;
  outline: none;
  background: #fbfcfc;
  color: var(--ink);
  font-size: 17px;
}

.login-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(12 96 113 / 14%);
}

.login-submit {
  min-height: 52px;
  margin-top: 2px;
  border-color: #0b5260;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
}

.login-submit:hover {
  border-color: #083f49;
  background: var(--brand-dark);
}

.login-error {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff0ef;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.login-footnote {
  margin: 20px 0 0;
  color: #73848b;
  font-size: 12px;
  text-align: center;
}

.access-card {
  text-align: center;
}

.access-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: #fff0df;
  color: #a75a06;
  font-size: 34px;
  font-weight: 800;
}

.access-card h1 {
  margin: 0;
  font-size: 24px;
}

.access-card p {
  margin: 14px 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.access-card .button {
  min-height: 48px;
}

.page {
  width: min(1720px, calc(100% - 40px));
  margin: 24px auto 40px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  padding: 13px 16px;
  border: 1px solid #e5c99f;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff8eb;
  color: #61431d;
  font-size: 14px;
  line-height: 1.65;
}

.notice strong {
  flex: 0 0 auto;
  color: #8b510c;
}

.material-editor {
  margin-bottom: 24px;
  border: 1px solid #b8d3d8;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgb(217 238 241 / 58%), transparent 44%),
    var(--surface);
  box-shadow: var(--shadow);
}

.material-editor.is-editing {
  border-color: #e4a145;
  box-shadow:
    0 0 0 4px rgb(240 160 74 / 16%),
    var(--shadow);
}

.material-editor.is-editing .material-heading {
  background: linear-gradient(90deg, #fff4e3, #fff);
}

.material-heading {
  background: linear-gradient(90deg, #edf8f9, #fff);
}

.material-intro {
  max-width: 860px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.required-mark {
  color: var(--danger);
  font-weight: 800;
}

.material-form {
  padding: 0 22px 22px;
}

.material-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 4px 0 20px;
  border: 0;
}

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #344b55;
  font-size: 14px;
  font-weight: 700;
}

.form-field-wide {
  grid-column: span 2;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #afc0c6;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 550;
}

.form-field select {
  padding-right: 34px;
}

.form-field input::placeholder {
  color: #8d9da4;
  font-weight: 400;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgb(12 96 113 / 12%);
}

.form-field input:disabled,
.form-field select:disabled {
  cursor: not-allowed;
  background: #f2f5f6;
  color: #73858d;
}

.material-image-field {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, 28%) minmax(0, 1fr);
  gap: 10px 18px;
  align-items: start;
  padding-top: 4px;
}

.material-image-label {
  color: #344b55;
  font-size: 14px;
  font-weight: 700;
}

.material-image-preview {
  position: relative;
  display: flex;
  grid-row: span 2;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed #a6bcc2;
  border-radius: 10px;
  background: #f5f9fa;
}

.material-image-preview img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  background: #eef3f4;
}

.material-image-placeholder {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  color: #6f858d;
  font-size: 14px;
  text-align: center;
}

.material-image-placeholder strong {
  color: #38545d;
  font-size: 17px;
}

.material-image-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.material-image-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.button-danger-light {
  border: 1px solid #e2b4ad;
  background: #fff2f0;
  color: #a52a1a;
}

.table-thumbnail {
  display: block;
  width: 78px;
  height: 58px;
  border: 1px solid #d5e0e3;
  border-radius: 7px;
  background: #f2f6f7;
  object-fit: cover;
}

.table-photo-empty {
  display: inline-flex;
  width: 78px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c5d2d6;
  border-radius: 7px;
  color: #82949a;
  font-size: 12px;
}

.material-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.material-form-status {
  display: flex;
  min-height: 44px;
  min-width: 0;
  align-items: center;
  flex: 1 1 auto;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #d6e0e3;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.material-form-status strong {
  flex: 0 0 auto;
  color: #344e58;
}

.material-form-status.is-loading {
  border-color: #a9cbd2;
  background: #edf8fa;
  color: #315d68;
}

.material-form-status.is-loading strong::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 2px solid #a7c9d0;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  content: "";
  vertical-align: -1px;
}

.material-form-status.is-success {
  border-color: #afd8bf;
  background: #eef9f2;
  color: #316746;
}

.material-form-status.is-success strong {
  color: var(--success);
}

.material-form-status.is-error {
  border-color: #e4b2ad;
  background: #fff3f2;
  color: #7c322e;
}

.material-form-status.is-error strong {
  color: var(--danger);
}

.material-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.button-save {
  min-width: 132px;
  min-height: 48px;
  border-color: #0b7184;
  background: var(--brand);
  box-shadow: 0 6px 16px rgb(12 96 113 / 22%);
  color: #fff;
  font-size: 16px;
}

.button-save:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.overview-section,
.demo-panel,
.data-panel {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.overview-section {
  padding: 22px;
}

.demo-panel {
  overflow: hidden;
}

.data-panel {
  overflow: hidden;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  margin-bottom: 18px;
}

.panel-heading {
  padding: 22px 22px 18px;
}

.demo-heading {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgb(12 96 113 / 5%), transparent 55%),
    var(--surface);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 22px;
}

.demo-action {
  display: flex;
  min-height: 158px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid #cddfe2;
  border-radius: 10px;
  background: #f7fbfb;
}

.demo-action h3 {
  margin: 0 0 8px;
  color: #23434c;
  font-size: 17px;
}

.demo-action p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.demo-action-danger {
  border-color: #e5c2bf;
  background: #fff8f7;
}

.demo-action-danger h3 {
  color: #7f2924;
}

.demo-status {
  display: flex;
  min-height: 58px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #f7f9fa;
  color: var(--muted);
  font-size: 13px;
}

.demo-status strong {
  color: #364c56;
  font-size: 14px;
}

.demo-status.is-loading {
  background: #eef7f8;
  color: var(--brand-dark);
}

.demo-status.is-success {
  background: #edf8f1;
  color: var(--success);
}

.demo-status.is-success strong {
  color: var(--success);
}

.demo-status.is-error {
  background: #fff3f2;
  color: var(--danger);
}

.demo-status.is-error strong {
  color: var(--danger);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.updated-at,
.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid #dce5e8;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgb(12 96 113 / 4%), transparent 60%),
    var(--surface-soft);
}

.metric-card::after {
  position: absolute;
  right: -16px;
  bottom: -28px;
  width: 80px;
  height: 80px;
  border: 14px solid rgb(12 96 113 / 5%);
  border-radius: 50%;
  content: "";
}

.metric-label {
  display: block;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.metric-value {
  position: relative;
  z-index: 1;
  color: var(--brand-dark);
  font-size: clamp(28px, 3vw, 38px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}

.metric-unit {
  margin-left: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.metric-card.is-alert {
  border-color: #e7b3ae;
  background: #fff7f6;
}

.metric-card.is-alert .metric-value {
  color: var(--danger);
}

.skeleton {
  color: #9fb1b9;
}

.tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding: 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
  scrollbar-width: thin;
}

.tab {
  min-width: max-content;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #52656f;
  font-size: 15px;
  font-weight: 650;
}

.tab:hover {
  color: var(--brand);
}

.tab.is-active {
  border-bottom-color: var(--brand);
  color: var(--brand-dark);
  background: #fff;
}

.tab:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 22px;
}

.search-box,
.select-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-box {
  width: min(440px, 40vw);
}

.select-box {
  min-width: 160px;
}

.toolbar label {
  color: #4a5e68;
  font-size: 13px;
  font-weight: 700;
}

.toolbar input,
.toolbar select {
  min-height: 43px;
  border: 1px solid #bfcdd2;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.toolbar input {
  width: 100%;
  padding: 8px 13px;
}

.toolbar select {
  padding: 8px 34px 8px 12px;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(12 96 113 / 11%);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.table-summary {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px 10px;
  color: var(--muted);
  font-size: 13px;
}

.table-summary p {
  margin: 0;
}

#resultSummary {
  color: #364c56;
  font-weight: 650;
}

.table-wrapper {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
  color: var(--muted);
  font-size: 13px;
}

.pagination .button {
  min-width: 82px;
  min-height: 38px;
}

#pageInfo {
  min-width: 92px;
  color: #364c56;
  font-weight: 700;
  text-align: center;
}

#pageTotal {
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  white-space: nowrap;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e7edef;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f1f5f6;
  color: #425761;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

tbody tr:nth-child(even) {
  background: #fbfcfc;
}

tbody tr:hover {
  background: #edf7f8;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.is-number,
th.is-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.is-empty-value {
  color: #8b9ba2;
}

.table-action-button {
  min-width: 66px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #8ebfc8;
  border-radius: 7px;
  background: #eaf6f8;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.table-action-button:hover {
  border-color: var(--brand);
  background: #d8eef2;
}

.table-action-button:active {
  transform: translateY(1px);
}

.table-action-button:focus-visible {
  outline: 3px solid rgb(12 96 113 / 24%);
  outline-offset: 2px;
}

.table-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.primary-value {
  color: #163f4b;
  font-weight: 750;
}

.value-danger {
  color: var(--danger);
  font-weight: 750;
}

.value-success {
  color: var(--success);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.badge-neutral {
  border-color: #d3dcdf;
  background: #f0f3f4;
  color: #576972;
}

.badge-info {
  border-color: #b8d7e8;
  background: #e9f5fb;
  color: #17698d;
}

.badge-warning {
  border-color: #ead19f;
  background: #fff6df;
  color: #8b5a0a;
}

.badge-success {
  border-color: #b8ddc8;
  background: #eaf7ef;
  color: #176d48;
}

.badge-danger {
  border-color: #ebc0bc;
  background: #fff0ef;
  color: #a52d27;
}

.table-state {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 34px;
  border-top: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgb(12 96 113 / 2%) 10px,
      rgb(12 96 113 / 2%) 20px
    ),
    #fbfcfc;
  color: var(--muted);
  text-align: center;
}

.table-state strong {
  color: #344c56;
  font-size: 17px;
}

.table-state.is-error {
  color: #7c322e;
  background: #fff7f6;
}

.table-state.is-error strong {
  color: var(--danger);
}

.loading-ring {
  width: 30px;
  height: 30px;
  border: 3px solid #c9d9dd;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.table-state:not(.is-loading) .loading-ring {
  display: none;
}

.empty-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #d7e1e4;
  border-radius: 50%;
  background: #fff;
  color: #83969e;
  font-size: 23px;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 10px;
  color: #70828a;
  font-size: 12px;
}

.footer a {
  color: var(--brand);
  font-weight: 650;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .topbar {
    position: relative;
    align-items: flex-start;
  }

  .operator-area {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .demo-grid {
    grid-template-columns: 1fr;
  }

  .material-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-field-wide {
    grid-column: span 2;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .search-box {
    width: min(100%, 520px);
    flex: 1 1 420px;
  }

  .toolbar-actions {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  html {
    font-size: 15px;
  }

  .topbar {
    flex-direction: column;
    gap: 15px;
    padding: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .operator-area {
    width: 100%;
    justify-content: flex-start;
  }

  .operator-area .button-primary {
    flex: 1;
  }

  .page {
    width: calc(100% - 20px);
    margin-top: 12px;
  }

  .material-image-field {
    grid-template-columns: 1fr;
  }

  .material-image-preview {
    grid-row: auto;
  }

  .notice {
    flex-direction: column;
    gap: 3px;
  }

  .material-form {
    padding: 0 16px 18px;
  }

  .material-fields {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .form-field-wide {
    grid-column: span 1;
  }

  .material-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .material-form-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .material-buttons {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
  }

  .button-save {
    width: 100%;
  }

  .overview-section {
    padding: 16px;
  }

  .section-heading,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .panel-heading {
    padding: 17px 16px 14px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 105px;
    padding: 14px;
  }

  .metric-value {
    font-size: 28px;
  }

  .tabs {
    padding: 0 8px;
  }

  .tab {
    min-height: 50px;
    padding: 0 13px;
  }

  .demo-grid {
    padding: 15px 16px;
  }

  .demo-status {
    padding-inline: 16px;
  }

  .toolbar {
    padding: 15px 16px;
  }

  .search-box,
  .select-box {
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .toolbar-actions .button {
    padding-inline: 8px;
    font-size: 13px;
  }

  .table-summary {
    align-items: flex-start;
    padding-inline: 16px;
    flex-direction: column;
    gap: 3px;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    padding-inline: 12px;
  }

  .pagination .button {
    min-width: 78px;
  }

  #pageTotal {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}

.scope-user-summary {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #344e58;
  font-size: 14px;
  font-weight: 700;
}

.scope-warehouse-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.scope-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #afc0c6;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.scope-option:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(12 96 113 / 10%);
}

.scope-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.scope-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  font-size: 14px;
}

.scope-option-text small {
  color: var(--muted);
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
