:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, .82);
  --panel-solid: #ffffff;
  --panel-soft: rgba(250, 250, 252, .78);
  --line: rgba(60, 60, 67, .18);
  --line-soft: rgba(60, 60, 67, .10);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --primary: #007aff;
  --primary-dark: #0068d9;
  --danger: #b42318;
  --ok-bg: rgba(52, 199, 89, .14);
  --ok: #248a3d;
  --run-bg: rgba(0, 122, 255, .13);
  --run: #006edb;
  --fail-bg: rgba(255, 59, 48, .13);
  --fail: #d70015;
  --queue-bg: rgba(255, 149, 0, .16);
  --queue: #a05a00;
  --shadow: 0 14px 34px rgba(0, 0, 0, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 122, 255, .08), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(52, 199, 89, .06), transparent 26%),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset;
}

button:hover {
  background: var(--primary-dark);
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

button.secondary {
  background: rgba(60, 60, 67, .86);
}

button.ghost {
  background: rgba(255, 255, 255, .62);
  color: var(--text);
  border: 1px solid var(--line);
}

.button-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.button-link.ghost {
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--line);
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  padding: 7px 9px;
}

textarea {
  resize: vertical;
}

label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  padding: 24px;
  background: var(--panel);
  backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.login-panel h1,
section h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: 22px;
}

.error {
  margin: 0;
  min-height: 20px;
  color: var(--danger);
  font-size: 12px;
}

.app {
  min-height: 100vh;
  padding-left: 0;
}

.nav-rail {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 50%;
  width: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  backdrop-filter: blur(20px) saturate(180%);
  overflow: hidden;
  transform: translate(-80px, -50%);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.nav-rail:hover,
.nav-rail:focus-within {
  transform: translate(0, -50%);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .15);
}

.nav-btn {
  width: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  text-align: left;
  box-shadow: none;
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(0, 122, 255, .12);
  color: var(--primary);
}

.nav-label {
  white-space: nowrap;
}

.app-main {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.view-panel {
  min-height: calc(100vh - 122px);
}

.monitor-view {
  display: grid;
  gap: 12px;
}

.top-modules {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset;
  backdrop-filter: blur(18px);
}

.status-module {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.identity-module {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  justify-self: start;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.identity-module p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-identity-module {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  justify-content: flex-start;
}

.asset-account-actions {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.metric-card {
  min-height: 54px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .48);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
  backdrop-filter: none;
}

.metric-total {
  background: rgba(0, 122, 255, .10);
  border-color: rgba(0, 122, 255, .22);
}

.metric-total strong {
  color: #006edb;
}

.metric-active {
  background: rgba(255, 149, 0, .14);
  border-color: rgba(255, 149, 0, .28);
}

.metric-active strong {
  color: #a05a00;
}

.metric-finished {
  background: rgba(52, 199, 89, .14);
  border-color: rgba(52, 199, 89, .28);
}

.metric-finished strong {
  color: #248a3d;
}

.metric-failed {
  background: rgba(255, 59, 48, .13);
  border-color: rgba(255, 59, 48, .28);
}

.metric-failed strong {
  color: #d70015;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1;
}

.monitor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset;
  backdrop-filter: blur(18px);
}

.section-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
}

.section-head h2 {
  font-size: 14px;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
}

.asset-section-head {
  min-height: 42px;
}

.asset-section-head .table-tools {
  flex-wrap: nowrap;
  min-width: 0;
}

.asset-title-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.asset-inline-metrics {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.asset-inline-metrics::-webkit-scrollbar {
  display: none;
}

.asset-inline-metrics .metric-card {
  min-height: 26px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: none;
}

.asset-inline-metrics .metric-card span {
  font-size: 10px;
  white-space: nowrap;
}

.asset-inline-metrics .metric-card strong {
  margin-top: 0;
  font-size: 13px;
  line-height: 1;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-module {
  display: grid;
  grid-template-columns: minmax(145px, 1.1fr) minmax(168px, 1.35fr) repeat(4, minmax(0, 1fr)) minmax(96px, auto) auto;
  gap: 8px;
  align-items: end;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.filter-module.asset-filter-module {
  overflow: visible;
}

.filter-module label,
.filter-module .filter-field {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.filter-module label span,
.filter-module .filter-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.filter-module input,
.filter-module select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
}

.filter-module .source-filter {
  min-width: 96px;
}

.filter-module .radio-filter {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.filter-module .radio-filter input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--primary);
}

.filter-module .radio-filter > span {
  color: var(--text);
  font-size: 12px;
}

.filter-module .date-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 168px;
  min-height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.filter-module .date-select-wrap > span {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 9px;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, .025);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-module .date-select-wrap input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.filter-module .date-select-wrap input[type="text"]:focus {
  outline: none;
}

.filter-module .date-select-wrap:focus-within {
  border-color: rgba(0, 122, 255, .42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, .10);
}

.flatpickr-calendar {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .16);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  border-color: var(--primary);
  background: var(--primary);
}

.flatpickr-day.today {
  border-color: #ff9500;
}

.date-range-filter {
  position: relative;
  z-index: 150;
}

.date-range-picker {
  position: relative;
  z-index: 150;
}

.date-range-picker.open {
  z-index: 230;
}

.date-range-trigger {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.date-range-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.date-range-picker.open .date-range-trigger::after {
  transform: rotate(225deg) translateY(-1px);
}

.date-range-menu {
  position: absolute;
  z-index: 230;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: 268px;
  max-width: calc(100vw - 32px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .14);
  backdrop-filter: blur(18px);
}

.date-range-picker.open .date-range-menu {
  display: grid;
}

.date-range-menu label {
  min-width: 0;
}

.date-range-menu input {
  width: 100%;
}

.assets-top {
  position: relative;
  z-index: 120;
  overflow: visible;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

#assetsView.monitor-view {
  align-content: start;
  grid-auto-rows: max-content;
}

#assetsView .assets-top,
#assetsView .job-board {
  align-self: start;
}

.assets-view .job-board,
#assetsView .job-board {
  position: relative;
  z-index: 1;
}

.asset-filter-module {
  position: relative;
  z-index: 130;
  grid-template-columns: minmax(140px, 1.2fr) minmax(160px, 1.3fr) minmax(115px, 1fr) minmax(175px, 1.3fr) repeat(4, minmax(90px, 1fr)) auto;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .38);
}

.asset-filter-module > label,
.asset-filter-module > .filter-field {
  display: block;
}

.asset-filter-module > label:not(.date-select-wrap) > span,
.asset-filter-module > .filter-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.asset-filter-module .date-select-wrap {
  min-width: 0;
}

.asset-filter-module input,
.asset-filter-module select,
.asset-filter-module .check-dropdown-trigger,
.asset-filter-module button.compact {
  min-height: 30px;
  height: 30px;
  font-size: 12px;
}

.asset-filter-module .check-dropdown-trigger {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.people-filter {
  position: relative;
  z-index: 140;
}

.check-dropdown {
  position: relative;
  z-index: 140;
}

.check-dropdown.open {
  z-index: 220;
}

.check-dropdown-trigger {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 650;
  text-align: left;
}

.check-dropdown-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.check-dropdown.open .check-dropdown-trigger::after {
  transform: rotate(225deg) translateY(-1px);
}

.check-dropdown-menu {
  position: absolute;
  z-index: 220;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  min-width: 190px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .14);
  backdrop-filter: blur(18px);
}

.check-dropdown.open .check-dropdown-menu {
  display: grid;
  gap: 2px;
}

.check-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 32px;
  padding: 5px 7px;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
}

.check-option:hover {
  background: rgba(0, 122, 255, .09);
}

.check-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.check-option span,
.check-empty {
  font-size: 12px;
}

.check-empty {
  padding: 8px;
  color: var(--muted);
}

button.compact {
  min-height: 32px;
  padding: 0 12px;
}

.table-wrap {
  max-height: calc(100vh - 308px);
  overflow: auto;
}

.config-view {
  display: grid;
  gap: 12px;
}

.config-panel {
  min-height: calc(100vh - 32px);
}

.config-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.config-tabs {
  display: flex;
  gap: 6px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.config-tab {
  min-height: 32px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  box-shadow: none;
}

.config-tab:hover,
.config-tab.active {
  background: rgba(0, 122, 255, .10);
  color: var(--primary-dark);
  border-color: rgba(0, 122, 255, .18);
}

.mapping-config {
  display: grid;
  gap: 12px;
  padding: 8px;
}

.admin-config {
  display: grid;
  gap: 12px;
  padding: 8px;
}

.admin-form {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.admin-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.config-action {
  width: 48px;
  min-width: 48px;
  min-height: 32px;
  padding: 0;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.config-action:hover {
  background: #3a3a3c;
}

.admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.admin-row strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.admin-remove {
  min-height: 30px;
  padding: 0 10px;
}

.mapping-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(140px, 200px) auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.mapping-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.mapping-form input {
  min-height: 36px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-solid);
  color: var(--text);
}

.mapping-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px;
}

.mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(90px, .55fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.mapping-row strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.mapping-row span {
  color: var(--muted);
}

.mapping-row i {
  color: var(--muted);
  font-style: normal;
}

.mapping-remove {
  min-height: 30px;
  padding: 0 10px;
}

.config-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .admin-form,
  .mapping-form,
  .mapping-row {
    grid-template-columns: 1fr;
  }

  .admin-remove,
  .mapping-remove,
  .admin-remove {
    grid-row: auto;
    grid-column: auto;
  }
}

.preference-gallery {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-content: start;
  max-height: calc(100vh - 94px);
  overflow: auto;
  padding: 8px;
}

.model-supplier-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 10px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.model-supplier-card.is-configurable {
  border-color: rgba(0, 122, 255, .22);
}

.model-supplier-card.is-saving {
  border-color: var(--queue);
  box-shadow: 0 10px 24px rgba(255, 149, 0, .10);
}

.model-supplier-card.has-error {
  border-color: var(--fail);
  background: rgba(255, 59, 48, .06);
}

.model-supplier-main {
  display: grid;
  gap: 8px;
}

.model-supplier-title {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.model-supplier-title strong {
  font-size: 15px;
  line-height: 1.2;
}

.supplier-segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 5px;
}

.supplier-segment {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.supplier-segment.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.supplier-segment:disabled {
  opacity: .72;
  cursor: default;
}

.preference-model-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .48);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

.preference-model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preference-model-head strong {
  font-size: 14px;
}

.preference-model-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preference-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 7px;
}

.preference-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line-soft);
  border-left: 3px solid rgba(52, 199, 89, .72);
  border-radius: 8px;
}

.preference-card.needs-config,
.preference-card.has-error {
  border-left-color: var(--fail);
  background: rgba(255, 59, 48, .06);
}

.preference-card.is-saving {
  border-left-color: var(--queue);
}

.preference-card-main {
  min-width: 0;
}

.preference-card-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preference-card-main strong {
  font-size: 13px;
  line-height: 1.2;
}

.preference-card select {
  min-height: 31px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 700;
}

.jobs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 12px;
}

.gallery-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
  min-height: 260px;
  padding: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .68);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: none;
  text-align: left;
}

.gallery-card:hover {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(0, 122, 255, .32);
  box-shadow: 0 12px 24px rgba(0, 122, 255, .10);
}

.gallery-card.feishu-glass {
  position: relative;
  border-color: rgba(93, 170, 255, .52);
  background: rgba(255, 255, 255, .42);
  box-shadow:
    0 8px 24px rgba(31, 111, 235, .10),
    0 1px 0 rgba(255, 255, 255, .82) inset,
    0 0 0 1px rgba(255, 255, 255, .32) inset;
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.gallery-card.feishu-glass:hover {
  border-color: rgba(0, 122, 255, .68);
  background: rgba(255, 255, 255, .58);
  box-shadow:
    0 14px 30px rgba(0, 122, 255, .15),
    0 1px 0 rgba(255, 255, 255, .92) inset,
    0 0 0 1px rgba(255, 255, 255, .42) inset;
}

.gallery-preview {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
}

.preview-group {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  overflow: hidden;
}

.preview-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.preview-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.preview-images img,
.preview-images video,
.video-preview-placeholder,
.empty-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: rgba(118, 118, 128, .12);
  object-fit: cover;
}

.video-preview-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.video-preview-placeholder.large {
  border-radius: 0;
  font-size: 13px;
}

.empty-preview {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  place-items: center;
  min-height: 82px;
  overflow: hidden;
  color: var(--muted);
}

.gallery-meta {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 5px;
  align-content: start;
  overflow: hidden;
}

.gallery-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gallery-title strong,
.gallery-line,
.gallery-time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-line,
.gallery-time {
  color: var(--muted);
  font-size: 12px;
}

.gallery-empty {
  grid-column: 1 / -1;
}

.page-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.page-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.page-input {
  width: 58px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.page-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.page-size-select {
  height: 30px;
  min-width: 88px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.page-nav {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.tool-divider {
  width: 1px;
  height: 20px;
  flex: 0 0 1px;
  background: var(--line);
}

.job-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.job-table th,
.job-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.job-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 248, 250, .92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.job-table th:nth-child(1) {
  width: 25%;
}

.job-table th:nth-child(2) {
  width: 96px;
}

.job-table th:nth-child(5) {
  width: 160px;
}

.job-table tr {
  cursor: pointer;
}

.job-table tbody tr:hover,
.job-table tbody tr.active {
  background: rgba(0, 122, 255, .08);
}

.empty-row {
  padding: 28px !important;
  color: var(--muted);
  text-align: center !important;
}

.job-main {
  display: grid;
  gap: 2px;
}

.job-main strong,
.cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-main span {
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.pill.finished {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill.running,
.pill.processing,
.pill.pending {
  background: var(--run-bg);
  color: var(--run);
}

.pill.failed {
  background: var(--fail-bg);
  color: var(--fail);
}

.pill.queued {
  background: var(--queue-bg);
  color: var(--queue);
}

.detail-section {
  min-height: calc(100vh - 174px);
}

.modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .22);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty {
  padding: 28px;
  color: var(--muted);
}

.detail-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.summary-grid div {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel-soft);
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.asset-columns,
.info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.subhead {
  min-height: 24px;
  display: flex;
  align-items: center;
}

h3 {
  font-size: 13px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-top: 8px;
  max-height: 360px;
  overflow: auto;
}

.asset {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
}

.asset img,
.asset video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef2f6;
}

.asset-preview-btn {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.asset-preview-btn:hover {
  background: transparent;
}

.asset a {
  display: block;
  padding: 8px;
  color: var(--primary);
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.image-viewer {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(14px);
}

.image-viewer-panel {
  position: relative;
  z-index: 1;
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: rgba(28, 28, 30, .96);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .34);
}

.image-viewer-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}

.image-viewer-head strong,
.image-viewer-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-head span {
  margin-top: 2px;
  color: rgba(235, 235, 245, .68);
  font-size: 12px;
}

.image-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.image-viewer-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.image-viewer-stage.is-dragging {
  cursor: grabbing;
}

.image-viewer-stage video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, .04);
  pointer-events: none;
}

.image-viewer-stage img {
  position: absolute;
  z-index: 1;
  max-width: none;
  max-height: none;
  object-fit: initial;
  user-select: none;
  pointer-events: auto;
  cursor: grab;
}

.image-viewer-stage.is-dragging img {
  cursor: grabbing;
}

.viewer-control-group {
  height: 34px;
  display: inline-grid;
  grid-template-columns: 32px 32px 50px 32px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .09);
}

.image-viewer-actions .viewer-control {
  appearance: none;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, .92);
  line-height: 0;
  box-shadow: none;
}

.viewer-control-group .viewer-control + .viewer-control,
.viewer-control-group .image-viewer-zoom-label + .viewer-control {
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.image-viewer-actions .viewer-control:hover {
  background: rgba(255, 255, 255, .14);
}

.image-viewer-actions .viewer-control:disabled {
  opacity: .38;
}

.image-viewer-actions .viewer-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .09);
}

.viewer-icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.image-viewer-actions .image-viewer-zoom-label {
  width: 50px;
  min-width: 50px;
  height: 32px;
  display: grid;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  border-left: 1px solid rgba(255, 255, 255, .14);
  color: rgba(235, 235, 245, .78);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.image-nav {
  appearance: none;
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(28, 28, 30, .64);
  color: #fff;
  transform: translateY(-50%);
  box-shadow: none;
}

.image-nav .viewer-icon {
  width: 22px;
  height: 22px;
}

.image-nav:hover {
  background: rgba(255, 255, 255, .18);
}

.image-nav:disabled {
  opacity: .35;
  cursor: default;
}

.image-nav.prev {
  left: 12px;
}

.image-nav.next {
  right: 12px;
}

pre {
  margin: 8px 0 0;
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #1c1c1e;
  color: #f2f2f7;
  white-space: pre-wrap;
}

@media (max-width: 1600px) {
  .top-modules {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .top-modules,
  .monitor-grid,
  .asset-columns,
  .info-columns,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  .asset-grid {
    max-height: none;
  }

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

  .asset-filter-module {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .image-viewer {
    padding: 0;
  }

  .image-viewer-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .image-viewer-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .image-viewer-head > div:first-child {
    min-width: 0;
    flex: 1 1 140px;
  }

  .image-viewer-actions {
    gap: 4px;
  }

  .app {
    padding-left: 0;
  }

  .nav-rail {
    inset: auto 0 0 0;
    left: 0;
    top: auto;
    width: 100%;
    height: 52px;
    flex-direction: row;
    padding: 6px;
    transform: none;
    border-radius: 0;
  }

  .nav-rail:hover,
  .nav-rail:focus-within {
    width: 100%;
  }

  .nav-btn {
    width: auto;
    flex: 1;
    justify-content: center;
  }

  .app-main {
    padding: 12px 12px 64px;
  }

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

  .asset-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 7px 10px;
  }

  .asset-title-summary {
    width: 100%;
  }

  .asset-section-head .table-tools {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .asset-section-head .table-tools::-webkit-scrollbar {
    display: none;
  }

  .asset-identity-module {
    align-items: center;
  }

  .asset-account-actions {
    justify-content: space-between;
  }

  .filter-module {
    grid-template-columns: 1fr;
  }

  .asset-filter-module {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}
