* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6fa; color: #333; font-size: 14px; }
a { color: #1890ff; text-decoration: none; }

.login-box { width: 360px; margin: 100px auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.login-box h2 { text-align: center; margin-bottom: 24px; }
.login-box input { width: 100%; height: 40px; padding: 0 12px; margin-bottom: 16px; border: 1px solid #ddd; border-radius: 4px; }
.login-box button { width: 100%; height: 40px; background: #1890ff; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }
.login-box .err { color: #f5222d; margin-bottom: 12px; text-align: center; }

.topbar { background: #001529; color: #fff; height: 48px; display: flex; align-items: center; padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.topbar .logo { font-size: 18px; font-weight: bold; margin-right: 32px; }
.topbar a { color: rgba(255,255,255,.85); margin-right: 20px; }
.topbar a:hover { color: #fff; }
.topbar .right { margin-left: auto; }
.topbar .right span { margin-right: 12px; color: rgba(255,255,255,.65); }

.wrap { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.stat { background: #fff; padding: 20px; border-radius: 8px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat .num { font-size: 28px; font-weight: bold; color: #1890ff; }
.stat .label { color: #999; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 600; color: #555; }
tr:hover { background: #fafafa; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-pending_payment { background: #fff7e6; color: #fa8c16; }
.tag-paid { background: #e6f7ff; color: #1890ff; }
.tag-arrived { background: #f6ffed; color: #52c41a; }
.tag-can_ship { background: #fff0f6; color: #eb2f96; }
.tag-shipped { background: #f9f0ff; color: #722ed1; }
.tag-signed { background: #f5f5f5; color: #999; }

.btn { display: inline-block; padding: 6px 16px; border-radius: 4px; border: none; cursor: pointer; font-size: 14px; transition: all .2s; }
.btn:active { transform: scale(.96); }
.btn-primary { background: #1890ff; color: #fff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-danger { background: #f5222d; color: #fff; }
.btn-default { background: #fff; border: 1px solid #ddd; color: #555; }
.btn.big { padding: 12px 32px; font-size: 16px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.toolbar input, .toolbar select { height: 32px; padding: 0 10px; border: 1px solid #ddd; border-radius: 4px; }

/* 色块分区 */
.section { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border-left: 4px solid #ddd; }
.sec-blue { border-left-color: #1890ff; }
.sec-green { border-left-color: #52c41a; }
.sec-orange { border-left-color: #fa8c16; }
.sec-purple { border-left-color: #722ed1; }
.sec-red { border-left-color: #f5222d; }
.sec-gray { border-left-color: #999; }
.sec-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #333; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 600px; }
.form-item { display: flex; flex-direction: column; }
.form-item label { margin-bottom: 6px; color: #666; font-size: 13px; }
.form-item input, .form-item select, .form-item textarea { height: 36px; padding: 0 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border .2s; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: #1890ff; outline: none; }
.form-item textarea { height: 72px; padding: 8px 10px; resize: vertical; }
.form-item.full { grid-column: span 1; }

/* 图片上传 */
.img-upload-row { display: flex; gap: 16px; margin-top: 16px; }
.img-slot { flex: 1; }
.img-slot label { font-size: 13px; color: #666; margin-bottom: 6px; display: block; }
.drop-zone { border: 2px dashed #ddd; border-radius: 8px; min-height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; transition: all .2s; }
.drop-zone:hover { border-color: #1890ff; }
.drop-zone.drag { border-color: #1890ff; background: #e6f7ff; }
.drop-zone.uploading { opacity: .5; pointer-events: none; }
.drop-zone.active { border-color: #1890ff; background: #e6f7ff; }
.drop-zone img { max-width: 100%; max-height: 200px; display: block; cursor: zoom-in; }
.drop-zone .hint { color: #999; font-size: 13px; }
.del-btn { float: right; background: #f5222d; color: #fff; border: none; padding: 2px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.btn-mini { background: #1890ff; color: #fff; border: none; padding: 2px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; margin-right: 4px; }
.btn-pick { background: #52c41a; }
.note-slot { display: inline-block; margin: 0 8px 8px 0; vertical-align: top; position: relative; }
.note-slot .drop-zone { width: 150px; min-height: 100px; }
.note-slot img { max-width: 150px; max-height: 100px; }
.del-note { position: absolute; top: -8px; right: -8px; background: #f5222d; color: #fff; border: none; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 20px; padding: 0; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #ccc; border-radius: 24px; transition: .2s; cursor: pointer; }
.switch .slider:before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: #52c41a; }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* 提示 */
.toast { background: #f6ffed; color: #52c41a; padding: 12px 20px; border-radius: 8px; margin-bottom: 16px; border: 1px solid #b7eb8f; }
.sticky-bar { position: sticky; bottom: 20px; background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.15); display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
