:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #1a2332;
  --muted: #6b7a90;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2f6fed;
  --accent-hover: #235dda;
  --accent-soft: #e8f0fe;
  --accent-glow: rgba(47, 111, 237, 0.16);
  --accent-mid: #5b8ff9;
  --ok: #0d9f6e;
  --ok-soft: #e6f7f0;
  --warn: #c47d14;
  --warn-soft: #fff6e8;
  --danger: #d14343;
  --danger-soft: #fdeeee;
  --sidebar: #0b1220;
  --sidebar-mid: #121a2b;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(26, 35, 50, 0.04), 0 8px 24px rgba(26, 35, 50, 0.06);
  --shadow-lg: 0 2px 4px rgba(26, 35, 50, 0.04), 0 16px 32px rgba(47, 111, 237, 0.08);
  --side-w: 240px;
  --font: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-display: var(--font);
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;
  --el-font-family: var(--font);
  --el-color-primary: #2f6fed;
  --el-color-primary-light-3: #5b8ff9;
  --el-color-primary-light-5: #8ab0fb;
  --el-color-primary-light-7: #b6cffc;
  --el-color-primary-light-8: #cfe0fd;
  --el-color-primary-light-9: #e8f0fe;
  --el-color-primary-dark-2: #235dda;
  --el-component-size: 32px;
  --el-component-size-small: 28px;
  --control-h: 32px;
  --control-h-sm: 28px;
  --content-max: 1180px;
  --content-max-wide: 1560px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(47, 111, 237, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(13, 159, 110, 0.05), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.layout {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}

.side {
  background: var(--sidebar);
  padding: 16px 12px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  padding: 8px 10px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.brand-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.02em;
}

.nav-group {
  display: grid;
  gap: 3px;
  padding: 4px 2px;
}

.nav-btn {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  cursor: pointer;
  width: 100%;
  transition: background 0.18s ease, color 0.18s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.nav-btn .nav-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
}

.nav-btn .nav-ico svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.nav-btn:hover .nav-ico {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.nav-btn.active {
  background: rgba(47, 111, 237, 0.18);
  color: #fff;
  font-weight: 600;
}

.nav-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-mid);
}

.nav-btn.active .nav-ico {
  background: rgba(47, 111, 237, 0.28);
  color: #93c5fd;
}

.status-row {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-logout {
  margin-top: 8px;
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #94a3b8;
  font: inherit;
  cursor: pointer;
}

.side-logout:hover {
  color: #e2e8f0;
  background: var(--sidebar-hover);
}

.main {
  padding: 18px 22px 28px;
  width: 100%;
  max-width: calc(var(--content-max) + 44px);
  margin-inline: auto;
  min-width: 0;
}

.main:has(.page.active[data-page="orders"]) {
  max-width: calc(var(--content-max-wide) + 44px);
}

.page { display: none; }
.page.active {
  display: block;
  animation: fadeIn 0.28s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  position: relative;
  margin-bottom: 16px;
  padding: 16px 18px 16px 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, rgba(47, 111, 237, 0.07) 0%, rgba(255, 255, 255, 0.8) 42%, rgba(255, 255, 255, 0.55) 100%);
  border: 1px solid rgba(47, 111, 237, 0.12);
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.03);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-mid), var(--accent));
}

.page-header h2 {
  position: relative;
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.page-header p {
  position: relative;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-featured {
  border-color: rgba(47, 111, 237, 0.16);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.04) 0%, transparent 40%),
    linear-gradient(165deg, #ffffff 0%, #f7faff 100%);
  box-shadow: var(--shadow-lg);
}

.hint {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 5px 0 0;
}

.card > .hint {
  margin: 0 0 16px;
}

.hint code {
  background: #eef2f7;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.stat-card {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.stat-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-card-value {
  margin-top: 5px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-card.is-accent {
  border-color: rgba(47, 111, 237, 0.22);
  background: linear-gradient(180deg, #ffffff, var(--accent-soft));
}

.stat-card.is-accent .stat-card-value { color: var(--accent); }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.grid2 .span-2 { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

input, textarea, select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: var(--control-h);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  width: 100%;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px;
}

input[type="number"] { max-width: 180px; }
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #9db7f5;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.poll-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}

.audit-actions {
  flex-wrap: nowrap;
  gap: 18px;
  margin-top: 14px;
}

.poll-toolbar .btn {
  height: var(--control-h);
  min-height: var(--control-h);
}

.poll-toolbar .pill {
  height: var(--control-h);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}

.poll-interval {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}

.poll-interval input {
  width: 88px;
  height: var(--control-h);
  min-height: var(--control-h);
  max-width: none;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.orders-toolbar .orders-q {
  flex: 0 1 280px;
  width: 280px;
  max-width: 100%;
  min-width: 160px;
}

.orders-toolbar select {
  width: auto;
  min-width: 160px;
}

.btn {
  --btn-fg: #3d4d63;
  --btn-bg: #fff;
  --btn-bg-hover: #f4f7fb;
  --btn-bd: #d5dee8;
  --btn-bd-hover: #b7c6d8;
  --btn-shadow: 0 1px 2px rgba(26, 35, 50, 0.05);
  --btn-shadow-hover: 0 6px 14px rgba(26, 35, 50, 0.08);
  --btn-ring: rgba(47, 111, 237, 0.22);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-h);
  padding: 0 14px;
  border: 1px solid var(--btn-bd);
  border-radius: 9px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bd-hover);
  box-shadow: var(--btn-shadow-hover);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: var(--btn-shadow);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-sm {
  height: var(--control-h-sm);
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-primary {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #4b87f6 0%, #2f6fed 100%);
  --btn-bg-hover: linear-gradient(180deg, #3d7af2 0%, #235dda 100%);
  --btn-bd: #2458c9;
  --btn-bd-hover: #1d4cb3;
  --btn-shadow: 0 1px 1px rgba(35, 93, 218, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --btn-shadow-hover: 0 8px 16px rgba(47, 111, 237, 0.28);
  --btn-ring: rgba(47, 111, 237, 0.32);
}

.btn-edit {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #818cf8 0%, #4f46e5 100%);
  --btn-bg-hover: linear-gradient(180deg, #6d76f5 0%, #4338ca 100%);
  --btn-bd: #4338ca;
  --btn-bd-hover: #3730a3;
  --btn-shadow: 0 1px 1px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  --btn-shadow-hover: 0 8px 16px rgba(79, 70, 229, 0.26);
  --btn-ring: rgba(79, 70, 229, 0.32);
}

.btn-danger {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
  --btn-bg-hover: linear-gradient(180deg, #f43f5e 0%, #be123c 100%);
  --btn-bd: #be123c;
  --btn-bd-hover: #9f1239;
  --btn-shadow: 0 1px 1px rgba(225, 29, 72, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  --btn-shadow-hover: 0 8px 16px rgba(225, 29, 72, 0.26);
  --btn-ring: rgba(225, 29, 72, 0.3);
}

.btn-ok {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #22c58b 0%, #0d9f6e 100%);
  --btn-bg-hover: linear-gradient(180deg, #14b87e 0%, #0b8a5e 100%);
  --btn-bd: #0a7d56;
  --btn-bd-hover: #086848;
  --btn-shadow: 0 1px 1px rgba(13, 159, 110, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  --btn-shadow-hover: 0 8px 16px rgba(13, 159, 110, 0.26);
  --btn-ring: rgba(13, 159, 110, 0.3);
}

.btn-warn {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #f0b14a 0%, #d4891a 100%);
  --btn-bg-hover: linear-gradient(180deg, #e6a338 0%, #c47d14 100%);
  --btn-bd: #b56e0e;
  --btn-bd-hover: #9a5d0c;
  --btn-shadow: 0 1px 1px rgba(196, 125, 20, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --btn-shadow-hover: 0 8px 16px rgba(196, 125, 20, 0.26);
  --btn-ring: rgba(196, 125, 20, 0.32);
}

.btn-info {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  --btn-bg-hover: linear-gradient(180deg, #22b4f5 0%, #0369a1 100%);
  --btn-bd: #0369a1;
  --btn-bd-hover: #075985;
  --btn-shadow: 0 1px 1px rgba(2, 132, 199, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --btn-shadow-hover: 0 8px 16px rgba(2, 132, 199, 0.26);
  --btn-ring: rgba(2, 132, 199, 0.32);
}

.btn-teal {
  --btn-fg: #fff;
  --btn-bg: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%);
  --btn-bg-hover: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
  --btn-bd: #0f766e;
  --btn-bd-hover: #115e59;
  --btn-shadow: 0 1px 1px rgba(13, 148, 136, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  --btn-shadow-hover: 0 8px 16px rgba(13, 148, 136, 0.26);
  --btn-ring: rgba(13, 148, 136, 0.3);
}

.ops-cell .btn + .btn {
  margin-left: 6px;
}

.login-submit {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  border-radius: 12px;
  font-size: 15px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(13, 159, 110, 0.22);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(196, 125, 20, 0.22);
}

.pill.bad {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(209, 67, 67, 0.18);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1456b8;
  font-size: 12px;
  font-weight: 600;
}

.tag.off { background: #f2f4f7; color: var(--muted); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag[title] { cursor: help; }

.log-wrap { margin-top: 14px; }
.log-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.log {
  background: #0f172a;
  color: #cbd5e1;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: 12.5px/1.65 var(--font-mono);
  min-height: 280px;
  max-height: 460px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
}

.log .error, .log-error { color: #fca5a5; }
.log .warn { color: #ffd59a; }
.log .info { color: #cbd5e1; }

.table-wrap {
  overflow: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.orders-table-wrap {
  max-height: min(62vh, 640px);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }
.empty { color: #94a3b8; padding: 24px 14px; text-align: center; }

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.ops-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.submit-log-item {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.submit-log-item:first-of-type {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.submit-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.submit-log-head .muted {
  color: #64748b;
  font-size: 12px;
}

.hidden { display: none !important; }

.el-overlay#modal {
  z-index: 2000;
}

#modal-dialog.el-dialog {
  --el-dialog-width: 640px;
  width: min(640px, calc(100% - 32px));
  margin: 12vh auto 40px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.el-dialog__header {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.el-dialog__title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.el-dialog__headerbtn {
  display: grid;
  place-items: center;
}

.el-dialog__body {
  padding: 18px 20px 8px;
}

.el-dialog__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.el-message-box__btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.el-message-box__btns .el-button {
  height: var(--control-h);
  min-height: var(--control-h);
  margin: 0;
  padding: 0 16px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.05);
}

.el-message-box__btns .el-button--default {
  color: #3d4d63;
  background: #fff;
  border-color: #d5dee8;
}

.el-message-box__btns .el-button--default:hover {
  color: #3d4d63;
  background: #f4f7fb;
  border-color: #b7c6d8;
}

.el-message-box__btns .el-button--primary {
  color: #fff;
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
  border-color: #be123c;
  box-shadow: 0 1px 1px rgba(225, 29, 72, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.el-message-box__btns .el-button--primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #f43f5e 0%, #be123c 100%);
  border-color: #9f1239;
}

.el-dialog .grid2 {
  gap: 14px 16px;
}

.el-dialog input,
.el-dialog textarea,
.el-dialog select {
  min-height: 36px;
  border-radius: 8px;
}

.el-dialog input[type="number"] {
  max-width: none;
}

.el-dialog label.check {
  min-height: 36px;
  margin-top: 22px;
}

.el-dialog .hint {
  margin: 0 0 12px;
}

.el-dialog .log {
  min-height: 160px;
  max-height: 360px;
}

.field-combo {
  display: flex;
  gap: 8px;
  align-items: center;
}

.field-combo input,
.field-combo select {
  flex: 1;
  min-width: 0;
}

.field-combo .btn {
  flex-shrink: 0;
}

.el-dialog .field-combo .btn {
  height: 36px;
}

.el-dialog label.check-row {
  margin-top: 4px;
}

.el-dialog #vendor-product-hint,
.el-dialog #gth-product-hint {
  margin: -6px 0 0;
  color: var(--muted);
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.el-overlay#picker {
  z-index: 2200;
}

#picker-dialog.el-dialog {
  --el-dialog-width: 780px;
  width: min(780px, calc(100% - 32px));
  margin: 8vh auto 40px;
}

.picker-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.picker-toolbar input {
  flex: 1;
}

.picker-table {
  max-height: 380px;
  overflow: auto;
}

#picker .pager {
  margin-top: 10px;
}

#callback-url,
#callback-url-page {
  background: #f8fafc;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.cell-clip {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv-table th {
  width: 160px;
  color: var(--muted);
  font-weight: 600;
  vertical-align: top;
  white-space: nowrap;
}

.kv-table td {
  word-break: break-all;
}

.login-locked .layout { display: none; }

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(720px 360px at 12% 8%, rgba(47, 111, 237, 0.16), transparent 62%),
    radial-gradient(640px 320px at 92% 92%, rgba(13, 159, 110, 0.1), transparent 60%),
    #eef3f8;
}

.login-gate[hidden] { display: none; }

.login-shell {
  width: min(960px, 100%);
  min-height: 540px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6edf5;
  box-shadow: 0 18px 50px rgba(26, 35, 50, 0.08);
}

.login-hero {
  position: relative;
  padding: 44px 40px;
  color: #1a2332;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 40%),
    linear-gradient(165deg, #e7f0ff 0%, #f4f8fd 55%, #eef6f3 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.login-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 111, 237, 0.18), transparent 68%);
}

.login-kicker,
.login-hero h2,
.login-hero > p,
.login-points {
  position: relative;
  z-index: 1;
}

.login-kicker {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d5e3f7;
  background: rgba(255, 255, 255, 0.72);
  color: #3d5a80;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.login-hero h2 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #152033;
}

.login-hero > p {
  margin: 0 0 28px;
  max-width: 360px;
  color: #5c6b82;
  font-size: 15px;
  line-height: 1.7;
}

.login-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.login-points li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e3ebf5;
}

.login-points span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e8f0fe;
  color: #2f6fed;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.login-points strong,
.login-points em { display: block; font-style: normal; }
.login-points strong { font-size: 14px; color: #1a2332; }
.login-points em { margin-top: 2px; font-size: 12px; color: #6b7a90; }

.login-card {
  padding: 52px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 24px rgba(47, 111, 237, 0.28);
  margin-bottom: 22px;
}

.login-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.login-card > p {
  margin: 8px 0 28px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.login-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.login-field input {
  height: 48px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 0 14px;
  font-size: 15px;
}

.login-field input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.15);
}

.login-error {
  min-height: 22px;
  margin: 12px 0 0;
  color: #d14343;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .side {
    position: relative;
    height: auto;
    flex-direction: row;
    overflow: auto;
    align-items: center;
  }
  .nav-group { display: flex; }
  .status-row, .brand-sub { display: none; }
  .grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .login-gate { padding: 16px; }
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-hero { padding: 28px 24px 22px; }
  .login-kicker { margin-bottom: 22px; }
  .login-hero h2 { font-size: 32px; }
  .login-card { padding: 28px 22px 22px; }
}
