/* ── 全局 ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6fa; color: #333; }
#app { max-width: 600px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ── 顶部标题 ── */
.header { background: linear-gradient(135deg, #0082ef, #00b7ee); color: #fff; padding: 20px; text-align: center; box-shadow: 0 2px 8px rgba(0,130,239,0.3); }
.header h1 { font-size: 1.3rem; font-weight: 600; }

/* ── 卡片 ── */
.card { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.card-title { font-size: 0.95rem; font-weight: 600; color: #666; margin-bottom: 12px; }

/* ── 按钮 ── */
.btn-group { display: flex; flex-direction: column; gap: 10px; }
.btn { padding: 12px 20px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: opacity 0.2s; text-align: center; }
.btn:active { opacity: 0.7; }
.btn-large { padding: 14px 24px; font-size: 1.05rem; }
.btn-small { padding: 8px 16px; font-size: 0.85rem; }
.btn-primary { background: #0082ef; color: #fff; }
.btn-success { background: #07c160; color: #fff; }
.btn-info { background: #10aeff; color: #fff; }
.btn-danger { background: #fa5151; color: #fff; }
.btn-default { background: #f0f0f0; color: #333; }

/* ── 手动输入 ── */
.manual-input { display: flex; gap: 8px; margin-top: 12px; }
.input-field { flex: 1; padding: 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; }
.input-field:focus { border-color: #0082ef; }

/* ── 照片预览 ── */
.photo-preview { margin-top: 12px; text-align: center; }
.photo-preview img { max-width: 100%; border-radius: 8px; }
.photo-actions { margin-top: 8px; }

/* ── 单据信息 ── */
.delivery-info { background: #f8f9fa; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.delivery-info .info-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #eee; }
.delivery-info .info-row:last-child { border-bottom: none; }
.delivery-info .label { color: #888; font-size: 0.85rem; }
.delivery-info .value { color: #333; font-weight: 500; font-size: 0.9rem; }
.delivery-info .value.highlight { color: #0082ef; }

/* ── 结果 ── */
.result-message { padding: 16px; border-radius: 8px; text-align: center; font-size: 1rem; line-height: 1.6; margin-bottom: 12px; }
.result-message.success { background: #e8f8ee; color: #07c160; }
.result-message.error { background: #fef0f0; color: #fa5151; }

/* ── 加载 ── */
.loading { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; }
.spinner { width: 40px; height: 40px; border: 4px solid #e0e0e0; border-top-color: #0082ef; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading-text { margin-top: 12px; color: #666; font-size: 0.9rem; }

/* ── 底部 ── */
.footer { text-align: center; padding: 16px; color: #aaa; font-size: 0.8rem; margin-top: auto; }
/* ── 前缀输入框 ── */
.prefix-input { display: flex; align-items: stretch; margin-bottom: 10px; }
.prefix-select { background: #e8e8e8; color: #333; border: 2px solid #ddd; border-right: none; border-radius: 8px 0 0 8px; font-size: 1rem; font-weight: 600; padding: 0 12px; outline: none; }
.prefix-input .input-field { border-radius: 0 8px 8px 0; flex: 1; }
.btn-block { width: 100%; }

/* ── 登录表单 ── */
.login-form { display: flex; flex-direction: column; gap: 12px; }
.error-msg { background: #fef0f0; color: #fa5151; padding: 10px; border-radius: 8px; font-size: 0.85rem; }

/* ── 前缀输入框 ── */
.prefix-input { display: flex; align-items: center; flex: 1; }
.prefix-label { background: #e8e8e8; color: #666; padding: 12px 14px; border: 2px solid #ddd; border-right: none; border-radius: 8px 0 0 8px; font-size: 1rem; font-weight: 500; white-space: nowrap; }
.prefix-input .input-field { border-radius: 0 8px 8px 0; }
