:root {
	--ink: #0B1220;
	--navy: #132033;
	--gold: #C6A15B;
	--gold-deep: #A7843D;
	--ivory: #F4EFE6;
	--paper: #fff;
	--muted: #8A8478;
	--line: #E6DFD2;
	--ok: #2F6B4F;
	--danger: #A33B32;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--ivory); color: var(--ink); }
.hidden { display: none !important; }
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 20% 10%, rgba(198,161,91,.2), transparent 45%), #0B1220; }
.login-card { width: 380px; background: #fff; padding: 36px; border-radius: 18px; }
.brand { width: 56px; height: 56px; border: 1px solid var(--gold); color: var(--gold-deep); display: flex; align-items: center; justify-content: center; letter-spacing: 2px; margin-bottom: 12px; }
.login-card h1 { margin: 0; letter-spacing: 6px; }
.sub { color: var(--gold-deep); letter-spacing: 4px; font-size: 12px; margin: 4px 0 24px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #FFFdf8; }
textarea { min-height: 84px; resize: vertical; }
.btn { border: 0; border-radius: 22px; height: 40px; padding: 0 18px; cursor: pointer; font-size: 14px; }
.btn.gold { background: linear-gradient(135deg, #D4B36A, #A7843D); color: #0B1220; width: 100%; margin-top: 18px; font-weight: 600; }
.btn.dark { background: var(--navy); color: #F4EFE4; }
.btn.ghost { background: transparent; border: 1px solid var(--gold); color: var(--gold-deep); }
.btn.danger { background: #F8E8E6; color: var(--danger); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; }
.err { color: var(--danger); min-height: 20px; font-size: 13px; }
.app { display: flex; min-height: 100%; }
aside { width: 220px; background: var(--ink); color: #F4EFE4; display: flex; flex-direction: column; }
.aside-brand { display: flex; gap: 10px; align-items: center; padding: 22px 18px; }
.aside-brand span { width: 36px; height: 36px; border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 12px; }
.aside-brand small { display: block; color: var(--gold); letter-spacing: 1px; font-size: 10px; }
nav { display: flex; flex-direction: column; padding: 8px; flex: 1; }
nav button { background: transparent; border: 0; color: rgba(244,239,228,.55); text-align: left; padding: 12px 14px; border-radius: 10px; cursor: pointer; }
nav button.on, nav button:hover { background: rgba(198,161,91,.12); color: var(--gold); }
.aside-user { padding: 16px; border-top: 1px solid rgba(198,161,91,.2); font-size: 13px; }
.aside-user button { margin-top: 8px; background: transparent; border: 1px solid rgba(198,161,91,.4); color: var(--gold); border-radius: 16px; padding: 4px 12px; cursor: pointer; }
main { flex: 1; padding: 24px 28px 48px; overflow: auto; }
.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.top h2 { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.card { background: #fff; border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(19,32,51,.04); }
.card .n { font-size: 28px; color: var(--gold-deep); font-weight: 700; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 220px; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: top; }
th { background: #FAF6EE; color: var(--muted); font-weight: 500; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.ok { background: #E7F2EB; color: var(--ok); }
.tag.warn { background: #F7EEDC; color: #8A6420; }
.tag.off { background: #EEEAE1; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-h { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 12px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #FFFdf8; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.ops { display: flex; gap: 6px; flex-wrap: wrap; }
.modal { position: fixed; inset: 0; background: rgba(11,18,32,.45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { background: #fff; border-radius: 16px; padding: 22px; width: min(720px, 100%); max-height: 86vh; overflow: auto; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv b { font-weight: 600; }
@media (max-width: 1100px) {
	.cards, .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
	.app { flex-direction: column; }
	aside { width: 100%; }
	nav { flex-direction: row; overflow: auto; }
}
