/* ─── Notes panel (shared by md_view and pdf_view) ────────────────────── */
.notes-display-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.notes-display-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.notes-display-content {
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  min-height: 60px;
}
.notes-display-empty {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font);
}

.notes-editor-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.notes-editor-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notes-textarea {
  width: 100%;
  min-height: 140px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
}
.notes-textarea:focus { outline: none; border-color: var(--accent); }
.notes-buttons { display: flex; gap: 0.5rem; }
.notes-history-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}
.notes-history-link:hover { text-decoration: underline; }

/* ─── PDF viewer ───────────────────────────────────────────────────────── */
.pdf-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}
@media (max-width: 1400px) {
  .pdf-layout { grid-template-columns: 1fr 300px; gap: 1.2rem; }
}
@media (max-width: 1200px) {
  .pdf-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .notes-sidebar { order: 2; }
  .pdf-viewer-wrapper { order: 1; }
}

.pdf-viewer-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pdf-controls {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.pdf-controls button {
  background: var(--accent);
  border: none;
  color: #0f1117;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pdf-controls button:hover { background: #849aff; }
.pdf-page-info { color: var(--text-muted); font-size: 0.8rem; }
#pdfCanvas { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.pdf-container {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding: 1rem;
  background: var(--bg);
}

.notes-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: fit-content;
}
.notes-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.notes-button {
  background: var(--accent);
  border: none;
  color: #0f1117;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}
.notes-button:hover { background: #849aff; }
.notes-status {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem 0;
}
.history-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}
.history-link:hover { text-decoration: underline; }
