/* ===== 返佣联盟 - 统一样式 ===== */
:root {
    --primary: #f0b90b;
    --primary-dark: #d4a50a;
    --primary-light: #f8d56b;
    --bg-dark: #0f172a;
    --bg-card: rgba(255,255,255,0.95);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --info: #3b82f6;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Header */
.header {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px 28px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header h1, .header h2 {
    font-size: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.nav { display: flex; gap: 8px; flex-wrap: wrap; }

.nav-btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}
.nav-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-home { background: rgba(255,255,255,0.1); color: white; }
.btn-binance { background: linear-gradient(135deg, #f0b90b, #e5a800); color: #1a1a2e; }
.btn-okx { background: linear-gradient(135deg, #00c9a7, #00a88a); color: white; }
.btn-bybit { background: linear-gradient(135deg, #0089ff, #0070e0); color: white; }
.btn-xiaobei { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.btn-calc { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-logout { background: rgba(255,255,255,0.08); color: white; border: 1px solid rgba(255,255,255,0.15); }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #1a1a2e; }
.btn-success { background: linear-gradient(135deg, var(--success), #34d399); color: white; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #f87171); color: white; }
.btn-info { background: linear-gradient(135deg, var(--info), #60a5fa); color: white; }

.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* Search */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}
.search-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(240,185,11,0.1); }
.btn-search {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-search:hover { transform: translateY(-1px); }

/* Forms */
.form-row { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; transition: all 0.2s; background: #f8fafc;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); outline: none; background: white; box-shadow: 0 0 0 3px rgba(240,185,11,0.1); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: 15px; background: white; border-radius: var(--radius-sm); overflow: hidden; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
th {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tr:hover { background: #f8fafc; }
tr:nth-child(even) { background: #fafbfc; }

/* Tags */
.uid-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 320px; }
.uid-tag {
    display: inline-flex; padding: 4px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 500; font-family: 'SF Mono', 'Consolas', monospace;
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-binance { background: #fef3c7; color: #92400e; }
.tag-okx { background: #d1fae5; color: #065f46; }
.tag-bybit { background: #dbeafe; color: #1e40af; }
.tag-xiaobei { background: #ede9fe; color: #5b21b6; }
.tag-invite { background: #f3e8ff; color: #7c3aed; }

/* Action Buttons */
.action-btns { display: flex; gap: 6px; }
.action-btn {
    padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none; display: inline-flex;
    align-items: center; gap: 4px; transition: all 0.2s;
}
.action-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.btn-edit { background: linear-gradient(135deg, #10b981, #34d399); color: white; }
.btn-delete { background: linear-gradient(135deg, #ef4444, #f87171); color: white; }

/* Stats */
.stats { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
    flex: 1; min-width: 140px; padding: 20px; border-radius: var(--radius-sm);
    text-align: center; transition: all 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-label { font-size: 12px; color: #64748b; margin-bottom: 6px; font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-binance { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.stat-binance .stat-value { color: #92400e; }
.stat-okx { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.stat-okx .stat-value { color: #065f46; }
.stat-bybit { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.stat-bybit .stat-value { color: #1e40af; }
.stat-xiaobei { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.stat-xiaobei .stat-value { color: #5b21b6; }
.stat-success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.stat-success .stat-value { color: #065f46; }
.stat-info { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.stat-info .stat-value { color: #3730a3; }

/* Upload Area */
.upload-area {
    border: 2px dashed #cbd5e1; border-radius: var(--radius-sm); padding: 32px;
    text-align: center; transition: all 0.2s; cursor: pointer; margin-bottom: 16px;
}
.upload-area:hover { border-color: var(--primary); background: #fffbeb; }
.upload-area input { display: none; }

/* Messages */
.msg { padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 12px; font-size: 13px; }
.msg-success { background: #d1fae5; color: #065f46; }
.msg-error { background: #fee2e2; color: #991b1b; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; padding: 16px; background: white; border-radius: var(--radius-sm); }
.pagination a { padding: 8px 16px; background: var(--primary); color: #1a1a2e; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 13px; }
.pagination span { padding: 8px 16px; background: #e2e8f0; color: #94a3b8; border-radius: 8px; font-size: 13px; }

/* Commission Group */
.comm-group-header {
    background: #f8fafc; font-weight: 700; color: var(--text-dark);
    padding: 10px 16px; border-bottom: 2px solid #e2e8f0;
}
.comm-group-header .badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 500; margin-left: 8px;
}
.badge-invite { background: #f3e8ff; color: #7c3aed; }
.badge-count { background: #e0e7ff; color: #4338ca; }

/* Toggle */
.toggle-btn {
    display: inline-block; padding: 3px 8px; background: #e2e8f0;
    border-radius: 4px; font-size: 11px; color: #64748b; cursor: pointer;
}
.toggle-btn:hover { background: #cbd5e1; }

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 12px; }
    .header { padding: 16px; }
    .header h1, .header h2 { font-size: 18px; }
    .nav { gap: 6px; }
    .nav-btn { padding: 8px 12px; font-size: 12px; }
    .form-row { flex-direction: column; }
    .stats { flex-direction: column; }
    .search-box { flex-direction: column; }
}


/* Enhanced Platform Admin Pages */
.upload-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.upload-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.upload-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px dashed #cbd5e1;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-card:hover {
    border-color: var(--primary);
    background: #fffbeb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.upload-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.upload-card p {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-item .label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-item .value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
