/* ===== Variables ===== */
:root {
  --rutgers-scarlet: #CC0033;
  --rutgers-dark: #5C0018;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-500: #868E96;
  --gray-700: #495057;
  --gray-900: #212529;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --max-width: 900px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

/* ===== Header & Nav ===== */
header {
  background: var(--white);
  border-bottom: 3px solid var(--rutgers-scarlet);
}

header h1 {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--rutgers-dark);
}

nav {
  background-color: rgb(204, 0, 51);
}

nav a {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}

nav a:hover {
  background-color: var(--rutgers-dark);
}

/* ===== Main Content ===== */
main {
  padding: 2rem 1.5rem;
}

.page-layout {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-content {
  flex: 1;
  min-width: 0;
  max-width: var(--max-width);
}

/* ===== Sidebar ===== */
.sidebar {
  width: 250px;
  min-width: 180px;
  max-width: 450px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  align-self: flex-start;
  display: flex;
}

.sidebar-resize-handle {
  width: 5px;
  flex-shrink: 0;
  cursor: col-resize;
  background: transparent;
  transition: background-color 0.2s;
  border-radius: 2px;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
  background: var(--gray-300);
}

.sidebar-nav {
  flex: 1;
  min-width: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.sidebar-section {
  margin-bottom: 0.25rem;
}

.sidebar-section-title {
  display: block;
  padding: 0.4rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--rutgers-dark);
  text-decoration: none;
  transition: background-color 0.15s;
}

.sidebar-section-title:hover {
  background: var(--gray-100);
}

.sidebar-section-title.active {
  color: var(--rutgers-scarlet);
  border-left: 3px solid var(--rutgers-scarlet);
  padding-left: calc(1rem - 3px);
}

.sidebar-question {
  display: block;
  padding: 0.25rem 1rem 0.25rem 1.5rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-question:hover {
  color: var(--rutgers-scarlet);
}

.sidebar-question.active {
  color: var(--rutgers-scarlet);
  font-weight: 600;
}

/* ===== Page Controls ===== */
.page-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

#collapse-all-btn,
#expand-all-btn,
#add-entry-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--rutgers-scarlet);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--rutgers-scarlet);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#collapse-all-btn:hover,
#expand-all-btn:hover,
#add-entry-btn:hover {
  background: var(--rutgers-scarlet);
  color: var(--white);
}

/* ===== Sections ===== */
.qa-section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--rutgers-scarlet);
}

/* ===== Q&A Block Cards ===== */
.qa-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  border-left: 4px solid var(--rutgers-scarlet);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-left-color: rgb(204, 0, 51);
}

.question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  flex: 1;
}

.collapse-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  color: var(--gray-500);
  transition: color 0.2s;
  flex-shrink: 0;
}

.collapse-btn:hover {
  color: var(--rutgers-scarlet);
}

/* ===== Tags ===== */
.qa-tags {
  padding: 0.25rem 1.25rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.qa-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rutgers-scarlet);
  background: #FFF0F3;
  border: 1px solid #FFCDD8;
  border-radius: 12px;
}

/* ===== Answer ===== */
.answer {
  padding: 0 1.25rem 1rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.answer p {
  margin: 0;
}

/* ===== Useful Links ===== */
.qa-links {
  padding: 0.5rem 1.25rem 0.75rem;
  border-top: 1px solid var(--gray-200);
}

.qa-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.qa-links a {
  display: inline-block;
  margin-right: 1rem;
  font-size: 0.9rem;
  color: var(--rutgers-scarlet);
  text-decoration: none;
  font-weight: 500;
}

.qa-links a:hover {
  text-decoration: underline;
}

/* ===== References Toggle ===== */
.references-toggle-btn {
  display: block;
  padding: 0.5rem 1.25rem;
  background: none;
  border: none;
  border-top: 1px solid var(--gray-200);
  color: var(--rutgers-scarlet);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s;
}

.references-toggle-btn:hover {
  background: var(--gray-50);
}

/* ===== References ===== */
.references {
  background: var(--gray-100);
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-200);
}

.reference {
  margin-bottom: 0.75rem;
}

.reference:last-child {
  margin-bottom: 0;
}

.document-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

blockquote.quote {
  margin: 0.25rem 0 0.5rem;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 3px solid var(--rutgers-scarlet);
  font-style: italic;
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== Collapse States ===== */
.qa-block.collapsed .answer {
  display: none;
}

.qa-block.collapsed .references {
  display: none;
}

.qa-block.collapsed .references-toggle-btn {
  display: none;
}

.qa-block.refs-collapsed .references {
  display: none;
}

/* ===== Add Entry Form ===== */
.add-entry-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gray-200);
}

.add-entry-form {
  margin-top: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.add-entry-form h3 {
  font-size: 1.15rem;
  color: var(--rutgers-dark);
  margin-bottom: 1rem;
}

.add-entry-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.add-entry-form label:first-of-type {
  margin-top: 0;
}

.add-entry-form input,
.add-entry-form textarea,
.add-entry-form select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.add-entry-form input:focus,
.add-entry-form textarea:focus,
.add-entry-form select:focus {
  border-color: var(--rutgers-scarlet);
}

.add-entry-form button[type="submit"] {
  margin-top: 1.25rem;
  padding: 0.6rem 2rem;
  background: var(--rutgers-scarlet);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-entry-form button[type="submit"]:hover {
  background: var(--rutgers-dark);
}

.add-entry-error {
  color: #DC3545;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 0;
}

.add-entry-error:not(:empty) {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: #FFF3F5;
  border: 1px solid #FFCDD8;
  border-radius: 6px;
}

/* ===== Search Bar ===== */
.search-wrapper {
  margin-bottom: 1.5rem;
}

#search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

#search-input:focus {
  border-color: var(--rutgers-scarlet);
}

/* ===== Search Results Viewer ===== */
.search-results {
  display: none;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-results-strong,
.search-results-weak,
.search-results-cross-page,
.search-results-guides,
.search-results-personal {
  flex: 1;
  max-height: 400px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
}

.search-results h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--rutgers-scarlet);
}

.search-result-card {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background-color 0.15s;
}

.search-result-card:last-child {
  border-bottom: none;
}

.search-result-card:hover {
  background: var(--gray-50);
}

.search-result-question {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
  margin: 0 0 0.15rem;
}

.search-result-section {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.search-no-results {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-style: italic;
}

/* ===== Cross-Page Loading ===== */
.cross-page-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-style: italic;
  padding: 0.5rem 0;
}

.cross-page-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--rutgers-scarlet);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.search-result-source {
  font-size: 0.75rem;
  color: var(--white);
  background: var(--rutgers-scarlet);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  display: inline-block;
  margin-top: 0.2rem;
}

/* ===== Search Highlight ===== */
.search-highlight {
  animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
  0% { background-color: #FFF3CD; }
  100% { background-color: var(--white); }
}

/* ===== Landing Page ===== */
.hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0.5rem auto 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.topic-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--gray-900);
  border-top: 4px solid var(--rutgers-scarlet);
  transition: transform 0.2s, box-shadow 0.2s;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.topic-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  margin-bottom: 0.5rem;
}

.topic-card-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ===== Personal Entries ===== */
.personal-entry {
  border-left-color: var(--gray-500);
  position: relative;
}

.personal-entry-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0;
}

.personal-entry-edit-btn,
.personal-entry-delete-btn {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.personal-entry-edit-btn {
  color: var(--gray-700);
}

.personal-entry-edit-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
}

.personal-entry-delete-btn {
  color: #DC3545;
  border-color: #FFCDD8;
}

.personal-entry-delete-btn:hover {
  background: #FFF3F5;
  border-color: #DC3545;
}

/* Admin entry action buttons (edit/delete on QA cards) */
.admin-entry-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0;
}

.admin-edit-btn,
.admin-delete-btn {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-edit-btn {
  color: var(--gray-700);
}

.admin-edit-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
}

.admin-delete-btn {
  color: #DC3545;
  border-color: #FFCDD8;
}

.admin-delete-btn:hover {
  background: #FFF3F5;
  border-color: #DC3545;
}

/* Admin edit form */
.admin-edit-form {
  background: var(--white);
  border: 2px solid var(--rutgers-scarlet);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-edit-form h3 {
  margin: 0 0 1rem;
  color: var(--rutgers-scarlet);
}

.admin-edit-form label {
  display: block;
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.875rem;
}

.admin-edit-form input[type="text"],
.admin-edit-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.admin-edit-error {
  color: #DC3545;
  font-size: 0.875rem;
  min-height: 1.25rem;
}

.admin-edit-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-edit-submit {
  padding: 0.5rem 1.25rem;
  background: var(--rutgers-scarlet);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-edit-submit:hover {
  background: var(--rutgers-dark);
}

.admin-edit-cancel {
  padding: 0.5rem 1.25rem;
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-edit-cancel:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
}

#add-personal-entry-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--gray-500);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#add-personal-entry-btn:hover {
  background: var(--gray-700);
  color: var(--white);
}

.personal-entry-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

#download-personal-entries-btn,
#upload-personal-entries-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-500);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

#download-personal-entries-btn:hover,
#upload-personal-entries-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
  color: var(--gray-700);
}

.personal-entry-form {
  margin-top: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border-left: 4px solid var(--gray-500);
}

.personal-entry-form h3 {
  font-size: 1.15rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.personal-entry-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.personal-entry-form label:first-of-type {
  margin-top: 0;
}

.personal-entry-form input,
.personal-entry-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.personal-entry-form input:focus,
.personal-entry-form textarea:focus {
  border-color: var(--gray-500);
}

.personal-entry-form button[type="submit"] {
  margin-top: 1.25rem;
  padding: 0.6rem 2rem;
  background: var(--gray-700);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.personal-entry-form button[type="submit"]:hover {
  background: var(--gray-900);
}

.personal-entry-error {
  color: #DC3545;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 0;
}

.personal-entry-error:not(:empty) {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: #FFF3F5;
  border: 1px solid #FFCDD8;
  border-radius: 6px;
}

.personal-entries-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--gray-300);
}

/* ===== Guide Pages ===== */
.guide-section {
  margin-bottom: 2.5rem;
}

.guide-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--rutgers-scarlet);
}

.guide-paragraph {
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.guide-list,
.guide-ordered-list {
  padding-left: 1.5rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.guide-list li,
.guide-ordered-list > li {
  margin-bottom: 0.5rem;
}

.guide-ordered-list > li strong {
  color: var(--gray-900);
}

.guide-sub-list {
  padding-left: 1.25rem;
  margin-top: 0.25rem;
  list-style-type: disc;
}

.guide-sub-list li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.guide-table th {
  background: var(--rutgers-scarlet);
  color: var(--white);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.9rem;
  color: var(--gray-700);
}

.guide-table tr:nth-child(even) td {
  background: var(--gray-50);
}

.guide-contacts,
.guide-sources {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--rutgers-scarlet);
}

.guide-contact-item {
  margin-bottom: 0.75rem;
}

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

.guide-contact-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.guide-contact-value a {
  color: var(--rutgers-scarlet);
  text-decoration: none;
}

.guide-contact-value a:hover {
  text-decoration: underline;
}

.guide-source-item {
  margin-bottom: 0.5rem;
}

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

.guide-source-item a {
  color: var(--rutgers-scarlet);
  text-decoration: none;
  font-weight: 500;
}

.guide-source-item a:hover {
  text-decoration: underline;
}

/* ===== Guides Index Page ===== */
.guides-list {
  margin-top: 1.5rem;
}

.guides-alphabetical {
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.guides-list-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  padding: 1.25rem;
  border-left: 4px solid var(--rutgers-scarlet);
}

.guides-list-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.guides-list-link:hover {
  color: var(--rutgers-scarlet);
  text-decoration: underline;
}

.guides-list-desc {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.35rem;
}

.guides-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

/* ===== Admin Page ===== */
.admin-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  margin-bottom: 1.5rem;
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--rutgers-scarlet);
}

.admin-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.admin-card-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#refresh-cache-btn {
  background: var(--rutgers-scarlet);
  color: var(--white);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#refresh-cache-btn:hover {
  background: var(--rutgers-dark);
}

#refresh-cache-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.refresh-success {
  color: #2B8A3E;
  font-size: 0.85rem;
  font-weight: 600;
}

.refresh-error {
  color: #DC3545;
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-link {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--rutgers-scarlet);
  border-radius: var(--radius);
  color: var(--rutgers-scarlet);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.admin-link:hover {
  background: var(--rutgers-scarlet);
  color: var(--white);
}

/* ===== Login Page ===== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--gray-50);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  border-top: 4px solid var(--rutgers-scarlet);
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-error {
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  background: #FFF3F5;
  border: 1px solid #FFCDD8;
  border-radius: 6px;
  color: #DC3545;
  font-size: 0.85rem;
  font-weight: 600;
}

.login-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
  margin-top: 1rem;
}

.login-form label:first-of-type {
  margin-top: 0;
}

.login-form input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.login-form input:focus {
  border-color: var(--rutgers-scarlet);
}

.login-form button[type="submit"] {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.7rem;
  background: var(--rutgers-scarlet);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.login-form button[type="submit"]:hover {
  background: var(--rutgers-dark);
}

/* ===== Footer ===== */
footer {
  margin-top: 3rem;
  border-top: 3px solid var(--rutgers-scarlet);
  background: var(--white);
  padding: 1.5rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--rutgers-dark);
  text-decoration: underline;
}

.footer-note h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rutgers-dark);
  margin-bottom: 0.25rem;
}

.footer-note p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.35rem;
    padding: 1rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
  }

  nav a {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.25rem 1rem;
  }

  .sidebar {
    display: none;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .question {
    font-size: 0.95rem;
  }

  .search-results {
    flex-direction: column;
  }

  .search-results-strong,
  .search-results-weak,
  .search-results-cross-page,
  .search-results-guides,
  .search-results-personal {
    max-height: 300px;
  }
}
