/* App Layout & Specific Styles */

#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    padding: 12px;
    height: 100%;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 12px 12px 12px;
    height: var(--header-height);
}

.logo {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-color);
    margin-left: 12px;
}

.logo i {
    color: var(--accent-color);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 48px;
    border-radius: 0 24px 24px 0;
    color: var(--text-color);
    margin-bottom: 4px;
    cursor: pointer;
    transition: background-color 0.1s;
    font-weight: 500;
}

.nav-item:hover {
    background-color: var(--hover-bg);
}

.nav-item.active {
    background-color: var(--sidebar-active);
    color: var(--sidebar-active-text);
}

.nav-item i {
    width: 24px;
    margin-right: 18px;
    font-size: 18px;
}

.nav-label {
    flex-grow: 1;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-color);
}

.top-bar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    /* Optional, depending on clean look */
}

.search-bar {
    flex-grow: 1;
    max-width: 720px;
    background: var(--bg-secondary);
    border-radius: 8px;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin: 0 16px;
    transition: box-shadow 0.2s, background 0.2s;
}

.search-bar:focus-within {
    background: var(--bg-color);
    box-shadow: var(--shadow);
}

.search-bar input {
    background: transparent;
    border: none;
    flex-grow: 1;
    margin-left: 16px;
    font-size: 16px;
    color: var(--text-color);
}

.search-bar i {
    color: var(--text-secondary);
}

/* Grid/List View of Notes */
.notes-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-content: start;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .notes-container {
        padding: 16px;
        grid-template-columns: 1fr;
        /* Single column on mobile */
    }
}