/**
 * Dashboard CSS — "Obsidian Command Center"
 * Premium analytics dashboard with depth, glass, and precision.
 *
 * Dashboard-specific only. Never override global .card, .btn, .platform-badge.
 * Design tokens from design-tokens.css, base components from components.css.
 */

/* === Dashboard Shell === */
.dashboard {
    padding: 2rem 0 3rem;
    position: relative;
}

/* Ambient glow behind dashboard - creates depth atmosphere */
.dashboard::before {
    content: '';
    position: fixed;
    top: -40%;
    left: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(20, 184, 166, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.dashboard::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -15%;
    width: 50%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* === Dashboard Header === */
.dashboard-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-header p {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* === Refresh Button — Premium Glass Pill === */
.dash-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-body);
    min-height: 38px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(20, 184, 166, 0);
    letter-spacing: 0.01em;
}

.dash-refresh-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    opacity: 0;
    transition: opacity 280ms ease;
}

.dash-refresh-btn:hover {
    border-color: rgba(20, 184, 166, 0.4);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.15), 0 0 0 1px rgba(20, 184, 166, 0.1);
}

.dash-refresh-btn:hover::before {
    opacity: 1;
}

.dash-refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition-duration: 100ms;
}

.dash-refresh-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dash-refresh-btn svg {
    width: 15px;
    height: 15px;
    position: relative;
    z-index: 1;
}

.dash-refresh-btn span {
    position: relative;
    z-index: 1;
}

.dash-refresh-btn .spinning {
    animation: spinner-rotate 0.7s linear infinite;
}

/* === App Launcher Section — Elevated Cards === */
.app-launcher {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.app-launcher-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    transition: all 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Gradient border overlay on hover */
.app-launcher-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 280ms ease;
}

.app-launcher-card.story-shorts::after {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.5), rgba(34, 211, 238, 0.3));
}

.app-launcher-card.ugc-pipeline::after {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(251, 146, 60, 0.3));
}

.app-launcher-card:hover {
    border-color: transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.app-launcher-card:hover::after {
    opacity: 1;
}

.app-launcher-card:active {
    transform: translateY(-1px);
    transition-duration: 100ms;
}

.app-launcher-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 1px solid;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.app-launcher-card.story-shorts .app-launcher-icon {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(34, 211, 238, 0.15));
    color: var(--color-primary);
    border-color: rgba(20, 184, 166, 0.25);
    box-shadow: 0 0 16px rgba(20, 184, 166, 0.08);
}

.app-launcher-card.ugc-pipeline .app-launcher-icon {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.15));
    color: var(--color-warning);
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.08);
}

.app-launcher-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.app-launcher-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    font-family: var(--font-heading);
    margin-bottom: 0.125rem;
}

.app-launcher-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

.app-launcher-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), color 280ms ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.app-launcher-card:hover .app-launcher-arrow {
    transform: translateX(5px);
    color: var(--color-primary);
}

/* === Filter Command Bar — Command Palette Aesthetic === */
.dash-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dash-filter-bar__section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-filter-bar__divider {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, transparent, var(--border-secondary), transparent);
    flex-shrink: 0;
    opacity: 0.6;
}

.dash-filter-bar__label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    font-family: var(--font-body);
}

/* === Platform Toggle Buttons — Refined Toggles === */
.dash-platform-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: transparent;
    cursor: pointer;
    transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.dash-platform-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 200ms ease;
}

.dash-platform-toggle svg {
    width: 16px;
    height: 16px;
    opacity: 0.3;
    transition: all 200ms ease;
    position: relative;
    z-index: 1;
}

.dash-platform-toggle:hover {
    border-color: var(--border-secondary);
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.dash-platform-toggle:hover svg {
    opacity: 0.6;
}

.dash-platform-toggle:active {
    transform: scale(0.95);
    transition-duration: 80ms;
}

/* Active platform states with glow */
.dash-platform-toggle.active {
    border-color: var(--color-primary);
    background: var(--color-primary-muted);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.12);
}

.dash-platform-toggle.active svg {
    opacity: 1;
}

.dash-platform-toggle.active.tiktok {
    border-color: var(--color-tiktok);
    background: var(--color-tiktok-bg);
    box-shadow: 0 0 12px rgba(254, 44, 85, 0.1);
}

.dash-platform-toggle.active.instagram {
    border-color: var(--color-instagram);
    background: var(--color-instagram-bg);
    box-shadow: 0 0 12px rgba(228, 64, 95, 0.1);
}

.dash-platform-toggle.active.youtube {
    border-color: var(--color-youtube);
    background: var(--color-youtube-bg);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.08);
}

/* === Period / Metric Select — Refined Dropdowns === */
.dash-period-select {
    padding: 0.4375rem 2.125rem 0.4375rem 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 200ms ease;
    min-height: 36px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dash-period-select:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dash-period-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--input-focus-shadow);
}

/* === Stat Cards Grid — Premium Elevated Cards === */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.dash-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.25rem 1.375rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Subtle gradient sheen on cards */
.dash-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 50%, transparent 100%);
    pointer-events: none;
}

.dash-stat:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

/* Stagger animation for stat cards */
.dash-stats .dash-stat {
    animation: dashStatEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.dash-stats .dash-stat:nth-child(1) { animation-delay: 0.04s; }
.dash-stats .dash-stat:nth-child(2) { animation-delay: 0.08s; }
.dash-stats .dash-stat:nth-child(3) { animation-delay: 0.12s; }
.dash-stats .dash-stat:nth-child(4) { animation-delay: 0.16s; }
.dash-stats .dash-stat:nth-child(5) { animation-delay: 0.20s; }
.dash-stats .dash-stat:nth-child(6) { animation-delay: 0.24s; }
.dash-stats .dash-stat:nth-child(7) { animation-delay: 0.28s; }
.dash-stats .dash-stat:nth-child(8) { animation-delay: 0.32s; }

@keyframes dashStatEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Stat Icon — Gradient Glow Circles === */
.dash-stat__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
    position: relative;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dash-stat:hover .dash-stat__icon {
    transform: scale(1.08);
}

.dash-stat__icon--teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(20, 184, 166, 0.08));
    color: var(--color-primary);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.1), inset 0 1px 0 rgba(20, 184, 166, 0.15);
}

.dash-stat__icon--green {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.08));
    color: var(--color-success);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.1), inset 0 1px 0 rgba(52, 211, 153, 0.15);
}

.dash-stat__icon--purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.08));
    color: var(--color-secondary-light);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1), inset 0 1px 0 rgba(139, 92, 246, 0.15);
}

.dash-stat__icon--amber {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.08));
    color: var(--color-warning);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1), inset 0 1px 0 rgba(251, 191, 36, 0.15);
}

.dash-stat__icon--cyan {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.08));
    color: var(--color-accent-cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.1), inset 0 1px 0 rgba(34, 211, 238, 0.15);
}

.dash-stat__icon--rose {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.22), rgba(251, 113, 133, 0.08));
    color: var(--color-danger);
    box-shadow: 0 0 20px rgba(251, 113, 133, 0.1), inset 0 1px 0 rgba(251, 113, 133, 0.15);
}

.dash-stat__icon--blue {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(96, 165, 250, 0.08));
    color: var(--color-info);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.1), inset 0 1px 0 rgba(96, 165, 250, 0.15);
}

.dash-stat__icon--lime {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.2), rgba(163, 230, 53, 0.08));
    color: var(--color-accent-lime);
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.08), inset 0 1px 0 rgba(163, 230, 53, 0.15);
}

/* === Stat Body === */
.dash-stat__body {
    flex: 1;
    min-width: 0;
}

.dash-stat__label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-stat__value {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.035em;
    font-family: var(--font-heading);
    margin-bottom: 0.375rem;
}

.dash-stat__change {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.dash-stat__change--up {
    color: var(--color-success);
    background: rgba(52, 211, 153, 0.12);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.06);
}

.dash-stat__change--down {
    color: var(--color-danger);
    background: rgba(251, 113, 133, 0.12);
    box-shadow: 0 0 8px rgba(251, 113, 133, 0.06);
}

.dash-stat__change--neutral {
    color: var(--text-tertiary);
    background: rgba(100, 116, 139, 0.12);
}

/* === Chart Row — Side by Side Panels === */
.dash-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* === Panel — Glass Elevated Container === */
.dash-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 300ms ease, border-color 300ms ease;
    overflow: hidden;
}

/* Top edge light */
.dash-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.dash-panel:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dash-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
}

.dash-panel__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    margin: 0;
}

.dash-panel__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-panel__select {
    padding: 0.375rem 1.875rem 0.375rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    transition: all 200ms ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dash-panel__select:hover {
    border-color: var(--border-secondary);
}

.dash-panel__select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}

/* === Chart Canvas Area === */
.dash-chart-wrap {
    position: relative;
    height: 280px;
}

/* === Data Tables Row === */
.dash-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* === Data Table — Refined Rows === */
.dash-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.dash-data-table thead {
    border-bottom: 1px solid var(--border-light);
}

.dash-data-table th {
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dash-data-table th.text-right {
    text-align: right;
}

.dash-data-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 180ms ease;
}

.dash-data-table tbody tr:last-child {
    border-bottom: none;
}

.dash-data-table tbody tr:hover {
    background: var(--table-row-hover);
}

.dash-data-table td {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.dash-data-table td.text-right {
    text-align: right;
}

.dash-data-table td.rank-cell {
    width: 2rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* Top 3 rank highlight */
.dash-data-table tbody tr:nth-child(1) .rank-cell {
    color: var(--color-accent-yellow);
}
.dash-data-table tbody tr:nth-child(2) .rank-cell {
    color: var(--text-tertiary);
}
.dash-data-table tbody tr:nth-child(3) .rank-cell {
    color: #CD7F32;
}

/* === Creator Row in Table === */
.dash-creator-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.dash-creator-row__avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    flex-shrink: 0;
    transition: all 200ms ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.dash-data-table tbody tr:hover .dash-creator-row__avatar {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}

.dash-creator-row__info {
    min-width: 0;
}

.dash-creator-row__name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    text-decoration: none;
    transition: color 180ms ease;
}

.dash-creator-row__name:hover {
    color: var(--color-primary);
}

.dash-creator-row__meta {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* === Video Row in Table === */
.dash-video-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: block;
}

.dash-video-creator {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* === Metric Value in Table === */
.dash-metric-val {
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* === Platform Dot === */
.dash-platform-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.dash-platform-dot--tiktok {
    background: var(--color-tiktok);
    box-shadow: 0 0 6px rgba(254, 44, 85, 0.3);
}
.dash-platform-dot--instagram {
    background: var(--color-instagram);
    box-shadow: 0 0 6px rgba(228, 64, 95, 0.3);
}
.dash-platform-dot--youtube {
    background: var(--color-youtube);
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.25);
}

/* === Change Pill (inline in tables) === */
.dash-change-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.4375rem;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.dash-change-pill--up {
    color: var(--color-success);
    background: rgba(52, 211, 153, 0.12);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.06);
}

.dash-change-pill--down {
    color: var(--color-danger);
    background: rgba(251, 113, 133, 0.12);
    box-shadow: 0 0 6px rgba(251, 113, 133, 0.06);
}

/* === Trending Tags === */
.dash-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4375rem 0.875rem;
    border-radius: 8px;
    background: var(--badge-info-bg);
    color: var(--badge-info-text);
    border: 1px solid rgba(20, 184, 166, 0.1);
    transition: all 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    letter-spacing: 0.01em;
}

.dash-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.25);
    background: rgba(20, 184, 166, 0.15);
}

/* === Loading / Empty States === */
.dash-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 0.875rem;
    color: var(--text-secondary);
}

.dash-loading p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 400;
}

.dash-empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 400;
}

/* === Light Theme Adjustments === */
[data-theme="light"] .dashboard::before {
    background: radial-gradient(ellipse, rgba(13, 148, 136, 0.03) 0%, transparent 70%);
}

[data-theme="light"] .dashboard::after {
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.02) 0%, transparent 70%);
}

[data-theme="light"] .dash-stat::before,
[data-theme="light"] .dash-panel::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
}

[data-theme="light"] .dashboard-header h1 {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .dash-stat {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .dash-stat:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .dash-panel {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .dash-panel:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .app-launcher-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .app-launcher-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-chart-row { grid-template-columns: 1fr; }
    .dash-table-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard { padding: 1.25rem 0; }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .dashboard-header h1 { font-size: 1.5rem; }

    .dash-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }

    .dash-filter-bar__divider { display: none; }

    .dash-filter-bar__section {
        justify-content: flex-start;
    }

    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-stat__value { font-size: 1.25rem; }

    .dash-chart-row,
    .dash-table-row { grid-template-columns: 1fr; }

    .dash-chart-wrap { height: 220px; }

    .app-launcher { grid-template-columns: 1fr; }

    .dash-video-title { max-width: 160px; }
}

@media (max-width: 480px) {
    .dash-stats { grid-template-columns: 1fr; }

    .dash-stat {
        padding: 1rem;
    }

    .dash-panel {
        padding: 1.125rem;
        border-radius: 12px;
    }
}

/* === Print === */
@media print {
    .dash-filter-bar,
    .dash-refresh-btn,
    .app-launcher { display: none; }

    .dashboard::before,
    .dashboard::after { display: none; }

    .dash-stat,
    .dash-panel {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .dash-stats .dash-stat {
        animation: none;
    }

    .dash-stat,
    .dash-panel,
    .app-launcher-card,
    .dash-refresh-btn,
    .dash-platform-toggle,
    .dash-tag {
        transition: none;
    }

    .dash-stat:hover,
    .app-launcher-card:hover,
    .dash-refresh-btn:hover {
        transform: none;
    }
}
