* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; color: #333; background: #f0f2f5; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #11998e, #38ef7d); }
.login-page.agent { background: linear-gradient(135deg, #667eea, #764ba2); }
.login-page.sub { background: linear-gradient(135deg, #f093fb, #f5576c); }
.login-page.store { background: linear-gradient(135deg, #fa709a, #fee140); }
.login-page.consumer { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.login-box { background: #fff; padding: 36px; border-radius: 10px; width: 380px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.login-box h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: #999; margin-bottom: 24px; font-size: 13px; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: #001529; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .logo { padding: 18px 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar nav { flex: 1; padding: 10px 0; }
.nav-item { display: block; padding: 11px 20px; color: rgba(255,255,255,.65); text-decoration: none; }
.nav-item:hover, .nav-item.active { color: #fff; background: #1890ff; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.main { flex: 1; padding: 24px; overflow: auto; }
.page { display: none; } .page.active { display: block; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; }

.h5-app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f5f5f5; padding-bottom: 60px; }
.h5-header { background: #07c160; color: #fff; padding: 16px; text-align: center; font-size: 17px; font-weight: 600; }
.h5-tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #fff; border-top: 1px solid #eee; z-index: 100; }
.h5-tab { flex: 1; text-align: center; padding: 10px 0; font-size: 12px; color: #666; cursor: pointer; }
.h5-tab.active { color: #07c160; }
.h5-page { display: none; padding: 12px; } .h5-page.active { display: block; }
.card { background: #fff; border-radius: 8px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card h3 { font-size: 15px; margin-bottom: 10px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; color: #666; font-size: 13px; }
.form-group input, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.form-box { background: #fff; padding: 18px; border-radius: 6px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.form-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn { padding: 7px 16px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; }
.btn-primary { background: #1890ff; border-color: #1890ff; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; background: transparent; border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.85); }
.btn-green { background: #07c160; border-color: #07c160; color: #fff; }
.hidden { display: none !important; }
.error-msg { color: #ff4d4f; font-size: 13px; min-height: 18px; margin-bottom: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: #fff; padding: 18px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.stat-label { color: #999; font-size: 13px; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; color: #1890ff; }

.table-wrap { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
thead { background: #fafafa; }
td.empty { text-align: center; color: #999; padding: 28px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag.ok { background: #f6ffed; color: #52c41a; }
.tag.off { background: #fff2f0; color: #ff4d4f; }
.toast { position: fixed; top: 20px; right: 20px; background: #333; color: #fff; padding: 10px 18px; border-radius: 4px; z-index: 9999; display: none; }
.toast.success { background: #52c41a; } .toast.error { background: #ff4d4f; }
.note { color: #999; font-size: 12px; margin-top: 8px; }
.link-box { background: #f6ffed; border: 1px solid #b7eb8f; padding: 12px; border-radius: 6px; word-break: break-all; font-size: 13px; margin-top: 10px; }
