/* Basic reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #f5f5f5;
  color: #222;
}

/* CSU header/footer placeholders */
#csu-header {
  background: #8a1f1f; /* use CSU brand colour when integrating */
  color: #ffffff;
}

.csu-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.csu-logo-link {
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.csu-logo-text {
  font-size: 1rem;
}

.csu-site-title span {
  font-size: 0.95rem;
  font-weight: 500;
}

#csu-footer {
  background: #111827;
  color: #e5e7eb;
  margin-top: 1.5rem;
}

.csu-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  font-size: 0.8rem;
}

#csu-footer a {
  color: #e5e7eb;
  text-decoration: underline;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  max-width: 1200px;
  margin: 0.75rem auto 1.5rem;
  gap: 0;
  min-height: 60vh;
}

/* Sidebar */
.sidebar {
  background: #0f172a;
  color: #e5e7eb;
  padding: 1rem 0.75rem;
  border-right: 1px solid #1f2937;
}

.sidebar h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.sidebar ul {
  list-style: none;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.sidebar li {
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sidebar li:hover {
  background: #1f2937;
}

.sidebar li.active {
  background: #10b981;
  color: #022c22;
  font-weight: 600;
}

/* Content */
.content {
  padding: 0.75rem 1rem 1.5rem;
  background: #f9fafb;
  overflow-x: auto;
}

.page-header h1 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

#last-update {
  font-size: 0.8rem;
  color: #4b5563;
}

.search-bar {
  margin: 0.7rem 0 0.5rem;
}

#search-input {
  width: 100%;
  max-width: 480px;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-size: 0.9rem;
}

#summary {
  font-size: 0.8rem;
  color: #4b5563;
  margin-bottom: 0.6rem;
}

/* Table */
.catalogue-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.85rem;
}

.catalogue-table thead {
  background: #e5e7eb;
}

.catalogue-table th,
.catalogue-table td {
  padding: 0.35rem 0.45rem;
  border: 1px solid #e5e7eb;
  vertical-align: top;
}

.catalogue-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.catalogue-table tbody tr:hover {
  background: #e0f2fe;
}

.catalogue-table th {
  text-align: left;
}

.catalogue-table td:nth-child(1) {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.cost-ext {
  color: #1d4ed8;
}

.cost-int {
  color: #16a34a;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #1f2937;
  }
}
