/* Dashboard-Specific Styles */

/* Compact Dashboard Container */
.dashboard-compact-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Override main-content padding for compact dashboard */
.dashboard-compact-container ~ .main-content,
.main-content .dashboard-compact-container {
    padding-top: 0;
    padding-bottom: 0;
}

/* Dashboard Title Section - Compact */
.dashboard-title-section {
    text-align: center;
    padding: 1rem 2rem 0.75rem;
    flex-shrink: 0;
}

.dashboard-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0;
    line-height: 1.2;
}

/* Stats Grid - Removed (not used in compact design) */
.stats-grid {
    display: none;
}

/* Widgets Grid - Removed (not used in compact design) */
.widgets-grid {
    display: none;
}

/* Modules Grid - Compact Design */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 100%;
    margin: 0;
    padding: 1rem 2rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
    /* Height calculation: viewport height - nav (80px) - title (~60px) - ticker (~50px if present) - filter tabs (~60px) - padding */
    /* Using a conservative estimate that works with or without ticker */
    max-height: calc(100vh - 260px);
}

/* Filter Tabs - Compact */
.filter-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 2rem;
    flex-shrink: 0;
}

.filter-tab {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-900);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

/* Activity Feed Widget */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-feed-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    transition: background 0.2s;
}

.activity-feed-item:last-child {
    border-bottom: none;
}

.activity-feed-item:hover {
    background: var(--gray-50);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0.5rem;
}

.activity-feed-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.activity-feed-content {
    flex: 1;
}

.activity-feed-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.activity-feed-message {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.activity-feed-time {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Quick Actions Widget */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 1rem;
    background: var(--gray-50);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.quick-action:hover {
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.quick-action-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    text-align: center;
}

/* Kids Tracker Ticker - Compact */
.kidstracker-ticker-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0;
    position: relative;
    overflow: hidden;
    z-index: 5;
    margin-top: 0;
    flex-shrink: 0;
}

.ticker-wrapper {
    position: relative;
    width: 100%;
    height: 32px;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: scroll-ticker 30s linear infinite;
    gap: 3rem;
}

.ticker-message {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 1rem;
    flex-shrink: 0;
}

.ticker-message .icon {
    font-size: 1rem;
}

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

.kidstracker-ticker-container:hover .ticker-content {
    animation-play-state: paused;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeIn 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.widget {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.widget:nth-child(1) { animation-delay: 0.5s; }
.widget:nth-child(2) { animation-delay: 0.6s; }
.widget:nth-child(3) { animation-delay: 0.7s; }

.module-card {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.module-card:nth-child(1) { animation-delay: 0.8s; }
.module-card:nth-child(2) { animation-delay: 0.9s; }
.module-card:nth-child(3) { animation-delay: 1s; }
.module-card:nth-child(4) { animation-delay: 1.1s; }
.module-card:nth-child(5) { animation-delay: 1.2s; }
.module-card:nth-child(6) { animation-delay: 1.3s; }

/* Responsive - Compact Design */
@media (max-width: 1400px) {
    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 1200px) {
    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.875rem;
    }
}

@media (max-width: 768px) {
    .dashboard-compact-container {
        min-height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
    }
    
    .dashboard-title-section {
        padding: 0.75rem 1rem 0.5rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        max-height: calc(100vh - 240px);
    }
    
    .filter-tabs {
        padding: 0 1rem;
        margin: 0.5rem 0;
    }
    
    .filter-tab {
        padding: 0.4rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .kidstracker-ticker-container {
        padding: 0.4rem 0;
    }
    
    .ticker-wrapper {
        height: 28px;
    }
    
    .ticker-message {
        font-size: 0.75rem;
    }
    
    .module-card {
        padding: 1rem;
        min-height: 120px;
    }
    
    .module-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .module-title {
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
    }
    
    .module-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
}

