* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; background: #f3f5f9; color: #1e293b; min-height: 100vh; display: flex; flex-direction: column; }

.topbar { background: #1e3a8a; color: #fff; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.brand { font-size: 18px; font-weight: 700; }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav a { color: #dbeafe; text-decoration: none; font-size: 14px; }
.nav a:hover { color: #fff; text-decoration: underline; }
.nav-user { font-size: 14px; color: #bfdbfe; }

.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px; flex: 1; }

.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 16px; }
.card h2 { font-size: 20px; margin-bottom: 12px; color: #1e3a8a; }
.card p { font-size: 14px; line-height: 1.8; color: #334155; }

.flashes { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.flash-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; color: #334155; }
.form-group input { width: 100%; max-width: 360px; padding: 10px 12px; font-size: 14px; border: 1px solid #cbd5e1; border-radius: 8px; }
.form-group input:focus { outline: 2px solid #3b82f6; border-color: transparent; }

.btn { display: inline-block; padding: 10px 22px; font-size: 14px; border-radius: 8px; border: none; cursor: pointer; text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; color: #2563eb; border: 1px solid #2563eb; }
.btn-outline:hover { background: #eff6ff; }

.hero { text-align: center; padding: 40px 20px; }
.hero h1 { font-size: 26px; color: #1e3a8a; margin-bottom: 12px; }
.hero p { font-size: 15px; color: #475569; max-width: 640px; margin: 0 auto 24px; line-height: 1.8; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.feature { flex: 1; min-width: 220px; background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.feature h3 { font-size: 15px; color: #1e3a8a; margin-bottom: 8px; }
.feature p { font-size: 13px; color: #475569; line-height: 1.7; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e2e8f0; }
th { color: #475569; font-weight: 600; background: #f8fafc; }

.empty { text-align: center; padding: 40px 16px; color: #64748b; font-size: 14px; }

/* 搜索与订阅 */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 240px; padding: 10px 12px; font-size: 14px; border: 1px solid #cbd5e1; border-radius: 8px; }
.search-bar input:focus { outline: 2px solid #3b82f6; border-color: transparent; }

.result-item { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; background: #fff; flex-wrap: wrap; }
.result-item img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #f1f5f9; }
.result-info { flex: 1; min-width: 180px; }
.result-info .name { font-size: 15px; font-weight: 600; color: #1e293b; }
.result-info .meta { font-size: 13px; color: #64748b; margin-top: 4px; }
.result-info .price { font-size: 15px; font-weight: 700; color: #dc2626; margin-top: 4px; }
.result-info .price .rate-up { color: #dc2626; }
.result-info .price .rate-down { color: #059669; }
.result-actions { display: flex; gap: 8px; align-items: center; }

.sub-item { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; background: #fff; flex-wrap: wrap; }
.sub-item .name { font-size: 15px; font-weight: 600; }
.sub-item .meta { font-size: 13px; color: #64748b; margin-top: 4px; }
.sub-item .price { font-size: 15px; font-weight: 700; color: #dc2626; margin-top: 4px; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #fff; color: #dc2626; border: 1px solid #dc2626; }
.btn-danger:hover { background: #fef2f2; }
.toast { position: fixed; top: 16px; right: 16px; padding: 12px 18px; border-radius: 8px; color: #fff; font-size: 14px; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: none; }
.toast.show { display: block; }
.toast-ok { background: #16a34a; }
.toast-err { background: #dc2626; }

.section-title { font-size: 16px; font-weight: 700; color: #1e3a8a; margin-bottom: 12px; }

.footer { text-align: center; padding: 16px; color: #94a3b8; font-size: 12px; }
