:root {
    --app-bg: #f3f5f8;
    --frame-bg: #ffffff;
    --sidebar-bg: #f8f9fb;
    --sidebar-border: #e6e9ef;
    --note-hover: #ecf3ff;
    --note-active: #dbe9ff;
    --editor-border: #d8dee8;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: radial-gradient(circle at top right, #e6efff 0%, var(--app-bg) 45%);
    font-family: "Segoe UI", "Noto Sans", sans-serif;
}

.app-shell {
    min-height: 100vh;
    padding: 1rem;
}

.app-frame {
    height: calc(100vh - 2rem);
    background: var(--frame-bg);
    border: 1px solid #dde3ee;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(17, 30, 56, 0.08);
}

.sidebar-panel {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notes-list {
    overflow-y: auto;
}

.note-item {
    width: 100%;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: #1f2a44;
}

.note-item:hover {
    background: var(--note-hover);
}

.note-item.active {
    background: var(--note-active);
    font-weight: 600;
}

.editor-panel {
    background: #fff;
    height: 100%;
}

.editor-body {
    flex: 1 1 auto;
    min-height: 0;
}

.note-textarea {
    flex: 1 1 auto;
    height: 100%;
    width: 100%;
    min-height: 0;
    resize: none;
    border: 1px solid var(--editor-border);
    border-radius: 0.9rem;
    padding: 1rem;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

.note-textarea:focus {
    border-color: #7eb0ff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

@media (max-width: 991.98px) {
    .app-shell {
        padding: 0.5rem;
    }

    .app-frame,
    .sidebar-panel,
    .editor-panel {
        height: auto;
        max-height: none;
    }
}
