* { box-sizing: border-box; }
:root { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; color: #242323; background: #f3f4f5; accent-color: #a74220; }
body { margin: 0; }
[hidden] { display: none !important; }
.topbar { background: #a74220; color: white; display: flex; align-items: center; gap: 20px; min-height: 58px; padding: 10px 26px; }
.topbar strong { font-size: 22px; }
.topbar span { border-left: 1px solid #f1c1ad; padding-left: 20px; }
.topbar button { margin-left: auto; border-color: #cc8065; background: transparent; color: white; }
.workspace { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: calc(100vh - 58px); }
nav { padding: 20px 12px; background: white; border-right: 1px solid #e1e3e6; }
nav button { display: block; width: 100%; border: 0; text-align: left; padding: 11px 14px; margin-bottom: 4px; }
nav button[aria-current] { background: #faebe4; color: #963717; font-weight: 700; }
.main { padding: 20px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 25px; margin-bottom: 0; }
h2 { font-size: 18px; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 34%); gap: 14px; align-items: start; }
.columns:has(aside[hidden]) { grid-template-columns: minmax(0, 1fr); }
.card, aside { background: white; border: 1px solid #e0e2e6; border-radius: 7px; padding: 16px; margin-bottom: 12px; min-width: 0; }
.login { max-width: 410px; margin: 10vh auto 0; padding: 0 16px; }
.login .card { padding: 25px; }
.login h1 { margin-bottom: 22px; }
#login-error { max-width: 378px; margin: auto; }
#notice, #login-error { padding: 10px 14px; border-radius: 5px; background: #fff0e9; color: #763116; }
button, input, textarea, select { font: inherit; }
button { background: #fff; color: #302b29; border: 1px solid #d4d5d8; padding: 7px 12px; border-radius: 5px; cursor: pointer; }
button:hover { border-color: #a74220; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid #9c3919; outline-offset: 2px; }
button:disabled { cursor: default; opacity: .55; }
.primary { background: #a74220; color: #fff; border-color: #a74220; }
.danger { color: #9d3322; }
label { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; }
label.check { display: flex; align-items: center; gap: 8px; }
input:not([type="checkbox"]), textarea, select { padding: 8px 10px; min-width: 0; border: 1px solid #d4d5d8; border-radius: 5px; background: white; }
textarea { min-height: 90px; resize: vertical; }
.actions, .toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; margin-bottom: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; background: #f1f2f4; white-space: nowrap; }
th, td { border-bottom: 1px solid #e9e9eb; padding: 10px 11px; }
td:first-child { min-width: 155px; overflow-wrap: anywhere; }
td:last-child { white-space: nowrap; }
tr.selected td { background: #faebe4; }
.form-section { border-top: 1px solid #e8e8ec; margin-top: 14px; padding-top: 14px; }
.copy { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.meta { color: #626065; font-size: 13px; }
.status { display: inline-block; background: #f0eeec; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
.status.pending { background: #fcecd9; color: #893b13; }
.images { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; margin-bottom: 12px; }
.images img { width: 100%; max-height: 210px; object-fit: contain; display: block; }
@media (max-width: 980px) {
  .columns, .columns:has(aside[hidden]) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .workspace { display: block; }
  nav { display: flex; overflow: auto; gap: 6px; border-right: 0; border-bottom: 1px solid #ddd; padding: 8px; }
  nav button { width: auto; flex: 0 0 auto; margin-bottom: 0; }
  .main { padding: 12px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  td:first-child { min-width: 110px; }
  .topbar { padding: 10px 12px; gap: 10px; font-size: 13px; }
  .topbar strong { font-size: 17px; }
  .topbar span { padding-left: 10px; }
}
