:root {
    --notes-bg: #f7f8fb;
    --notes-panel: #ffffff;
    --notes-border: #e2e8f0;
    --notes-text: #172033;
    --notes-muted: #64748b;
    --notes-accent: #2563eb;
    --notes-soft: #eff6ff;
}

body { background: var(--notes-bg); color: var(--notes-text); }
.notes-quick-nav {
    position: fixed; top: 16px; right: 22px; z-index: 8000; display: flex; align-items: center; gap: 5px;
    padding: 6px; border: 1px solid rgba(148, 163, 184, .35); border-radius: 14px;
    background: rgba(15, 23, 42, .9); backdrop-filter: blur(14px); box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}
.notes-quick-nav a, .notes-quick-nav button {
    border: 0; border-radius: 9px; padding: 8px 10px; background: transparent; color: #dbeafe;
    font: inherit; font-size: .82rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.notes-quick-nav a:hover, .notes-quick-nav a.active { background: rgba(59, 130, 246, .28); color: #fff; }
.notes-quick-nav button { background: #2563eb; color: #fff; }
.notes-quick-nav button:hover { background: #1d4ed8; }

.notes-page { min-height: 100vh; padding: 34px 24px 28px 100px; box-sizing: border-box; }
.notes-workspace {
    display: grid; grid-template-columns: 238px minmax(270px, 360px) minmax(380px, 1fr); min-height: calc(100vh - 62px);
    max-width: 1480px; margin: 0 auto; overflow: hidden; border: 1px solid var(--notes-border); border-radius: 20px;
    background: var(--notes-panel); box-shadow: 0 18px 60px rgba(15, 23, 42, .09);
}
.notes-side, .notes-list-pane { border-right: 1px solid var(--notes-border); }
.notes-side { background: #fbfcfe; padding: 22px 14px; display: flex; flex-direction: column; gap: 20px; }
.notes-brand { display: flex; align-items: center; gap: 10px; padding: 0 9px; font-weight: 800; font-size: 1.1rem; }
.notes-brand i { color: #eab308; font-size: 1.3rem; }
.notes-new, .notes-save, .notes-icon-button, .notes-tool-button { border: 0; cursor: pointer; font: inherit; }
.notes-new { width: 100%; border-radius: 11px; padding: 12px; color: #fff; background: var(--notes-accent); font-weight: 800; text-align: left; }
.notes-new:hover { background: #1d4ed8; }
.notes-new i { margin-right: 9px; }
.notes-nav { display: grid; gap: 3px; }
.notes-nav button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 9px; padding: 10px; background: transparent; color: #475569; font: inherit; text-align: left; cursor: pointer; }
.notes-nav button i { width: 22px; color: #64748b; }
.notes-nav button span:first-of-type { flex: 1; margin-left: 4px; }
.notes-nav button small { color: #94a3b8; font-size: .75rem; }
.notes-nav button:hover, .notes-nav button.active { color: #1d4ed8; background: var(--notes-soft); font-weight: 750; }
.notes-nav button.active i { color: var(--notes-accent); }
.notes-folders-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 9px; color: var(--notes-muted); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.notes-folders-heading button { border: 0; background: transparent; color: var(--notes-accent); cursor: pointer; font-size: 1rem; }
.notes-folders { display: grid; gap: 2px; overflow: auto; }
.notes-folder { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; border-radius: 8px; padding: 8px 9px; background: transparent; color: #475569; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.notes-folder:hover, .notes-folder.active { background: #f1f5f9; color: #1d4ed8; }
.notes-folder-dot { width: 9px; height: 9px; border-radius: 99px; flex: 0 0 auto; }

.notes-list-pane { min-width: 0; display: flex; flex-direction: column; background: #fff; }
.notes-list-head { padding: 20px 18px 12px; border-bottom: 1px solid #f1f5f9; }
.notes-list-headline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.notes-list-headline h1 { margin: 0; font-size: 1.22rem; letter-spacing: -.02em; }
.notes-list-headline span { color: var(--notes-muted); font-size: .8rem; }
.notes-search { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 0 11px; border: 1px solid var(--notes-border); border-radius: 10px; background: #f8fafc; color: #94a3b8; }
.notes-search:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; background: #fff; }
.notes-search input { width: 100%; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--notes-text); font: inherit; }
.notes-list { overflow-y: auto; flex: 1; }
.note-item { position: relative; display: block; width: 100%; border: 0; border-bottom: 1px solid #f1f5f9; padding: 15px 18px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.note-item:hover { background: #f8fafc; }
.note-item.active { background: #eff6ff; }
.note-item.active::before { position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--note-color, #2563eb); content: ''; }
.note-item-top { display: flex; align-items: center; gap: 7px; color: #94a3b8; font-size: .75rem; }
.note-item-top i { color: #eab308; }
.note-item-title { margin-top: 6px; overflow: hidden; color: #1e293b; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.note-item-preview { display: -webkit-box; margin-top: 5px; overflow: hidden; color: #64748b; font-size: .84rem; line-height: 1.42; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notes-empty-list { display: grid; place-items: center; min-height: 240px; padding: 25px; color: #94a3b8; text-align: center; }
.notes-empty-list i { display: block; margin-bottom: 10px; font-size: 2rem; color: #cbd5e1; }

.notes-editor { min-width: 0; display: flex; flex-direction: column; background: #fff; }
.notes-editor-empty { display: grid; place-items: center; flex: 1; padding: 30px; color: #94a3b8; text-align: center; }
.notes-editor-empty i { display: block; margin-bottom: 12px; font-size: 2.6rem; color: #cbd5e1; }
.notes-editor-content { display: none; flex: 1; min-height: 0; flex-direction: column; }
.notes-editor-content.active { display: flex; }
.notes-editor-top { display: flex; align-items: center; gap: 4px; padding: 13px 14px; border-bottom: 1px solid var(--notes-border); }
.notes-status { flex: 1; color: #94a3b8; font-size: .78rem; }
.notes-icon-button { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: transparent; color: #64748b; }
.notes-icon-button:hover { background: #f1f5f9; color: #1e293b; }
.notes-icon-button.active { color: #d97706; background: #fffbeb; }
.notes-editor-scroll { flex: 1; overflow-y: auto; padding: 28px clamp(22px, 5vw, 64px); }
.note-title-input { width: 100%; border: 0; outline: 0; background: transparent; color: #172033; font: 800 clamp(1.55rem, 3vw, 2.25rem)/1.2 inherit; letter-spacing: -.04em; }
.note-title-input::placeholder { color: #cbd5e1; }
.note-meta-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 20px; color: #94a3b8; font-size: .78rem; }
.note-folder-select { max-width: 190px; border: 0; outline: 0; background: #f1f5f9; border-radius: 7px; padding: 6px 9px; color: #475569; font: inherit; cursor: pointer; }
.note-body { width: 100%; min-height: 330px; box-sizing: border-box; resize: none; border: 0; outline: 0; background: transparent; color: #334155; font: 1rem/1.7 inherit; }
.note-body::placeholder { color: #cbd5e1; }
.notes-editor-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--notes-border); }
.notes-colors { display: flex; align-items: center; gap: 7px; }
.notes-color { width: 18px; height: 18px; border: 2px solid transparent; border-radius: 99px; cursor: pointer; }
.notes-color.active { outline: 2px solid #475569; outline-offset: 2px; }
.notes-tool-button { display: grid; min-width: 32px; height: 30px; place-items: center; border-radius: 7px; background: #f8fafc; color: #64748b; font-weight: 800; }
.notes-tool-button:hover { background: #e2e8f0; color: #1e293b; }
.notes-trash-button { margin-left: auto; color: #dc2626; }
.notes-toast { position: fixed; bottom: 24px; left: 50%; z-index: 10001; transform: translateX(-50%); border-radius: 10px; padding: 11px 14px; background: #172033; color: #fff; font-size: .88rem; box-shadow: 0 12px 28px rgba(15,23,42,.25); }
.notes-auth { display: grid; min-height: 70vh; place-items: center; }
.notes-auth-card { width: min(430px, 100%); box-sizing: border-box; border: 1px solid var(--notes-border); border-radius: 18px; padding: 36px; background: #fff; text-align: center; box-shadow: 0 12px 42px rgba(15,23,42,.08); }
.notes-auth-card i { color: #eab308; font-size: 2.5rem; }
.notes-auth-card h1 { margin: 16px 0 8px; }
.notes-auth-card p { color: var(--notes-muted); line-height: 1.55; }
.notes-auth-card a { display: inline-block; margin-top: 12px; border-radius: 10px; padding: 11px 16px; background: var(--notes-accent); color: #fff; font-weight: 800; text-decoration: none; }

@media (max-width: 1120px) { .notes-workspace { grid-template-columns: 215px minmax(240px, 320px) minmax(320px, 1fr); } .notes-page { padding-left: 94px; } }
@media (max-width: 900px) {
    .notes-quick-nav { top: 72px; right: 12px; left: 12px; justify-content: space-between; }
    .notes-quick-nav a { display: none; } .notes-quick-nav a:first-child { display: inline-block; }
    .notes-page { padding: 72px 12px 14px; }
    .notes-workspace { grid-template-columns: minmax(235px, 36%) 1fr; min-height: calc(100vh - 150px); }
    .notes-side { display: none; }.notes-list-pane { border-right: 1px solid var(--notes-border); }.notes-editor { min-width: 0; }
}
@media (max-width: 650px) {
    .notes-page { padding: 72px 0 0; }.notes-workspace { display: block; border: 0; border-radius: 0; box-shadow: none; min-height: calc(100vh - 137px); }
    .notes-list-pane { display: none; min-height: calc(100vh - 137px); border-right: 0; }.notes-list-pane.mobile-open { display: flex; }
    .notes-editor { min-height: calc(100vh - 137px); }.notes-editor.list-open { display: none; }
    .notes-editor-scroll { padding: 22px 18px; }.note-body { min-height: 48vh; }.notes-list-head { padding-top: 15px; }
    .notes-quick-nav { border-radius: 0; }.notes-quick-nav a:first-child { font-size: .76rem; }
}
