/* Shared chrome for UAI MedAI demo app shells */
:root {
  --app-font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.app-shell {
  font-family: var(--app-font);
  background: #f5f7fa;
  color: #1f2937;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-topbar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  flex-shrink: 0;
}
.app-topbar a { color: #7dd3fc; text-decoration: none; }
.app-topbar a:hover { text-decoration: underline; }
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.app-layout { display: flex; flex: 1; min-height: 0; }
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
}
.app-sidebar .brand {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 18px;
  padding: 0 8px;
}
.app-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 4px;
  font-family: inherit;
  color: inherit;
}
.app-nav-btn:hover { background: rgba(24, 144, 255, 0.08); }
.app-nav-btn.active {
  background: #1890ff;
  color: #fff;
  font-weight: 600;
}
.app-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 20px 24px 40px;
}
.app-panel { display: none; }
.app-panel.active { display: block; }
.app-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.app-card h2, .app-card h3 { margin: 0 0 12px; }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #111827;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 50;
}
.toast.show { opacity: 1; }
.table-wrap { overflow: auto; }
table.mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.mock-table th, table.mock-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
table.mock-table th { background: #f8fafc; color: #64748b; font-weight: 600; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #1890ff;
  background: #1890ff;
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn.outline { background: #fff; color: #1890ff; }
.btn.ghost { background: transparent; border-color: #cbd5e1; color: #475569; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 14px;
}
.field label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
}
.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.chip.ok { background: #d1fae5; color: #065f46; }
.chip.warn { background: #fef3c7; color: #92400e; }
.chip.muted { background: #e2e8f0; color: #475569; }
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
  font-size: 13px;
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #64748b; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.req { color: #ef4444; font-weight: 700; }
.sys { color: #f59e0b; font-weight: 700; }
.qry { color: #ec4899; font-weight: 700; }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .app-sidebar { width: 180px; }
}
.step {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
  font-size: 12px;
}
.step strong { display: block; font-size: 13px; margin-bottom: 6px; }
.status-bar {
  margin-top: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #475569;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  border: 0;
  background: #eef2f7;
  color: #475569;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.tab.active { background: #1890ff; color: #fff; font-weight: 600; }
.ocr-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: #f0f7ff;
  border: 1px dashed #91caff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.upload-box {
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}
