* { box-sizing: border-box; }
body { margin: 0; font-family: "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; background: #f4f6fa; color: #1f2937; }
.topbar { display: flex; justify-content: space-between; align-items: center; background: #1d4ed8; color: #fff; padding: 10px 18px; }
.brand { font-weight: 700; font-size: 17px; }
.topbar button { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; margin-left: 6px; }
.topbar .navbtn.active { background: #fff; color: #1d4ed8; font-weight: 700; }
.whoami { margin-left: 12px; font-size: 13px; opacity: .9; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.hidden { display: none !important; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.login-card { max-width: 380px; margin: 60px auto; }
.login-card label { display: block; margin: 10px 0; font-size: 14px; }
.login-card input { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #cbd5e1; border-radius: 6px; }
button.primary { background: #1d4ed8; color: #fff; border: none; padding: 9px 18px; border-radius: 6px; cursor: pointer; font-size: 15px; }
button { cursor: pointer; }
.err { color: #dc2626; min-height: 18px; font-size: 14px; }
.ok { color: #059669; font-size: 14px; }
.muted { color: #64748b; font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { padding: 7px; border: 1px solid #cbd5e1; border-radius: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lot { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: pointer; position: relative; }
.lot img { width: 100%; height: 170px; object-fit: cover; background: #e5e7eb; }
.lot .info { padding: 10px; }
.lot .title { font-size: 13px; height: 36px; overflow: hidden; }
.lot .meta { font-size: 12px; color: #64748b; margin-top: 4px; }
.favbtn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 16px; color: #94a3b8; }
.favbtn.on { color: #e11d48; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; font-size: 13px; text-align: left; vertical-align: top; }
.tbl img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; z-index: 50; }
.modal-box { background: #fff; width: min(880px, 94vw); margin: 30px 0; border-radius: 12px; padding: 20px; position: relative; }
.close { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 24px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; }
.gallery img { height: 260px; border-radius: 8px; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.lb-close { position: absolute; top: 10px; right: 14px; width: 48px; height: 48px; font-size: 30px; line-height: 1; color: #fff; background: rgba(255,255,255,.14); border: none; border-radius: 50%; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 64px; font-size: 36px; line-height: 1; color: #fff; background: rgba(255,255,255,.14); border: none; border-radius: 8px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 15px; background: rgba(0,0,0,.45); padding: 3px 12px; border-radius: 999px; }
.kv { font-size: 14px; line-height: 1.9; }
.kv b { color: #334155; }
.bidrow { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.bidrow input { padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; width: 160px; }
.status { padding: 2px 8px; border-radius: 999px; background: #e0e7ff; font-size: 12px; white-space: nowrap; }
input, select { font-size: 14px; }
.admin-form label { display: inline-block; margin: 4px 10px 4px 0; font-size: 13px; }
.admin-form input, .admin-form select { padding: 6px; border: 1px solid #cbd5e1; border-radius: 6px; margin-left: 4px; }
.favline { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #e5e7eb; }
.favline:last-child { border-bottom: none; }
.favline .favmain { flex: 1; }
