* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #222; }

header { display: flex; align-items: center; gap: 24px; background: #c8161e; color: #fff; padding: 0 24px; height: 52px; }
.brand { font-size: 17px; font-weight: 700; }
nav { display: flex; gap: 4px; flex: 1; }
nav a { color: rgba(255,255,255,.85); text-decoration: none; padding: 6px 14px; border-radius: 6px; font-size: 14px; }
nav a:hover { background: rgba(255,255,255,.15); }
nav a.on { background: rgba(255,255,255,.22); color: #fff; font-weight: 600; }
.logout { color: rgba(255,255,255,.8); font-size: 13px; text-decoration: none; }

main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
h2 { margin-bottom: 16px; font-size: 20px; }
h3 { margin: 24px 0 12px; font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card .num { font-size: 28px; font-weight: 700; }
.card .label { color: #888; font-size: 13px; margin-top: 4px; }
.card.warn .num { color: #c8161e; }

table { width: 100%; background: #fff; border-radius: 10px; overflow: hidden; border-collapse: collapse; box-shadow: 0 1px 3px rgba(0,0,0,.06); font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; color: #666; font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: none; }
.tag { background: #fff1f0; color: #c8161e; border-radius: 4px; padding: 2px 8px; font-size: 12px; }

.inline-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.inline-form input, .inline-form select, .row-form select { padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
button { background: #c8161e; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
button:hover { background: #a91218; }
.row-form { display: flex; gap: 6px; }
.row-form button { padding: 4px 10px; font-size: 12px; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #c8161e; }
.login-box { background: #fff; padding: 40px 36px; border-radius: 12px; width: 340px; display: flex; flex-direction: column; gap: 14px; }
.login-box h1 { font-size: 20px; text-align: center; margin-bottom: 8px; }
.login-box input { padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.login-box button { padding: 10px; font-size: 15px; }
.error { color: #c8161e; font-size: 13px; text-align: center; }
