@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    /* Warm editorial LIGHT — newspaper / magazine feel, not generic white */
    --bg: #faf6f0;
    --bg-card: rgba(255, 252, 247, 0.95);
    --bg-card-solid: #ffffff;
    --bg-card-hover: rgba(245, 239, 230, 0.95);
    --bg-input: #ffffff;
    --bg-glass: rgba(255, 252, 247, 0.7);
    --border: rgba(26, 20, 14, 0.08);
    --border-hover: rgba(26, 20, 14, 0.16);
    --text: #1a1714;
    --text-dim: rgba(26, 23, 20, 0.62);
    /* Accent: warm tangerine (Bloomberg/editorial vibe), not Linear purple */
    --accent: #e8804a;
    --accent-light: #f4a47a;
    --accent-dark: #b85e2e;
    --accent-glow: rgba(232, 128, 74, 0.22);
    --accent-subtle: rgba(232, 128, 74, 0.07);
    /* Status colors — muted, not neon */
    --green: #6db58a;
    --green-glow: rgba(109, 181, 138, 0.18);
    --red: #d96868;
    --red-glow: rgba(217, 104, 104, 0.18);
    --orange: #d4a64b;
    --orange-glow: rgba(212, 166, 75, 0.18);
    --blue: #5fa8d9;
    --blue-glow: rgba(95, 168, 217, 0.2);
    /* Tighter geometry — feels less templated */
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(26,20,14,0.06), 0 1px 2px rgba(26,20,14,0.04);
    --shadow-md: 0 4px 12px rgba(26,20,14,0.08), 0 2px 4px rgba(26,20,14,0.04);
    --shadow-lg: 0 8px 24px rgba(26,20,14,0.1), 0 4px 8px rgba(26,20,14,0.06);
    --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ambient background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(232, 128, 74, 0.06) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    left: -20%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(95, 168, 217, 0.04) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(232, 128, 74, 0.22); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(232, 128, 74, 0.45); }

/* ===== LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: #f3ede2;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(26, 20, 14, 0.04) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    opacity: 0.5;
}

.sidebar-header {
    padding: 28px 22px 22px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Sheen line removed for cleaner editorial look */

.sidebar-header h1 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text);
    font-family: 'Cairo', 'Helvetica Neue', sans-serif;
}
.sidebar-header h1::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--accent);
    margin-top: 8px;
}

.sidebar-header p {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 10px;
    letter-spacing: 0.1px;
    font-weight: 400;
}

.sidebar-actions {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

/* ===== Sidebar Search ===== */
.client-search-wrap {
    position: relative;
    padding: 10px 14px 6px;
}
.client-search-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-30%);
    color: var(--text-dim);
    pointer-events: none;
    opacity: 0.7;
}
.client-search {
    width: 100%;
    padding: 8px 32px 8px 12px;
    font-size: 12px;
    color: var(--text);
    background: rgba(255, 252, 247, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}
.client-search::placeholder { color: var(--text-dim); }
.client-search:focus {
    border-color: var(--accent);
    background: rgba(232, 128, 74, 0.05);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ===== Sidebar Footer ===== */
.sidebar-footer {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: rgba(26, 20, 14, 0.025);
}
.sb-foot-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.sb-foot-btn:hover {
    color: var(--text);
    background: rgba(232, 128, 74, 0.08);
    border-color: rgba(232, 128, 74, 0.18);
}
.sb-foot-btn svg { flex-shrink: 0; opacity: 0.85; }
.sb-foot-btn:hover svg { opacity: 1; }

/* ===== Verified Badge (sidebar) ===== */
.client-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d9bf0;
    margin-right: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 0 4px rgba(29, 155, 240, 0.4));
}
.client-verified svg { display: block; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 4px 16px var(--accent-glow);
    width: 100%;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 6px 24px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border: 1px solid rgba(217, 104, 104, 0.3);
    padding: 6px 14px;
    font-size: 11px;
}
.btn-danger:hover {
    background: var(--red-glow);
    border-color: var(--red);
}
.btn-danger::after { display: none; }

.btn-sm {
    padding: 7px 14px;
    font-size: 11px;
    border-radius: 8px;
}

.btn-ghost {
    background: rgba(26, 20, 14, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.btn-ghost::after { display: none; }
.btn-ghost:hover {
    background: rgba(26, 20, 14, 0.08);
    color: var(--text);
    border-color: var(--border-hover);
}

/* ===== CLIENT LIST ===== */
.client-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.client-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.client-item:hover {
    background: rgba(26, 20, 14, 0.035);
}

.client-item.active {
    background: rgba(232, 128, 74, 0.10);
}
.client-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--accent);
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: var(--transition);
}
.client-item:hover .client-avatar,
.client-item.active .client-avatar {
    border-color: var(--accent);
}

.client-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: var(--accent-dark);
    letter-spacing: -0.3px;
}

.client-info { flex: 1; min-width: 0; }

.client-info .username {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.client-info .followers {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 36px 40px;
    position: relative;
    z-index: 1;
}

/* ===== EMPTY / SETUP ===== */
.setup-screen, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    max-width: 460px;
    margin: 0 auto;
}

.setup-screen h2, .empty-state h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text), var(--text-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.setup-screen p, .empty-state p {
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.7;
    font-size: 14px;
}

/* ===== FORMS ===== */
.form-group {
    width: 100%;
    margin-bottom: 16px;
    text-align: right;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 36px;
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.dashboard-header .client-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
    transition: var(--transition);
}
.dashboard-header .client-avatar-lg:hover {
    transform: scale(1.05);
    box-shadow: 0 0 32px var(--accent-glow);
}

.dashboard-header .info h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.dashboard-header .info .bio {
    color: var(--text-dim);
    font-size: 13px;
    margin-top: 5px;
    max-width: 500px;
    line-height: 1.5;
}

.dashboard-header .actions {
    margin-right: auto;
    display: flex;
    gap: 8px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse at top right, var(--accent-subtle), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(232, 128, 74, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 24px var(--accent-glow);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--text), rgba(26,23,20,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card .change {
    font-size: 11px;
    margin-top: 6px;
    font-weight: 600;
}
.stat-card .change.up { color: var(--green); }
.stat-card .change.down { color: var(--red); }

.posts-analyzed {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 8px;
    padding: 3px 8px;
    background: rgba(26,20,14,0.05);
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.3px;
    font-weight: 500;
    border: 1px solid var(--border);
}

.stat-card.stat-highlight {
    border-color: rgba(232, 128, 74, 0.35);
    background: linear-gradient(135deg, rgba(232,128,74,0.08), var(--bg-card));
    box-shadow: 0 0 24px rgba(232,128,74,0.12), inset 0 0 30px rgba(232,128,74,0.04);
}
.stat-card.stat-highlight .value {
    font-size: 36px;
    background: linear-gradient(135deg, #f4a47a, #e8804a, #b85e2e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(232,128,74,0.4));
}
.stat-card.stat-highlight::before { opacity: 1; }
.stat-card.stat-highlight::after {
    content: '';
    position: absolute;
    top: -1px; left: 20%; right: 20%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 36px;
}

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

.section-header h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
    position: relative;
    padding-right: 14px;
}
.section-header h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    border-radius: 2px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent);
}

/* ===== POST CARDS ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.post-card:hover {
    border-color: rgba(232, 128, 74, 0.3);
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.post-card .post-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--bg-input);
}

.post-card .post-info { padding: 16px; }

.post-card .post-caption {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.post-card .post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-dim);
}

.post-card .post-stats .count {
    color: var(--text);
    font-weight: 700;
}

.post-card .post-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.post-type-IMAGE { background: var(--blue-glow); color: var(--blue); }
.post-type-VIDEO, .post-type-REEL { background: var(--red-glow); color: var(--red); }
.post-type-CAROUSEL_ALBUM { background: var(--orange-glow); color: var(--orange); }

/* ===== DEMOGRAPHICS ===== */
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.demo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    backdrop-filter: blur(8px);
}

.demo-card h4 {
    font-size: 11px;
    margin-bottom: 16px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.bar-chart { display: flex; flex-direction: column; gap: 8px; }

.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    font-size: 12px;
    width: 100px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dim);
}

.bar-track {
    flex: 1;
    height: 22px;
    background: rgba(26,20,14,0.05);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
    position: relative;
}
.bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: inherit;
}

.bar-value {
    font-size: 12px;
    font-weight: 700;
    width: 50px;
}

/* ===== CHART ===== */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    height: 300px;
    position: relative;
    backdrop-filter: blur(8px);
}

.chart-svg { width: 100%; height: 100%; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart-area { fill: url(#chartGradient); opacity: 0.3; }
.chart-dot {
    fill: var(--accent);
    stroke: var(--bg-card-solid);
    stroke-width: 3;
    transition: var(--transition);
}
.chart-dot:hover {
    r: 6;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}
.chart-label { font-size: 11px; fill: var(--text-dim); }

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-dim);
    font-size: 13px;
    gap: 12px;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(232, 128, 74, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, rgba(26,20,14,0.06) 25%, rgba(26,20,14,0.1) 37%, rgba(26,20,14,0.06) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-heading { height: 24px; width: 40%; margin-bottom: 12px; border-radius: 6px; }
.skeleton-avatar { width: 72px; height: 72px; border-radius: 50%; }
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 120px;
}
.skeleton-stat {
    height: 36px;
    width: 70%;
    margin: 10px auto 0;
    border-radius: 6px;
}

/* ===== PAGE TRANSITIONS ===== */
.main-content {
    animation: pageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stagger children entrance */
.stats-grid .stat-card {
    opacity: 0;
    animation: cardIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.25s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 0.3s; }
.stats-grid .stat-card:nth-child(7) { animation-delay: 0.35s; }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Section stagger */
.section, #crossPlatformSection, #insightsSection, #competitorsSection,
#pinnedVideosSection, #scrapedPostsSection, #scrapedAnalyticsSection {
    opacity: 0;
    animation: sectionIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
#crossPlatformSection { animation-delay: 0.15s; }
#insightsSection { animation-delay: 0.25s; }
#competitorsSection { animation-delay: 0.3s; }
#pinnedVideosSection { animation-delay: 0.35s; }
#scrapedPostsSection { animation-delay: 0.4s; }
#scrapedAnalyticsSection { animation-delay: 0.45s; }
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Post card stagger */
.post-card {
    opacity: 0;
    animation: postIn 0.35s ease forwards;
}
@keyframes postIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Social link card entrance */
.social-link-card {
    opacity: 0;
    animation: socialIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes socialIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Counter animation — keep gradient text, no overflow */
.stat-card .value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Insight card entrance */
.insight-card {
    opacity: 0;
    animation: insightIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes insightIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Sidebar client items stagger on load */
.client-item {
    opacity: 0;
    animation: clientIn 0.3s ease forwards;
}
@keyframes clientIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Dashboard header entrance */
.dashboard-header {
    opacity: 0;
    animation: headerIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes headerIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Notification exit */
.notification.exiting {
    animation: notifyOut 0.3s ease forwards;
}
@keyframes notifyOut {
    to { transform: translateX(-120%); opacity: 0; }
}

/* ===== TOKEN WARNING ===== */
.token-warning {
    background: var(--orange-glow);
    border: 1px solid rgba(212, 166, 75, 0.3);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    backdrop-filter: blur(8px);
}
.token-warning .icon { font-size: 18px; }

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 24px;
    left: 24px;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    z-index: 100;
    animation: notifyIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    letter-spacing: 0.1px;
}

.notification.success {
    background: rgba(109, 181, 138, 0.9);
    color: #fff;
    border: 1px solid var(--green);
}
.notification.error {
    background: rgba(217, 104, 104, 0.9);
    color: #fff;
    border: 1px solid var(--red);
}

@keyframes notifyIn {
    from { transform: translateX(-120%) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

/* ===== OVERVIEW TABLE ===== */
.overview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.overview-table th {
    text-align: right;
    padding: 12px 14px;
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.overview-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.overview-row {
    transition: var(--transition);
}
.overview-row:hover {
    background: rgba(232, 128, 74, 0.04);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow); }
}

/* ===== BUBBLE UNIVERSE ===== */
.bu { position:fixed; top:0; left:0; right:280px; bottom:0; overflow:hidden; cursor:grab; background:#faf6f0; z-index:2; }
.bu.dragging { cursor:grabbing; }
.bu-bg { position:absolute; inset:0;
    background: radial-gradient(circle at 25% 35%, rgba(232,128,74,0.05) 0%, transparent 50%),
                radial-gradient(circle at 75% 65%, rgba(109,181,138,0.03) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(95,168,217,0.02) 0%, transparent 60%);
    pointer-events:none; }
.bu-dots { position:absolute; inset:0;
    background-image:
        linear-gradient(rgba(26,20,14,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26,20,14,0.05) 1px, transparent 1px);
    background-size: 50px 50px; pointer-events:none; }
.bu-transform { position:absolute; top:0; left:0; width:0; height:0; transform-origin:0 0; }
.bu.smooth .bu-transform { transition: transform 0.5s cubic-bezier(.4,0,.2,1); }

.bu-node { position:absolute; }
@keyframes buFloat {
    0%,100% { transform:translate(0,0); }
    25% { transform:translate(var(--f1,8px), var(--f2,-10px)); }
    50% { transform:translate(var(--f3,-6px), var(--f4,12px)); }
    75% { transform:translate(var(--f5,10px), var(--f6,4px)); }
}

.client-bubble {
    position:absolute; left:0; top:0; border-radius:50%; cursor:pointer;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; background:rgba(255,252,247,0.95);
    border:2px solid rgba(26,20,14,0.10); backdrop-filter:blur(16px);
    transition: border-color .3s, box-shadow .3s, transform .3s;
    transform:translate(-50%,-50%);
}
.client-bubble:hover {
    border-color:var(--accent);
    box-shadow:0 0 60px var(--accent-glow), inset 0 0 30px rgba(232,128,74,0.05);
    transform:translate(-50%,-50%) scale(1.1);
    z-index:5;
}
.client-bubble::after {
    content:''; position:absolute; inset:-3px; border-radius:50%;
    background:conic-gradient(from 0deg, var(--accent) 0%, transparent 25%, var(--accent-dark) 50%, transparent 75%, var(--accent) 100%);
    opacity:0; transition:opacity .5s; z-index:-1;
    animation:buRing 8s linear infinite;
}
@keyframes buRing { to { transform:rotate(360deg); } }
.client-bubble:hover::after { opacity:.35; }
.bu-node.dragging { z-index:100 !important; }
.bu-node.dragging .client-bubble {
    box-shadow:0 0 80px var(--accent-glow), 0 0 120px rgba(232,128,74,0.08);
    border-color:var(--accent); cursor:grabbing;
    transform:translate(-50%,-50%) scale(1.08);
}
.bu-node.dragging .sat-bubble { transition:none; }

.cb-avatar { border-radius:50%; object-fit:cover; border:2px solid rgba(26,20,14,0.10); flex-shrink:0; }
.cb-name { font-size:11px; font-weight:700; color:var(--text); white-space:nowrap; max-width:90%; overflow:hidden; text-overflow:ellipsis; margin-top:4px; }
.cb-followers {
    font-size:13px; color:var(--accent-dark); font-weight:800; margin-top:3px;
    letter-spacing:-0.3px;
    font-variant-numeric: tabular-nums;
}
.cb-name { color: var(--text); font-weight:600; }
.cb-eng { font-size:9px; color:var(--green); font-weight:600; margin-top:1px; opacity:0; transition:opacity .3s; }
.client-bubble:hover .cb-eng { opacity:1; }

.sat-bubble {
    position:absolute; border-radius:50%;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; cursor:pointer;
    border:1.5px solid rgba(26,20,14,0.12); backdrop-filter:blur(8px);
    transition:transform .3s, box-shadow .3s; transform:translate(-50%,-50%);
    opacity:0; animation:satAppear .5s ease forwards;
}
@keyframes satAppear { to { opacity:1; } }
.sat-bubble:hover { transform:translate(-50%,-50%) scale(1.2); box-shadow:0 0 20px rgba(0,0,0,.5); z-index:10; }
.sat-icon { display:flex; align-items:center; justify-content:center; }
.sat-count { font-size:10px; font-weight:700; color:#fff; margin-top:2px; text-shadow:0 1px 2px rgba(0,0,0,0.5); }

.bu-rope {
    position:absolute; left:0; top:0;
    pointer-events:none; height:0;
    border-top:2px dashed rgba(26,20,14,0.18);
    transform-origin:0 0;
    z-index:-1;
}
.bu-connector {
    position:absolute; pointer-events:none; height:1px;
    background:linear-gradient(to right, rgba(232,128,74,0.12), rgba(232,128,74,0.03));
    transform-origin:left center;
}

.bu-controls {
    position:absolute; bottom:24px; left:24px;
    display:flex; flex-direction:column; gap:4px; z-index:20;
    background:rgba(255,252,247,0.9); backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    padding:6px; border-radius:14px;
    border:1px solid rgba(26,20,14,0.08);
    box-shadow: 0 2px 8px rgba(26,20,14,0.08);
}
.bu-ctrl {
    width:36px; height:36px; border-radius:50%; border:1px solid var(--border);
    background:rgba(255,252,247,0.95); backdrop-filter:blur(12px); color:var(--text);
    cursor:pointer; display:flex; align-items:center; justify-content:center; transition:var(--transition);
}
.bu-ctrl:hover { border-color:var(--accent); background:var(--accent-subtle); transform: translateY(-1px); }
.bu-ctrl:active { transform: translateY(0); }
.bu-hint {
    position:absolute; bottom:32px; left:50%; transform:translateX(-50%);
    font-size:11px; color:var(--text-dim); opacity:.85;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255,252,247,0.85); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(26,20,14,0.07);
    pointer-events:none; z-index:20; white-space:nowrap;
    letter-spacing: 0.2px;
}

.bu-detail {
    position:absolute; top:20px; left:20px; bottom:20px; width:400px;
    background:rgba(255,252,247,0.96); backdrop-filter:blur(24px); border:1px solid var(--border);
    border-radius:var(--radius); overflow-y:auto; z-index:30; padding:24px;
    animation:buSlideIn .35s cubic-bezier(.4,0,.2,1);
}
@keyframes buSlideIn { from { transform:translateX(-110%); opacity:0; } to { transform:translateX(0); opacity:1; } }
.bu-detail-close {
    position:absolute; top:12px; right:12px; width:28px; height:28px; border-radius:50%;
    border:1px solid var(--border); background:transparent; color:var(--text-dim);
    cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px;
    transition:var(--transition);
}
.bu-detail-close:hover { border-color:var(--accent); color:var(--text); }
.bu-detail h3 { font-size:18px; font-weight:700; margin-bottom:4px; }
.bu-detail .bd-sub { font-size:12px; color:var(--text-dim); margin-bottom:20px; }
.bd-platform {
    background:rgba(26,20,14,.025); border:1px solid var(--border); border-radius:var(--radius-sm);
    padding:16px; margin-bottom:12px; transition:var(--transition);
}
.bd-platform:hover { border-color:rgba(26,20,14,.14); }
.bd-platform-header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.bd-platform-header .bd-p-icon { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.bd-platform-header .bd-p-name { font-size:14px; font-weight:600; }
.bd-platform-header .bd-p-user { font-size:11px; color:var(--text-dim); }
.bd-metrics { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.bd-metric { text-align:center; }
.bd-metric .bd-m-val { font-size:18px; font-weight:800; background:linear-gradient(135deg,var(--text),rgba(26,23,20,0.7)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.bd-metric .bd-m-lbl { font-size:9px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px; margin-top:2px; }

.bu-total-bar {
    position:absolute; top:24px; left:50%; transform:translateX(-50%); z-index:20;
    display:flex; gap:4px; padding:6px; border-radius:48px;
    background:rgba(255,252,247,0.92); backdrop-filter:blur(16px) saturate(140%);
    -webkit-backdrop-filter:blur(16px) saturate(140%);
    border:1px solid rgba(26,20,14,0.08);
    box-shadow: 0 4px 16px rgba(26,20,14,0.08), 0 12px 32px rgba(26,20,14,0.06);
    font-size:13px; white-space:nowrap;
}
.bu-total-bar .bt-item {
    display:flex; align-items:center; gap:8px;
    padding:8px 18px; border-radius:40px;
    transition: var(--transition);
}
.bu-total-bar .bt-item:hover { background: rgba(232,128,74,0.10); }
.bu-total-bar .bt-clickable { cursor:pointer; user-select:none; }
.bu-total-bar .bt-clickable.bt-active {
    background: rgba(109,181,138,0.12);
    border-radius: 40px;
}
.bu-total-bar .bt-clickable.bt-active .bt-val { color: var(--green); }
.bu-total-bar .bt-clickable.bt-active .bt-lbl { color: var(--green); }
.bu-total-bar .bt-item + .bt-item { position:relative; }
.bu-total-bar .bt-item + .bt-item::before {
    content:''; position:absolute; right:-2px; top:25%; bottom:25%;
    width:1px; background:rgba(26,20,14,0.10);
}
.bu-total-bar .bt-val {
    font-weight:700; font-size:16px;
    color: var(--text);
    letter-spacing:-0.4px;
    font-variant-numeric: tabular-nums;
}
.bu-total-bar .bt-lbl {
    color:var(--text-dim); font-size:11px;
    text-transform:uppercase; letter-spacing:0.5px;
}

/* ===== OVERVIEW TOOLBAR ===== */
.ov-toolbar {
    position:absolute; top:80px; left:50%; transform:translateX(-50%); z-index:20;
    display:flex; align-items:center; gap:8px;
    padding:5px 8px; border-radius:14px;
    background:rgba(255,252,247,0.88); backdrop-filter:blur(14px) saturate(130%);
    -webkit-backdrop-filter:blur(14px) saturate(130%);
    border:1px solid rgba(26,20,14,0.07);
    box-shadow: 0 2px 10px rgba(26,20,14,0.06);
}
.ov-select {
    appearance:none; -webkit-appearance:none;
    background:rgba(26,20,14,0.04); border:1px solid rgba(26,20,14,0.08);
    border-radius:8px; padding:6px 12px 6px 26px; font-size:12px;
    color:var(--text); cursor:pointer; font-family:inherit;
    transition:var(--transition);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231a140e' opacity='.4'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:10px center;
}
.ov-select:hover { border-color:rgba(232,128,74,0.3); background-color:rgba(232,128,74,0.06); }
.ov-select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px rgba(232,128,74,0.15); }
.ov-view-toggle {
    display:flex; gap:2px; padding:2px;
    background:rgba(26,20,14,0.04); border-radius:8px;
}
.ov-view-btn {
    width:30px; height:30px; border:none; border-radius:6px;
    background:transparent; color:var(--text-dim); cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:var(--transition);
}
.ov-view-btn:hover { color:var(--text); background:rgba(26,20,14,0.06); }
.ov-view-btn.active { background:rgba(232,128,74,0.15); color:var(--accent); }

/* ===== OVERVIEW LIST VIEW ===== */
.ov-list {
    position:absolute; top:120px; left:50%; transform:translateX(-50%);
    width:calc(100% - 48px); max-width:900px; max-height:calc(100% - 160px);
    overflow-y:auto; z-index:15;
    background:rgba(255,252,247,0.92); backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-radius:16px; border:1px solid rgba(26,20,14,0.08);
    box-shadow: 0 4px 20px rgba(26,20,14,0.08);
    padding:4px;
}
.ov-list::-webkit-scrollbar { width:6px; }
.ov-list::-webkit-scrollbar-track { background:transparent; }
.ov-list::-webkit-scrollbar-thumb { background:rgba(26,20,14,0.12); border-radius:3px; }
.ov-list::-webkit-scrollbar-thumb:hover { background:rgba(26,20,14,0.2); }
.ov-list-header {
    display:grid; grid-template-columns:36px 1.8fr repeat(4,1fr) 80px;
    gap:4px; padding:10px 14px 8px; font-size:10px;
    color:var(--text-dim); text-transform:uppercase; letter-spacing:0.5px;
    border-bottom:1px solid rgba(26,20,14,0.06);
    position:sticky; top:0; background:rgba(255,252,247,0.95);
    backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
    z-index:2; border-radius:12px 12px 0 0;
}
.ov-list-row {
    display:grid; grid-template-columns:36px 1.8fr repeat(4,1fr) 80px;
    gap:4px; padding:10px 14px; align-items:center;
    border-radius:10px; cursor:pointer;
    transition:var(--transition);
    animation: ovRowIn 0.3s ease both;
}
@keyframes ovRowIn {
    from { opacity:0; transform:translateY(6px); }
    to { opacity:1; transform:translateY(0); }
}
.ov-list-row:hover { background:rgba(232,128,74,0.06); }
.ov-list-row:active { background:rgba(232,128,74,0.1); transform:scale(0.995); }
.ov-row-inactive { opacity:0.5; filter:grayscale(0.5); }
.ov-row-inactive:hover { opacity:0.75; filter:grayscale(0.2); }
.ov-lr-rank {
    font-size:12px; font-weight:700; color:var(--text-dim);
    text-align:center; font-variant-numeric:tabular-nums;
}
.ov-lr-name {
    display:flex; align-items:center; gap:10px; min-width:0;
}
.ov-lr-avatar {
    width:34px; height:34px; border-radius:50%; object-fit:cover;
    border:2px solid rgba(26,20,14,0.06); flex-shrink:0;
}
.ov-lr-avatar-ph {
    width:34px; height:34px; border-radius:50%; flex-shrink:0;
    background:linear-gradient(135deg, var(--accent), var(--accent-dark));
    color:white; display:flex; align-items:center; justify-content:center;
    font-size:14px; font-weight:700;
}
.ov-lr-user {
    font-size:13px; font-weight:600; color:var(--text);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ov-lr-full {
    font-size:10px; color:var(--text-dim); margin-top:1px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ov-lr-stat {
    font-size:13px; font-weight:600; color:var(--text);
    font-variant-numeric:tabular-nums; text-align:center;
}
.ov-lr-status {
    font-size:11px; font-weight:600; text-align:center;
}
.ov-lh-rank { text-align:center; }
.ov-lh-stat { text-align:center; }
.ov-lh-sort {
    cursor:pointer; user-select:none;
    transition:var(--transition);
    border-radius:4px; padding:2px 4px; margin:-2px -4px;
}
.ov-lh-sort:hover { color:var(--accent); background:rgba(232,128,74,0.06); }
.ov-lh-active { color:var(--accent) !important; font-weight:700; }

/* ===== CLICKABLE PLATFORM CARDS ===== */
.platform-card.clickable { cursor: pointer; }
.platform-card.clickable:hover {
    border-color: rgba(232, 128, 74, 0.4);
    box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
}
.platform-card.clickable .platform-header::after {
    content: '\2190';
    margin-right: auto;
    font-size: 18px;
    color: var(--text-dim);
    transition: var(--transition);
}
.platform-card.clickable:hover .platform-header::after {
    color: var(--accent-light);
    transform: translateX(-4px);
}

.platform-detail-view {
    animation: fadeSlideUp 0.3s ease;
}
.platform-detail-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; color: var(--accent-light);
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: inherit; padding: 8px 0; margin-bottom: 16px;
    transition: var(--transition);
}
.platform-detail-back:hover { color: var(--accent); }

.platform-detail-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px; padding: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); position: relative; overflow: hidden;
}
.platform-detail-header::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
}
.platform-detail-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
}
.platform-detail-info h3 { font-size: 20px; font-weight: 700; }
.platform-detail-info .pd-user { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

.pd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.pd-stat {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; text-align: center;
    transition: var(--transition);
}
.pd-stat:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.pd-stat.pd-stat-primary {
    border-color: rgba(232,128,74,0.3);
    background: linear-gradient(135deg, rgba(232,128,74,0.08), var(--bg-card));
    box-shadow: 0 0 16px rgba(232,128,74,0.1);
}
.pd-stat .pd-stat-val {
    font-size: 24px; font-weight: 800;
    background: linear-gradient(135deg, var(--text), rgba(26,23,20,0.7));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.pd-stat.pd-stat-primary .pd-stat-val {
    font-size: 30px;
    background: linear-gradient(135deg, #f4a47a, #e8804a);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(232,128,74,0.4));
}
.pd-stat .pd-stat-lbl {
    font-size: 10px; color: var(--text-dim); text-transform: uppercase;
    letter-spacing: 0.8px; font-weight: 600; margin-top: 6px;
}

/* Collapsed empty sections */
.section-collapsed {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
    background: var(--bg);
}
.section-collapsed:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.section-collapsed h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin: 0;
}
.section-collapsed .collapsed-hint {
    font-size: 11px;
    color: var(--text-dim);
    opacity: 0.7;
}

/* ===== CALENDAR VIEW ===== */
.ov-calendar {
    position:absolute; top:120px; left:24px; right:24px; bottom:16px;
    z-index:15;
    background:rgba(255,252,247,0.92); backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-radius:16px; border:1px solid rgba(26,20,14,0.08);
    box-shadow: 0 4px 20px rgba(26,20,14,0.08);
    display:flex; flex-direction:column;
    overflow:hidden;
}

/* Navigation bar */
.cal-nav {
    display:flex; align-items:center; justify-content:space-between;
    padding:12px 16px; border-bottom:1px solid rgba(26,20,14,0.06);
    gap:12px; flex-wrap:wrap;
}
.cal-nav-arrows { display:flex; gap:4px; align-items:center; }
.cal-nav-btn {
    background:none; border:1px solid var(--border);
    border-radius:6px; padding:4px 10px; cursor:pointer;
    font-size:14px; font-family:inherit; color:var(--text);
    transition:var(--transition);
}
.cal-nav-btn:hover { border-color:var(--accent); color:var(--accent); background:rgba(232,128,74,0.06); }
.cal-today-btn { font-size:11px; font-weight:600; }
.cal-nav-title { font-size:16px; font-weight:700; color:var(--text); }
.cal-nav-views { display:flex; gap:2px; background:rgba(26,20,14,0.04); border-radius:8px; padding:2px; }
.cal-vbtn {
    background:none; border:none; padding:5px 12px; border-radius:6px;
    font-size:11px; font-weight:600; cursor:pointer; font-family:inherit;
    color:var(--text-dim); transition:var(--transition);
}
.cal-vbtn:hover { color:var(--text); }
.cal-vbtn.active { background:var(--accent); color:white; }

/* ---- Month view ---- */
.cal-grid-month { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.cal-weekdays {
    display:grid; grid-template-columns:repeat(7, 1fr);
    border-bottom:1px solid rgba(26,20,14,0.06);
}
.cal-wh {
    text-align:center; padding:8px 4px;
    font-size:10px; font-weight:600; color:var(--text-dim);
    text-transform:uppercase; letter-spacing:0.5px;
}
.cal-cells {
    display:grid; grid-template-columns:repeat(7, 1fr);
    flex:1; overflow-y:auto;
}
.cal-cell {
    min-height:90px; padding:6px;
    border-bottom:1px solid rgba(26,20,14,0.04);
    border-left:1px solid rgba(26,20,14,0.04);
    cursor:pointer; transition:var(--transition);
}
.cal-cell:hover { background:rgba(232,128,74,0.04); }
.cal-cell-empty { cursor:default; background:rgba(26,20,14,0.015); }
.cal-cell-empty:hover { background:rgba(26,20,14,0.015); }
.cal-cell-num {
    font-size:13px; font-weight:600; color:var(--text);
    margin-bottom:4px;
}
.cal-cell-today { background:rgba(232,128,74,0.05); }
.cal-cell-today .cal-cell-num {
    background:var(--accent); color:white;
    width:26px; height:26px; border-radius:50%;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:12px;
}
.cal-cell-dots {
    display:flex; flex-wrap:wrap; gap:3px; margin-bottom:3px;
}
.cal-dot-avatar {
    width:18px; height:18px; border-radius:50%; object-fit:cover;
    border:1px solid rgba(26,20,14,0.08);
}
.cal-dot-more {
    width:18px; height:18px; border-radius:50%; font-size:8px;
    background:var(--accent-subtle); color:var(--accent); font-weight:700;
    display:flex; align-items:center; justify-content:center;
}
.cal-cell-count {
    font-size:9px; color:var(--text-dim); line-height:1.4;
}
.cal-cell-has { border-left-color:rgba(232,128,74,0.15); }

/* ---- Year view ---- */
.cal-grid-year {
    flex:1; display:grid; grid-template-columns:repeat(4, 1fr);
    gap:12px; padding:14px; overflow-y:auto;
}
.cal-year-month {
    background:var(--bg-card); border:1px solid var(--border);
    border-radius:10px; padding:10px; cursor:pointer;
    transition:var(--transition);
}
.cal-year-month:hover { border-color:var(--accent); box-shadow:var(--shadow-sm); }
.cal-year-mheader {
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom:6px; padding-bottom:5px;
    border-bottom:1px solid rgba(26,20,14,0.05);
}
.cal-year-mname { font-size:12px; font-weight:700; color:var(--text); }
.cal-year-mcount { font-size:9px; color:var(--text-dim); font-weight:500; }
.cal-year-mini {
    display:grid; grid-template-columns:repeat(7, 1fr); gap:1px;
}
.cal-year-wh {
    text-align:center; font-size:8px; font-weight:600;
    color:var(--text-dim); padding:2px 0; opacity:0.6;
}
.cal-year-day {
    text-align:center; font-size:9px; padding:3px 1px;
    border-radius:3px; color:var(--text-dim); cursor:pointer;
    transition:var(--transition); line-height:1.3;
}
.cal-year-day:hover { background:rgba(232,128,74,0.1); }
.cal-yd-has { background:rgba(232,128,74,0.1); color:var(--accent); font-weight:600; }
.cal-yd-warm { background:rgba(232,128,74,0.2); color:var(--accent-dark); font-weight:700; }
.cal-yd-hot { background:rgba(232,128,74,0.35); color:white; font-weight:700; }
.cal-yd-ours { box-shadow:0 0 0 1.5px var(--green) inset; }
.cal-yd-today {
    background:var(--accent) !important; color:white !important;
    font-weight:700; border-radius:50%;
}

/* ---- Week view ---- */
.cal-grid-week {
    flex:1; display:grid; grid-template-columns:repeat(7, 1fr);
    overflow:hidden;
}
.cal-week-col {
    display:flex; flex-direction:column;
    border-left:1px solid rgba(26,20,14,0.06);
    overflow:hidden;
}
.cal-week-col:first-child { border-left:none; }
.cal-week-header {
    padding:8px 6px; text-align:center;
    border-bottom:1px solid rgba(26,20,14,0.06);
    cursor:pointer; transition:var(--transition);
}
.cal-week-header:hover { background:rgba(232,128,74,0.06); }
.cal-week-today { background:rgba(232,128,74,0.04); }
.cal-week-today .cal-day-num {
    background:var(--accent); color:white;
    width:28px; height:28px; border-radius:50%;
    display:inline-flex; align-items:center; justify-content:center;
}
.cal-week-posts {
    flex:1; overflow-y:auto; padding:6px;
    display:flex; flex-direction:column; gap:6px;
}
.cal-week-posts::-webkit-scrollbar { width:4px; }
.cal-week-posts::-webkit-scrollbar-thumb { background:rgba(26,20,14,0.1); border-radius:2px; }

.cal-post {
    display:flex; align-items:flex-start; gap:8px;
    padding:8px; border-radius:8px;
    background:var(--bg-card); border:1px solid var(--border);
    cursor:pointer; text-decoration:none; color:var(--text);
    transition:var(--transition);
}
.cal-post:hover { border-color:var(--accent); box-shadow:var(--shadow-sm); transform:translateY(-1px); }
.cal-post.cal-ours { border-color:rgba(109,181,138,0.4); background:linear-gradient(135deg, rgba(109,181,138,0.06), var(--bg-card)); }
.cal-post-avatar { width:24px; height:24px; border-radius:50%; object-fit:cover; flex-shrink:0; border:1.5px solid var(--border); }
.cal-post-avatar-ph { width:24px; height:24px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg, var(--accent), var(--accent-dark)); color:white; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; }
.cal-post-info { flex:1; min-width:0; }
.cal-post-user { font-size:10px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-post-caption { font-size:9px; color:var(--text-dim); margin-top:2px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cal-post-meta { font-size:9px; color:var(--text-dim); margin-top:3px; display:flex; gap:5px; align-items:center; flex-wrap:wrap; }
.cal-post-meta b { font-weight:600; color:var(--text); }
.cal-day-name { font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); font-weight:600; }
.cal-day-num { font-size:16px; font-weight:700; color:var(--text); margin-top:2px; }
.cal-day-count { font-size:9px; color:var(--text-dim); margin-top:2px; font-weight:500; }
.cal-day-empty { padding:12px 8px; text-align:center; font-size:10px; color:var(--text-dim); opacity:0.4; }

/* ---- Day view ---- */
.cal-day-view { flex:1; overflow-y:auto; padding:16px; }
.cal-day-view-header { font-size:14px; font-weight:700; color:var(--text); margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.cal-day-detail-list { display:flex; flex-direction:column; gap:10px; }
.cal-detail-post {
    display:flex; align-items:flex-start; gap:14px;
    padding:14px; border-radius:10px;
    background:var(--bg-card); border:1px solid var(--border);
    text-decoration:none; color:var(--text);
    transition:var(--transition);
}
.cal-detail-post:hover { border-color:var(--accent); box-shadow:var(--shadow-sm); }
.cal-detail-post.cal-ours { border-color:rgba(109,181,138,0.4); background:linear-gradient(135deg, rgba(109,181,138,0.04), var(--bg-card)); }
.cal-detail-right { display:flex; gap:10px; flex:1; min-width:0; }
.cal-detail-avatar { width:36px; height:36px; border-radius:50%; object-fit:cover; flex-shrink:0; border:2px solid var(--border); }
.cal-detail-info { flex:1; min-width:0; }
.cal-detail-user { font-size:13px; font-weight:600; display:flex; align-items:center; gap:6px; }
.cal-detail-plat { display:inline-flex; }
.cal-detail-plat svg { width:14px; height:14px; }
.cal-detail-caption { font-size:12px; color:var(--text-dim); margin-top:4px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.cal-detail-metrics { display:flex; gap:12px; margin-top:8px; font-size:12px; color:var(--text-dim); flex-wrap:wrap; }
.cal-detail-metrics b { color:var(--text); margin-left:3px; }
.cal-detail-thumb { width:80px; height:80px; border-radius:8px; object-fit:cover; flex-shrink:0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar { width: 240px; }
    .main-content { margin-right: 240px; padding: 20px 16px; }
    .bu { right: 240px; }
    .bu-detail { width: calc(100% - 40px); }
    .bu-total-bar { font-size:10px; gap:12px; padding:8px 16px; }
    .ov-toolbar { gap:4px; padding:4px 6px; flex-wrap:wrap; justify-content:center; }
    .ov-select { font-size:11px; padding:5px 10px 5px 22px; }
    .ov-list { width:calc(100% - 24px); top:130px; max-height:calc(100% - 170px); }
    .ov-list-header, .ov-list-row { grid-template-columns:28px 1.5fr repeat(4,1fr) 64px; gap:2px; padding:8px 8px; }
    .ov-lr-avatar, .ov-lr-avatar-ph { width:28px; height:28px; }
    .ov-lr-user { font-size:11px; }
    .ov-lr-stat { font-size:11px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; text-align: center; }
    .dashboard-header .actions { margin: 12px auto 0; }
    .insights-grid { grid-template-columns: repeat(2, 1fr); }
    .cal-grid-year { grid-template-columns:repeat(3, 1fr); gap:8px; padding:10px; }
    .cal-grid-week { grid-template-columns:repeat(3, 1fr); }
}

/* ===== INACTIVE CLIENT (sidebar) ===== */
.client-item.client-inactive {
    opacity: 0.45;
    filter: grayscale(0.7);
}
.client-item.client-inactive:hover {
    opacity: 0.7;
    filter: grayscale(0.3);
}
.client-item.client-inactive.active {
    opacity: 0.65;
    filter: grayscale(0.3);
}

/* ===== CLIENT STATUS TAGS ===== */
.client-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid;
    margin-right: 4px;
    vertical-align: middle;
}

/* ===== INSIGHTS CARDS ===== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    transition: var(--transition);
}
.insight-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.insight-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.insight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--accent-subtle);
    color: var(--accent);
    flex-shrink: 0;
}
.insight-icon svg { width: 15px; height: 15px; }
.verified-mark {
    display: inline-flex; align-items: center; vertical-align: middle;
    color: var(--blue); margin-left: 4px;
}
.verified-mark svg { width: 16px; height: 16px; }
.comp-icon-btn { padding: 6px 8px; min-width: auto; }

.insight-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.insight-badge {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.insight-tip {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.6;
}

.insight-sub {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}


/* Sync-all button spinner */
@keyframes sync-spin { to { transform: rotate(360deg); } }
.sb-foot-btn svg.spin { animation: sync-spin 0.9s linear infinite; }
.sb-foot-btn:disabled { opacity: 0.85; cursor: wait; }
.sync-progress-label { font-size: 11px; }


/* ===== SCRAPED POSTS ===== */
.sp-empty {
    text-align: center; padding: 50px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius);
    color: var(--text);
}
.sp-empty svg { width: 38px; height: 38px; }
.sp-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.sp-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    position: relative;
    overflow: hidden;
}
.sp-stat::before {
    content: ''; position: absolute;
    top: 0; right: 0; width: 3px; height: 100%;
    background: var(--accent);
}
.sp-stat-val {
    font-size: 20px; font-weight: 800;
    color: var(--text); letter-spacing: -0.4px;
    font-variant-numeric: tabular-nums;
}
.sp-stat-lbl {
    font-size: 11px; color: var(--text-dim); margin-top: 2px;
}
.sp-filter {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}
.sp-filter:focus { border-color: var(--accent); }
.sp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.sp-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 14px 12px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: postIn 0.35s ease forwards;
}
.sp-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; height: 3px;
    width: 100%;
    background: var(--accent);
    opacity: 0.4;
    transition: var(--transition);
}
.sp-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.sp-card:hover::before { opacity: 1; }
.sp-card.sp-hot {
    border-color: rgba(232, 128, 74, 0.45);
    background: linear-gradient(180deg, rgba(232, 128, 74, 0.04), var(--bg-card));
}
.sp-card.sp-hot::before { opacity: 1; height: 4px; }

/* "Our work" highlighted posts */
.sp-card.sp-ours {
    border-color: rgba(109, 181, 138, 0.45);
    background: linear-gradient(180deg, rgba(109, 181, 138, 0.06), var(--bg-card));
}
.sp-card.sp-ours::before {
    background: var(--green);
    opacity: 1;
    height: 4px;
}
.sp-ours-badge {
    background: var(--green);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.sp-card-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.sp-ours-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-family: inherit;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}
.sp-ours-btn:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-glow);
}
.sp-ours-btn.active {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-glow);
    font-weight: 600;
}

.sp-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.sp-platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.sp-platform-pill svg { width: 12px; height: 12px; color: #fff; }
.sp-platform-pill .sp-mt { letter-spacing: 0.3px; }
.sp-hot-pill {
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.sp-primary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.sp-primary-icon {
    font-size: 14px;
    color: var(--accent);
    line-height: 1;
}
.sp-primary-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.sp-primary-lbl {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sp-caption {
    font-size: 12px;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.88;
    flex: 1;
    min-height: 36px;
}
.sp-empty-cap {
    color: var(--text-dim);
    font-style: italic;
    opacity: 0.5;
}

.sp-metrics .sp-date {
    margin-right: auto;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 10px;
    opacity: 0.85;
    direction: rtl;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.sp-metrics b {
    color: var(--accent-dark);
    font-weight: 700;
    margin-left: 2px;
}

.sp-metrics {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    flex-wrap: wrap;
    font-variant-numeric: tabular-nums;
}


/* ===== SCRAPED ANALYTICS (advisor view) ===== */
.sa-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.sa-kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
}
.sa-kpi::before {
    content: ''; position: absolute;
    top: 0; right: 0; width: 3px; height: 100%;
    background: var(--accent);
}
.sa-kpi-val {
    font-size: 24px; font-weight: 800;
    color: var(--text); letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.sa-kpi-lbl {
    font-size: 11px; color: var(--text-dim);
    margin-top: 6px; letter-spacing: 0.3px;
}
.sa-kpi-sub {
    font-size: 10px; color: var(--text-dim);
    margin-top: 3px; opacity: 0.7;
}

.sa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.sa-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.sa-card.sa-wide { grid-column: span 1; }
.sa-card.sa-fullwide { grid-column: span 2; }
@media (min-width: 1100px) {
    .sa-grid { grid-template-columns: repeat(3, 1fr); }
    .sa-card.sa-wide { grid-column: span 2; }
    .sa-card.sa-fullwide { grid-column: span 3; }
}
.sa-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    opacity: 0.85;
    padding-right: 10px;
    border-right: 3px solid var(--accent);
    line-height: 1.2;
}

/* Hashtag list */
.sa-hashtags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.sa-hashtag {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: rgba(232,128,74,0.04);
    border: 1px solid rgba(232,128,74,0.12);
    border-radius: 8px;
    font-size: 12px;
}
.sa-tag { font-weight: 700; color: var(--accent-dark); }
.sa-tag-count { font-size: 11px; color: var(--text-dim); }
.sa-tag-eng { font-size: 11px; color: var(--text); margin-right: auto; font-variant-numeric: tabular-nums; }

/* Top performers table */
.sa-top-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.sa-top-table th {
    text-align: right;
    color: var(--text-dim);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
}
.sa-top-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.sa-top-table tr:last-child td { border-bottom: none; }
.sa-top-table tr:hover td { background: rgba(232,128,74,0.04); }
.sa-top-table .sa-cap { color: var(--text); max-width: 350px; }
.sa-top-table .sa-open {
    color: var(--accent);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
}
.sa-top-table .sa-open:hover { color: var(--accent-dark); }

/* ===== SYNC RESULTS PANEL ===== */
/* ── Sync Live Panel ─────────────────────────────────────────────────────── */
.sync-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    max-height: 55vh;
    direction: rtl;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.03);
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: syncPanelIn 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
    font-family: 'Cairo', sans-serif;
}
@keyframes syncPanelIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.sync-panel.exiting {
    animation: syncPanelOut 0.2s ease forwards;
}
@keyframes syncPanelOut {
    to { transform: translateY(16px) scale(0.96); opacity: 0; }
}
.sync-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-card);
}
.sync-panel-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sync-panel-title .spin {
    color: var(--accent);
}
.sync-panel-counts {
    display: flex;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    direction: ltr;
}
.sync-count-ok   { color: var(--green); }
.sync-count-fail { color: var(--red); }
.sync-panel-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sync-panel-btn:hover:not(:disabled) {
    color: var(--text);
    background: var(--accent-subtle);
}
.sync-panel-btn:disabled {
    opacity: 0.25;
    cursor: default;
}
.sync-panel-body {
    overflow-y: auto;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    max-height: 40vh;
}
.sync-client-group {
    padding: 2px 0;
}
.sync-client-group + .sync-client-group {
    border-top: 1px solid var(--border);
    margin-top: 2px;
    padding-top: 4px;
}
.sync-client-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-dark);
    padding: 4px 14px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sync-client-name .spin {
    color: var(--accent);
    width: 10px;
    height: 10px;
}
.sync-platform-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 10px;
    transition: background 0.12s;
}
.sync-platform-row:hover { background: var(--accent-subtle); }
.sync-platform-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sync-platform-icon svg { width: 12px; height: 12px; fill: #fff; }
.sync-platform-label {
    flex: 1;
    min-width: 0;
}
.sync-platform-label .plat-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sync-platform-label .plat-handle {
    font-size: 10px;
    color: var(--text-dim);
    direction: ltr;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sync-status-ok {
    color: var(--green);
    font-size: 13px;
    flex-shrink: 0;
    font-weight: 700;
}
.sync-status-fail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    gap: 1px;
}
.sync-status-fail .fail-icon {
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
}
.sync-status-fail .fail-reason {
    font-size: 9px;
    color: var(--red);
    max-width: 100px;
    text-align: right;
    line-height: 1.2;
    word-break: break-word;
}
.sync-panel-footer {
    padding: 6px 14px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    color: var(--text-dim);
    flex-shrink: 0;
    background: var(--bg-card);
}
.sp-row-fail {
    background: var(--red-glow);
}
.sync-panel.sync-panel-minimized .sync-panel-body,
.sync-panel.sync-panel-minimized .sync-panel-footer {
    display: none;
}
.sync-panel.sync-panel-minimized {
    max-height: none;
}
/* Avatar in client row */
.sp-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    flex-shrink: 0;
}
.sp-avatar-ph {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-light);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
}
/* Follower delta badges */
.sp-delta-up {
    font-size: 10px;
    font-weight: 700;
    color: var(--green);
    margin-right: 4px;
}
.sp-delta-down {
    font-size: 10px;
    font-weight: 700;
    color: var(--red);
    margin-right: 4px;
}
/* Connect button on failed platform */
.sp-connect-btn {
    font-size: 9px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    padding: 1px 8px;
    border: 1px solid var(--accent);
    background: var(--accent-subtle);
    color: var(--accent-dark);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 2px;
    transition: var(--transition);
}
.sp-connect-btn:hover {
    background: var(--accent);
    color: #fff;
}
/* Toggle switch */
.toggle-switch { position:relative; display:inline-block; width:36px; height:20px; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:var(--border); border-radius:20px; cursor:pointer; transition:0.2s; }
.toggle-slider::before { content:""; position:absolute; width:16px; height:16px; left:2px; bottom:2px; background:#fff; border-radius:50%; transition:0.2s; }
.toggle-switch input:checked + .toggle-slider { background:var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform:translateX(16px); }
