/* =========================================
   Annotated Bibliography Tool Styles
========================================= */

/* ===== USER BAR ===== */
.user-bar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.guest-badge {
  background: rgba(212, 167, 38, 0.2);
  border: 1px solid rgba(212, 167, 38, 0.4);
  color: var(--gold);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== MANAGER VIEW ===== */
.manager-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  text-align: left;
}

.manager-header {
  text-align: center;
  margin-bottom: 2rem;
}

.manager-header h1 {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.manager-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* ===== DIRECTIONS ===== */
.directions {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.directions ol {
  margin: 0;
  padding: 0;
  list-style-position: inside;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
}

.directions li {
  color: var(--gold);
  font-size: 0.95rem;
}

/* ===== ARTICLE SLOTS ===== */
.article-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  .article-slots {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .article-slots {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .article-slots {
    grid-template-columns: 1fr;
  }
}

.slot {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
}

.slot:hover {
  border-color: rgba(212, 167, 38, 0.3);
}

/* Empty Slot */
.slot-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.slot-empty:hover {
  background: var(--glass-hover);
}

.slot-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.slot-empty:hover .slot-icon {
  color: var(--gold);
}

.slot-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Filled Slot */
.slot-filled {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.slot-citation {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.slot-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.slot-actions {
  display: flex;
  gap: 0.5rem;
}

.slot-btn {
  flex: 1;
  padding: 0.4rem 0.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.slot-btn:hover {
  background: var(--glass-hover);
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.slot-btn.open-btn {
  background: var(--gold);
  color: var(--green-900);
  border-color: var(--gold);
}

.slot-btn.open-btn:hover {
  background: var(--gold-light);
}

/* ===== ARCHIVE SECTION ===== */
.archive-section {
  margin-bottom: 2rem;
}

.archive-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.archive-toggle:hover {
  background: var(--glass-hover);
  color: var(--gold);
}

.archive-count {
  color: var(--text-muted);
}

.toggle-arrow {
  margin-left: auto;
  transition: transform 0.2s;
}

.archive-toggle.open .toggle-arrow {
  transform: rotate(180deg);
}

.archive-list {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.empty-archive {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.archived-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--glass);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.archived-item:last-child {
  margin-bottom: 0;
}

.archived-citation {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.archived-actions {
  display: flex;
  gap: 0.5rem;
}

.archived-btn {
  padding: 0.3rem 0.6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.archived-btn:hover {
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.archived-btn.delete:hover {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.3);
}

/* ===== BIBLIOGRAPHY OUTPUT ===== */
.bibliography-output {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.bibliography-output h2 {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.bibliography-content {
  color: var(--text-primary);
}

.empty-bib {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

.bib-entry {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.bib-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.bib-reference {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  text-indent: -2rem;
}

.bib-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
}

.bib-annotations {
  margin-top: 0.75rem;
}

.bib-annotations-title {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.bib-quote {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.bib-quote::before {
  content: '"';
}

.bib-quote::after {
  content: '" (p. ' attr(data-page) ')';
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--green-800);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.25rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--gold);
}

.article-form {
  padding: 1.25rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row-inline {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select {
  padding: 0.6rem 0.75rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.flex-grow {
  flex: 1;
}

.pdf-upload-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pdf-upload-btn {
  padding: 0.5rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.pdf-upload-btn:hover {
  background: var(--glass-hover);
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.pdf-filename-display {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-secondary,
.btn-primary {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--gold);
  border: none;
  color: var(--green-900);
}

.btn-primary:hover {
  background: var(--gold-light);
}

/* ===== EDITOR VIEW ===== */
.editor-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1400px;
  text-align: left;
}

.editor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.back-btn {
  padding: 0.5rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--glass-hover);
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.editor-article-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.working-on {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.editor-citation {
  color: var(--gold-light);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-info-btn {
  padding: 0.35rem 0.7rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.edit-info-btn:hover {
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

/* PDF Prompt */
.pdf-prompt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.prompt-box {
  text-align: center;
  padding: 3rem;
  background: var(--glass);
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  max-width: 400px;
}

.prompt-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.prompt-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.upload-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--gold);
  color: var(--green-900);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.upload-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ===== ANNOTATOR SECTION (from original) ===== */
.annotator-section {
  flex: 1;
  display: flex;
  min-height: 0;
}

.pdf-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  min-width: 0;
  background: #1a1a1a;
}

.pdf-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--glass-border);
}

.pdf-filename {
  color: var(--text-secondary);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.header-btn {
  padding: 0.35rem 0.7rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.header-btn:hover {
  background: var(--glass-hover);
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  padding: 3px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-muted);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.mode-btn:hover {
  color: var(--text-secondary);
}

.mode-btn.active {
  background: var(--gold);
  color: var(--green-900);
  font-weight: 600;
}

.mode-icon {
  font-size: 1rem;
}

.markup-toolbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-right: 0.3rem;
}

.tool-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.tool-btn:hover {
  background: var(--glass-hover);
  border-color: rgba(212, 167, 38, 0.3);
}

.tool-btn.active {
  background: var(--gold);
  border-color: var(--gold);
}

.tool-btn.active .tool-icon {
  filter: brightness(0.2);
}

.tool-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.highlight-icon {
  background: linear-gradient(to bottom, transparent 40%, #FFEB3B 40%, #FFEB3B 80%, transparent 80%);
  border-radius: 2px;
}

.box-icon {
  width: 14px;
  height: 10px;
  background: rgba(255, 235, 59, 0.5);
  border: 2px solid #FFEB3B;
  border-radius: 2px;
}

.tool-btn.active .box-icon {
  background: rgba(7, 26, 14, 0.4);
  border-color: var(--green-900);
}

.underline-icon {
  border-bottom: 3px solid var(--text-secondary);
}

.pen-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-secondary);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.eraser-icon {
  width: 14px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 3px 3px 0 0;
}

.tool-btn.active .underline-icon {
  border-bottom-color: var(--green-900);
}

.tool-btn.active .pen-icon {
  border-color: var(--green-900);
}

.tool-btn.active .eraser-icon {
  background: var(--green-900);
}

.color-btn {
  width: 24px;
  height: 24px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.color-btn:hover {
  transform: scale(1.15);
}

.color-btn.active {
  border-color: white;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
}

.action-btn-small {
  padding: 0.3rem 0.6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn-small:hover {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.3);
}

.annotate-hint {
  padding: 0.5rem 1rem;
  background: rgba(33, 150, 243, 0.15);
  border-bottom: 1px solid rgba(33, 150, 243, 0.3);
  color: #90CAF9;
  font-size: 0.85rem;
}

.pdf-viewer {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

.page-container {
  position: relative;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.page-container canvas.pdf-canvas {
  display: block;
}

.page-container .text-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  line-height: 1.0;
  opacity: 0.2;
}

.page-container .text-layer > span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}

.page-container .text-layer ::selection {
  background: rgba(33, 150, 243, 0.4);
}

.page-container .markup-canvas {
  position: absolute;
  left: 0;
  top: 0;
  cursor: crosshair;
}

body.annotate-mode .page-container .markup-canvas {
  pointer-events: none;
  cursor: default;
}

body.annotate-mode .page-container .text-layer {
  cursor: text;
}

.pdf-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--glass-border);
}

.nav-btn {
  padding: 0.4rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover:not(:disabled) {
  background: var(--glass-hover);
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#page-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Annotations Side */
.annotations-side {
  width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--green-800);
}

.annotations-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
}

.annotations-header h2 {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1rem;
  margin: 0;
}

.note-count-badge {
  background: var(--gold);
  color: var(--green-900);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.add-form {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.1);
}

.add-form .form-row {
  margin-bottom: 0.6rem;
}

.add-form .form-row label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.add-form .form-row textarea,
.add-form .form-row input,
.add-form .form-row select {
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.add-form .form-row textarea {
  min-height: 50px;
}

.add-form .form-row-inline {
  margin-bottom: 0.6rem;
  gap: 0.6rem;
}

.add-form .form-field label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.add-form .form-field input,
.add-form .form-field select {
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.add-form .form-field input[type="number"] {
  width: 60px;
}

.save-btn {
  width: 100%;
  padding: 0.55rem;
  background: var(--gold);
  color: var(--green-900);
  border: none;
  border-radius: var(--radius);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.save-btn:hover {
  background: var(--gold-light);
}

.annotations-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1.25rem;
}

.annotations-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 1rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.annotation-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  transition: var(--transition);
}

.annotation-card:hover {
  border-color: rgba(212, 167, 38, 0.25);
}

.annotation-card .card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.annotation-card .card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  background: var(--gold);
  color: var(--green-900);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.annotation-card .card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.annotation-card .card-tag {
  background: rgba(212, 167, 38, 0.2);
  color: var(--gold);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-left: auto;
}

.annotation-card .card-quote {
  color: var(--gold-light);
  font-style: italic;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--gold);
  line-height: 1.35;
}

.annotation-card .card-quote::before {
  content: '"';
}

.annotation-card .card-quote::after {
  content: '"';
}

.annotation-card .card-note {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.35;
}

.annotation-card .card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--glass-border);
}

.annotation-card .action-btn {
  flex: 1;
  padding: 0.3rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.annotation-card .action-btn:hover {
  color: var(--gold);
  border-color: rgba(212, 167, 38, 0.3);
}

.annotation-card .action-btn.delete:hover {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .annotator-section {
    flex-direction: column;
  }

  .pdf-side {
    height: 55vh;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .annotations-side {
    width: 100%;
    flex: 1;
  }

  .markup-toolbar {
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .tool-label {
    display: none;
  }

  .editor-header {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-article-info {
    flex-wrap: wrap;
  }
}

/* ===== SCROLLBAR ===== */
.annotations-list-container::-webkit-scrollbar,
.pdf-viewer::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.annotations-list-container::-webkit-scrollbar-track,
.pdf-viewer::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.annotations-list-container::-webkit-scrollbar-thumb,
.pdf-viewer::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

.annotations-list-container::-webkit-scrollbar-thumb:hover,
.pdf-viewer::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
