* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f3f5f7; color: #2b333d; font-size: 14px; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%); }
.login-card { background: #fff; border-radius: 12px; padding: 40px 36px; width: 340px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card h1 { font-size: 24px; text-align: center; color: #1e3a5f; }
.login-sub { text-align: center; color: #98a2ae; font-size: 12px; margin: 6px 0 24px; }
.login-card input { width: 100%; padding: 11px 12px; border: 1px solid #d8dee5; border-radius: 6px; margin-bottom: 14px; font-size: 14px; outline: none; }
.login-card input:focus { border-color: #2d5a8a; }
.error-text { color: #d4380d; font-size: 13px; margin-top: 10px; min-height: 18px; text-align: center; }

/* 顶栏 */
.topbar { background: #1e3a5f; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: 52px; position: sticky; top: 0; z-index: 10; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.org-select { background: #2d5a8a; color: #fff; border: 1px solid #4a78ab; border-radius: 6px; padding: 5px 8px; font-size: 13px; max-width: 220px; }
.user-label { color: #b8c7d9; font-size: 13px; }

/* 按钮 */
.btn { border: 1px solid #d8dee5; background: #fff; border-radius: 6px; padding: 7px 16px; cursor: pointer; font-size: 13px; color: #2b333d; }
.btn:hover { background: #f0f4f8; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: #2d5a8a; color: #fff; border-color: #2d5a8a; }
.btn-primary:hover { background: #1e3a5f; }
.btn-danger { color: #d4380d; border-color: #f0c0b0; }
.btn-danger:hover { background: #fff1ec; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }
.topbar .btn { background: transparent; color: #cfdcea; border-color: #4a78ab; }
.topbar .btn:hover { background: #2d5a8a; }
.topbar .btn.active { background: #fff; color: #1e3a5f; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 页签 */
.tabbar { background: #fff; border-bottom: 1px solid #e4e9ee; padding: 0 20px; display: flex; gap: 4px; }
.tabbar .tab { padding: 13px 18px; cursor: pointer; border-bottom: 2px solid transparent; color: #6b7787; font-size: 14px; }
.tabbar .tab.active { color: #1e3a5f; border-bottom-color: #2d5a8a; font-weight: 600; }

.main { max-width: 1080px; margin: 20px auto; padding: 0 20px 40px; }

/* 卡片与表格 */
.card { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(20,40,60,.06); }
.card h3 { font-size: 15px; margin-bottom: 14px; color: #1e3a5f; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef1f4; }
th { color: #6b7787; font-weight: 500; background: #fafbfc; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-green { background: #e8f6ee; color: #1d9e57; }
.tag-gray { background: #eef1f4; color: #6b7787; }
.tag-orange { background: #fff4e5; color: #d98a16; }
.tag-blue { background: #e8f0fa; color: #2d5a8a; }

/* 表单 */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.form-item { flex: 1; min-width: 160px; }
.form-item label { display: block; font-size: 12px; color: #6b7787; margin-bottom: 4px; }
.form-item input, .form-item textarea, .form-item select { width: 100%; padding: 8px 10px; border: 1px solid #d8dee5; border-radius: 6px; font-size: 13px; outline: none; font-family: inherit; }
.form-item input:focus, .form-item textarea:focus { border-color: #2d5a8a; }

/* 上传区 */
.upload-zone { display: block; border: 2px dashed #c3cfdb; border-radius: 10px; padding: 26px; text-align: center; color: #6b7787; cursor: pointer; transition: border-color .2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: #2d5a8a; color: #2d5a8a; background: #f6f9fc; }
.upload-zone input { display: none; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,25,35,.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 10px; width: 860px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #eef1f4; font-weight: 600; }
.modal-close { border: none; background: none; font-size: 22px; cursor: pointer; color: #98a2ae; line-height: 1; }
.modal-body { padding: 18px; overflow: auto; }
.modal-body iframe { width: 100%; height: 72vh; border: none; }

/* 提示 */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(30,45,60,.92); color: #fff; padding: 10px 22px; border-radius: 8px; z-index: 200; font-size: 13px; max-width: 80vw; }
.muted { color: #98a2ae; font-size: 12px; }
.empty { text-align: center; color: #98a2ae; padding: 36px 0; }
.summary-bar { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px; background: #f6f9fc; border-radius: 8px; }
.summary-item .num { font-size: 20px; font-weight: 700; color: #1e3a5f; }
.summary-item .lbl { font-size: 12px; color: #6b7787; }
.checkbox-cell { width: 34px; }
.inv-detail-grid { display: grid; grid-template-columns: 110px 1fr 110px 1fr; gap: 8px 12px; font-size: 13px; }
.inv-detail-grid .k { color: #6b7787; }
@media (max-width: 720px) { .inv-detail-grid { grid-template-columns: 100px 1fr; } }
