:root {
    --primary: #FF2442;
    --primary-light: #FFF2F4;
    --secondary: #333;
    --bg: #f5f6f7;
    --card-bg: #fff;
    --border: #e8e8e8;
    --text: #333;
    --text-light: #999;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.sys-nav {
    background: #1a1a1a;
    color: rgba(255,255,255,0.7);
    padding: 6px 24px;
    font-size: 13px;
    display: flex;
    gap: 20px;
    align-items: center;
}
.sys-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}
.sys-nav a:hover {
    color: white;
}
.sys-nav-current {
    color: white;
    font-weight: 500;
}

.navbar {
    background: var(--primary);
    color: white;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(255,36,66,0.2);
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
}
.brand-logo-img { height: 24px; width: 24px; border-radius: 6px; object-fit: cover; display: inline-block; vertical-align: middle; margin-right: 4px; }

.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 6px;
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.15);
}
.btn-text {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 4px 8px;
}
.btn-text:hover {
    color: white;
}
.btn-block {
    width: 100%;
    margin-top: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-box {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    animation: modalSlide 0.2s ease;
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text);
}
.modal-body {
    padding: 20px;
}

/* Admin-only visibility */
.admin-only {
    display: none;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: white;
    border-bottom-color: white;
}

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

.page { display: none; }
.page.active { display: block; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: #e0203a; }

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }

.btn-success {
    background: #52c41a;
    color: white;
}
.btn-success:hover { background: #389e0d; }

.btn-danger {
    background: #ff4d4f;
    color: white;
}
.btn-danger:hover { background: #cf1322; }

.btn-large {
    padding: 12px 32px;
    font-size: 16px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-bar input, .filter-bar select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    outline: none;
}

.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-bar input:focus, .filter-bar select:focus {
    border-color: var(--primary);
}

.filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.filter-row select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    outline: none;
    cursor: pointer;
    min-width: 120px;
}

.filter-row select:focus {
    border-color: var(--primary);
}

.filter-count {
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 16px;
    padding-left: 4px;
}

/* 达人卡片 */
.influencer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.influencer-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.influencer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-avatar .avatar-placeholder {
    font-size: 20px;
}

.card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.card-info .card-id {
    font-size: 12px;
    color: var(--text-light);
}
.card-info .card-created {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pct-badge {
    background: #e6f7ff;
    color: #1890ff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 500;
}

.tag {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.platform-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.platform-badge.xhs {
    background: #ffe6eb;
    color: #ff2442;
}

.platform-badge.dianxin {
    background: #fff2cc;
    color: #d46b08;
}

.tag-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-light);
}

.card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.metric {
    text-align: center;
}

/* Platform banner */
.platform-banner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 12px;
    margin-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.platform-banner::-webkit-scrollbar {
    display: none;
}
.platform-banner-item {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.platform-banner-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.platform-banner-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.metric-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.card-price {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.price-label {
    font-size: 12px;
    color: var(--text-light);
}

/* 添加页面 */
.add-form {
    max-width: 600px;
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.status-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.status-message.success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
    display: block;
}

.status-message.error {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
    display: block;
}

.status-message.loading {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
    display: block;
}

/* 详情页 */
.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-panel {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.detail-panel h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-light);
}

.detail-value {
    font-weight: 600;
}

.detail-value.highlight {
    color: var(--primary);
}

/* 详情页头像 */
.detail-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.detail-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-light);
}

.detail-avatar.fallback {
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 2px solid var(--primary-light);
}

.detail-avatar-name {
    flex: 1;
    min-width: 0;
}

.detail-avatar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.detail-avatar-id {
    font-size: 13px;
    color: var(--text-light);
}

/* 手机端详情头像 */
@media (max-width: 768px) {
    .detail-avatar {
        width: 56px;
        height: 56px;
    }
    .detail-avatar.fallback {
        font-size: 22px;
    }
    .detail-avatar-title {
        font-size: 16px;
    }
    .hide-on-mobile {
        display: none !important;
    }
}

.notes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.notes-table th {
    background: var(--primary-light);
    color: var(--primary);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}

.notes-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.notes-table td.note-title {
    vertical-align: top;
}
.notes-table td.note-title .note-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.notes-table tr:hover {
    background: var(--bg);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

/* Distribution bars */
.dist-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
}
.dist-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dist-bar-label {
    font-size: 13px;
    color: #666;
    min-width: 60px;
    text-align: right;
}
.dist-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.dist-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.dist-bar-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

/* Profile link */
.profile-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
}
.profile-link:hover {
    text-decoration: underline;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

/* 认证页面 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #FF2442 0%, #ff6b7a 100%);
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.auth-form .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.auth-form .form-group input:focus {
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 导航栏用户信息 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

/* App 页面切换 */
#app-list, #app-add, #app-detail, #app-match, #app-packages, #app-users, #app-unmatched {
    display: none;
}
#app-list.active, #app-add.active, #app-detail.active, #app-match.active, #app-packages.active, #app-users.active, #app-unmatched.active {
    display: block;
}


/* 响应式：平板和手机 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    .navbar {
        height: auto;
        min-height: 48px;
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .nav-brand {
        font-size: 15px;
    }
    .nav-menu {
        order: 3;
        width: 100%;
        display: flex;
        overflow-x: auto;
        gap: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 2px;
    }
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    .nav-menu button {
        white-space: nowrap;
        font-size: 12px;
        padding: 4px 8px;
        flex-shrink: 0;
    }
    .nav-auth {
        margin-left: auto;
    }
    .nav-auth button, .nav-auth .user-info {
        font-size: 12px;
    }
    .sys-nav {
        display: none;
    }
    .page-header {
        height: 48px;
        padding: 0 16px;
    }
    .nav-brand {
        font-size: 16px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }
    .page-header h1 {
        font-size: 20px;
    }
    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 8px;
        margin-bottom: 12px;
    }
    .filter-bar input, .filter-bar select {
        min-width: 120px;
        font-size: 16px;
        padding: 10px 12px;
        flex-shrink: 0;
    }
    .filter-bar input {
        flex: 0 0 160px;
    }
    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 8px;
        margin-bottom: 16px;
    }
    .filter-row select {
        min-width: 110px;
        font-size: 16px;
        padding: 10px 12px;
        flex-shrink: 0;
    }
    .filter-group {
        min-width: 110px;
    }
    .influencer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .influencer-card {
        padding: 16px;
    }
    .card-avatar {
        width: 40px;
        height: 40px;
    }
    .card-avatar .avatar-placeholder {
        font-size: 16px;
    }
    .card-info h3 {
        font-size: 15px;
    }
    .detail-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .detail-panel {
        padding: 16px;
    }
    .detail-row {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }
    .detail-label {
        font-size: 12px;
    }
    .detail-value {
        font-size: 14px;
    }
    .notes-table {
        display: table;
        width: 100%;
    }
    .notes-table th, .notes-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    /* XHS: 日期(紧凑) | 标题(占满剩余) | 阅读(紧凑) | 点赞(紧凑) | 收藏(紧凑) */
    .notes-table-xhs th:nth-child(1), .notes-table-xhs td:nth-child(1) { width: 1%; white-space: nowrap; text-align: center; }
    .notes-table-xhs th:nth-child(2), .notes-table-xhs td:nth-child(2) { width: 100%; }
    .notes-table-xhs th:nth-child(3), .notes-table-xhs td:nth-child(3),
    .notes-table-xhs th:nth-child(4), .notes-table-xhs td:nth-child(4),
    .notes-table-xhs th:nth-child(5), .notes-table-xhs td:nth-child(5) { width: 1%; white-space: nowrap; text-align: center; }
    /* Dianxin: 标题(占满剩余) | 浏览量(紧凑) | 互动量(紧凑) | 种草量(紧凑) */
    .notes-table-dianxin th:nth-child(1), .notes-table-dianxin td:nth-child(1) { width: 100%; }
    .notes-table-dianxin th:nth-child(2), .notes-table-dianxin td:nth-child(2),
    .notes-table-dianxin th:nth-child(3), .notes-table-dianxin td:nth-child(3),
    .notes-table-dianxin th:nth-child(4), .notes-table-dianxin td:nth-child(4) { width: 1%; white-space: nowrap; text-align: center; }
    .detail-actions {
        flex-direction: column;
        width: 100%;
    }
    .detail-actions .btn {
        width: 100%;
        text-align: center;
    }
    .add-form {
        padding: 20px;
    }
    .btn-large {
        padding: 10px 20px;
        font-size: 15px;
    }
    .empty-state {
        padding: 48px 16px;
    }
    .empty-icon {
        font-size: 48px;
    }
    .platform-banner-item {
        padding: 6px 14px;
        font-size: 13px;
    }
    .auth-card {
        padding: 24px 20px;
        margin: 16px;
    }
    .packages-list {
        grid-template-columns: 1fr;
    }
    .selection-bar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .nav-menu {
        gap: 4px;
    }
    .nav-menu .btn {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* ========== PACKAGES & SELECTION BAR ========== */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu .btn {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    padding: 6px 12px;
}

.nav-menu .btn:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.packages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.package-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.package-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.package-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.package-count {
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.package-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.package-meta {
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.package-creator {
    color: var(--primary);
    font-weight: 500;
}

/* Card checkbox */
.card-checkbox-wrap {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.influencer-card .card-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Selection bar */
.selection-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    gap: 12px;
    flex-wrap: wrap;
}

.selection-count {
    font-size: 14px;
    color: var(--text);
}

.selection-count strong {
    color: var(--primary);
    font-size: 16px;
}

.selection-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-to-package-btn {
    font-size: 14px;
    padding: 6px 16px;
}

/* Package list inside modal */
.package-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.package-list-item:hover {
    background: var(--bg);
    border-color: var(--border);
}

.package-list-item input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.package-list-name {
    font-size: 14px;
    color: var(--text);
    flex: 1;
}

.package-list-count {
    font-size: 12px;
    color: var(--text-light);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 12px;
}

/* App page visibility */
#app-packages, #app-package-detail, #app-users, #app-share {
    display: none;
}
#app-packages.active, #app-package-detail.active, #app-users.active, #app-share.active {
    display: block;
}

/* Share page (standalone, no navbar) */
#app-share {
    min-height: 100vh;
    background: var(--bg);
}
.share-header {
    background: var(--primary);
    color: white;
    padding: 40px 24px 24px;
    text-align: center;
}
.share-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}
.share-header .share-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}
.share-header .share-meta {
    font-size: 13px;
    opacity: 0.75;
}
#share-content {
    padding: 24px 0 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Share detail page */
.share-detail-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}
.share-detail-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.share-detail-info {
    flex: 1;
    min-width: 0;
}
.share-detail-id {
    font-size: 13px;
    color: #999;
    word-break: break-all;
}
.share-detail-price {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}
.share-detail-link {
    margin-top: 8px;
}
.share-detail-link a {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
    word-break: break-all;
}
.share-detail-link a:hover {
    text-decoration: underline;
}
.share-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.share-metric-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.share-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.share-metric-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Mobile responsive for share page */
@media (max-width: 768px) {
    .share-header {
        padding: 24px 16px 16px;
    }
    .share-header h1 {
        font-size: 20px;
    }
    .share-header .share-desc {
        font-size: 13px;
    }
    #share-content .influencer-grid {
        grid-template-columns: 1fr;
        padding: 0 12px !important;
    }
    .share-detail-body {
        padding: 16px 12px;
    }
    .share-detail-profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .share-detail-info {
        width: 100%;
    }
    .share-detail-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .share-metric-card {
        padding: 12px;
    }
    .share-metric-value {
        font-size: 16px;
    }
}

/* Users table (admin) */
.users-list {
    padding: 0;
}
.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.users-table th {
    background: var(--primary);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}
.users-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}
.users-table tr:hover {
    background: var(--primary-light);
}
.users-table .user-role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.users-table .user-role.admin {
    background: #fff2f0;
    color: #ff4d4f;
}
.users-table .user-role.user {
    background: #f0f9ff;
    color: #1890ff;
}

/* Match table sticky columns */
.match-table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.match-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}
.match-table-wrapper th,
.match-table-wrapper td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 13px;
    white-space: nowrap;
    text-align: left;
    background: #fff;
}
.match-table-wrapper th {
    background: var(--primary) !important;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 20;
}
.match-table-wrapper .sticky-col-1 {
    position: sticky;
    left: 0;
    z-index: 10;
    width: 120px;
    min-width: 120px;
    background: #fff;
    border-right: 2px solid #ddd;
}
.match-table-wrapper .sticky-col-2 {
    position: sticky;
    left: 120px;
    z-index: 10;
    width: 80px;
    min-width: 80px;
    background: #fff;
    border-right: 2px solid #ddd;
}
.match-table-wrapper th.sticky-col-1,
.match-table-wrapper th.sticky-col-2 {
    z-index: 30;
    background: var(--primary) !important;
    border-right: 2px solid rgba(255,255,255,0.3);
}
.match-table-wrapper tr:nth-child(even) .sticky-col-1,
.match-table-wrapper tr:nth-child(even) .sticky-col-2 {
    background: #fafafa;
}
.match-table-wrapper tr:nth-child(odd) .sticky-col-1,
.match-table-wrapper tr:nth-child(odd) .sticky-col-2 {
    background: #fff;
}
.match-table-wrapper tr:hover .sticky-col-1,
.match-table-wrapper tr:hover .sticky-col-2 {
    background: var(--primary-light);
}

@media (max-width: 768px) {
    .users-table th, .users-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    .match-table-wrapper .sticky-col-1 {
        min-width: 100px;
        width: 100px;
    }
    .match-table-wrapper .sticky-col-2 {
        left: 100px;
        min-width: 70px;
        width: 70px;
    }
}