* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2328; background: #f4f5f7; }
a { color: #2457c5; }
.nav { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #1f2d4d; color: #fff; }
.nav .brand { font-weight: 600; }
.nav nav { display: flex; gap: 16px; flex: 1; }
.nav a { color: #dbe4ff; text-decoration: none; }
.nav a:hover { color: #fff; }
.nav .logout { display: flex; gap: 8px; align-items: center; color: #dbe4ff; }
.nav .logout .link { color: #dbe4ff; }
main { padding: 20px 24px; }
main.center { display: flex; justify-content: center; padding-top: 12vh; }
main.split { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: 20px; align-items: start; }
.card { background: #fff; border: 1px solid #e3e6eb; border-radius: 8px; padding: 18px 20px; }
.card.wide { max-width: 1100px; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 18px 0 10px; }
h2:first-child { margin-top: 0; }
label { display: block; margin-bottom: 10px; color: #444; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 9px; font: inherit; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff; }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.req { color: #c62828; margin-left: 2px; }
button { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid #cfd4dc; background: #fff; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: #2457c5; border-color: #2457c5; color: #fff; }
button.link { border: 0; background: none; padding: 0; color: #2457c5; }
.login { width: 340px; }
.login button { width: 100%; margin-top: 6px; }
.error { color: #c62828; }
.msg { min-height: 1.5em; margin: 8px 0 0; }
.muted { color: #6b7280; }
.small { font-size: 12px; }
.drop { margin: 8px 0; padding: 12px; border: 1px dashed #b8c0cc; border-radius: 6px; color: #6b7280; text-align: center; }
.drop.over { border-color: #2457c5; background: #eef3ff; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: center; }
.thumb { position: relative; }
.thumb img { height: 64px; border: 1px solid #ddd; border-radius: 4px; }
.thumb button { position: absolute; top: -6px; right: -4px; background: #fff; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; }
.items-edit { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.items-edit th { text-align: left; font-weight: normal; color: #444; padding-bottom: 2px; }
.items-edit td { padding: 2px 4px 2px 0; }
.items-edit .amt { width: 130px; }
.items-edit input { margin: 0; }
.total { text-align: right; }
.actions { display: flex; gap: 10px; }
.done { margin-top: 10px; padding: 10px 12px; background: #eaf7ee; border: 1px solid #b7e1c3; border-radius: 6px; }
.preview-col { position: sticky; top: 20px; height: calc(100vh - 100px); padding: 0; overflow: hidden; }
.preview-col iframe { width: 100%; height: 100%; border: 0; display: none; }
.preview-col iframe.on { display: block; }
.preview-col .muted { padding: 20px; }
table.list { width: 100%; border-collapse: collapse; margin-top: 14px; }
table.list th, table.list td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #eceef2; }
table.list .amt { text-align: right; white-space: nowrap; }
table.list tr.off td { color: #9aa0a6; }
.ops { display: flex; gap: 12px; }
form.inline { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
form.inline input, form.inline select { width: auto; margin: 0; }
.secret { margin: 10px 0; padding: 12px; background: #fff8e1; border: 1px solid #f2d27a; border-radius: 6px; }
.secret code { font-size: 15px; background: #fff; padding: 2px 6px; border-radius: 4px; user-select: all; }
@media (max-width: 900px) { main.split { grid-template-columns: 1fr; } .preview-col { position: static; height: 80vh; } }
