:root {
  --ink: #17212b;
  --muted: #68737d;
  --line: #dfe4e8;
  --canvas: #eef1f3;
  --surface: #ffffff;
  --nav: #17242b;
  --nav-soft: #24343c;
  --teal: #087f73;
  --teal-dark: #05665d;
  --amber: #d98b16;
  --red: #c34842;
  --green: #16835a;
  --blue: #3272b8;
  --shadow: 0 10px 30px rgba(27, 39, 48, 0.08);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, [role="button"], [role="link"], a[href] { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.icon::before { content: attr(data-icon); }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 228px;
  color: #d9e1e4;
  background: var(--nav);
  border-right: 1px solid #0e181d;
}

.brand {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 22px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 7px;
  font-size: 17px;
  font-weight: 800;
}

.brand-title { font-size: 17px; font-weight: 700; }
.brand-subtitle { margin-top: 2px; color: #8ea0a8; font-size: 10px; text-transform: uppercase; }
.nav-section { padding: 18px 12px 0; }
.nav-caption { padding: 0 11px 8px; color: #74868f; font-size: 11px; }

.nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 3px 0;
  padding: 0 12px;
  border-radius: 5px;
  color: #b9c6cc;
  transition: background .18s, color .18s;
}

.nav-item:hover { color: #fff; background: var(--nav-soft); }
.nav-item.active { color: #fff; background: var(--teal); }
.nav-item .icon { font-size: 15px; }

.main { min-height: 100vh; margin-left: 228px; }
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar-left, .topbar-right, .user-box { display: flex; align-items: center; }
.topbar-left { gap: 14px; }
.topbar-right { gap: 20px; }
.page-context { font-size: 16px; font-weight: 700; }
.context-separator { width: 1px; height: 16px; background: var(--line); }
.context-note { color: var(--muted); font-size: 12px; }
.user-box { gap: 10px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; color: #fff; background: #263943; border-radius: 50%; font-size: 12px; }
.user-meta strong { display: block; font-size: 12px; }
.user-meta span { color: var(--muted); font-size: 10px; }
.menu-toggle { display: none; }

.content { padding: 24px 28px 36px; }
.page-heading { margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 7px; font-size: 23px; line-height: 1.25; }
.page-heading p { margin: 0; color: var(--muted); line-height: 1.6; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title { margin: 0; font-size: 15px; }
.panel-note { margin-top: 4px; color: var(--muted); font-size: 11px; }
.panel-tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #ccd4d9;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: border .18s, background .18s, transform .18s;
}

.btn:hover { background: #f6f8f9; border-color: #aebac1; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.btn-primary:hover { color: #fff; background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-danger { color: var(--red); border-color: #ebc5c2; }
.btn-sm { min-height: 28px; padding: 4px 8px; font-size: 12px; }
.btn-icon { width: 34px; padding: 0; }
.btn .icon { width: 15px; height: 15px; font-size: 13px; }
.btn.menu-toggle { display: none; }

.search-box { position: relative; }
.search-box input { width: 210px; height: 34px; padding: 0 34px 0 11px; border: 1px solid #ccd4d9; border-radius: 5px; outline: none; }
.search-box input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,115,.1); }
.search-box .icon { position: absolute; top: 8px; right: 9px; color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th, .data-table td { padding: 13px 10px; border-bottom: 1px solid #edf0f2; text-align: center; vertical-align: middle; }
.data-table th { color: #4b5962; background: #f7f8f9; font-size: 12px; font-weight: 700; white-space: nowrap; }
.data-table td { color: #334149; font-size: 12px; }
.data-table tbody tr:hover { background: #fbfcfc; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.cell-title { color: var(--ink); font-weight: 700; }
.cell-sub { margin-top: 4px; color: #8b969c; font-size: 10px; }
.actions { display: flex; justify-content: center; align-items: center; gap: 5px; flex-wrap: wrap; }
.action-link { padding: 4px; border: 0; color: var(--blue); background: transparent; cursor: pointer; font-size: 12px; }
.action-link.danger { color: var(--red); }
.action-divider { color: #ccd3d7; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; }
.badge-running { color: var(--green); background: #e7f5ef; }
.badge-idle { color: #71808a; background: #edf0f2; }
.badge-warning { color: #a86a0b; background: #fff1d8; }
.badge-bound { color: var(--blue); background: #e9f1fa; }
.badge-unbound { color: var(--red); background: #faeae9; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.pager-pages { display: flex; gap: 5px; }
.page-btn { min-width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #fff; cursor: pointer; }
.page-btn.active { color: #fff; background: var(--teal); border-color: var(--teal); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; min-height: 132px; padding: 20px; overflow: hidden; }
.stat[role="link"] { cursor: pointer; }
.stat[role="link"]:hover { box-shadow: 0 4px 14px rgba(18, 77, 68, .14); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal); background: #e6f2f0; border-radius: 6px; font-size: 16px; font-weight: 700; }
.stat-value { margin: 12px 0 4px; font-family: Consolas, monospace; font-size: 27px; font-weight: 700; }
.stat-foot { color: var(--muted); font-size: 11px; }
.stat-foot strong { color: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; }
.activity-list { padding: 6px 18px; }
.activity { display: grid; grid-template-columns: 8px 1fr auto; align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf0f2; }
.activity:last-child { border: 0; }
.activity-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--green); }
.activity-dot.warning { background: var(--amber); }
.activity-dot.muted { background: #92a0a8; }
.activity-title { font-size: 12px; font-weight: 700; }
.activity-desc, .activity-time { color: var(--muted); font-size: 11px; }
.activity-desc { margin-top: 4px; }
.system-list { padding: 7px 18px 14px; }
.system-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf0f2; font-size: 12px; }
.system-row:last-child { border: 0; }
.system-row span { color: var(--muted); }
.system-row strong.ok { color: var(--green); }

.dashboard-heading-actions { display: flex; align-items: center; gap: 9px; }
.dashboard-stats .stat { text-align: left; }
.dashboard-stats .stat::after { display: none; }
.dashboard-stats .stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-stats .stat-foot span { white-space: nowrap; }
.dashboard-stats .dashboard-failure-stat.has-failures { border-color: #e5c4c1; border-top-color: var(--red); background: #fffafa; }
.dashboard-stats .dashboard-failure-stat.has-failures .stat-value,
.dashboard-stats .dashboard-failure-stat.has-failures .stat-foot strong { color: var(--red); }
.dashboard-workspace { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, .72fr); align-items: start; gap: 20px; }
.dashboard-side { display: grid; gap: 20px; }
.dashboard-activity-panel { min-width: 0; }
.dashboard-job-head,
.dashboard-job { display: grid; grid-template-columns: minmax(180px, 1.35fr) 100px minmax(210px, 1.25fr) 88px 126px; align-items: center; gap: 12px; }
.dashboard-job-head { min-height: 40px; padding: 0 20px; color: #7b888d; background: #f6f8f7; border-bottom: 1px solid #e4e9e8; font-size: 10px; font-weight: 700; }
.dashboard-job { min-height: 70px; padding: 11px 20px; color: #455258; border-bottom: 1px solid #e9eeee; font-size: 11px; }
.dashboard-job:last-child { border-bottom: 0; }
.dashboard-job:hover { background: #f8fbfa; }
.dashboard-job-name { min-width: 0; }
.dashboard-job-name strong { display: block; overflow: hidden; color: #203037; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-job-name small { display: block; margin-top: 4px; color: #8a979c; font-family: Consolas, monospace; font-size: 9px; }
.dashboard-scope { color: #516168; font-weight: 600; }
.dashboard-job-result { overflow: hidden; color: #59676c; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-job time { color: #7d8a90; font-size: 10px; white-space: nowrap; }
.dashboard-empty { min-height: 330px; display: grid; align-content: center; justify-items: center; gap: 12px; color: #8a969b; font-size: 12px; }
.dashboard-empty a { color: var(--teal); font-weight: 700; }
.dashboard-live { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; font-weight: 700; }
.dashboard-live i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px #e5f3ed; }
.dashboard-health-body { padding: 7px 20px 18px; }
.health-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e9eeee; }
.health-row > div { min-width: 0; }
.health-row span { display: block; color: #35454b; font-size: 12px; font-weight: 700; }
.health-row small { display: block; margin-top: 3px; color: #8a969b; font-size: 9px; }
.health-row strong { color: #26383e; font-family: Consolas, monospace; font-size: 13px; }
.health-row strong.ok { color: var(--green); }
.health-database { border-bottom: 0; }
.health-meter { height: 6px; overflow: hidden; background: #e7eceb; border-radius: 3px; }
.health-meter span { width: 0; height: 100%; display: block; background: var(--green); border-radius: inherit; transition: width .25s ease; }
.shortcut-list { padding: 5px 20px 12px; }
.shortcut-list a { min-height: 58px; display: grid; grid-template-columns: 34px 1fr 14px; align-items: center; gap: 11px; border-bottom: 1px solid #e9eeee; }
.shortcut-list a:last-child { border-bottom: 0; }
.shortcut-list a > .icon { width: 32px; height: 32px; color: var(--teal); background: #edf7f4; border: 1px solid #d6ebe5; border-radius: 4px; font-size: 13px; }
.shortcut-list a > span { min-width: 0; }
.shortcut-list strong { display: block; color: #34444a; font-size: 11px; }
.shortcut-list small { display: block; margin-top: 3px; color: #8b979c; font-size: 9px; }
.shortcut-list b { color: #9aa5a9; font-size: 18px; font-weight: 400; }
.shortcut-list a:hover strong,
.shortcut-list a:hover b { color: var(--teal); }

.empty-state { display: none; padding: 40px 20px; color: var(--muted); text-align: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(9, 19, 24, .62); }
.modal-backdrop.open { display: flex; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 7px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close { width: 31px; height: 31px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 20px; }
.modal-body { padding: 20px; }
.modal-foot { justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #3a4850; font-size: 12px; font-weight: 700; }
.required { color: var(--red); }
.input, .select, .textarea { width: 100%; border: 1px solid #cdd5da; border-radius: 5px; color: var(--ink); background: #fff; outline: none; }
.input, .select { height: 39px; padding: 0 11px; }
.textarea { min-height: 88px; padding: 10px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,115,.1); }
.field-hint { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.radio-row { min-height: 39px; display: flex; align-items: center; gap: 18px; }
.radio { display: inline-flex; align-items: center; gap: 7px; color: #3e4b53; font-size: 12px; cursor: pointer; }
.radio input { accent-color: var(--teal); }
.switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 0 11px; background: #f7f8f9; border: 1px solid var(--line); border-radius: 5px; }
.switch { position: relative; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: #aeb9bf; cursor: pointer; transition: .2s; }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; content: ""; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(16px); }

.toast { position: fixed; top: 50%; left: 50%; z-index: 160; min-width: 260px; max-width: calc(100vw - 32px); padding: 15px 20px; color: #fff; background: #203039; border-top: 3px solid #32b58e; border-radius: 5px; box-shadow: 0 18px 48px rgba(0,0,0,.28); opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.98); pointer-events: none; text-align: center; transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.mobile-nav-backdrop { display: none; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 45%) 1fr; background: #fff; }
.login-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 54px 64px; color: #fff; background: #17262d; overflow: hidden; }
.login-aside::before { position: absolute; inset: auto -80px -130px auto; width: 430px; height: 430px; content: ""; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.login-aside::after { position: absolute; inset: auto 45px -105px auto; width: 260px; height: 260px; content: ""; border: 55px solid rgba(8,127,115,.46); border-radius: 50%; }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-intro { position: relative; z-index: 2; max-width: 470px; }
.login-kicker { color: #5ed0bd; font-size: 12px; font-weight: 700; }
.login-intro h1 { margin: 16px 0 18px; font-size: 36px; line-height: 1.35; }
.login-intro p { margin: 0; color: #aebdc4; line-height: 1.9; }
.login-version { position: relative; z-index: 2; color: #738890; font-size: 11px; }
.login-main { display: grid; place-items: center; padding: 36px; }
.login-box { width: min(390px, 100%); }
.login-box h2 { margin: 0 0 8px; font-size: 26px; }
.login-welcome { margin: 0 0 30px; color: var(--muted); }
.login-field { margin-bottom: 18px; }
.login-field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.login-input-wrap { position: relative; }
.login-input-wrap .icon { position: absolute; left: 12px; top: 11px; color: #8c989e; }
.login-input-wrap .input { height: 43px; padding-left: 39px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 24px; color: var(--muted); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 7px; }
.check input { accent-color: var(--teal); }
.login-submit { width: 100%; min-height: 43px; }
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; align-items: center; }
.captcha-image-button { width: 132px; height: 46px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #f5f8f7; cursor: pointer; }
.captcha-image-button:hover { border-color: var(--teal); }
.captcha-image-button img { display: block; width: 132px; height: 46px; }
.login-tip { margin-top: 20px; padding-top: 17px; color: #94a0a6; border-top: 1px solid var(--line); text-align: center; font-size: 11px; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { height: 60px; padding: 0 16px; }
  .menu-toggle { display: inline-flex; }
  .context-separator, .context-note, .user-meta { display: none; }
  .content { padding: 18px 14px 28px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .panel-tools { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; gap: 11px; }
  .stat { min-height: 112px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .pager { align-items: flex-start; gap: 12px; flex-direction: column; }
  .login-page { display: block; background: #f3f5f6; }
  .login-aside { min-height: 210px; padding: 30px 24px; }
  .login-intro h1 { margin: 24px 0 8px; font-size: 26px; }
  .login-intro p, .login-version { display: none; }
  .login-main { min-height: calc(100vh - 210px); padding: 30px 20px; }
  .login-box { padding: 25px 20px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
}

/* Refined console theme */
:root {
  --ink: #162126;
  --muted: #6f7c81;
  --line: #dfe5e5;
  --canvas: #f2f5f4;
  --surface: #ffffff;
  --nav: #132126;
  --nav-soft: #1d3036;
  --teal: #087d70;
  --teal-dark: #05665c;
  --amber: #c77b0a;
  --red: #bd4541;
  --green: #147b55;
  --blue: #2f6ca8;
  --shadow: 0 2px 3px rgba(21, 35, 40, .02), 0 12px 32px rgba(21, 35, 40, .055);
}

body {
  background-color: var(--canvas);
}

::selection { color: #fff; background: var(--teal); }

.sidebar {
  width: 240px;
  background: #132126;
  border-right: 0;
  box-shadow: 8px 0 24px rgba(13, 27, 32, .08);
}

.brand {
  height: 76px;
  padding: 0 20px;
  gap: 12px;
  border-bottom-color: rgba(255, 255, 255, .075);
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 5px;
  background: var(--teal);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  font-family: Georgia, serif;
  font-size: 19px;
}

.brand-mark::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  content: "";
  background: #75decb;
  border-radius: 50%;
}

.brand-title { font-size: 16px; }
.brand-subtitle { color: #789097; letter-spacing: 1.2px; }
.nav-section { padding: 22px 13px 0; }
.nav-caption { padding: 0 12px 9px; color: #71858b; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }

.nav-item {
  position: relative;
  min-height: 44px;
  gap: 11px;
  margin: 4px 0;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #b1c0c4;
  font-size: 13px;
  font-weight: 600;
}

.nav-item:hover { color: #eef7f5; background: #1a2c31; border-color: rgba(255,255,255,.045); }
.nav-item.active {
  color: #fff;
  background: #087d70;
  border-color: #159184;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .18);
}

.nav-item.active::after {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 5px;
  height: 5px;
  content: "";
  background: #a7f0e3;
  border-radius: 50%;
  transform: translateY(-50%);
}

.nav-item .icon {
  width: 24px;
  height: 24px;
  color: #8fa4aa;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  background: rgba(255,255,255,.035);
  font-size: 12px;
}

.nav-item.active .icon { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.09); }
.main {
  width: calc(100% - 240px);
  min-width: 0;
  margin-left: 240px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .96);
  border-bottom-color: #dfe5e5;
  box-shadow: 0 2px 10px rgba(23, 37, 42, .025);
  backdrop-filter: blur(12px);
}

.topbar-left { gap: 12px; }
.page-context { font-size: 15px; }
.context-separator { height: 20px; }
.context-note { position: relative; padding-left: 13px; }
.context-note::before { position: absolute; top: 5px; left: 0; width: 5px; height: 5px; content: ""; background: #28a67e; border-radius: 50%; box-shadow: 0 0 0 3px #e4f3ed; }
.user-box { min-height: 43px; padding: 5px 8px 5px 6px; border: 1px solid #e3e8e8; border-radius: 5px; background: #f8faf9; }
.avatar { width: 30px; height: 30px; background: #26383e; border-radius: 4px; }
.user-meta { padding-right: 3px; }
.user-meta strong { font-size: 11px; }
.user-meta span { font-size: 9px; }

.content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 26px 28px 40px;
}
.page-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 55px; margin-bottom: 24px; padding-left: 15px; }
.page-heading::before { position: absolute; inset: 2px auto 2px 0; width: 4px; content: ""; background: var(--teal); border-radius: 1px; }
.page-heading h1 { margin-bottom: 6px; font-size: 24px; font-weight: 750; }
.page-heading p { font-size: 12px; }

.heading-status {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid #dce3e2;
  border-radius: 5px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 4px 15px rgba(22, 36, 41, .035);
}

.heading-status-item { position: relative; min-width: 66px; text-align: right; }
.heading-status-item + .heading-status-item::before { position: absolute; top: 3px; bottom: 3px; left: -10px; width: 1px; content: ""; background: #e0e5e5; }
.heading-status-item span { display: block; margin-bottom: 3px; color: #829095; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.heading-status-item strong { color: #26353a; font-family: Consolas, monospace; font-size: 13px; }
.heading-status-item strong.live { color: var(--green); }

.panel {
  border-color: #dfe5e5;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 70px;
  padding: 15px 20px;
  background: #fff;
}

.panel-title { position: relative; padding-left: 12px; font-size: 14px; }
.panel-title::before { position: absolute; top: 1px; bottom: 1px; left: 0; width: 3px; content: ""; background: var(--teal); }
.panel-note { margin: 5px 0 0 12px; color: #849095; }

.btn {
  min-height: 36px;
  padding: 7px 14px;
  border-color: #ccd5d6;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(20, 34, 39, .03);
  font-size: 12px;
  transition: border-color .18s, background .18s, color .18s, box-shadow .18s, transform .18s;
}

.btn:hover { background: #f5f8f7; border-color: #9dacab; box-shadow: 0 4px 12px rgba(23, 38, 43, .07); }
.btn-primary { background: #087d70; border-color: #087d70; box-shadow: 0 5px 12px rgba(8, 125, 112, .18); }
.btn-primary:hover { background: #066b61; border-color: #066b61; box-shadow: 0 7px 16px rgba(8, 125, 112, .24); }
.btn-sm { min-height: 29px; padding: 4px 9px; border-color: #d7dede; background: #fbfcfc; font-size: 11px; }
.btn-sm:hover { color: var(--teal); border-color: #86bcb5; background: #f0f8f6; }
.btn-icon { width: 36px; }

.search-box input { width: 228px; height: 36px; padding-left: 13px; color: #243238; background: #f8faf9; border-color: #d8dfdf; border-radius: 4px; transition: width .2s, border-color .2s, box-shadow .2s, background .2s; }
.search-box input:focus { width: 250px; background: #fff; }

.table-wrap { background: #fff; }
.data-table { min-width: 960px; }
.data-table th, .data-table td { padding: 15px 11px; }
.data-table th {
  height: 45px;
  color: #59676c;
  background: #f5f7f6;
  border-top: 1px solid #edf0ef;
  border-bottom-color: #dfe5e5;
  font-size: 11px;
  letter-spacing: .2px;
}

.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 18px; }
.data-table td { color: #455258; border-bottom-color: #e9eeee; }
.data-table tbody tr { transition: background .15s, box-shadow .15s; }
.data-table tbody tr:nth-child(even) { background: #fcfdfd; }
.data-table tbody tr:hover { position: relative; background: #f3f9f7; box-shadow: inset 3px 0 0 var(--teal); }
.data-table td:first-child { color: #7a888d; font-family: Consolas, monospace; font-size: 11px; }
.cell-title { color: #17262b; font-size: 12px; }
.cell-sub { color: #8c999d; }

.badge { min-height: 25px; padding: 4px 8px; border: 1px solid transparent; border-radius: 3px; font-size: 10px; }
.badge::before { width: 5px; height: 5px; }
.badge-running { border-color: #c9e9db; background: #edf8f3; }
.badge-idle { border-color: #dce2e4; background: #f2f4f5; }
.badge-warning { border-color: #f0ddb9; background: #fff7e8; }
.badge-bound { border-color: #cbddee; background: #f0f6fb; }
.badge-unbound { border-color: #efd2cf; background: #fdf1f0; }
.action-link { position: relative; padding: 4px 3px; font-weight: 600; }
.action-link::after { position: absolute; right: 3px; bottom: 1px; left: 3px; height: 1px; content: ""; background: currentColor; transform: scaleX(0); transition: transform .18s; }
.action-link:hover::after { transform: scaleX(1); }
.pager { min-height: 58px; padding: 14px 20px; background: #fafbfb; }
.page-btn { border-radius: 3px; }
.page-btn:disabled { opacity: .45; cursor: default; }

.stats-grid { gap: 18px; margin-bottom: 22px; }
.stat { min-height: 145px; padding: 21px 22px; border-top: 3px solid #087d70; }
.stat:nth-child(2) { border-top-color: #3272a5; }
.stat:nth-child(3) { border-top-color: #b97a19; }
.stat:nth-child(4) { border-top-color: #b54a46; }
.stat::after { position: absolute; right: -18px; bottom: -38px; width: 94px; height: 94px; content: ""; border: 18px solid rgba(20, 39, 45, .035); transform: rotate(18deg); }
.stat-top { position: relative; z-index: 1; }
.stat-label { color: #627075; font-weight: 700; }
.stat-icon { width: 38px; height: 38px; border: 1px solid #d7ebe7; border-radius: 4px; background: #eef7f5; }
.stat:nth-child(2) .stat-icon { color: #3272a5; border-color: #d6e3ee; background: #f0f5f9; }
.stat:nth-child(3) .stat-icon { color: #a76a10; border-color: #ecdfc9; background: #faf6ee; }
.stat:nth-child(4) .stat-icon { color: #b54a46; border-color: #ecd5d3; background: #faf1f0; }
.stat-value { position: relative; z-index: 1; margin-top: 15px; font-size: 29px; }
.stat-foot { position: relative; z-index: 1; }
.dashboard-grid { gap: 20px; }
.activity-list { padding: 8px 20px; }
.activity { grid-template-columns: 9px 1fr auto; padding: 16px 0; }
.activity-dot { box-shadow: 0 0 0 4px #e6f3ed; }
.activity-dot.warning { box-shadow: 0 0 0 4px #fcf1dd; }
.activity-dot.muted { box-shadow: 0 0 0 4px #eef1f2; }
.activity-title { color: #26353a; }
.system-list { padding: 8px 20px 16px; }
.system-row { padding: 13px 0; }

.modal-backdrop { background: rgba(10, 23, 28, .72); backdrop-filter: blur(3px); }
.modal-backdrop.modal-secondary { z-index: 100; background: rgba(8, 19, 23, .58); }
.modal-wide { width: min(820px, 100%); }
.modal-task { width: min(980px, 100%); }
.mode-switch { display: inline-flex; align-items: center; min-height: 38px; padding: 3px; border: 1px solid #cfd9d7; border-radius: 4px; background: #f5f8f7; gap: 3px; }
.mode-option { border: 0; border-radius: 3px; padding: 8px 14px; color: #6f7d80; background: transparent; cursor: pointer; font: inherit; }
.mode-option.active { color: #fff; background: var(--teal); }
.modal { border: 1px solid rgba(255,255,255,.25); border-radius: 6px; box-shadow: 0 30px 90px rgba(0,0,0,.32); animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { position: relative; min-height: 65px; padding: 17px 21px; background: #f8faf9; }
.modal-head::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; content: ""; background: var(--teal); }
.modal-head h2 { padding-left: 12px; border-left: 3px solid var(--teal); font-size: 16px; }
.modal-close { border-radius: 4px; transition: color .18s, background .18s; }
.modal-close:hover { color: var(--red); background: #f8e9e8; }
.modal-body { padding: 23px 22px; }
.modal-foot { min-height: 65px; padding: 14px 21px; background: #fafbfb; }
.task-log-summary { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.task-log-list { display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; }
.task-log-item { padding: 13px 15px; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px; background: #fffafa; }
.task-log-item-head { display: flex; align-items: center; gap: 9px; min-height: 24px; }
.task-log-item-head strong { color: var(--ink); font-size: 13px; }
.task-log-item-head time { margin-left: auto; color: var(--muted); font-size: 12px; }
.task-log-message { margin-top: 8px; color: var(--ink); font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.download-failure-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; margin-top: 8px; color: #4c5a60; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.download-failure-line b, .task-log-message b { color: #27383f; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.download-failure-line span { overflow-wrap: anywhere; }
.task-progress { display: grid; gap: 6px; min-width: 105px; color: var(--ink); font-size: 12px; }
.task-progress i { display: block; width: 100%; height: 5px; overflow: hidden; border-radius: 3px; background: #e3e8e8; }
.task-progress b { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .2s ease; }
.task-operation { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; min-width: 150px; margin: 0 auto; }
#taskTable th:last-child, #taskTable td:last-child { text-align: center; }
#taskTable .task-progress span { text-align: center; }
.field label { color: #3c4a4f; }
.input, .select, .textarea { border-color: #ced7d7; border-radius: 4px; background-color: #fbfcfc; transition: border-color .18s, box-shadow .18s, background .18s; }
.input:focus, .select:focus, .textarea:focus { background: #fff; }
.switch-row { border-radius: 4px; background: #f5f7f6; }

.toast { border-radius: 4px; background: #17282d; box-shadow: 0 18px 45px rgba(0,0,0,.25); }

.binding-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #dce3e2;
  border-radius: 4px;
  background: #f6f8f7;
}

.binding-entry strong { display: block; margin-bottom: 4px; color: #344348; font-size: 12px; }
.binding-entry span { color: #7d898e; font-size: 10px; }
.binding-entry-copy { min-width: 0; flex: 1; }
.binding-entry-actions { display: flex; align-items: center; gap: 7px; }
.binding-add-table { width: 38px; min-width: 38px; padding: 0; }
.table-binding-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.table-binding-item { display: inline-flex; align-items: stretch; border: 1px solid #d6dfdd; border-radius: 3px; overflow: hidden; background: #fff; }
.table-binding-item button { min-height: 28px; padding: 4px 8px; border: 0; color: #405156; background: transparent; cursor: pointer; font: inherit; font-size: 10px; }
.table-binding-item button:first-child:hover { background: #edf6f3; }
.table-binding-item button span { margin-right: 5px; color: var(--teal); font-size: 9px; }
.table-binding-item .table-binding-remove { width: 28px; padding: 0; border-left: 1px solid #e0e6e5; color: #a15854; font-size: 15px; }
.table-binding-item .table-binding-remove:hover { background: #faeeee; }
.binding-status.configured { color: var(--green); }
.binding-context { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.4fr) auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 11px 13px; border: 1px solid #dce5e3; border-left: 3px solid var(--teal); background: #f3f8f6; }
.binding-context-database { align-self: center; }
.binding-table-field { margin: 0; }
.binding-context > .btn { min-height: 39px; }
.binding-context-label { color: #78858a; font-size: 10px; }
.binding-context strong { display: block; margin-top: 3px; color: #26363a; font-size: 12px; }
.mapping-block { border: 1px solid #dde4e3; border-radius: 4px; overflow: hidden; }
.mapping-head { display: grid; grid-template-columns: minmax(130px, 1fr) 24px minmax(145px, 1fr) minmax(150px, 1fr) 32px; gap: 8px; padding: 10px 12px; color: #67757a; background: #f2f5f4; border-bottom: 1px solid #dde4e3; font-size: 10px; font-weight: 700; text-align: center; }
.mapping-rows { padding: 4px 12px; }
.mapping-row { display: grid; grid-template-columns: minmax(130px, 1fr) 24px minmax(145px, 1fr) minmax(150px, 1fr) 32px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #edf0ef; }
.mapping-row:last-child { border-bottom: 0; }
.mapping-source { display: grid; grid-template-columns: 1fr; gap: 5px; }
.mapping-source-note { min-height: 32px; display: flex; align-items: center; padding: 0 9px; color: #758287; background: #f3f6f5; border: 1px dashed #d4dcdb; font-size: 10px; }
.rule-editor-block { margin-top: 14px; border: 1px solid #dde4e3; border-radius: 4px; overflow: hidden; background: #fff; }
.rule-editor-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #526168; background: #f3f6f5; border-bottom: 1px solid #dde4e3; font-size: 11px; }
.rule-editor-head span { color: #7d898e; font-size: 10px; }
.rule-editor-head .btn { margin-left: auto; white-space: nowrap; }
.rule-field-head, .rule-field-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.25fr) minmax(0, .6fr) minmax(0, 1fr) minmax(0, .7fr) 30px; gap: 6px; align-items: center; padding: 7px 10px; }
.rule-field-head { color: #67757a; background: #f8faf9; border-bottom: 1px solid #edf0ef; font-size: 10px; font-weight: 700; text-align: center; }
.rule-field-row { border-bottom: 1px solid #edf0ef; }
.rule-field-replacements { grid-column: 1 / -1; min-height: 42px; resize: vertical; }
.rule-field-row .input, .rule-field-row .select { min-width: 0; }
.rule-field-row:last-child, .rule-replace-row:last-child { border-bottom: 0; }
.rule-replace-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #edf0ef; }
.rule-replace-row .input { min-width: 0; }
.rule-editor-block code { color: #367b73; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.rule-editor-empty { padding: 12px; color: #8a9699; font-size: 10px; text-align: center; }
.rule-remove { width: 28px; height: 28px; padding: 0; border: 0; color: #a15854; background: transparent; cursor: pointer; font-size: 16px; }
.rule-remove:hover { background: #faeeee; }
.rule-stepper { display: flex; gap: 6px; padding: 10px 18px 0; border-bottom: 1px solid #e1e7e5; background: #fbfcfc; }
.rule-step { padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; color: #7a878b; background: transparent; cursor: pointer; font: inherit; font-size: 11px; }
.rule-step.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 700; }
.random-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.random-range span { color: #7d898e; font-size: 10px; }
.fixed-json { display: grid; grid-template-columns: minmax(80px, .8fr) minmax(100px, 1fr); gap: 5px; }
.task-actions { display: flex; flex-wrap: nowrap; justify-content: center; gap: 4px; white-space: nowrap; }
.task-actions .btn { padding: 6px 8px; font-size: 11px; }
.image-options { margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); background: #fafcfb; }
.image-options-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.image-options-grid > .field.full { grid-column: 1 / -1 !important; }
.image-options-grid > .field:not(.full) { grid-column: auto !important; min-width: 0; }
.image-options-grid > .field:not(.full) > label { white-space: nowrap; }
.category-binding-tools { display: flex; justify-content: center; padding: 10px; border-top: 1px solid #e2e7e6; background: #fafbfb; }
.category-map-row .category-remove { width: 28px; height: 28px; }
.mapping-fixed.compact { min-height: 30px; }
.category-target-manual { display: grid; grid-template-columns: minmax(80px, .65fr) 1fr; gap: 6px; }
.toast.toast-error { background: #8e302c; }
.database-test-result { margin: 0 20px 4px; padding: 10px 12px; border: 1px solid #cfd9dc; border-radius: 4px; color: #40545b; background: #f4f7f7; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.database-test-result.testing { border-color: #c8d9dc; color: #486269; background: #f1f6f7; }
.database-test-result.success { border-color: #b8ddd1; color: #166b59; background: #edf8f4; }
.database-test-result.error { border-color: #e3c2bf; color: #963c37; background: #fbf1f0; }
.modal-database-command { width: min(940px, 100%); }
.database-command-context { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.database-command-list { display: grid; }
.database-command-row { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(150px, 1fr) minmax(150px, 1fr) auto minmax(130px, .75fr); align-items: end; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.database-command-row:last-child { padding-bottom: 0; border-bottom: 0; }
.database-command-title { align-self: center; min-width: 0; }
.database-command-title strong { display: block; color: var(--ink); font-size: 13px; }
.database-command-title span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.database-command-row .command-value-field { grid-column: 2 / span 2; }
.database-command-table-note { grid-column: 2 / span 2; align-self: center; padding: 10px 12px; color: #8f4b47; border: 1px solid #ebcfcc; background: #fff5f4; font-size: 11px; line-height: 1.5; }
.database-command-run { min-width: 68px; }
.database-command-result { align-self: center; min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.database-command-result.success { color: var(--green); }
.database-command-result.error { color: var(--red); }
.mapping-arrow { color: var(--teal); text-align: center; font-weight: 700; }
.mapping-remove { width: 28px; height: 28px; padding: 0; border: 0; color: #a16b68; background: transparent; cursor: pointer; }
.mapping-remove:hover { color: var(--red); background: #faeeee; }
.mapping-add { display: flex; justify-content: center; padding: 11px; border-top: 1px solid #e2e7e6; background: #fafbfb; }
.identity-panel { margin-top: 18px; padding: 15px; border: 1px solid #dce3e2; border-radius: 4px; background: #fbfcfc; }
.identity-title { margin-bottom: 11px; color: #344348; font-size: 12px; font-weight: 700; }
.identity-title span { margin-left: 6px; color: #889499; font-size: 10px; font-weight: 400; }
.identity-grid { display: grid; grid-template-columns: 1fr 32px 1fr; align-items: end; gap: 9px; }
.identity-connector { padding-bottom: 11px; color: var(--teal); text-align: center; font-weight: 700; }
.mapping-hint { margin-top: 10px; }
.task-form { display: grid; gap: 15px; background: #f4f6f5; }
.form-section { padding: 17px; border: 1px solid #dce3e2; border-radius: 4px; background: #fff; }
.form-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e8eceb; }
.form-section-head > span { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 3px; font-family: Consolas, monospace; font-size: 10px; }
.form-section-head strong { display: block; color: #2e3d42; font-size: 12px; }
.form-section-head small { display: block; margin-top: 3px; color: #889498; font-size: 9px; }
.form-grid-three { grid-template-columns: 1.25fr 1fr 1fr; }
.task-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.task-info-grid .task-name-field { grid-column: span 2; }
.play-separator-field[hidden] { display: none; }
.play-separator-field .input:disabled { cursor: not-allowed; background: #eef1f0; }
.readonly-control { height: 39px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #d5dddc; border-radius: 4px; background: #f7f9f8; }
.readonly-control small { color: #849095; font-size: 10px; }
.schedule-interval-field { display: none; }
.schedule-interval-field.visible { display: block; }
.number-unit { position: relative; }
.number-unit .input { padding-right: 48px; }
.number-unit span { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 43px; display: grid; place-items: center; color: #68767b; background: #edf1f0; border-left: 1px solid #d6dddc; font-size: 11px; }
.category-bind { border-style: solid; cursor: pointer; font-family: inherit; }
.category-bind:hover { filter: brightness(.96); box-shadow: 0 3px 9px rgba(22, 36, 41, .1); }
.category-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; padding: 13px 14px; border: 1px solid #dce3e2; background: #f7f9f8; }
.category-toolbar strong { display: block; margin-bottom: 4px; color: #26363a; font-size: 13px; }
.category-toolbar span { color: #7f8c90; font-size: 10px; }
.category-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.category-columns > section { overflow: hidden; border: 1px solid #dce3e2; border-radius: 4px; }
.category-column-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; color: #344348; background: #f2f5f4; border-bottom: 1px solid #dce3e2; font-size: 11px; font-weight: 700; }
.category-column-head small { color: #829095; font-weight: 400; }
.category-list { min-height: 154px; max-height: 220px; overflow-y: auto; padding: 8px 12px; }
.category-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px; border-bottom: 1px solid #edf1f0; color: #3d4b50; font-size: 11px; }
.category-item:last-child { border-bottom: 0; }
.category-item code { color: #839095; font-size: 10px; }
.category-placeholder { display: grid; min-height: 136px; place-items: center; padding: 20px; color: #929da1; text-align: center; font-size: 11px; }
.category-mapping { margin-top: 16px; border: 1px solid #dce3e2; border-radius: 4px; }
.category-map-head, .category-map-row { display: grid; grid-template-columns: minmax(170px, 1fr) 30px minmax(240px, 1.4fr) 36px; align-items: center; gap: 8px; }
.category-map-head { padding: 9px 12px; color: #6e7b80; background: #f2f5f4; font-size: 10px; font-weight: 700; text-align: center; }
.category-map-row { padding: 8px 12px; border-top: 1px solid #edf0ef; }
.category-map-row .input { display: flex; align-items: center; }
.category-map-row > .input:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-map-row .category-target, .category-map-row .category-target-control, .category-map-row .category-target-manual { min-width: 0; }
.category-map-row .category-target-manual { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px; }
.category-map-row .category-remove { justify-self: end; flex: 0 0 28px; }
.category-map-row .category-id-input { width: 100%; text-align: center; }
.region-match { margin-bottom: 16px; padding: 14px; border: 1px solid #dce3e2; border-radius: 4px; background: #f8faf9; }
.region-match-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.region-match-title > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.region-match-title strong { color: #344348; font-size: 12px; }
.region-match-title span { color: #859196; font-size: 10px; }
.primary-category-switch { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.primary-category-switch > span { color: #425258; font-size: 11px; font-weight: 600; }
.primary-category-match { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e3e9e7; }
.primary-category-match[hidden] { display: none; }
.primary-category-match .field { max-width: 360px; }
.region-match-fields { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)) auto; align-items: end; gap: 10px; }
.region-match-fields .btn { min-height: 39px; }
.cron-code { display: inline-block; padding: 5px 8px; color: #3e555c; background: #edf2f1; border: 1px solid #dbe3e1; border-radius: 3px; font-family: Consolas, monospace; font-size: 11px; }
.schedule-summary { display: flex; align-items: center; justify-content: center; gap: 6px; color: #56666b; }
.schedule-summary .icon { color: var(--teal); }

.login-page { background: #eef2f1; }
.login-aside {
  padding: 52px 64px;
  background-color: #142429;
}

.login-aside::before {
  inset: 76px 48px auto auto;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(100, 215, 194, .25);
  border-radius: 0;
  transform: rotate(45deg);
}

.login-aside::after {
  inset: auto 64px 66px auto;
  width: 76px;
  height: 76px;
  border: 0;
  border-right: 1px solid rgba(100, 215, 194, .3);
  border-bottom: 1px solid rgba(100, 215, 194, .3);
  border-radius: 0;
  background: transparent;
}

.login-brand .brand-mark { box-shadow: 0 8px 25px rgba(0,0,0,.25); }
.login-intro { padding-left: 20px; border-left: 3px solid var(--teal); }
.login-kicker { color: #71d8c5; letter-spacing: 1.5px; }
.login-intro h1 { max-width: 390px; margin: 18px 0 15px; font-size: 38px; }
.login-intro p { max-width: 430px; color: #a8b9bd; }
.login-version { display: inline-flex; width: fit-content; padding: 7px 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.025); }
.login-main { position: relative; background: #f5f7f6; }
.login-main::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; content: ""; background: var(--teal); }
.login-box { width: min(405px, 100%); padding: 39px 38px 34px; background: #fff; border: 1px solid #dce3e2; border-radius: 6px; box-shadow: 0 20px 55px rgba(20, 36, 41, .1); }
.login-box h2 { position: relative; padding-top: 16px; font-size: 25px; }
.login-box h2::before { position: absolute; top: 0; left: 0; width: 34px; height: 3px; content: ""; background: var(--teal); }
.login-welcome { margin-bottom: 28px; font-size: 12px; }
.login-input-wrap .input { height: 44px; background: #f8faf9; }
.login-input-wrap .input:focus { background: #fff; }
.login-submit { min-height: 44px; }
.login-tip { margin-top: 22px; padding: 13px; border: 1px dashed #d6dede; background: #fafbfb; }

@media (max-width: 1200px) {
  .sidebar { width: 220px; }
  .main { width: calc(100% - 220px); margin-left: 220px; }
  .content { padding-right: 20px; padding-left: 20px; }
  .dashboard-workspace { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { background-image: none; }
  .sidebar { width: 238px; }
  .sidebar.open { box-shadow: 18px 0 55px rgba(6, 18, 22, .3); }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: rgba(8, 20, 24, .58);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(2px);
    transition: opacity .22s, visibility .22s;
  }
  body.nav-open .mobile-nav-backdrop { opacity: 1; visibility: visible; }
  .main { width: 100%; margin-left: 0; }
  .topbar { height: 62px; padding: 0 14px; }
  .btn.menu-toggle { display: inline-flex; }
  .content { padding: 20px 14px 30px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 21px; }
  .dashboard-heading > div:first-child { width: 100%; min-width: 0; }
  .dashboard-heading p { overflow-wrap: anywhere; }
  .dashboard-heading-actions { width: 100%; max-width: 100%; display: grid; grid-template-columns: 1fr; }
  .dashboard-heading-actions .btn { min-width: 0; padding-right: 8px; padding-left: 8px; }
  .heading-status { width: 100%; justify-content: space-between; }
  .heading-status-item { flex: 1; text-align: left; }
  .heading-status-item + .heading-status-item::before { left: -10px; }
  .panel-head { min-height: auto; padding: 15px; }
  .panel-tools { align-items: stretch; }
  .panel-tools > .btn { min-height: 36px; }
  .search-box input, .search-box input:focus { width: 100%; }
  .stat { min-height: 122px; }
  .dashboard-stats .stat-foot { align-items: flex-start; flex-direction: column; gap: 4px; }
  .dashboard-side { grid-template-columns: 1fr; }
  .dashboard-job-head { display: none; }
  .dashboard-job { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 15px; }
  .dashboard-job > div:nth-child(2) { grid-column: 1; }
  .dashboard-job > div:nth-child(3) { grid-column: 1; }
  .dashboard-job > div:nth-child(4) { grid-column: 2; grid-row: 1; }
  .dashboard-job time { grid-column: 2; grid-row: 2 / span 2; align-self: end; text-align: right; }
  .dashboard-empty { min-height: 220px; }
  .data-table th, .data-table td { padding-top: 13px; padding-bottom: 13px; }
  .login-aside { min-height: 218px; padding: 27px 24px; }
  .login-intro { margin-top: 24px; padding-left: 14px; }
  .login-intro h1 { margin: 12px 0 0; font-size: 25px; }
  .login-main { min-height: calc(100vh - 218px); padding: 24px 16px; }
  .login-box { padding: 28px 22px 24px; }
  .binding-entry { align-items: flex-start; flex-direction: column; }
  .binding-entry-actions { width: 100%; }
  .binding-entry-actions .btn:not(.binding-add-table) { flex: 1; }
  .binding-context { grid-template-columns: 1fr; }
  .mapping-head { display: none; }
  .rule-editor-head { align-items: flex-start; flex-wrap: wrap; }
  .rule-stepper { overflow-x: auto; padding-left: 10px; padding-right: 10px; }
  .rule-step { white-space: nowrap; }
  .rule-editor-head .btn { margin-left: 0; }
  .rule-field-head { display: none; }
  .rule-field-row { grid-template-columns: 1fr 1fr; }
  .rule-field-row .rule-remove { grid-column: 2; justify-self: end; }
  .rule-replace-row { grid-template-columns: minmax(0, 1fr) 30px; }
  .rule-replace-row .rule-replace-value { grid-column: 1; }
  .rule-replace-row .rule-remove { grid-column: 2; grid-row: 1 / span 2; }
  .mapping-row { grid-template-columns: 1fr 24px; }
  .mapping-row .mapping-source, .mapping-row .mapping-database, .mapping-row .crawler-identity { grid-column: 1; }
  .mapping-row .select:first-child, .mapping-row .select:nth-child(3), .mapping-row .crawler-identity { grid-column: 1; }
  .mapping-row .mapping-arrow { grid-column: 1; transform: rotate(90deg); }
  .mapping-row .mapping-remove { grid-column: 2; grid-row: 1 / span 4; }
  .identity-grid { grid-template-columns: 1fr; }
  .identity-connector { padding: 0; transform: rotate(90deg); }
  .category-toolbar { align-items: stretch; flex-direction: column; }
  .category-toolbar .panel-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .category-columns { grid-template-columns: 1fr; }
  .region-match-title, .region-match-title > div:first-child { align-items: flex-start; flex-direction: column; }
  .region-match-fields { grid-template-columns: 1fr; }
  .region-match-fields .btn { width: 100%; }
  .category-map-head, .category-map-row { min-width: 620px; grid-template-columns: minmax(150px, 1fr) 24px minmax(280px, 1.5fr) 36px; }
  .form-grid-three { grid-template-columns: 1fr; }
  .database-command-context, .database-command-row { grid-template-columns: 1fr; }
  .database-command-row .command-value-field { grid-column: auto; }
  .database-command-table-note { grid-column: auto; }
  .database-command-run { width: 100%; }
  .task-info-grid .task-name-field { grid-column: auto; }
}
 .error-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; background: #f5f7f6; color: #26332f; text-align: center; }
 .error-page .error-code { font-size: 112px; line-height: 1; font-weight: 800; letter-spacing: 2px; color: #1f8068; }
 .error-page h1 { margin: 0; font-size: 28px; }
 .error-page p { margin: 0 0 12px; color: #718079; }
