/* 跨境电商分销商管理系统 - 全局样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; color: #333; line-height: 1.6; background: #f5f6fa; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1e293b; color: #fff; flex-shrink: 0; }
.sidebar-header { padding: 20px; font-size: 18px; font-weight: 600; border-bottom: 1px solid #334155; }
.sidebar-nav { padding: 12px 0; }
.sidebar-nav a { display: block; padding: 12px 20px; color: #94a3b8; transition: all 0.2s; border-left: 3px solid transparent; }
.sidebar-nav a:hover { background: #334155; color: #e2e8f0; border-left-color: transparent; }
.sidebar-nav a.active { background: #334155; color: #fbbf24; border-left-color: #fbbf24; font-weight: 600; }
.sidebar-nav a.nav-intro { color: #fbbf24; font-weight: 600; }
.sidebar-nav a.nav-intro:hover { color: #fde68a; }
.sidebar-nav a.nav-intro.active { color: #fde68a; border-left-color: #fde68a; }
.main { flex: 1; padding: 24px; overflow-auto; }

/* 顶部栏 */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.topbar h1 { font-size: 20px; font-weight: 600; }
.user-info { display: flex; align-items: center; gap: 16px; }
.user-info .balance { color: #059669; font-weight: 600; }
.btn-logout { padding: 6px 14px; background: #64748b; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-logout:hover { background: #475569; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); padding: 24px; margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #475569; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #2563eb; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }

/* 按钮 */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: #64748b; color: #fff; }
.btn-secondary:hover { background: #475569; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
table th { background: #f8fafc; font-weight: 600; color: #475569; }
table tr:hover { background: #f8fafc; }
.table-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-actions .btn { padding: 4px 10px; font-size: 12px; }

/* 状态标签 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; background: #0f172a; }
.login-banner { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-brand { text-align: center; user-select: none; }
.login-brand-logo { font-size: 56px; font-weight: 800; color: #fff; letter-spacing: 4px; margin-bottom: 20px; text-shadow: 0 2px 20px rgba(251,191,36,0.3); }
.login-brand-slogan { font-size: 26px; font-weight: 600; color: #fbbf24; margin-bottom: 12px; letter-spacing: 2px; }
.login-brand-sub { font-size: 16px; color: #94a3b8; letter-spacing: 1px; line-height: 1.8; }
.login-box { width: 420px; padding: 40px; background: #fff; margin: 40px; border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); align-self: center; }
.login-box h2 { font-size: 22px; margin-bottom: 24px; text-align: center; }
.login-box .form-group { margin-bottom: 18px; }
.login-box .btn { width: 100%; padding: 12px; margin-top: 8px; font-size: 15px; }
.login-err { color: #dc2626; font-size: 13px; margin-top: 8px; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #64748b; }
.empty-state p { margin-top: 12px; }

/* 响应式 */
@media (max-width: 768px) {
  .login-page { flex-direction: column; }
  .login-box { width: 100%; margin: 20px; }
  .sidebar { width: 100%; }
  .layout { flex-direction: column; }
}
