* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; color: #1c2834; background: #eef2f6; font-size: 14px; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #c4a35a; outline-offset: 2px; }

.mark { width: 36px; height: 36px; display: grid; place-items: center; background: #c4a35a; color: #0c2340; font-weight: 700; flex: none; }
.boot { position: fixed; inset: 0; z-index: 30; background: #0c2340; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.boot p { margin: 0; letter-spacing: .08em; }

.login { min-height: 100vh; display: flex; }
.login-hero { flex: 1.1; background: linear-gradient(165deg, #071525, #12375f); color: #f4efe4; padding: 40px 56px; display: flex; flex-direction: column; }
.login-hero .brand, .side-brand { display: flex; gap: 10px; align-items: center; }
.login-hero strong, .side-brand strong { display: block; }
.login-hero em, .side-brand em { display: block; font-style: normal; font-size: 12px; opacity: .7; }
.login-hero h1 { font-size: 36px; line-height: 1.35; font-weight: 650; max-width: 520px; margin: 72px 0 24px; }
.login-hero ul { margin: 0; padding: 0; list-style: none; color: rgba(244, 239, 228, .8); }
.login-hero li { padding: 8px 0 8px 14px; border-left: 2px solid #c4a35a; margin: 8px 0; }
.login-panel { flex: .9; display: flex; align-items: center; justify-content: center; padding: 32px 24px; background: #f7f5f0; }
.login-panel form, .login form { width: min(400px, 100%); }
.panel-kicker { margin: 0; color: #8a6a2f; font-size: 12px; letter-spacing: .08em; }
.login h2 { margin: 8px 0; font-size: 28px; }
.hint { margin: 0 0 18px; color: #6b7785; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; color: #526173; font-size: 13px; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select {
  width: 100%; height: 40px; border: 1px solid #d5dde6; border-radius: 4px; padding: 0 12px; background: #fff; font-size: 14px;
}
.field textarea { height: auto; min-height: 76px; padding: 8px 12px; }
.pwd { position: relative; display: block; }
.pwd input { padding-right: 64px; }
.pwd button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #1d4e89; }
.error { min-height: 20px; margin: 0 0 8px; color: #a12622; font-size: 13px; }
.back-home { display: inline-block; margin-top: 16px; color: #1d4e89; text-decoration: none; font-size: 13px; }

.btn { height: 34px; padding: 0 14px; border-radius: 4px; border: 1px solid transparent; background: #fff; font-size: 13px; }
.btn-primary { background: #0c2340; color: #fff; }
.btn-primary:hover { background: #16365f; }
.btn-danger { color: #a12622; border-color: #e7c1bf; background: #fff; }
.btn-ghost { border-color: #d5dde6; color: #243140; background: #fff; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-block { width: 100%; height: 44px; }

.app { min-height: 100vh; display: flex; }
.side { width: 220px; background: #0c2340; color: #fff; display: flex; flex-direction: column; flex: none; }
.side-brand { padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side nav { flex: 1; overflow: auto; padding: 8px 0; }
.nav-btn { width: 100%; text-align: left; background: transparent; border: 0; color: rgba(255,255,255,.78); padding: 10px 16px; border-left: 3px solid transparent; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.nav-btn.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: #c4a35a; }
.nav-btn:hover { color: #fff; }
#alert-badge:empty { display: none; }
#alert-badge { background: #c4a35a; color: #0c2340; border-radius: 99px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 12px; font-style: normal; padding: 0 5px; }
.side-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.side-user b, .side-user span { display: block; }
.side-user span { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 2px; }
.side-user button { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; height: 28px; padding: 0 8px; border-radius: 4px; }

.workspace { flex: 1; min-width: 0; height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: #fff; border-bottom: 1px solid #e6ebf0; flex: none; }
.topbar h1 { margin: 0; font-size: 18px; }
.top-actions { display: flex; align-items: center; gap: 12px; color: #6b7785; font-size: 13px; }
.page { flex: 1; overflow: auto; padding: 16px 22px 32px; }
.page-desc { margin: 0 0 10px; color: #6b7785; font-size: 13px; }

.toolbar { display: flex; gap: 8px; margin: 0 0 12px; }
.toolbar input { max-width: 320px; }
.toolbar select { max-width: 160px; }
.toolbar .btn { margin-left: auto; flex: none; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { height: 34px; padding: 0 14px; border: 1px solid #d5dde6; background: #fff; border-radius: 4px; }
.tab.on { background: #0c2340; color: #fff; border-color: #0c2340; }

.table-wrap { overflow: auto; background: #fff; border: 1px solid #e6ebf0; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
th { text-align: left; background: #f7f9fb; color: #5c6b7a; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid #e6ebf0; white-space: nowrap; position: sticky; top: 0; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f3f6; vertical-align: middle; }
tbody tr[data-act]:hover td { background: #f8fbff; }
tbody tr[data-act] { cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: #6b7785; font-size: 13px; }
.empty { color: #7b8794; text-align: center; padding: 28px 8px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.kpi { text-align: left; background: #fff; border: 1px solid #e6ebf0; border-radius: 8px; padding: 14px 16px; }
.kpi span { color: #6b7785; font-size: 12px; }
.kpi strong { display: block; margin: 6px 0 4px; font-size: 26px; color: #0c2340; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; color: #8a97a6; font-size: 12px; }
.kpi:hover { border-color: #b9cbe0; }
.kpi.static { cursor: default; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin-bottom: 12px; }
.panel { background: #fff; border: 1px solid #e6ebf0; border-radius: 8px; padding: 14px 16px 8px; margin-bottom: 12px; }
.split .panel { margin-bottom: 0; }
.panel h3 { margin: 0 0 10px; font-size: 15px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-head h3 { margin: 0; }
.book-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; background: #fff; border: 1px solid #e6ebf0; border-radius: 8px; padding: 12px 14px; margin: 12px 0; font-size: 13px; }
.book-bar b { color: #0c2340; }
.todo, .link-item { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #f0f3f6; padding: 10px 2px; display: flex; flex-direction: column; gap: 3px; }
.todo b { font-size: 13px; }
.todo span, .todo em, .link-item { color: #6b7785; font-size: 12px; font-style: normal; }
.alert-item { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #f0f3f6; padding: 10px 2px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.alert-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alert-title b { font-size: 13px; }
.alert-title small, .alert-item em { color: #6b7785; font-size: 12px; font-style: normal; }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.tag-gray { background: #eef1f4; color: #52606d; }
.tag-gold { background: #fbf3e4; color: #8a5a00; }
.tag-blue { background: #e7f0fa; color: #1d4e89; }
.tag-red { background: #fdeceb; color: #a12622; }
.tag-green { background: #e5f6ee; color: #0d7a45; }

.bars { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.bar-row { display: grid; grid-template-columns: 108px 1fr 48px; gap: 8px; align-items: center; font-size: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #526173; }
.bar-track { height: 8px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #1d4e89; }
.bar-val { text-align: right; color: #526173; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.kv span { display: block; color: #6b7785; font-size: 12px; margin-bottom: 4px; font-weight: 400; }
.kv b { font-weight: 650; font-size: 14px; word-break: break-word; }
.kv .full { grid-column: 1 / -1; }
.block { margin-top: 20px; }
.block h3 { margin: 0 0 10px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 14px 16px; border-left: 2px solid #e1e7ee; }
.timeline li.done { border-left-color: #0d7a45; }
.timeline b { display: block; font-size: 13px; }
.timeline span { color: #6b7785; font-size: 12px; }
.drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid #e6ebf0; background: #fafbfc; flex: none; }

#overlay { position: fixed; inset: 0; z-index: 40; }
.mask { position: absolute; inset: 0; background: rgba(8, 18, 32, .48); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: #fff; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.12); }
.drawer-head, .modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid #e6ebf0; }
.drawer-head h2, .modal-head h2 { margin: 0; font-size: 18px; word-break: break-all; }
.kicker { margin: 0 0 4px; color: #6b7785; font-size: 12px; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 18px 20px; }
.icon-btn { width: 32px; height: 32px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: #526173; }
.modal-wrap { position: absolute; inset: 0; display: flex; justify-content: center; padding: 36px 16px; overflow: auto; pointer-events: none; }
.modal { pointer-events: auto; width: min(860px, 100%); background: #fff; border-radius: 8px; box-shadow: 0 16px 50px rgba(0,0,0,.2); display: flex; flex-direction: column; max-height: calc(100vh - 72px); }
.modal-body { overflow: auto; padding: 16px 18px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #e6ebf0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-title { margin: 6px 0 0; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px); background: #0c2340; color: #fff; padding: 10px 16px; border-radius: 6px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 80; font-size: 13px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1100px) {
  .kpi-grid, .split { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .login { flex-direction: column; }
  .login-hero { padding: 28px 22px; }
  .login-hero h1 { margin-top: 28px; font-size: 28px; }
}
