* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.mono { font-family: "JetBrains Mono", Menlo, Consolas, monospace; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c5cdd9; border-radius: 5px; border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: #aab3c2; }
::-webkit-scrollbar-track { background: transparent; }

/* AntD density overrides — match prototype's 26px row height */
.ant-table-cell { padding: 4px 8px !important; font-size: 12px; }
.ant-table-thead > tr > th {
  padding: 5px 8px !important;
  background: var(--bg-row-zebra) !important;
  font-weight: 500;
  border-bottom: 1px solid var(--border) !important;
}
.ant-table-tbody > tr > td { border-bottom: 1px solid #f0f2f5 !important; }
.ant-table-tbody > tr.ant-table-row:hover > td { background: var(--bg-row-hover) !important; }
.ant-table-tbody > tr.ant-table-row-selected > td { background: var(--selected) !important; }

.ant-form-item { margin-bottom: 6px !important; }
.ant-form-item-label > label { font-size: 12px !important; height: 26px !important; }
.ant-form-item .ant-input,
.ant-form-item .ant-select-selector,
.ant-form-item .ant-input-number {
  font-size: 12px !important;
}
.ant-input, .ant-select-selector, .ant-input-number {
  border-radius: 0 !important;
}
.ant-btn { border-radius: 0 !important; }

/* Tab strip styling — matches prototype */
.tab-strip {
  display: flex;
  align-items: stretch;
  background: var(--bg-tab-strip);
  border-bottom: 1px solid var(--border);
  height: 30px;
  flex: none;
  overflow: hidden;
}
.tab-strip .tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  border-right: 1px solid var(--border);
  background: transparent;
  height: 100%;
}
.tab-strip .tab-item.active {
  background: var(--bg-tab-active);
  color: var(--accent-strong);
  border-top: 2px solid var(--accent);
  font-weight: 500;
}
.tab-strip .tab-item .close {
  display: inline-flex;
  width: 14px; height: 14px;
  align-items: center; justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1;
}
.tab-strip .tab-item .close:hover { color: var(--danger); }

/* Light blue toolbar (#eaf1f7) used in UserList & ModuleConfig */
.blue-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  row-gap: 6px;
  padding: 6px 8px;
  background: #eaf1f7;
  border-bottom: 1px solid var(--border);
  flex: none;
}

/* Dark sub-toolbar used in UserDetail */
.dark-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  row-gap: 4px;
  padding: 4px 8px;
  background: var(--bg-toolbar-dark);
  flex: none;
  border-bottom: 1px solid #1a1f2a;
  color: var(--text-on-dark);
}
.dark-toolbar .ant-btn {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--text-on-dark) !important;
  height: 24px !important;
  font-size: 12px !important;
  padding: 0 8px !important;
}
.dark-toolbar .ant-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.25) !important;
  color: #fff !important;
}
.dark-toolbar .ant-btn:disabled {
  color: var(--text-on-dark-muted) !important;
  opacity: 0.5;
}

/* Topbar — full dark navy (#262d3a) bar */
.top-bar {
  height: 36px;
  flex: none;
  background: var(--bg-topbar);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid #1a1f2a;
}
.top-bar .top-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  background: transparent;
  color: var(--text-on-dark);
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.top-bar .top-btn:hover { background: rgba(255,255,255,0.06); }

/* Status bar */
.status-bar {
  height: 22px;
  flex: none;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
}
