* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
.hidden { display: none !important; }

/* 登录 */
.login-box { width: 320px; margin: 120px auto; background: #fff; padding: 36px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.login-box h2 { text-align: center; margin-bottom: 24px; color: #c0392b; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 14px; border: 1px solid #ddd; border-radius: 8px; }
.login-box button { width: 100%; padding: 12px; background: #c0392b; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 15px; }
.hint { text-align: center; color: #999; margin-top: 14px; font-size: 12px; }

/* 框架 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: #1f2d3d; color: #cfd8e3; padding: 20px 0; }
.sidebar .logo { color: #fff; font-size: 18px; font-weight: bold; padding: 0 20px 20px; }
.sidebar nav a { display: block; padding: 14px 20px; cursor: pointer; color: #cfd8e3; }
.sidebar nav a:hover, .sidebar nav a.active { background: #c0392b; color: #fff; }
.sidebar .logout { position: absolute; bottom: 20px; left: 20px; cursor: pointer; color: #8896a6; }
.content { flex: 1; padding: 24px; overflow-x: auto; }

/* 卡片/表格 */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.card-stat { background: #fff; border-radius: 10px; padding: 20px; flex: 1; min-width: 160px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card-stat .num { font-size: 26px; font-weight: bold; color: #c0392b; }
.card-stat .lbl { color: #888; margin-top: 6px; }
.panel { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.panel h3 { margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; }
th { background: #fafafa; color: #666; }
tr:hover td { background: #fcfcfc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #fdecea; color: #c0392b; font-size: 12px; }
.tag.g { background: #e8f5e9; color: #2e7d32; }
.tag.o { background: #fff3e0; color: #ef6c00; }
button.act { padding: 5px 12px; border: 1px solid #c0392b; background: #fff; color: #c0392b; border-radius: 6px; cursor: pointer; margin-right: 6px; }
button.act.solid { background: #c0392b; color: #fff; }
button.act:hover { opacity: .85; }
.toolbar { margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.toolbar input, .toolbar select { padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.toolbar button { padding: 8px 16px; background: #c0392b; color: #fff; border: none; border-radius: 6px; cursor: pointer; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; width: 560px; max-width: 92%; max-height: 86vh; overflow: auto; border-radius: 10px; }
.modal-head { display: flex; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; font-weight: bold; }
.modal-head .x { cursor: pointer; font-size: 20px; }
.modal-body, #modalBody { padding: 20px; }
.modal-body label, #modalBody label { display: block; margin: 12px 0 4px; color: #666; }
.modal-body input, .modal-body select, #modalBody input, #modal-body textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.picklist { background: #fff; padding: 24px; font-family: monospace; }
.picklist h2 { text-align: center; margin-bottom: 16px; }
.picklist table { border: 1px solid #333; }
.picklist th, .picklist td { border: 1px solid #333; }
.picklist .center { text-align: center; }
.warn { color: #e67e22; }
