/* Global app styles */

/* ── Shared widget label ─────────────────────────────────── */
.kpi-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 12px;
}

/* ── TV Dashboard shell ──────────────────────────────────── */
.tv-shell {
    background: #F9FAFB;
    overflow: hidden;
    font-family: 'DM Sans', 'Helvetica', 'Arial', sans-serif;
    color: #1B4332;
    display: flex;
    flex-direction: column;
    width: calc(100vw / 0.78);
    height: calc(100vh / 0.78);
    max-height: calc(100vh / 0.78);
    transform-origin: top left;
    zoom: 0.78;
}

/* ── TV Grid ─────────────────────────────────────────────── */
.tv-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 12px 24px 16px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.tv-column-title {
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1B4332;
    text-align: center;
    padding: 4px 0 20px;
}
.tv-slide-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    animation: tv-fade-in 0.6s ease-out;
}
@keyframes tv-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tv-slide {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tv-slide-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.tv-slide-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
}
.tv-slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D0D0D0;
    transition: background 0.3s ease;
}
.tv-slide-dot-active {
    background: #2196F3;
}
.tv-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Cards (match MudPaper Elevation=1 rounded-xl pa-5) ─── */
.tv-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),
                0 1px 1px 0 rgba(0,0,0,.14),
                0 1px 3px 0 rgba(0,0,0,.12);
    min-height: 0;
    overflow: hidden;
}

/* ── Shared label style (matches mobile widget labels) ──── */
.tv-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9E9E9E;
    margin-bottom: 12px;
}
.tv-empty {
    font-size: 14px;
    color: #9E9E9E;
    padding: 8px 0;
}
.tv-error {
    font-size: 13px;
    color: #F44336;
    padding: 8px 0;
}

/* ── Col 1 — Performance (matches PerformanceWidget) ────── */
.tv-figure-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.tv-figure {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}
.tv-target-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}
.tv-target-text {
    font-size: 13px;
    color: #9E9E9E;
}
.tv-target-value {
    font-size: 16px;
    font-weight: 500;
    color: #2196F3;
}
.tv-bar-track {
    height: 32px;
    border-radius: 999px;
    background: #EEEEEE;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.10),
                inset 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}
.tv-bar-fill {
    height: 100%;
    border-radius: 999px;
    position: relative;
    transition: width 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.tv-bar-green {
    background: linear-gradient(to bottom, #66BB6A 0%, #4CAF50 40%, #388E3C 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35),
                inset 0 -1px 0 rgba(0,0,0,0.15);
}
.tv-bar-red {
    background: linear-gradient(to bottom, #EF5350 0%, #F44336 40%, #D32F2F 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35),
                inset 0 -1px 0 rgba(0,0,0,0.15);
}
.tv-bar-gloss {
    position: absolute;
    top: 4px;
    left: 8px;
    right: 8px;
    height: 35%;
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.0) 100%);
    pointer-events: none;
}
.tv-bar-target-line {
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 0;
    pointer-events: none;
    z-index: 2;
}
.tv-bar-target-white {
    border-left: 2px solid rgba(255, 255, 255, 0.90);
}
.tv-bar-target-dark {
    border-left: 2px solid rgba(120, 120, 120, 0.50);
}
.tv-variance {
    margin-top: 16px;
    font-size: 15px;
    font-weight: 500;
}
.tv-context-note {
    font-size: 13px;
    color: #9E9E9E;
    margin-top: 6px;
}

/* ── Shared ranked list rows (staff + brand) ─────────────── */
.tv-ranked-row {
    padding: 6px 0;
}
.tv-ranked-line1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.tv-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2196F3;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tv-ranked-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}
.tv-ranked-value {
    font-size: 14px;
    font-weight: 700;
}
.tv-ranked-line2 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 32px;
}
.tv-ranked-count {
    font-size: 12px;
    color: #9E9E9E;
    white-space: nowrap;
    min-width: 60px;
}
.tv-ranked-bar-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.tv-ranked-bar-track {
    flex: 1;
    height: 12px;
    border-radius: 999px;
    background: #E0E0E0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.tv-ranked-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.35), #2196F3 40%, #1565C0);
    transition: width 0.4s ease;
}
.tv-ranked-pct {
    font-size: 12px;
    color: #9E9E9E;
    white-space: nowrap;
    min-width: 32px;
    text-align: right;
}
.tv-ranked-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 10px;
    background: #F5F5F5;
    border-radius: 8px;
}
.tv-ranked-footer-label {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}
.tv-ranked-footer-count {
    font-size: 12px;
    color: #9E9E9E;
}
.tv-ranked-footer-value {
    font-size: 14px;
    font-weight: 700;
}

/* ── Channel split (matches SplitComparisonWidget) ───────── */
.tv-channel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.tv-channel-col {
    display: flex;
    flex-direction: column;
}
.tv-channel-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.tv-channel-revenue {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1B4332;
    line-height: 1.2;
    margin-bottom: 4px;
}
.tv-channel-count {
    font-size: 12px;
    color: #9E9E9E;
}
.tv-channel-bar {
    display: flex;
    height: 32px;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px;
    position: relative;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.10),
                inset 0 1px 3px rgba(0, 0, 0, 0.06);
}
.tv-channel-bar-gloss {
    position: absolute;
    top: 4px;
    left: 8px;
    right: 8px;
    height: 35%;
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.0) 100%);
    pointer-events: none;
}
.tv-channel-badges {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}
.tv-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}


/* ── Delta badges ────────────────────────────────────────── */
.tv-delta {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.tv-delta-up {
    color: #4CAF50;
}
.tv-delta-down {
    color: #F44336;
}
