/* 字体 */
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 侧边栏宽度 */
@media (min-width: 992px) {
  .navbar-vertical.navbar-expand-lg { width: 220px; }
  .navbar-vertical.navbar-expand-lg ~ .page-wrapper { margin-left: 220px; }
}

/* 通知提示 */
.notice {
  border-radius: 6px;
  padding: .75rem 1rem;
  margin: .75rem 0;
  font-size: .9rem;
}
.notice.ok {
  background: var(--tblr-success-lt);
  color: var(--tblr-success);
  border-left: 4px solid var(--tblr-success);
}
.notice.error {
  background: var(--tblr-danger-lt);
  color: var(--tblr-danger);
  border-left: 4px solid var(--tblr-danger);
}

/* 当前页高亮 */
.navbar-vertical .nav-link.active {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* 表格空态 */
.table td.text-center.text-muted {
  color: var(--tblr-muted) !important;
}

/* 紧凑 panel 间距 */
.card + .card {
  margin-top: 1rem;
}

/* 文件导入区 */
.file-import-zone {
  border: 2px dashed var(--tblr-border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  background: var(--tblr-light);
}

:root { --admin-border: #dce2e0; --admin-ink: #27352f; --admin-muted: #5c6862; }
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--admin-ink); background: #f5f7f6; font-size: 14px; line-height: 1.55; }
a { color: #136c57; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary, [tabindex] { outline-offset: 3px; }
:focus-visible { outline: 3px solid #228167; }
.page-wrapper, #app, .workspace-content { min-width: 0; }
.page-title { font-size: 24px; font-weight: 600; }
.page-description { color: var(--admin-muted); margin-bottom: 20px; }
.workspace-section { border-top: 1px solid var(--admin-border); padding: 24px 0; }
.workspace-section:first-child { border-top: 0; padding-top: 0; }
.workspace-section h2, .workspace-section h3 { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.section-heading, .organization-context { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.organization-context { border-bottom: 1px solid var(--admin-border); padding-bottom: 20px; margin-bottom: 24px; }
.organization-context h2 { font-size: 22px; margin: 4px 0 0; overflow-wrap: anywhere; }
.dashboard-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.metric { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 148px; padding: 18px; background: #fff; border: 1px solid var(--admin-border); border-top: 3px solid #218365; border-radius: 6px; color: var(--admin-ink); text-decoration: none; }
.metric:nth-child(2) { border-top-color: #487d9a; }
.metric:nth-child(3) { border-top-color: #a06786; }
.metric:nth-child(4) { border-top-color: #8a843c; }
.metric:nth-child(5) { border-top-color: #68825f; }
.metric:hover { border-color: #218365; text-decoration: none; }
.metric strong { font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
.metric-label { font-weight: 600; }
.metric-hint { color: var(--admin-muted); font-size: 12px; }
.quick-links { display: flex; gap: 24px; flex-wrap: wrap; padding: 24px 0; }
.table-tools { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 16px 0; }
.table-tools label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.table-tools input { width: 240px; max-width: 100%; }
.table-tools select { min-width: 130px; }
.table-responsive { max-width: 100%; overflow-x: auto; border: 1px solid var(--admin-border); border-radius: 4px; background: #fff; }
.table { width: 100%; border-collapse: collapse; margin: 0; }
.table th { color: #48594f; background: #edf2ef; font-size: 13px; font-weight: 600; text-transform: none; white-space: nowrap; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid #e8ece9; vertical-align: middle; }
.table td { max-width: 360px; min-width: 80px; overflow-wrap: anywhere; }
.table td:first-child:has(input[type="radio"]) { min-width: 48px; width: 48px; }
.table td .form-control { min-width: 130px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8faf9; }
.table-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; color: var(--admin-muted); font-size: 13px; }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 6px; }
.icon-button .icon { margin: 0; }
.list-empty, .empty, .loading-state { padding: 40px 20px; text-align: center; color: var(--admin-muted); border-bottom: 1px solid var(--admin-border); }
.loading-state { min-height: 240px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.loading-mark { width: 20px; height: 20px; border: 2px solid #c5d4cd; border-top-color: #136c57; border-radius: 50%; animation: admin-spin .9s linear infinite; }
@keyframes admin-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-mark { animation: none; } }
.btn { cursor: pointer; border-radius: 4px; white-space: normal; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-control, .form-select { max-width: 100%; }
.badge { white-space: normal; font-weight: 500; }
.advanced-tools { margin: 20px 0; border-top: 1px solid var(--admin-border); padding-top: 16px; }
.advanced-tools summary { cursor: pointer; font-weight: 500; padding: 8px 0; }
pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-summary { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 16px 0; color: var(--admin-muted); }
.analysis-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.record-detail { min-width: 200px; max-width: 360px; }
.record-detail summary { cursor: pointer; }
.record-detail p { margin-top: 12px; }
#login-overlay { padding: 20px; }
@media (max-width: 1199px) { .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .navbar-vertical.navbar-expand-lg { width: 100%; }
  #sidebar-menu:not(.show) { display: none; }
  #sidebar-menu.show { display: block; width: 100%; }
  .page-wrapper { margin-left: 0; }
}
@media (max-width: 575px) {
  .analysis-metrics { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 14px; min-height: 138px; }
  .metric strong { font-size: 24px; }
  .organization-context h2 { font-size: 20px; }
  .table-tools label, .table-tools input { width: 100%; }
  .table-tools label:has(select) { width: auto; flex: 1; }
  .quick-links { gap: 16px; }
  .page-header .container-xl, .page-body .container-xl, .footer .container-xl { padding-left: 16px; padding-right: 16px; }
  .workspace-section { padding: 20px 0; }
}
/* Final UAT visual polish */
.card, .metric, .table-responsive {
  border-radius: 8px;
}
.card, .metric {
  box-shadow: 0 2px 8px rgba(39, 53, 47, 0.04);
}
.page-header, .page-body {
  min-width: 0;
}
.table-responsive {
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 767px) {
  .page-title { font-size: 22px; }
  .page-description { margin-bottom: 16px; }
  .table th, .table td { padding: 10px 12px; }
  .table { min-width: 640px; }
}
