/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.dashboard-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    position: sticky;
    top: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mode Toggle Button */
.mode-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.mode-toggle-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.mode-toggle-btn:active {
    transform: translateY(0);
}

.mode-toggle-btn i {
    font-size: 1rem;
}

/* Interval Selector */
.interval-selector {
    display: none; /* Hidden by default, shown only in TV mode */
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.interval-selector label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.interval-selector label i {
    color: #3b82f6;
}

.interval-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: white;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.interval-select:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.interval-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* TV Mode Active State */
body.tv-mode .mode-toggle-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

body.tv-mode .mode-toggle-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

body.tv-mode .mode-toggle-btn i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    color: #64748b;
    z-index: 1;
}

.search-box input {
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.875rem;
    width: 300px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
}

.filter-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.filter-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.filter-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    min-width: 300px;
    z-index: 1000;
    display: none;
}

.filter-menu.active {
    display: block;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.filter-section label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
}

.filter-section input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* View Options */
.view-options {
    display: flex;
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 2px;
    border: 1px solid #e2e8f0;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.view-btn.active {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.view-btn:hover:not(.active) {
    background: #e2e8f0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.user-profile:hover {
    background-color: #f1f5f9;
}

.user-profile i {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.stat-item i {
    color: #3b82f6;
}

.stat-item span {
    font-weight: 600;
    color: #1e293b;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Project Card */
.project-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.add-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.add-btn:hover {
    background: #e2e8f0;
    color: #3b82f6;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-item i {
    width: 16px;
    color: #64748b;
    font-size: 0.875rem;
}

.detail-label {
    font-size: 0.875rem;
    color: #64748b;
    min-width: 120px;
}

.detail-value {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 500;
}

/* Phase Badge */
.phase-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.phase-badge.on-going {
    background: #dcfce7;
    color: #166534;
}

.phase-badge.execution {
    background: #fef3c7;
    color: #92400e;
}

.phase-badge.launch {
    background: #dbeafe;
    color: #1e40af;
}

/* Team Tags */
.team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.team-tag {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Risk Badge */
.risk-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-badge.low {
    background: #dcfce7;
    color: #166534;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.risk-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #64748b;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Dashboard Hero Section */
.dashboard-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem 2rem;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    padding: 1.75rem;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.kpi-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.kpi-icon {
    width: 72px;
    height: 72px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.kpi-info {
    flex: 1;
}

.kpi-value {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.kpi-value.health-score {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kpi-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: #64748b;
}

.kpi-change.positive {
    color: #22c55e;
}

.kpi-change.negative {
    color: #ef4444;
}

.kpi-change i {
    font-size: 0.875rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-chart {
    height: 60px;
}

/* Phase Distribution */
.phase-distribution {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.phase-bar {
    display: grid;
    grid-template-columns: 90px 1fr 50px;
    align-items: center;
    gap: 1rem;
}

.phase-label {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 600;
}

.progress-bar-container {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.phase-count {
    text-align: right;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

/* Enhanced Project Cards */
.project-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: #e0e7ff;
}

/* Health Indicator */
.health-indicator {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.health-indicator.healthy {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.health-indicator.attention {
    background: #eab308;
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.2);
}

.health-indicator.critical {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Progress visualization in cards */
.project-progress {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.progress-label-text {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-percentage {
    color: #1e293b;
    font-weight: 800;
    font-size: 1rem;
}

.progress-track {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Stats row in card */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.stat-item-card {
    text-align: center;
}

.stat-value-card {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    display: block;
    line-height: 1;
}

.stat-label-card {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-hero {
        padding: 1.5rem 1rem;
    }
    
    .kpi-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .kpi-card {
        padding: 1.5rem;
    }
    
    .kpi-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .kpi-value {
        font-size: 2.25rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .stat-value-card {
        font-size: 1.5rem;
    }
    
    .header-content {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: space-between;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-menu {
        right: -1rem;
        left: -1rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-label {
        min-width: auto;
    }
}

/* ========================================
   LARGE SCREENS (TV/Board Display)
   ======================================== */

/* Full HD and larger (1920px+) */
@media (min-width: 1920px) {
    :root {
        font-size: 18px;
    }
    
    body {
        font-size: 1.1rem;
    }
    
    .header-content {
        max-width: 1800px;
        padding: 1.5rem 3rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .search-box input {
        width: 400px;
        font-size: 1rem;
        padding: 0.75rem 1rem 0.75rem 3rem;
    }
    
    .search-box i {
        left: 1rem;
        font-size: 1.2rem;
    }
    
    /* Hero Section */
    .dashboard-hero {
        padding: 3rem 3rem;
    }
    
    .hero-header h1 {
        font-size: 2.5rem;
    }
    
    .hero-header p {
        font-size: 1.2rem;
    }
    
    .kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .kpi-card {
        padding: 2rem;
    }
    
    .kpi-icon {
        width: 4rem;
        height: 4rem;
        font-size: 2rem;
    }
    
    .kpi-value {
        font-size: 2.5rem;
    }
    
    .kpi-label {
        font-size: 1.1rem;
    }
    
    .kpi-trend {
        font-size: 1rem;
    }
    
    /* Main Content */
    .dashboard-main {
        padding: 2rem 3rem;
        max-width: 1800px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Project Cards */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
        gap: 2rem;
    }
    
    .project-card {
        padding: 2rem;
    }
    
    .project-header h3 {
        font-size: 1.5rem;
    }
    
    .project-key {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    /* Charts */
    .chart-container {
        min-height: 400px;
    }
    
    /* Release Cards */
    .release-card {
        padding: 2rem;
    }
    
    .release-header h3 {
        font-size: 1.5rem;
    }
    
    .release-meta {
        font-size: 1rem;
    }
    
    /* Filter Chips */
    .filter-chip {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Progress Bars */
    .progress-bar {
        height: 12px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* 2K/QHD and larger (2560px+) */
@media (min-width: 2560px) {
    :root {
        font-size: 20px;
    }
    
    body {
        font-size: 1.2rem;
    }
    
    .header-content {
        max-width: 2400px;
        padding: 2rem 4rem;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .search-box input {
        width: 500px;
        font-size: 1.1rem;
        padding: 1rem 1.25rem 1rem 3.5rem;
    }
    
    .search-box i {
        left: 1.25rem;
        font-size: 1.4rem;
    }
    
    /* Hero Section */
    .dashboard-hero {
        padding: 4rem 4rem;
    }
    
    .hero-header h1 {
        font-size: 3rem;
    }
    
    .hero-header p {
        font-size: 1.4rem;
    }
    
    .kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2.5rem;
    }
    
    .kpi-card {
        padding: 2.5rem;
    }
    
    .kpi-icon {
        width: 5rem;
        height: 5rem;
        font-size: 2.5rem;
    }
    
    .kpi-value {
        font-size: 3rem;
    }
    
    .kpi-label {
        font-size: 1.3rem;
    }
    
    .kpi-trend {
        font-size: 1.1rem;
    }
    
    /* Main Content */
    .dashboard-main {
        padding: 3rem 4rem;
        max-width: 2400px;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    /* Project Cards */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
        gap: 2.5rem;
    }
    
    .project-card {
        padding: 2.5rem;
    }
    
    .project-header h3 {
        font-size: 1.8rem;
    }
    
    .project-key {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1.1rem;
    }
    
    /* Charts */
    .chart-container {
        min-height: 500px;
    }
    
    /* Release Cards */
    .release-card {
        padding: 2.5rem;
    }
    
    .release-header h3 {
        font-size: 1.8rem;
    }
    
    .release-meta {
        font-size: 1.1rem;
    }
    
    /* Filter Chips */
    .filter-chip {
        padding: 0.9rem 1.8rem;
        font-size: 1.1rem;
    }
    
    /* Progress Bars */
    .progress-bar {
        height: 14px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 1.1rem;
    }
}

/* 4K UHD and larger (3840px+) */
@media (min-width: 3840px) {
    :root {
        font-size: 24px;
    }
    
    body {
        font-size: 1.4rem;
    }
    
    .header-content {
        max-width: 3600px;
        padding: 3rem 6rem;
    }
    
    .logo h1 {
        font-size: 3.5rem;
    }
    
    .logo i {
        font-size: 3.5rem;
    }
    
    .search-box input {
        width: 700px;
        font-size: 1.3rem;
        padding: 1.5rem 1.75rem 1.5rem 4.5rem;
    }
    
    .search-box i {
        left: 1.75rem;
        font-size: 2rem;
    }
    
    /* Hero Section */
    .dashboard-hero {
        padding: 6rem 6rem;
    }
    
    .hero-header h1 {
        font-size: 4.5rem;
    }
    
    .hero-header p {
        font-size: 2rem;
    }
    
    .kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 3.5rem;
    }
    
    .kpi-card {
        padding: 3.5rem;
    }
    
    .kpi-icon {
        width: 7rem;
        height: 7rem;
        font-size: 3.5rem;
    }
    
    .kpi-value {
        font-size: 4.5rem;
    }
    
    .kpi-label {
        font-size: 1.8rem;
    }
    
    .kpi-trend {
        font-size: 1.5rem;
    }
    
    /* Main Content */
    .dashboard-main {
        padding: 4rem 6rem;
        max-width: 3600px;
    }
    
    .section-header h2 {
        font-size: 3.5rem;
    }
    
    /* Project Cards */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(800px, 1fr));
        gap: 3.5rem;
    }
    
    .project-card {
        padding: 3.5rem;
    }
    
    .project-header h3 {
        font-size: 2.5rem;
    }
    
    .project-key {
        font-size: 1.5rem;
        padding: 0.9rem 1.8rem;
    }
    
    .stat-value {
        font-size: 3.5rem;
    }
    
    .stat-label {
        font-size: 1.5rem;
    }
    
    /* Charts */
    .chart-container {
        min-height: 700px;
    }
    
    /* Release Cards */
    .release-card {
        padding: 3.5rem;
    }
    
    .release-header h3 {
        font-size: 2.5rem;
    }
    
    .release-meta {
        font-size: 1.5rem;
    }
    
    /* Filter Chips */
    .filter-chip {
        padding: 1.2rem 2.4rem;
        font-size: 1.5rem;
    }
    
    /* Progress Bars */
    .progress-bar {
        height: 20px;
    }
    
    /* Buttons */
    .btn {
        padding: 1.2rem 2.4rem;
        font-size: 1.5rem;
    }
    
    /* Icons in general */
    i.fas, i.far {
        font-size: 1.5em;
    }
    
    /* Alerts */
    .alert {
        padding: 1.5rem 2rem;
        font-size: 1.3rem;
    }
    
    /* Urgency Badges */
    .urgency-badge {
        padding: 0.75rem 1.5rem;
        font-size: 1.3rem;
    }
    
    /* Health Indicators */
    .health-indicator {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* ========================================
   TV MODE (Manual Toggle)
   ======================================== */

body.tv-mode {
    font-size: 1.25rem;
}

/* Hide header in TV Mode but keep toggle button visible */
body.tv-mode .dashboard-header {
    position: fixed;
    top: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    z-index: 10000;
}

/* Hide all header content except the mode toggle */
body.tv-mode .dashboard-header .logo,
body.tv-mode .dashboard-header .search-box,
body.tv-mode .dashboard-header .filter-dropdown,
body.tv-mode .dashboard-header .releases-link,
body.tv-mode .dashboard-header .view-options,
body.tv-mode .dashboard-header .last-updated,
body.tv-mode .dashboard-header .user-profile {
    display: none;
}

/* Position the toggle button in top-right corner */
body.tv-mode .dashboard-header .header-actions,
body.tv-mode .releases-header .header-top {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10001;
    gap: 1rem;
    display: flex;
    align-items: center;
}

/* Hide back button in TV mode on releases page */
body.tv-mode .releases-header .back-button {
    display: none;
}

/* Interval selector styling in TV mode */
body.tv-mode .interval-selector {
    display: flex !important; /* Show in TV mode */
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

body.tv-mode .interval-selector label {
    color: white;
}

body.tv-mode .interval-selector label i {
    color: white;
}

body.tv-mode .interval-select {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
}

body.tv-mode .interval-select:hover {
    background: white;
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

body.tv-mode .interval-select:focus {
    background: white;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Header in TV Mode */
body.tv-mode .header-content {
    padding: 1.5rem 3rem;
}

body.tv-mode .logo h1 {
    font-size: 2.25rem;
}

body.tv-mode .logo i {
    font-size: 2.25rem;
}

body.tv-mode .search-box input {
    font-size: 1.1rem;
    padding: 0.875rem 1.125rem 0.875rem 3.25rem;
}

/* Hero Section in TV Mode */
body.tv-mode .dashboard-hero {
    padding: 3rem 3rem;
    padding-top: 100px; /* Space for floating toggle button */
}

body.tv-mode .hero-header h1 {
    font-size: 3rem;
}

body.tv-mode .hero-header p {
    font-size: 1.4rem;
}

body.tv-mode .kpi-cards {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

body.tv-mode .kpi-card {
    padding: 2.5rem;
}

body.tv-mode .kpi-icon {
    width: 5rem;
    height: 5rem;
    font-size: 2.5rem;
}

body.tv-mode .kpi-value {
    font-size: 3.5rem;
    font-weight: 700;
}

body.tv-mode .kpi-label {
    font-size: 1.3rem;
}

body.tv-mode .kpi-trend {
    font-size: 1.1rem;
}

/* Main Content in TV Mode */
body.tv-mode .dashboard-main {
    padding: 2.5rem 3rem;
    padding-bottom: 120px; /* Extra space for carousel indicators */
    min-height: 100vh;
}

body.tv-mode .section-header h2 {
    font-size: 2.5rem;
}

/* Project Cards in TV Mode - MORE CARDS VISIBLE */
/* Disabled when carousel is active */
body.tv-mode .projects-grid:not(.tv-carousel) {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

body.tv-mode .project-card {
    padding: 2.5rem;
    transition: all 0.3s ease;
}

body.tv-mode .project-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

body.tv-mode .project-header h3 {
    font-size: 1.75rem;
}

body.tv-mode .project-key {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
}

body.tv-mode .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

body.tv-mode .stat-label {
    font-size: 1.1rem;
}

body.tv-mode .detail-label {
    font-size: 1rem;
}

body.tv-mode .detail-value {
    font-size: 1rem;
}

/* Charts in TV Mode */
body.tv-mode .chart-container {
    min-height: 450px;
}

/* Release Cards in TV Mode */
body.tv-mode .release-card {
    padding: 2.5rem;
}

body.tv-mode .release-header h3 {
    font-size: 1.75rem;
}

body.tv-mode .release-meta {
    font-size: 1.1rem;
}

body.tv-mode .urgency-badge {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
}

body.tv-mode .progress-label {
    font-size: 1rem;
}

body.tv-mode .progress-percentage {
    font-size: 1.5rem;
}

body.tv-mode .progress-bar {
    height: 14px;
}

body.tv-mode .days-info {
    font-size: 1rem;
}

body.tv-mode .issue-count {
    font-size: 1rem;
}

body.tv-mode .alert {
    padding: 1.25rem 1.75rem;
    font-size: 1.1rem;
}

/* Filter Chips in TV Mode */
body.tv-mode .filter-chip {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
}

body.tv-mode .sort-select {
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
}

/* Health Indicators in TV Mode */
body.tv-mode .health-indicator {
    width: 1.25rem;
    height: 1.25rem;
}

body.tv-mode .health-score {
    font-size: 1.1rem;
}

/* Buttons in TV Mode */
body.tv-mode .btn {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
}

/* Icons in TV Mode */
body.tv-mode i.fas,
body.tv-mode i.far {
    font-size: 1.2em;
}

/* Back Button in TV Mode (for releases page) */
body.tv-mode .back-button {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
}

body.tv-mode .back-button i {
    font-size: 1.2rem;
}

/* KPI Summary in TV Mode (releases page) */
body.tv-mode .kpi-summary {
    gap: 2rem;
}

body.tv-mode .kpi-item h3 {
    font-size: 2.5rem;
}

body.tv-mode .kpi-item p {
    font-size: 1.1rem;
}

/* Header Top alignment in TV Mode */
body.tv-mode .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Releases Header in TV Mode */
body.tv-mode .releases-header {
    padding: 2.5rem 3rem;
}

body.tv-mode .header-title h1 {
    font-size: 2.5rem;
}

/* TV Mode Notification Badge */
body.tv-mode::before {
    content: '📺 TV Mode Active';
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   TV CAROUSEL MODE - 6 Cards (3×2 Grid)
   ======================================== */

/* Remove max-width restriction in TV mode for carousel */
body.tv-mode .main-content,
body.tv-mode .releases-container,
body.tv-mode .hero-content {
    max-width: none;
    padding: 0;
}

body.tv-mode .hero-content {
    padding: 0 3rem;
}

body.tv-mode .content-header {
    padding: 1rem 3rem;
}

/* Releases page sections in TV mode */
body.tv-mode .sort-section,
body.tv-mode .filters-section {
    margin: 0 3rem 2rem 3rem;
}

/* TV Mode Carousel Container - Override existing grid */
body.tv-mode .projects-grid.tv-carousel,
body.tv-mode .releases-grid.tv-carousel {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 2rem !important;
    padding: 2rem 3rem !important;
    padding-bottom: 100px !important; /* Extra padding for indicators */
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    position: relative;
    overflow: visible;
}

/* Smaller gap for projects grid in TV mode to fit more */
body.tv-mode .projects-grid.tv-carousel {
    gap: 1.25rem !important;
    padding: 1.5rem 2.5rem !important;
    padding-bottom: 100px !important; /* Extra padding for indicators */
}

/* TV Mode Grid for the wrapper inside */
body.tv-mode .tv-carousel .tv-carousel-wrapper {
    display: contents;
}

/* Card visibility and animation */
body.tv-mode .tv-carousel .project-card,
body.tv-mode .tv-carousel .release-card {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

body.tv-mode .tv-carousel .project-card.tv-carousel-visible,
body.tv-mode .tv-carousel .release-card.tv-carousel-visible {
    opacity: 1;
    transform: scale(1);
}

/* Ensure cards fit well in 3×2 grid */
body.tv-mode .tv-carousel .release-card {
    min-height: 280px;
    max-height: 400px;
    height: auto;
    width: 100%;
    margin: 0;
}

/* Smaller project cards in TV mode to fit entire frame without scrolling */
body.tv-mode .tv-carousel .project-card {
    min-height: 220px;
    max-height: 320px;
    height: auto;
    width: 100%;
    margin: 0;
    padding: 1.5rem !important;
}

/* Reduce font sizes in project cards for TV mode */
body.tv-mode .tv-carousel .project-card .project-title {
    font-size: 1.1rem !important;
}

body.tv-mode .tv-carousel .project-card .project-key {
    font-size: 0.75rem !important;
}

body.tv-mode .tv-carousel .project-card .detail-label {
    font-size: 0.75rem !important;
}

body.tv-mode .tv-carousel .project-card .detail-value {
    font-size: 0.85rem !important;
}

body.tv-mode .tv-carousel .project-card .detail-item {
    gap: 0.5rem;
    padding: 0.4rem 0;
}

body.tv-mode .tv-carousel .project-card .detail-item i {
    font-size: 0.9rem !important;
}

/* Carousel Indicators */
.tv-carousel-indicators {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    animation: slideUpIndicators 0.5s ease;
}

@keyframes slideUpIndicators {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Indicator Dots */
.tv-carousel-indicator-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tv-carousel-indicator-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.tv-carousel-indicator-dot.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(255, 255, 255, 0.5);
    width: 16px;
    height: 16px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

/* Page Counter */
.tv-carousel-page-counter {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 60px;
    text-align: center;
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
}

/* Hide indicators in PC mode */
body:not(.tv-mode) .tv-carousel-indicators {
    display: none;
}

/* Adjust TV Mode badge position when indicators are showing */
body.tv-mode .tv-carousel-indicators ~ * body.tv-mode::before {
    bottom: 140px;
}

/* Responsive adjustments for smaller TV screens */
@media (max-width: 1600px) {
    body.tv-mode .tv-carousel .tv-carousel-wrapper {
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    body.tv-mode .tv-carousel .project-card,
    body.tv-mode .tv-carousel .release-card {
        min-height: 250px;
        max-height: 400px;
    }
}

/* Extra large screens (4K+) */
@media (min-width: 3840px) {
    body.tv-mode .tv-carousel .tv-carousel-wrapper {
        gap: 3rem;
        padding: 3rem;
    }
    
    body.tv-mode .tv-carousel .project-card,
    body.tv-mode .tv-carousel .release-card {
        min-height: 350px;
        max-height: 500px;
    }
    
    .tv-carousel-indicators {
        padding: 1.5rem 3rem;
        bottom: 30px;
    }
    
    .tv-carousel-indicator-dot {
        width: 18px;
        height: 18px;
    }
    
    .tv-carousel-indicator-dot.active {
        width: 20px;
        height: 20px;
    }
    
    .tv-carousel-page-counter {
        font-size: 1.25rem;
    }
}
