body, html {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.container-fluid {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

.app-header {
    background-color: #343a40;
    color: white;
    padding: 0.5rem 1rem;
    z-index: 1030;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
}

.main-content {
    display: flex;
    flex: 1;
    position: relative;
    height: calc(100vh - 56px);
    overflow: hidden;
    max-height: calc(100vh - 60px);
}

.sidebar {
    background-color: #f8f9fa;
    width: 300px;
    height: 100%;
    position: fixed;
    top: 56px;
    left: 0;
    z-index: 1020;
    padding: 1rem;
    padding-bottom: 2rem;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar .admin-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}
 
.sidebar .notes-list {
    margin-top: 1rem;
    margin-bottom: 2rem; 
}

.sidebar .note-item {
    padding: 0.15rem;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar .note-item:hover {
    background-color: #e9ecef;
}

.sidebar .note-item.active {
    background-color: #e9ecef;
    border-left: 3px solid #007bff;
}

.note-config {
    background-color: #f1f3f5;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.content-area {
    margin-left: 300px;
    width: calc(100% - 300px);
    height: 100%;
    transition: margin-left 0.3s ease, width 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

.content-area.full-width {
    margin-left: 0;
    width: 100%;
}

.editor-container {
    height: 100%; 
    box-sizing: border-box;
}

/* SimpleMDE custom styles */
.CodeMirror, .CodeMirror-scroll {
    min-height: calc(100vh - 150px);
    height: auto;
    max-height: calc(100vh - 150px);
}

.editor-toolbar {
    border-radius: 4px 4px 0 0;
}

.action-buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
}
textarea {
    width: 100%;
    min-height: calc(100dvh - 4rem);
    height: auto;
    max-height: calc(100dvh - 4rem);
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    } 
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }  
}