.dashboard-container {
    padding: clamp(0.5rem, 2vw, 2rem);
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-team-name {
    font-size: clamp(1.5rem, 4vw, 4rem);
    font-weight: 500;
    text-align: center;
    margin-bottom: clamp(0.5rem, 2vh, 2rem);
}

.dashboard-counter {
    font-size: clamp(3rem, 12vw, 14rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--mud-palette-primary);
    text-align: center;
}

.dashboard-counter-label {
    font-size: clamp(1rem, 3vw, 3rem);
    opacity: 0.7;
    text-align: center;
}

.leaderboard-name {
    font-size: clamp(1rem, 2.5vw, 2.5rem);
}

.leaderboard-count {
    font-size: clamp(1.25rem, 3vw, 3.5rem);
    font-weight: 700;
    color: var(--mud-palette-primary);
}

.leaderboard-rank {
    font-size: clamp(1rem, 2vw, 2rem);
    opacity: 0.5;
    min-width: 2em;
}

.event-feed-item {
    font-size: clamp(0.875rem, 1.5vw, 1.75rem);
    padding: clamp(0.25rem, 0.5vh, 0.5rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.event-feed-container {
    max-height: 50vh;
    overflow-y: auto;
    flex: 1;
}

.leaderboard-entry {
    padding: clamp(0.25rem, 0.5vh, 1rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-progress {
    margin-top: clamp(0.25rem, 1vh, 1rem);
}

.leaderboard-content {
    flex: 1;
}

/* Dashboard Bounty Panel */
.dashboard-bounty-header {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 1rem);
    font-size: clamp(1.25rem, 2.5vw, 2.5rem);
    font-weight: 600;
    color: #FFD700;
    margin-bottom: clamp(0.5rem, 1vh, 1rem);
}

.dashboard-bounty-list {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1vw, 1.5rem);
}

.dashboard-bounty-item {
    flex: 1 1 auto;
    min-width: 200px;
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 12px;
    padding: clamp(0.75rem, 1.5vw, 1.5rem);
}

.dashboard-bounty-name {
    font-size: clamp(1rem, 2vw, 2rem);
    font-weight: 600;
}

.dashboard-bounty-reward {
    font-size: clamp(0.875rem, 1.5vw, 1.5rem);
    opacity: 0.6;
    margin-top: 4px;
}

/* Dashboard Celebration Overlay */
.dashboard-celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: celebrationFadeIn 0.3s ease-out;
}

.dashboard-celebration-emoji {
    font-size: clamp(60px, 15vw, 200px);
    animation: celebrationBounce 0.6s ease-out;
}

.dashboard-celebration-title {
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: 700;
    color: #FFD700;
    margin-top: clamp(0.5rem, 2vh, 2rem);
    animation: celebrationSlideUp 0.4s ease-out 0.2s both;
}

.dashboard-celebration-member {
    font-size: clamp(1.5rem, 4vw, 4rem);
    font-weight: 600;
    margin-top: clamp(0.25rem, 1vh, 1rem);
    animation: celebrationSlideUp 0.4s ease-out 0.3s both;
}

.dashboard-celebration-bounty {
    font-size: clamp(1.25rem, 3vw, 3rem);
    font-weight: 500;
    margin-top: clamp(0.25rem, 0.5vh, 0.5rem);
    animation: celebrationSlideUp 0.4s ease-out 0.35s both;
}

.dashboard-celebration-reward {
    font-size: clamp(1rem, 2vw, 2rem);
    opacity: 0.6;
    margin-top: clamp(0.25rem, 0.5vh, 0.5rem);
    animation: celebrationSlideUp 0.4s ease-out 0.4s both;
}

/* Large display optimizations for TV/iPad */
@media (min-width: 1280px) {
    .dashboard-counter {
        font-size: clamp(6rem, 15vw, 18rem);
    }

    .dashboard-counter-label {
        font-size: clamp(1.5rem, 3vw, 4rem);
    }

    .leaderboard-name {
        font-size: clamp(1.5rem, 2.5vw, 3rem);
    }

    .leaderboard-count {
        font-size: clamp(2rem, 3vw, 4.5rem);
    }

    .event-feed-item {
        font-size: clamp(1rem, 1.5vw, 2rem);
    }

    .dashboard-bounty-name {
        font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    }

    .dashboard-bounty-reward {
        font-size: clamp(1rem, 1.5vw, 2rem);
    }
}

/* ============================================================
   TrackEvent - Mobile-first layout matching track-soft prototype
   ============================================================ */

/* CSS Variables for theming */
.track-event-container {
    --track-bg-card: rgba(255, 255, 255, 0.06);
    --track-bg-card-hover: rgba(255, 255, 255, 0.09);
    --track-text-muted: rgba(255, 255, 255, 0.5);
    --track-accent: var(--mud-palette-primary);
    --track-ring-size: 120px;
    --track-cta-height: 116px;
    --track-cta-radius: 22px;
    --track-radius-sm: 12px;
    --track-radius-md: 16px;
}

/* Container: 4-row grid (header, goal-card, scrollable-middle, cta) */
.track-event-container {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0);
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    max-width: 600px;
    margin: 0 auto;
    overscroll-behavior-y: contain;
}

/* Header */
.track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px 0;
}

.track-header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.track-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--track-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.track-header-avatar:active {
    background: var(--track-bg-card-hover);
}

/* Goal Card */
.track-goal-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--track-bg-card);
    border-radius: var(--track-radius-md);
    padding: 22px 24px;
    margin-bottom: 20px;
}

.track-goal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-goal-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--track-text-muted);
    letter-spacing: 0.2px;
}

.track-goal-number-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.track-goal-number {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1.5px;
}

.track-goal-unit {
    font-size: 16px;
    font-weight: 500;
    color: var(--track-text-muted);
}

.track-goal-period {
    font-size: 14px;
    font-weight: 600;
    color: var(--track-accent);
    margin-top: 2px;
}

/* Goal Ring */
.track-goal-ring-wrap {
    flex-shrink: 0;
    position: relative;
    width: var(--track-ring-size);
    height: var(--track-ring-size);
}

.track-goal-ring-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    pointer-events: none;
}

/* Track Page Bounty Card */
.track-bounty-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--track-radius-md);
    padding: 14px 18px;
    margin-bottom: 16px;
}

.track-bounty-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 10px;
}

.track-bounty-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.track-bounty-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.track-bounty-name {
    font-size: 14px;
    font-weight: 600;
}

.track-bounty-reward {
    font-size: 12px;
    color: var(--track-text-muted);
    margin-top: 2px;
}

.track-bounty-progress {
    font-size: 13px;
    font-weight: 500;
    color: var(--track-accent);
    margin-top: 4px;
}

.track-bounty-earned .track-bounty-progress {
    color: #4CAF50;
}

.track-bounty-earned {
    opacity: 0.85;
}

/* Track Page Bounty Celebration */
.track-celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: celebrationFadeIn 0.3s ease-out;
}

.track-celebration-emoji {
    font-size: 80px;
    animation: celebrationBounce 0.6s ease-out;
}

.track-celebration-title {
    font-size: 28px;
    font-weight: 700;
    color: #FFD700;
    margin-top: 16px;
    animation: celebrationSlideUp 0.4s ease-out 0.2s both;
}

.track-celebration-name {
    font-size: 20px;
    font-weight: 600;
    margin-top: 8px;
    animation: celebrationSlideUp 0.4s ease-out 0.3s both;
}

.track-celebration-reward {
    font-size: 16px;
    color: var(--track-text-muted, rgba(255,255,255,0.5));
    margin-top: 4px;
    animation: celebrationSlideUp 0.4s ease-out 0.4s both;
}

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

@keyframes celebrationBounce {
    0% { transform: scale(0) rotate(-10deg); }
    60% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes celebrationSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Middle Section (scrollable 1fr row) */
.track-middle-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.track-section-heading {
    font-size: 15px;
    font-weight: 600;
    color: var(--track-text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

/* CTA Area */
.track-cta-area {
    padding-top: 12px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.track-cta-area .mud-button-root {
    min-height: var(--track-cta-height);
    border-radius: var(--track-cta-radius) !important;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(124, 77, 255, 0.3);
}

/* ============================================================
   Target Carousel
   ============================================================ */
.track-carousel {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    margin-bottom: 12px;
}

.track-carousel-track {
    display: flex;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.track-target-card {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.track-target-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 20px;
    text-align: center;
}

/* Progress ring using SVG for visible background track */
.track-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    cursor: pointer;
    margin-bottom: 16px;
}

.track-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.track-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 12;
}

.track-ring-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease-out;
}

.track-ring-progress.counter-ring {
    stroke: var(--mud-palette-primary);
}

.track-ring-progress.revenue-ring {
    stroke: #66BB6A;
}

.track-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.track-ring-count {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.track-ring-goal {
    font-size: 14px;
    color: var(--track-text-muted, rgba(255, 255, 255, 0.5));
    margin-top: 4px;
}

/* Dot indicators */
.track-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}

.track-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.track-dot.active {
    background: var(--mud-palette-primary);
    transform: scale(1.25);
}

/* Arrow navigation (desktop) */
.track-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 18px;
}

.track-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
}

.track-arrow-left { left: 4px; }
.track-arrow-right { right: 4px; }

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .track-arrow { display: none; }
}

/* Hide carousel navigation for single-target */
.track-carousel.single-target .track-dots,
.track-carousel.single-target .track-arrow {
    display: none;
}

/* ============================================================
   Full-Screen Event List Overlay
   ============================================================ */
.track-event-overlay {
    position: fixed;
    inset: 0;
    background: var(--mud-palette-surface, #1E1E2E);
    z-index: 500;
    display: flex;
    flex-direction: column;
    animation: overlaySlideUp 0.25s ease-out;
}

@keyframes overlaySlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.track-overlay-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.track-overlay-back {
    background: none;
    border: none;
    color: var(--mud-palette-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.track-overlay-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.track-overlay-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.track-overlay-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.track-overlay-event:last-child {
    border-bottom: none;
}

.track-overlay-event-info {
    flex: 1;
    min-width: 0;
}

.track-overlay-event-member {
    font-size: 15px;
    font-weight: 500;
}

.track-overlay-event-meta {
    font-size: 13px;
    color: var(--track-text-muted, rgba(255, 255, 255, 0.5));
    margin-top: 2px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.track-overlay-event-target {
    font-size: 12px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.track-overlay-event-amount {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.track-overlay-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--track-text-muted, rgba(255, 255, 255, 0.5));
    font-size: 15px;
}

/* ============================================================
   Revenue Input
   ============================================================ */
.track-revenue-input {
    margin-bottom: 12px;
    animation: revenueSlideIn 0.2s ease-out;
}

@keyframes revenueSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.track-revenue-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.track-preset-chip {
    text-transform: none !important;
    font-weight: 600 !important;
}

/* ============================================================
   Dashboard Multi-Target Layout
   ============================================================ */

/* Header with team name and layout toggle */
.dashboard-targets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(0.5rem, 2vh, 2rem);
}

.dashboard-targets-header .dashboard-team-name {
    margin-bottom: 0;
}

.dashboard-header-title {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    min-width: 0;
    overflow: hidden;
}

.dashboard-header-separator {
    font-size: clamp(1.5rem, 4vw, 4rem);
    font-weight: 300;
    opacity: 0.4;
}

.dashboard-target-label {
    font-size: clamp(1.5rem, 4vw, 4rem);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-layout-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 2px;
}

/* Full-width target card */
.dashboard-target-card {
    position: relative;
    text-align: center;
}

.dashboard-target-name {
    font-size: clamp(1.25rem, 3vw, 3rem);
    font-weight: 600;
    margin-bottom: clamp(0.5rem, 1vh, 1rem);
    text-align: center;
}

.dashboard-target-nav {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.dashboard-target-nav .mud-icon-button {
    pointer-events: auto;
}

/* SVG Progress Ring (Dashboard large) */
.dashboard-ring-container {
    position: relative;
    width: clamp(220px, 35vw, 400px);
    height: clamp(220px, 35vw, 400px);
    margin: 0 auto clamp(0.5rem, 1vh, 1rem);
}

.dashboard-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dashboard-ring-svg-small {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dashboard-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 10;
}

.dashboard-ring-progress {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease-out;
}

.dashboard-ring-progress.counter-ring {
    stroke: var(--mud-palette-primary);
}

.dashboard-ring-progress.revenue-ring {
    stroke: #66BB6A;
}

.dashboard-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dashboard-ring-count {
    font-size: clamp(1.25rem, 2.5vw, 2.5rem);
    font-weight: 700;
    max-width: 80%;
    text-align: center;
    line-height: 1;
}

/* Dot indicators */
.dashboard-target-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: clamp(0.25rem, 0.5vh, 0.5rem) 0;
}

.dashboard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.dashboard-dot.active {
    background: var(--mud-palette-primary);
    transform: scale(1.25);
}

/* Side-by-side grid layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: clamp(0.5rem, 1vw, 1rem);
    margin-bottom: clamp(0.5rem, 2vh, 2rem);
}

.dashboard-compact-card {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

.dashboard-compact-ring {
    position: relative;
    width: clamp(60px, 8vw, 100px);
    height: clamp(60px, 8vw, 100px);
    flex-shrink: 0;
}

.dashboard-compact-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.75rem, 1.5vw, 1.25rem);
    font-weight: 700;
    pointer-events: none;
}

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

.dashboard-compact-name {
    font-size: clamp(0.875rem, 2vw, 1.5rem);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-compact-progress {
    font-size: clamp(0.75rem, 1.5vw, 1.25rem);
    opacity: 0.7;
    margin-top: 4px;
}

/* Live feed revenue amount */
.dashboard-feed-amount {
    font-weight: 600;
    color: #66BB6A;
    margin-left: 8px;
}

/* Large display optimizations for multi-target dashboard */
@media (min-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .dashboard-compact-ring {
        width: 120px;
        height: 120px;
    }

    .dashboard-compact-name {
        font-size: 1.5rem;
    }

    .dashboard-compact-progress {
        font-size: 1.25rem;
    }
}

/* ============================================
   Admin Target Management (Sidebar)
   ============================================ */

.admin-target-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-target-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.admin-target-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.admin-target-name-text {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-target-progress-text {
    font-size: 0.75rem;
    opacity: 0.6;
}

.admin-target-actions {
    display: flex;
    flex-shrink: 0;
    gap: 0;
}

.admin-target-empty {
    text-align: center;
    padding: 12px 0;
}
