/* Compact enterprise admin density, closer to traditional operations consoles. */
body {
  font-size: 12px;
}

.topbar,
.subpage-layout .topbar {
  height: 42px;
  padding: 0 12px;
}

.subpage-layout .breadcrumb {
  font-size: 12px;
}

h1 {
  font-size: 18px;
}

h2,
.panel-title {
  font-size: 14px;
}

h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.topbar-actions {
  gap: 8px;
}

.bell-button,
.topbar-icon-button,
.icon-button {
  width: 28px;
  height: 28px;
}

.role-switcher {
  height: 28px;
  gap: 5px;
  font-size: 12px;
}

.user-chip {
  width: 164px;
  min-width: 164px;
  max-width: 164px;
  grid-template-columns: 28px 1fr;
  gap: 8px;
}

.avatar-dot {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.user-chip strong {
  font-size: 12px;
}

.user-chip span {
  font-size: 11px;
}

.page-content,
.subpage-layout .page-content {
  padding: 7px 8px 40px;
}

.toolbar {
  margin-bottom: 8px;
}

.actions {
  gap: 5px;
}

.panel {
  margin-bottom: 7px;
  border-radius: 2px;
}

.panel-header {
  min-height: 36px;
  padding: 6px 10px;
}

.panel-subtitle {
  margin-top: 2px;
  font-size: 12px;
}

.panel-body {
  padding: 10px;
}

.metric-grid {
  gap: 8px;
  margin-bottom: 8px;
}

.metric-card {
  min-height: 72px;
  padding: 10px 12px;
}

.metric-card span {
  font-size: 12px;
}

.metric-card strong {
  margin-top: 8px;
  font-size: 24px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 8px;
}

.quick-action-card {
  min-height: 0;
}

.quick-action-list {
  gap: 6px;
}

.quick-action-list .primary-button,
.quick-action-list .secondary-button {
  min-height: 32px;
  font-size: 13px;
}

.filter-panel {
  padding: 8px 10px;
  border: 1px solid var(--line);
}

.filter-panel::before {
  content: "查询条件";
  display: block;
  margin: -1px 0 7px;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 7px 12px;
  align-items: center;
}

.field {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
}

.field span {
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.field input,
.field select,
.field textarea {
  height: 28px;
  border-radius: 2px;
  padding: 0 7px;
  font-size: 12px;
}

.field textarea {
  height: 60px;
  padding: 6px 8px;
}

.filter-grid > .actions {
  grid-column: 5;
  grid-row: 1;
  justify-content: flex-end;
  align-self: center;
  padding-left: 4px;
  gap: 5px;
}

.filter-grid > .actions:nth-child(9) {
  grid-row: 1 / span 2;
  align-self: end;
}

.filter-grid > .actions .primary-button,
.filter-grid > .actions .secondary-button {
  min-width: 56px;
  min-height: 28px;
  padding: 0 9px;
}

.filter-wide {
  grid-column: 1 / span 4;
  min-width: 0;
}

.quick-range {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented-button {
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0 10px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.segmented-button.active,
.segmented-button:hover {
  border-color: var(--primary);
  background: rgba(224, 46, 36, 0.08);
  color: var(--primary);
}

.photo-statistics-toolbar {
  padding: 10px 12px;
}

.photo-statistics-switch {
  width: fit-content;
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.photo-statistics-mode {
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.photo-statistics-mode:last-child {
  border-right: 0;
}

.photo-statistics-mode:hover {
  background: #f8fafc;
  color: #111827;
}

.photo-statistics-mode.active {
  background: var(--primary);
  color: #ffffff;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
  gap: 4px;
}

.text-button {
  min-height: 24px;
  padding: 0 4px;
  font-size: 12px;
  gap: 3px;
}

.primary-button .inline-icon,
.secondary-button .inline-icon,
.danger-button .inline-icon,
.ghost-button .inline-icon,
.text-button .inline-icon,
.inline-icon {
  width: 13px;
  height: 13px;
}

.table-scrollbar {
  left: 216px;
  right: 8px;
  height: 14px;
}

.sidebar-collapsed .table-scrollbar {
  left: 66px;
}

.table-wrap {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.table-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.table-wrap.exception-candidate-table {
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.table-wrap.exception-candidate-table::-webkit-scrollbar {
  width: 10px;
  height: 12px;
}

.table-wrap.exception-candidate-table::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 999px;
}

.table-wrap.exception-candidate-table::-webkit-scrollbar-track {
  background: #eef2f7;
}

.table-scrollbar {
  scrollbar-color: #9ca3af #f3f4f6;
}

.table-scrollbar::-webkit-scrollbar {
  height: 12px;
}

.table-scrollbar::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.table-scrollbar::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border: 3px solid #f3f4f6;
  border-radius: 999px;
}

.table-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}
