* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6f8; color: #1f2329; }
.hidden { display: none !important; }
.view { min-height: 100vh; }

/* 登录 */
#login-view { display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; padding: 36px 32px; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.08); width: 320px; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { color: #8a9099; margin-bottom: 20px; font-size: 13px; }
.login-card input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 14px; }
.login-card button { width: 100%; padding: 10px; background: #2f6bff; color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }
.login-card button:hover { background: #2456d6; }

/* 顶栏 */
.topbar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 12px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.brand { font-weight: 600; font-size: 16px; }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.user #cur-user { color: #8a9099; }

/* 工具栏 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; align-items: center; }
.toolbar input, .toolbar select { padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 13px; }
.toolbar input[type="text"] { width: 150px; }
.toolbar input[type="date"] { width: 140px; }
.spacer { flex: 1; }
button { padding: 8px 14px; border: 1px solid #2f6bff; background: #2f6bff; color: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; }
button:hover { opacity: .9; }
button.ghost { background: #fff; color: #2f6bff; }
button.danger { background: #fff; color: #e54545; border-color: #e54545; }

/* 表格 */
.table-wrap { margin: 0 20px 30px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
th { background: #fafbfc; color: #5a6069; font-weight: 600; }
tbody tr:hover { background: #f7f9ff; }
.cd { font-weight: 600; color: #2f6bff; }
.expired { color: #e54545; }
.empty { padding: 40px; text-align: center; color: #b0b5bd; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.modal-card { background: #fff; padding: 24px; border-radius: 12px; width: 320px; }
.modal-card h3 { margin-bottom: 16px; }
.modal-card label { display: block; font-size: 13px; color: #5a6069; margin-bottom: 12px; }
.modal-card input, .modal-card select { width: 100%; padding: 9px 10px; margin-top: 5px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.msg { color: #e54545; font-size: 12px; margin-top: 10px; min-height: 16px; }

/* 上传双模式切换 */
.tab { display: flex; gap: 6px; margin-bottom: 16px; }
.tab-btn { flex: 1; background: #f2f3f5; color: #5a6069; border: 1px solid #e4e6eb; }
.tab-btn.active { background: #2f6bff; color: #fff; border-color: #2f6bff; }
.hint { font-size: 12px; color: #8a9099; line-height: 1.5; margin: 4px 0 10px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-top: 1px solid #eef0f4; background: #f9fafb; font-size: 13px; color: #5a6069; }
.page-info { display: flex; align-items: center; gap: 8px; }
.page-info select { padding: 5px 8px; border: 1px solid #dcdfe6; border-radius: 6px; background: #fff; font-size: 13px; cursor: pointer; }
.page-btns { display: flex; align-items: center; gap: 6px; }
.page-btns button, .page-btns .page-ellipsis { padding: 6px 11px; border: 1px solid #dcdfe6; border-radius: 6px; background: #fff; color: #5a6069; cursor: pointer; min-width: 34px; }
.page-btns button:hover:not(:disabled):not(.active) { background: #f2f3f5; }
.page-btns button.active { background: #2f6bff; color: #fff; border-color: #2f6bff; }
.page-btns button:disabled { color: #bfc4cc; cursor: not-allowed; background: #f2f3f5; }
.page-ellipsis { cursor: default; }
.page-jump { display: flex; align-items: center; gap: 6px; }
.page-jump input { width: 58px; padding: 5px 8px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px; text-align: center; }
.page-jump button { padding: 5px 10px; font-size: 13px; }
