* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.08); width: 100%; max-width: 400px; }
.login-box h1 { font-size: 22px; margin-bottom: 8px; }
.login-box .subtitle { color: #999; margin-bottom: 24px; }

/* Layout */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; }
.sidebar-brand { padding: 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar nav a { display: block; padding: 14px 20px; color: rgba(255,255,255,.65); text-decoration: none; transition: all .2s; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: #1677ff; }
.main-content { flex: 1; overflow: auto; }
.page-header { background: #fff; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; }
.page-header h2 { font-size: 18px; font-weight: 600; }
.user-info { color: #999; font-size: 13px; }
.page-body { padding: 24px; }

/* Components */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.form-group input:focus { outline: none; border-color: #1677ff; }
.hint { font-size: 12px; color: #999; margin-top: 4px; }

.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; text-decoration: none; color: #333; transition: all .2s; }
.btn:hover { border-color: #1677ff; color: #1677ff; }
.btn-primary { background: #1677ff; color: #fff; border-color: #1677ff; }
.btn-primary:hover { background: #0958d9; color: #fff; }
.btn-success { background: #52c41a; color: #fff; border-color: #52c41a; }
.btn-danger { background: #ff4d4f; color: #fff; border-color: #ff4d4f; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; text-align: center; padding: 10px; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.alert-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { font-size: 15px; font-weight: 600; }
.card > form, .card > .inline-form { padding: 20px; }
.inline-form { display: flex; gap: 12px; align-items: center; }
.input-lg { flex: 1; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f5f5f5; }
.table th { background: #fafafa; font-weight: 600; font-size: 13px; color: #666; }
.table .amount { font-weight: 600; color: #1677ff; }
.row-highlight { background: #fffbe6 !important; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { background: #fffbe6; } 50% { background: #fff1b8; } }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-warning { background: #fff7e6; color: #fa8c16; }
.tag-info { background: #e6f4ff; color: #1677ff; }
.tag-success { background: #f6ffed; color: #52c41a; }
.tag-secondary { background: #f5f5f5; color: #999; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-left: 4px solid #1677ff; }
.stat-card.warning { border-left-color: #fa8c16; }
.stat-card.info { border-left-color: #1677ff; }
.stat-card.success { border-left-color: #52c41a; }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-label { color: #999; margin-top: 4px; font-size: 13px; }

.badge { background: #ff4d4f; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }

.filter-bar { margin-bottom: 16px; display: flex; gap: 8px; }
.text-center { text-align: center; }
.text-muted { color: #999; }
.actions { white-space: nowrap; }
.actions form { display: inline; }

.url-cell { display: flex; gap: 8px; align-items: center; }
.url-input { flex: 1; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; background: #fafafa; min-width: 200px; }

.qr-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid #eee; }
.qr-preview { max-width: 200px; max-height: 200px; border-radius: 8px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #fff; padding: 28px; border-radius: 12px; width: 90%; max-width: 420px; }
.modal-wide { max-width: 520px; }
.modal-content h3 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.input-full { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; font-family: inherit; }
textarea.input-full { resize: vertical; min-height: 72px; }

.pay-info-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.info-tag { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 4px; background: #f5f5f5; text-decoration: none; font-size: 14px; }
.link-tag:hover { background: #e6f4ff; }
.text-tag { cursor: default; }

.modal-img { background: transparent; max-width: 90%; }
.modal-img img { max-width: 100%; border-radius: 8px; }
#qr-container { display: flex; justify-content: center; margin: 16px 0; }

/* ===== 提交收款信息弹窗美化 ===== */
.upload-modal { padding: 16px; }
.upload-card { padding: 0; overflow: hidden; max-height: 92vh; display: flex; flex-direction: column; animation: modalPop .22s ease; }
@keyframes modalPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.upload-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px; background: linear-gradient(135deg, #1677ff, #0958d9); color: #fff; }
.upload-head-title { display: flex; gap: 12px; align-items: center; }
.upload-head-icon { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.upload-head h3 { margin: 0; font-size: 17px; color: #fff; }
.upload-head-sub { margin: 3px 0 0; font-size: 12px; color: rgba(255,255,255,.82); }
.modal-close { background: transparent; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: .85; padding: 0 4px; transition: opacity .2s; }
.modal-close:hover { opacity: 1; }

.order-summary { display: flex; gap: 12px; margin: 16px 24px 4px; }
.order-summary-item { flex: 1; background: #f6f8fb; border: 1px solid #eef1f6; border-radius: 10px; padding: 12px 14px; }
.os-label { display: block; font-size: 12px; color: #999; margin-bottom: 5px; }
.os-value { font-size: 14px; font-weight: 600; color: #333; word-break: break-all; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .2px; }
.os-amount { color: #1677ff; font-size: 19px; }

.upload-card form { padding: 16px 24px 24px; overflow-y: auto; }

.field-card { border: 1px solid #eef1f6; border-radius: 12px; padding: 14px; margin-bottom: 14px; transition: border .2s, box-shadow .2s; }
.field-card:focus-within { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.field-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.field-badge { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.badge-img { background: #e6f4ff; }
.badge-link { background: #f6ffed; }
.badge-text { background: #fff7e6; }
.field-title { font-size: 14px; font-weight: 600; color: #333; }
.field-desc { font-size: 12px; color: #999; margin-top: 1px; }

.dropzone { display: block; border: 1.5px dashed #d0d7e2; border-radius: 10px; background: #fafbfc; cursor: pointer; transition: all .2s; text-align: center; position: relative; }
.dropzone:hover { border-color: #1677ff; background: #f5f9ff; }
.dropzone-empty { padding: 26px 16px; }
.dz-icon { font-size: 26px; margin-bottom: 6px; }
.dz-text { font-size: 14px; color: #555; font-weight: 500; }
.dz-hint { font-size: 12px; color: #aaa; margin-top: 4px; }
.dropzone-preview { padding: 14px; position: relative; }
.dropzone-preview img { max-width: 100%; max-height: 220px; border-radius: 8px; vertical-align: middle; }
.dz-remove { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; transition: background .2s; }
.dz-remove:hover { background: rgba(0,0,0,.78); }

.upload-card .modal-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.btn-submit { min-width: 120px; }

@media (max-width: 768px) {
    .order-summary { flex-direction: column; gap: 8px; }
}

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar nav { display: flex; overflow-x: auto; }
    .sidebar nav a { white-space: nowrap; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
