:root {
  --bg: #f2f4f7;
  --line: #d9dce3;
  --line-dark: #c9cdd6;
  --text: #1f2937;
  --muted: #6b7280;
  --blue: #2f6feb;
  --blue-dark: #1f55c8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  height: 54px;
  background: #eceef2;
  border-bottom: 1px solid #bfc6d3;
  display: flex;
  align-items: center;
}

.topbar-left,
.topbar-right {
  width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.topbar-right {
  justify-content: flex-end;
  margin-left: auto;
}

.icon-btn {
  border: none;
  background: transparent;
  color: #7b8394;
  cursor: pointer;
  font-size: 13px;
}

.text-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #4b5563;
  border-radius: 6px;
  height: 32px;
  padding: 0 12px;
  cursor: pointer;
}

.workspace {
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
}

.topbar-tab {
  height: 100%;
  min-width: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border-right: 1px solid #d4d8e1;
  border-left: 1px solid #d4d8e1;
  color: #4b5563;
}

.topbar-tab.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.topbar-tab .close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.page-wrap {
  padding: 0 16px 20px;
}

.warehouse-tabs {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: none;
  padding: 0 14px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
}

.warehouse-tab {
  border: none;
  background: transparent;
  color: #374151;
  height: 54px;
  padding: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-size: 30px;
  zoom: 0.5;
}

.warehouse-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.filters-row,
.search-row {
  background: var(--white);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-row {
  border-bottom: 1px solid var(--line);
}

.label {
  color: #374151;
  font-size: 30px;
  zoom: 0.5;
}

.chip {
  height: 32px;
  border-radius: 999px;
  border: 1px solid #d2d8e3;
  background: #fff;
  color: #374151;
  padding: 0 14px;
  cursor: pointer;
}

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

#keywordInput {
  width: min(720px, 100%);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #f6f7fa;
}

.select-input {
  width: 220px;
  max-width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #f6f7fa;
  color: #1f2937;
}

.primary-btn,
.ghost-btn {
  height: 42px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 92px;
  border: 1px solid transparent;
}

.primary-btn {
  background: var(--blue);
  color: #fff;
}

.primary-btn:hover {
  background: var(--blue-dark);
}

.ghost-btn {
  background: #fff;
  color: #4b5563;
  border-color: var(--line);
}

.meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.panel-head {
  height: 50px;
  background: #f0f2f6;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 30px;
  zoom: 0.5;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  font-size: 14px;
}

th {
  background: #f7f8fb;
  white-space: nowrap;
  color: #111827;
}

tbody tr:hover {
  background: #f7faff;
}

td:nth-child(4) {
  color: #2563eb;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 10px;
}

.pagination {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.page-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.page-btn:disabled {
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.page-info {
  color: #6b7280;
  font-size: 13px;
  margin-right: 8px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
}

.auth-overlay[hidden] {
  display: none;
}

.auth-box {
  width: min(380px, calc(100vw - 32px));
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.22);
}

.auth-box h1 {
  margin: 0 0 18px;
  font-size: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.auth-field label {
  color: #374151;
  font-size: 14px;
}

.auth-field input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
}

.password-row {
  position: relative;
}

.password-row input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 42px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--blue);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 8px;
}

.captcha-img {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: #f6f7fa;
  cursor: pointer;
  overflow: hidden;
}

.captcha-img img {
  display: block;
  width: 112px;
  height: 42px;
}

.auth-submit {
  width: 100%;
}

.auth-error {
  min-height: 20px;
  margin-top: 10px;
  color: #dc2626;
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar-left,
  .topbar-right {
    width: auto;
  }

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

  #keywordInput {
    width: 100%;
  }

}
