@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono&display=swap");
.mono { font-family: 'JetBrains Mono', monospace; }
.sidebar { height: calc(100vh - 72px); overflow-y: auto; border-right: 1px solid #dee2e6; background: #fff; }
.editor-area { height: calc(100vh - 72px); overflow-y: auto; background: #f8f9fa; padding: 2rem; }
.chunk-card { margin-bottom: 2rem; border-radius: 1rem; border: 1px solid #dee2e6; background: #fff; transition: box-shadow 0.2s; }
.chunk-card:hover { box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05); }
.chunk-card .card-header { background-color: #fafbfc; border-bottom: 1px solid #dee2e6; font-weight: 600; padding: 1rem; border-radius: 1rem 1rem 0 0; }
.chunk-card textarea { border: none; resize: vertical; min-height: 180px; font-size: 1rem; line-height: 1.6; padding: 1.25rem; }
.chunk-card textarea:focus { box-shadow: none; outline: none; background-color: #fff; }
.chapter-item { font-size: 0.9rem; border-radius: 0.5rem; border: none; padding: 0.75rem 1rem; transition: all 0.2s; cursor: pointer; }
.chapter-item.active { background-color: #0d6efd !important; color: white !important; font-weight: 600; }
.loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.9); z-index: 9999; justify-content: center; align-items: center; flex-direction: column; }
.badge-limit { font-size: 0.75rem; font-weight: 700; }
.insert-wrap { position: relative; height: 0; display: flex; justify-content: center; z-index: 10; }
.btn-insert { position: absolute; transform: translateY(-50%); opacity: 0; transition: opacity 0.2s; }
.chunk-card:hover + .insert-wrap .btn-insert, .insert-wrap:hover .btn-insert { opacity: 1; }

.group:hover .group-hover-opacity-100 { opacity: 1 !important; }
.chapter-item-container .btn-delete-chapter-sidebar { padding: 0.25rem; }
.chapter-item-container .btn-delete-chapter-sidebar:hover { background: #fee2e2; border-radius: 4px; }

.btn-history { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #6c757d; border: 1px solid #dee2e6; background: #fff; transition: all 0.2s; }
.btn-history:hover:not(:disabled) { background: #e9ecef; color: #212529; }
.btn-history:disabled { opacity: 0.3; cursor: not-allowed; }

/* Toast positioning */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 10000; }