/* === Online Notepad - Enterprise Styles === */
:root {
  --np-primary: #4f46e5;
  --np-primary-hover: #4338ca;
  --np-primary-light: #eef2ff;
  --np-accent: #ef4444;
  --np-green: #10b981;
  --np-amber: #f59e0b;
  --np-text: #1f2937;
  --np-muted: #64748b;
  --np-surface: #f8fafc;
  --np-border: #e2e8f0;
  --np-card: #ffffff;
  --np-sidebar: #ffffff;
  --np-hover: #f1f5f9;
  --np-bg: #f0f2f5;
  --np-dark-bg: #0f172a;
  --np-dark-card: #1e293b;
  --np-dark-text: #f1f5f9;
  --np-dark-surface: #334155;
  --np-dark-border: #475569;
  --np-dark-sidebar: #1e293b;
  --np-dark-hover: #334155;
}
body.dark .np-app { color: var(--np-dark-text); }
body.dark .np-sidebar { background: var(--np-dark-sidebar); border-color: var(--np-dark-border); }
body.dark .np-card { background: var(--np-dark-card); border-color: var(--np-dark-border); }
body.dark .np-surface { background: var(--np-dark-surface); border-color: var(--np-dark-border); }
body.dark .np-muted { color: #94a3b8; }
body.dark .np-input { background: var(--np-dark-card); color: var(--np-dark-text); border-color: var(--np-dark-border); }
body.dark .np-editor { background: var(--np-dark-card); color: var(--np-dark-text); }
body.dark .np-btn-outline { background: var(--np-dark-card); color: var(--np-dark-text); border-color: var(--np-dark-border); }
body.dark .np-note-card { background: var(--np-dark-card); border-color: var(--np-dark-border); }
body.dark .np-note-card:hover { background: var(--np-dark-surface); }
body.dark .np-note-card.active { background: var(--np-dark-surface); border-color: var(--np-primary); }
body.dark .np-toolbar { background: var(--np-dark-surface); border-color: var(--np-dark-border); }
body.dark .np-toolbar button { color: var(--np-dark-text); }
body.dark .np-modal-content { background: var(--np-dark-card); color: var(--np-dark-text); }
body.dark .np-toast { color: #fff; }
body.dark .np-empty svg { opacity: .4; }

.np-app { font-family: 'Inter', sans-serif; color: var(--np-text); height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--np-bg); }
body.dark .np-app { background: var(--np-dark-bg); }

/* Header */
.np-header { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--np-card); border-bottom: 1px solid var(--np-border); flex-shrink: 0; z-index: 50; }
body.dark .np-header { background: var(--np-dark-card); border-color: var(--np-dark-border); }
.np-header .logo { font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; color: var(--np-primary); white-space: nowrap; }
.np-header .logo i { font-size: 1.4rem; }
.np-search { flex: 1; max-width: 400px; position: relative; }
.np-search input { width: 100%; padding: 8px 14px 8px 36px; border: 2px solid var(--np-border); border-radius: 10px; font-size: .88rem; background: var(--np-surface); transition: border-color .2s; font-family: 'Inter', sans-serif; }
.np-search input:focus { outline: none; border-color: var(--np-primary); }
.np-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--np-muted); font-size: .9rem; }
.np-header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* Main Layout */
.np-main { display: flex; flex: 1; overflow: hidden; }
.np-sidebar { width: 320px; background: var(--np-sidebar); border-right: 1px solid var(--np-border); display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden; }
.np-sidebar-header { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--np-border); flex-shrink: 0; }
.np-sidebar-header h3 { font-weight: 700; font-size: .9rem; }
.np-sidebar-header .count { font-size: .78rem; color: var(--np-muted); }
.np-sidebar-controls { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--np-border); flex-wrap: wrap; flex-shrink: 0; }
.np-sidebar-controls select { padding: 6px 10px; border: 1px solid var(--np-border); border-radius: 8px; font-size: .8rem; background: var(--np-card); cursor: pointer; font-family: 'Inter', sans-serif; }
body.dark .np-sidebar-controls select { background: var(--np-dark-card); color: var(--np-dark-text); border-color: var(--np-dark-border); }
.np-view-toggle { display: flex; gap: 4px; }
.np-view-toggle button { padding: 4px 8px; border: 1px solid var(--np-border); border-radius: 6px; background: var(--np-card); cursor: pointer; font-size: .8rem; color: var(--np-muted); }
body.dark .np-view-toggle button { background: var(--np-dark-card); color: var(--np-dark-text); border-color: var(--np-dark-border); }
.np-view-toggle button.active { background: var(--np-primary); color: #fff; border-color: var(--np-primary); }

/* Notes List */
.np-notes-list { flex: 1; overflow-y: auto; padding: 8px; }
.np-note-card { padding: 12px 14px; border: 1px solid var(--np-border); border-radius: 10px; margin-bottom: 6px; cursor: pointer; transition: all .15s; background: var(--np-card); position: relative; }
.np-note-card:hover { background: var(--np-hover); }
.np-note-card.active { background: var(--np-primary-light); border-color: var(--np-primary); }
body.dark .np-note-card.active { background: #1e1b4b; border-color: var(--np-primary); }
.np-note-card .title { font-weight: 700; font-size: .9rem; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.np-note-card .title .fav { color: var(--np-amber); font-size: .8rem; }
.np-note-card .preview { font-size: .8rem; color: var(--np-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-note-card .meta { display: flex; justify-content: space-between; font-size: .7rem; color: var(--np-muted); margin-top: 6px; }
.np-note-card .actions { position: absolute; top: 8px; right: 8px; display: none; gap: 2px; }
.np-note-card:hover .actions { display: flex; }
.np-note-card .actions button { padding: 4px 6px; border: none; background: transparent; cursor: pointer; color: var(--np-muted); border-radius: 4px; font-size: .8rem; }
.np-note-card .actions button:hover { background: var(--np-surface); color: var(--np-text); }
.np-note-card.list-view { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.np-note-card.list-view .title { margin: 0; flex: 1; }
.np-note-card.list-view .preview { display: none; }
.np-note-card.list-view .meta { flex-shrink: 0; }

/* Editor Area */
.np-editor-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.np-editor-empty { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--np-muted); text-align: center; padding: 40px; }
.np-editor-empty i { font-size: 4rem; margin-bottom: 16px; opacity: .4; }
.np-editor-empty h3 { font-weight: 700; font-size: 1.2rem; margin-bottom: 6px; }
.np-editor-empty p { font-size: .9rem; }
.np-editor-header { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--np-border); flex-shrink: 0; flex-wrap: wrap; }
body.dark .np-editor-header { border-color: var(--np-dark-border); }
.np-editor-header .title-input { flex: 1; border: none; font-weight: 700; font-size: 1.2rem; padding: 8px 0; background: transparent; color: inherit; font-family: 'Inter', sans-serif; min-width: 100px; }
.np-editor-header .title-input:focus { outline: none; }
.np-editor-header .save-status { font-size: .78rem; color: var(--np-muted); white-space: nowrap; }
.np-editor-header .save-status.saving { color: var(--np-amber); }
.np-editor-header .save-status.saved { color: var(--np-green); }

/* Toolbar */
.np-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 16px; border-bottom: 1px solid var(--np-border); background: var(--np-card); flex-shrink: 0; }
body.dark .np-toolbar { background: var(--np-dark-card); border-color: var(--np-dark-border); }
.np-toolbar .sep { width: 1px; background: var(--np-border); margin: 0 4px; }
body.dark .np-toolbar .sep { background: var(--np-dark-border); }
.np-toolbar button { padding: 6px 10px; border: none; background: transparent; cursor: pointer; border-radius: 6px; font-size: .85rem; color: var(--np-text); transition: all .15s; }
.np-toolbar button:hover { background: var(--np-surface); }
body.dark .np-toolbar button:hover { background: var(--np-dark-hover); }
.np-toolbar button.active { background: var(--np-primary-light); color: var(--np-primary); }
body.dark .np-toolbar button.active { background: #1e1b4b; color: #a5b4fc; }

/* Editor Content */
.np-editor-content { flex: 1; overflow-y: auto; padding: 20px; }
.np-editor-content .editor { min-height: 100%; padding: 0; font-size: 1rem; line-height: 1.7; outline: none; word-wrap: break-word; }
.np-editor-content .editor:empty:before { content: 'Start writing...'; color: var(--np-muted); }
.np-editor-content .editor h1 { font-size: 1.5rem; font-weight: 700; margin: 12px 0 8px; }
.np-editor-content .editor h2 { font-size: 1.3rem; font-weight: 700; margin: 10px 0 6px; }
.np-editor-content .editor ul, .np-editor-content .editor ol { padding-left: 24px; margin: 8px 0; }
.np-editor-content .editor li { margin-bottom: 4px; }

/* Analytics Bar */
.np-analytics { display: flex; gap: 16px; padding: 8px 20px; border-top: 1px solid var(--np-border); font-size: .78rem; color: var(--np-muted); flex-shrink: 0; flex-wrap: wrap; }
body.dark .np-analytics { border-color: var(--np-dark-border); }
.np-analytics span { display: flex; align-items: center; gap: 4px; }
.np-analytics .val { font-weight: 700; color: var(--np-text); }
body.dark .np-analytics .val { color: var(--np-dark-text); }

/* Buttons */
.np-btn { padding: 8px 18px; border-radius: 10px; font-weight: 600; font-size: .85rem; border: none; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; }
.np-btn-primary { background: var(--np-primary); color: #fff; }
.np-btn-primary:hover { background: var(--np-primary-hover); }
.np-btn-outline { background: var(--np-card); color: var(--np-text); border: 1px solid var(--np-border); }
.np-btn-outline:hover { border-color: var(--np-primary); background: var(--np-primary-light); }
.np-btn-icon { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--np-border); background: var(--np-card); cursor: pointer; color: var(--np-muted); font-size: .9rem; transition: all .15s; }
.np-btn-icon:hover { border-color: var(--np-primary); color: var(--np-primary); background: var(--np-primary-light); }

/* Modal */
.np-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.np-modal.show { display: flex; }
.np-modal-content { background: var(--np-card); border-radius: 16px; padding: 24px; max-width: 400px; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,.15); }
.np-modal-content h3 { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.np-modal-content p { color: var(--np-muted); font-size: .9rem; margin-bottom: 20px; }
.np-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.np-modal-actions .np-btn { min-width: 80px; justify-content: center; }

/* Toast */
.np-toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.np-toast { padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: .85rem; color: #fff; animation: np-slide-in .3s ease; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.np-toast.success { background: var(--np-green); }
.np-toast.error { background: var(--np-accent); }
.np-toast.info { background: var(--np-primary); }
@keyframes np-slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Empty State */
.np-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; color: var(--np-muted); }
.np-empty i { font-size: 4rem; margin-bottom: 16px; opacity: .4; }
.np-empty h3 { font-weight: 700; font-size: 1.2rem; color: var(--np-text); margin-bottom: 6px; }
body.dark .np-empty h3 { color: var(--np-dark-text); }
.np-empty p { font-size: .9rem; margin-bottom: 20px; }

/* Mobile Toggle */
.np-mobile-toggle { display: none; }
@media(max-width:768px) {
  .np-sidebar { position: fixed; left: -320px; top: 0; bottom: 0; z-index: 100; transition: left .3s; width: 300px; }
  .np-sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  .np-mobile-toggle { display: block; }
  .np-header { padding: 10px 12px; }
  .np-search { max-width: 200px; }
  .np-header .logo span { display: none; }
  .np-editor-header { padding: 10px 14px; }
  .np-toolbar { padding: 6px 10px; gap: 1px; }
  .np-toolbar button { padding: 5px 8px; font-size: .8rem; }
  .np-analytics { gap: 10px; padding: 6px 14px; font-size: .72rem; }
}
@media(max-width:480px) {
  .np-search { max-width: 140px; }
  .np-search input { font-size: .8rem; padding: 6px 10px 6px 30px; }
  .np-header-actions .np-btn span { display: none; }
}

/* Content Section (SEO) */
.np-content { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.np-content h2 { font-weight: 800; font-size: 1.5rem; margin-top: 32px; margin-bottom: 12px; color: var(--np-text); }
body.dark .np-content h2 { color: var(--np-dark-text); }
.np-content h3 { font-weight: 700; font-size: 1.15rem; margin-top: 24px; margin-bottom: 8px; }
.np-content p,.np-content li { font-size: .95rem; line-height: 1.7; color: #374151; margin-bottom: 10px; }
body.dark .np-content p,body.dark .np-content li { color: #cbd5e1; }
.np-content ul,.np-content ol { padding-left: 20px; }
.np-features { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 14px; margin: 16px 0; }
.np-feat-card { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: 14px; padding: 20px; }
body.dark .np-feat-card { background: var(--np-dark-surface); border-color: var(--np-dark-border); }
.np-feat-card .icon { font-size: 1.5rem; color: var(--np-primary); margin-bottom: 8px; }
.np-feat-card h4 { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.np-feat-card p { font-size: .85rem; color: var(--np-muted); margin: 0; }
.np-shortcuts { width: 100%; border-collapse: collapse; margin: 12px 0; }
.np-shortcuts th,.np-shortcuts td { padding: 8px 14px; border: 1px solid var(--np-border); text-align: left; font-size: .9rem; }
.np-shortcuts th { background: var(--np-surface); font-weight: 700; }
body.dark .np-shortcuts th { background: var(--np-dark-surface); }
.np-faq-item { border-bottom: 1px solid var(--np-border); padding: 14px 0; }
.np-faq-q { font-weight: 700; font-size: .95rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.np-faq-q i { transition: transform .2s; }
.np-faq-q.open i { transform: rotate(180deg); }
.np-faq-a { display: none; margin-top: 8px; font-size: .9rem; line-height: 1.6; color: var(--np-muted); }
.np-faq-a.show { display: block; }
</write_to_file>