.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 210px; flex: 0 0 210px;
  background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column;
  padding: 20px 0;
}
.brand { padding: 0 20px 22px; border-bottom: 1px solid #1e293b; }
.brand-title { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.4; }
.brand-sub { font-size: 12px; color: #64748b; margin-top: 3px; }
.sidebar nav { padding: 14px 10px; flex: 1; }
.nav-item {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: #cbd5e1; cursor: pointer; font-size: 14px; margin-bottom: 4px;
}
.nav-item:hover { background: #1e293b; color: #fff; }
.nav-item.active { background: #0d9488; color: #fff; font-weight: 500; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid #1e293b; display: flex; flex-direction: column; gap: 8px; }
.sidebar-foot .me { font-size: 12px; color: #94a3b8; margin-bottom: 4px; word-break: break-all; }

/* 主区 */
.main { flex: 1; padding: 24px 28px; overflow: auto; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 20px; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 18px; overflow: auto; }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card > .muted { margin: 0 0 14px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; flex: 0 0 auto; min-width: 150px; }
.toolbar input[type=date] { min-width: 140px; }
.pager { display: flex; align-items: center; gap: 14px; padding-top: 14px; justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* 弹窗内的标签页 */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.tab { padding: 8px 16px; border: none; background: none; cursor: pointer; font-size: 14px; color: #64748b; border-bottom: 2px solid transparent; font-family: inherit; }
.tab.active { color: #0d9488; border-bottom-color: #0d9488; font-weight: 500; }
.upload-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 14px; }
.qr-area { display: flex; align-items: flex-start; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; }
  .brand, .sidebar-foot { display: none; }
  .sidebar nav { display: flex; padding: 0; gap: 6px; }
  .nav-item { margin: 0; white-space: nowrap; }
  .main { padding: 16px; }
  .qr-area { flex-direction: column; }
  .qr-area > div:last-child { padding-left: 0 !important; margin-top: 16px; }
}
