/* 会员系统样式 */

/* 会员等级列表 */
.membership-level-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.membership-level-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: box-shadow 0.2s;
}

.membership-level-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.membership-level-item.builtin {
    border-left: 3px solid #94a3b8;
}

.membership-level-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.membership-level-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    min-width: 100px;
}

.membership-level-key {
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.membership-level-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.membership-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.membership-badge.discount {
    background: #ecfdf5;
    color: #059669;
}

.membership-badge.free-quota {
    background: #eff6ff;
    color: #2563eb;
}

.membership-badge.disabled {
    background: #fef2f2;
    color: #dc2626;
}

.membership-level-actions {
    display: flex;
    gap: 8px;
}

.membership-level-actions button {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.membership-level-actions button:hover {
    opacity: 0.85;
}

.membership-btn-edit {
    background: #4f46e5;
    color: #fff;
}

.membership-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

/* 会员状态卡片 */
.membership-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px 24px;
    color: #fff;
    margin-bottom: 20px;
}

.membership-card.free {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.membership-card .level-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.membership-card .expires-info {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.membership-card .expiring-soon {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-block;
    margin-top: 4px;
}

.membership-card .card-stats {
    display: flex;
    gap: 24px;
    margin-top: 12px;
}

.membership-card .card-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.membership-card .card-stat-label {
    font-size: 12px;
    opacity: 0.8;
}

.membership-card .card-stat-value {
    font-size: 16px;
    font-weight: 600;
}

/* 免费额度进度条 */
.free-quota-bar {
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
}

.free-quota-bar-fill {
    background: rgba(255,255,255,0.8);
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s;
}

/* 卡密生成表单 */
.membership-card-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.membership-card-form label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
    display: block;
}

.membership-card-form select,
.membership-card-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

/* 折扣标签 */
.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #ecfdf5;
    color: #059669;
}

.discount-original-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 12px;
}

.discount-final-price {
    color: #059669;
    font-weight: 600;
}

/* ========== 深色模式适配 ========== */
body.dark-mode .membership-level-item { background: #1a1a3e; border-color: #2a2a4a; }
body.dark-mode .membership-level-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
body.dark-mode .membership-level-name { color: #e0e0e0; }
