/* 图书ERP — WordPress简表风格 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: #1d2327; background: #f0f0f1;
}
a { color: #2271b1; text-decoration: none; }
a:hover { color: #135e96; }
code { background: #f0f0f1; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.mono { font-family: Consolas, monospace; font-size: 12px; }

.wrap { display: flex; min-height: 100vh; }
.sidebar {
  width: 180px; flex-shrink: 0; background: #1d2327; color: #c3c4c7;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 18px 16px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #2c3338; }
.sidebar nav { flex: 1; padding: 8px 0; }
.sidebar nav a {
  display: block; padding: 10px 16px; color: #c3c4c7; font-size: 13px;
}
.sidebar nav a:hover { background: #2c3338; color: #72aee6; }
.sidebar nav a.active { background: #2271b1; color: #fff; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid #2c3338; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }

.main { flex: 1; padding: 20px 24px; max-width: 1200px; }
h1 { font-size: 22px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #c3c4c7; }
h2 { font-size: 16px; margin: 20px 0 10px; }
.h-sub { font-size: 13px; font-weight: normal; color: #646970; }
.muted { color: #646970; font-size: 12px; }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.c-ok { color: #00a32a; } .c-err { color: #d63638; }

table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin-bottom: 12px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f0f0f1; vertical-align: middle; }
th { background: #f6f7f7; font-weight: 600; font-size: 12px; white-space: nowrap; }
tr:hover td { background: #f6f7f7; }
td.empty { text-align: center; color: #8c8f94; padding: 24px; }

.btn {
  display: inline-block; padding: 5px 12px; font-size: 13px; cursor: pointer;
  background: #fff; border: 1px solid #2271b1; color: #2271b1; border-radius: 3px;
}
.btn:hover { background: #f0f6fc; }
.btn-primary { background: #2271b1; color: #fff; }
.btn-primary:hover { background: #135e96; }
.btn-sm { padding: 2px 8px; font-size: 12px; }
.btn-link { border: none; background: none; color: #72aee6; padding: 0; font-size: 12px; cursor: pointer; }
.btn-block { width: 100%; padding: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input[type=text] { padding: 5px 8px; border: 1px solid #8c8f94; border-radius: 3px; }
.filter-bar input[type=text] { width: 180px; }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.pick-bar { display: flex; align-items: center; gap: 10px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card { background: #fff; padding: 14px; border-radius: 3px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.stat-card.ok .stat-num { color: #00a32a; }
.stat-card.err .stat-num { color: #d63638; }
.stat-num { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; color: #646970; margin-top: 2px; }
.detail-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #f0f0f1; color: #646970; }
.tag-ok { background: #edfaef; color: #00a32a; }
.tag-err { background: #fcf0f1; color: #d63638; }
.tag-warn { background: #fcf9e8; color: #996800; }

.flash { padding: 10px 14px; margin-bottom: 14px; border-radius: 3px; border-left: 4px solid; }
.flash-ok { background: #edfaef; border-color: #00a32a; color: #00a32a; }
.flash-err { background: #fcf0f1; border-color: #d63638; color: #d63638; }

.card-form { background: #fff; padding: 16px; max-width: 560px; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin-bottom: 16px; border-radius: 3px; }
.card-form label { display: block; margin: 10px 0 4px; font-size: 13px; color: #3c434a; }
.card-form input[type=text], .card-form input[type=password], .card-form input[type=number], .card-form textarea, .card-form select {
  width: 100%; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 3px; font-size: 13px; font-family: inherit;
}
.card-form .btn { margin-top: 12px; }
.card { background: #fff; padding: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.04); border-radius: 3px; margin-bottom: 12px; max-width: 560px; }
.inline { display: inline; }

.pct { width: 100px; height: 8px; background: #f0f0f1; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; }
.pct-bar { height: 100%; background: #2271b1; }
.pct-num { font-size: 11px; margin-left: 6px; color: #646970; }
.tpl-desc { white-space: pre-wrap; max-width: 300px; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #1d2327; }
.login-card { background: #fff; padding: 32px; border-radius: 6px; width: 320px; box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.login-card h1 { border: none; text-align: center; margin-bottom: 16px; font-size: 20px; }
.login-card label { display: block; margin: 10px 0 4px; font-size: 13px; }
.login-card input { width: 100%; padding: 8px 10px; border: 1px solid #8c8f94; border-radius: 3px; font-size: 14px; }
.login-card .btn { margin-top: 16px; }
.w-100 { width: 90px !important; padding: 3px 6px; }

.brand-logo { width: 22px; height: 22px; border-radius: 4px; vertical-align: -4px; margin-right: 6px; }
.login-logo { text-align: center; margin-bottom: 8px; }
.login-logo img { width: 64px; height: 64px; border-radius: 12px; }
