/* 馆配订购分拣系统样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f3f5f9; color: #1f2937; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 218px; background: #1e293b; color: #cbd5e1; flex-shrink: 0; padding: 14px 0 30px; }
.sidebar .brand { color: #fff; font-size: 17px; font-weight: bold; padding: 8px 18px 16px; border-bottom: 1px solid #334155; margin-bottom: 10px; }
.sidebar nav a { display: block; color: #cbd5e1; padding: 8px 20px; font-size: 14px; }
.sidebar nav a:hover { background: #273449; color: #fff; text-decoration: none; }
.sidebar nav a.active { background: #2563eb; color: #fff; }
.sidebar .nav-group { color: #64748b; font-size: 12px; padding: 14px 20px 4px; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; }
.topbar .title { font-size: 16px; font-weight: 600; }
.userbox { color: #6b7280; }
.content { padding: 20px 24px; flex: 1; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 18px 20px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 12px; color: #111827; }
.cards { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.card.stat { flex: 1; min-width: 130px; text-align: center; padding: 16px; }
.card.stat .n { font-size: 26px; font-weight: bold; color: #2563eb; }
.card.stat .t { color: #6b7280; margin-top: 4px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid #eef1f5; padding: 9px 10px; text-align: left; }
.table th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: #fafbfe; }

/* 表单：统一输入框尺寸 */
label { display: block; margin: 6px 0 4px; color: #374151; font-weight: 500; font-size: 13px; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff; color: #1f2937;
  height: 38px; line-height: 20px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: #2563eb; vertical-align: middle; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
textarea { font-family: Consolas, "Microsoft YaHei", monospace; height: auto; min-height: 76px; line-height: 1.5; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 180px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 18px; }
.form-grid .field { min-width: 0; }
.form-grid .field.span2 { grid-column: span 2; }
.form-section { margin: 18px 0 4px; border-top: 1px solid #eef1f5; padding-top: 10px; }
.form-section h3 { font-size: 14px; color: #2563eb; margin: 0; }
.form-card { max-width: 1024px; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.check-group { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=text], .toolbar input.search-input { width: 260px; height: 36px; }
.toolbar select { width: auto; min-width: 140px; height: 36px; }
.toolbar .btn { height: 36px; line-height: 20px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.inline-form input, .inline-form select { width: auto; min-width: 150px; height: 36px; }
.checkbox { display: flex; align-items: center; gap: 7px; margin: 6px 0; }
.checkbox input { width: auto; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 5px; color: #374151; font-size: 13px; white-space: nowrap; }
.batch-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 10px 12px;
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; margin-bottom: 12px; }
.batch-bar .btn { height: 32px; line-height: 18px; }
.td-check { width: 34px; text-align: center !important; }
.td-check input { margin: 0; }
.radio-group { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.radio-group label { display: flex; align-items: center; gap: 6px; font-weight: normal; font-size: 13px; margin: 0; }
.small-select { width: 200px !important; height: 32px !important; font-size: 13px; margin-bottom: 6px; }
.supplier-del { width: 230px !important; height: 32px !important; }
.sibling-tip { margin-top: 14px; padding: 10px 14px; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; border-radius: 8px; font-size: 13px; }
.import-tips { padding-left: 20px; margin: 8px 0; line-height: 1.9; }

/* 按钮：统一高度 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px;
  background: #2563eb; color: #fff; border: 1px solid #2563eb; padding: 0 16px;
  border-radius: 6px; cursor: pointer; font-size: 14px; font-family: inherit; vertical-align: middle; }
.btn:hover { background: #1d4ed8; text-decoration: none; color: #fff; }
.btn-ghost { background: #fff; color: #2563eb; }
.btn-ghost:hover { background: #eff6ff; }
.btn-danger { background: #fff; color: #dc2626; border-color: #dc2626; }
.btn-danger:hover { background: #fef2f2; color: #dc2626; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 徽标 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-err { background: #fee2e2; color: #b91c1c; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* 提示 */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-error { background: #fee2e2; color: #b91c1c; }
.flash-warning { background: #fef3c7; color: #b45309; }
.flash-info { background: #dbeafe; color: #1d4ed8; }
.muted { color: #6b7280; font-size: 13px; }
.red { color: #dc2626; }
.warn-cell { background: #fffbeb !important; color: #b45309; font-size: 13px; }

.pager { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #f3f6fb; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; color: #475569; }
.pager-total { font-size: 13px; }
.pager-total b { color: #1e293b; font-size: 15px; }
.pager-nav { display: flex; align-items: center; gap: 6px; }
.pager-btn, .pager-num { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155; font-size: 13px; text-decoration: none; cursor: pointer; transition: all .15s; }
a.pager-btn:hover, a.pager-num:hover { border-color: #2563eb; color: #2563eb; }
.pager-num.active { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.pager-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; background: #f8fafc; }
.pager-dots { color: #94a3b8; padding: 0 2px; }
.pager-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pager-form label { font-size: 13px; }
.pager-form select { height: 32px; padding: 0 6px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.pager-go { height: 32px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.pager-go:hover { border-color: #2563eb; color: #2563eb; }
.pager-info { font-size: 13px; }
.warn-panel { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; }
.warn-panel ul { margin: 8px 0 0; padding-left: 20px; }
.warn-panel li { margin: 4px 0; font-size: 13px; color: #b45309; }
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.login-card { background: #fff; width: 380px; border-radius: 12px; padding: 34px 30px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-card h1 { font-size: 21px; text-align: center; }
.login-card .sub { text-align: center; color: #6b7280; margin: 6px 0 18px; font-size: 13px; }

/* 详情面板 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 22px; }
.info-grid .item { padding: 4px 0; border-bottom: 1px dashed #eef1f5; }
.info-grid .k { color: #6b7280; font-size: 13px; }
.marc-box { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px; font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; margin-top: 8px; }

/* 打印 */
.print-bar { margin-bottom: 12px; }
.print-doc { background: #fff; padding: 30px 40px; border: 1px solid #e5e7eb; }
.print-doc h2 { text-align: center; margin-bottom: 4px; }
.print-doc .doc-sub { text-align: center; color: #6b7280; margin-bottom: 18px; font-size: 13px; }
.print-doc .meta { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-doc th, .print-doc td { border: 1px solid #94a3b8; padding: 5px 8px; }
.print-doc th { background: #f1f5f9; }
.print-doc .total-row td { font-weight: bold; background: #f8fafc; }
.print-doc .sign { display: flex; justify-content: space-between; margin-top: 46px; font-size: 13px; }

@media print {
  .sidebar, .topbar, .print-bar, .flash, .no-print { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; }
  .print-doc { border: none; padding: 0; }
}
