/* Home Page Styles */

body {
    background-color: var(--md-sys-color-background);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    width: 100%;
    height: calc(100vh - 64px);
    overflow: hidden;
    margin-top: 64px;
}

/* Sidebar */
#sidebar {
    width: 280px;
    background-color: var(--workspace-sidebar-bg, var(--md-sys-color-surface-container));
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 16px;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 24px 12px;
    color: var(--md-sys-color-on-surface);
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    transition: background-color 0.2s;
}

.sidebar-item .material-symbols-rounded {
    font-size: 24px;
}

.sidebar-item:hover {
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}

.sidebar-item.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* Main Content */
.home-container {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    overflow-y: auto;
    height: 100%;
    margin-left: 280px;
}

/* When sidebar is collapsed */
body.sidebar-collapsed #sidebar {
    width: 0;
    padding: 0;
    overflow: hidden;
}

body.sidebar-collapsed .home-container {
    margin-left: 0;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 40px;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-secondary-container) 100%);
    border-radius: 24px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--md-sys-color-shadow) 12%, transparent);
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-family: 'Kumbh Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--md-sys-color-on-primary-container);
    margin: 0 0 12px 0;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--md-sys-color-on-primary-container);
    opacity: 0.9;
    margin: 0;
}

.hero-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--md-sys-color-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.hero-icon {
    font-size: 40px;
    color: var(--md-sys-color-on-primary);
}

/* Search Bar */
.search-container {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: var(--md-sys-color-surface-container-high);
    border-radius: 16px;
    margin-bottom: 40px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-surface);
}

.search-icon {
    font-size: 24px;
    color: var(--md-sys-color-on-surface-variant);
    margin-right: 16px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
    outline: none;
    font-family: inherit;
}

.search-shortcut {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-variant);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Section Titles */
.section-title {
    font-family: 'Kumbh Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 24px 0;
}

/* Apps Section */
.apps-section {
    margin-bottom: 48px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.app-card {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--md-sys-color-shadow) 8%, transparent);
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--md-sys-color-shadow) 12%, transparent);
}

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.tasks-icon {
    background: var(--md-sys-color-primary-container);
}

.tasks-icon .material-symbols-rounded {
    color: var(--md-sys-color-on-primary-container);
}

.notes-icon {
    background: var(--md-sys-color-secondary-container);
}

.notes-icon .material-symbols-rounded {
    color: var(--md-sys-color-on-secondary-container);
}

.docs-icon {
    background: var(--md-sys-color-tertiary-container);
}

.docs-icon .material-symbols-rounded {
    color: var(--md-sys-color-on-tertiary-container);
}

.files-icon {
    background: var(--md-sys-color-error-container);
}

.files-icon .material-symbols-rounded {
    color: var(--md-sys-color-on-error-container);
}

.app-icon .material-symbols-rounded {
    font-size: 28px;
}

.app-info {
    flex: 1;
}

.app-name {
    font-family: 'Kumbh Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 4px 0;
}

.app-description {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

.app-arrow {
    font-size: 20px;
    color: var(--md-sys-color-primary);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.app-card:hover .app-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Stats Section */
.stats-section {
    margin-bottom: 48px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--md-sys-color-shadow) 8%, transparent);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--md-sys-color-shadow) 12%, transparent);
}

.stat-icon {
    font-size: 32px;
    color: var(--md-sys-color-primary);
    margin-right: 16px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Kumbh Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

/* Recent Section */
.recent-section {
    margin-bottom: 48px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.recent-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--md-sys-color-shadow) 8%, transparent);
}

.recent-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.recent-icon {
    font-size: 24px;
    color: var(--md-sys-color-primary);
    margin-right: 12px;
}

.recent-header h3 {
    font-family: 'Kumbh Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.recent-list {
    max-height: 200px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--md-sys-color-surface);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-item:hover {
    background: var(--md-sys-color-surface-container);
}

.recent-item-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface);
}

.empty-state {
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-style: italic;
    padding: 20px;
}

/* Hide scrollbars */
.recent-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.recent-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-container {
        padding: 20px;
    }
    
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
    
    .hero-decoration {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-container {
        padding: 12px 16px;
    }
    
    .app-card {
        padding: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .recent-card {
        padding: 16px;
    }
}