﻿/* CSS Variables & Design System */
:root {
  --color-primary: #0056b3;
  /* Deep Blue */
  --color-primary-dark: #004494;
  --color-accent: #ff9800;
  /* Vibrant Orange */
  --color-accent-hover: #f57c00;
  --color-text-main: #1a1a1a;
  --color-text-muted: #666666;
  --color-bg-light: #f8f9fa;
  --color-white: #ffffff;
  --color-border: #e0e0e0;

  /* Header Placeholder needs to be sticky */
  --header-height: 70px;
  /* Estimate if needed, but not using this variable yet */


  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-md: 8px;
  --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--color-text-main);
  line-height: 1.5;
  background-color: var(--color-bg-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  /* Slightly rounded as per design */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
}

.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-outline-white {
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}

/* Header */
#header-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header {
  background: var(--color-white);
  padding: var(--spacing-xs) 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  /* sticky moved to placeholder */
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
}

.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.auth-buttons {
  display: flex;
  gap: var(--spacing-sm);
  height: 40px;
  align-items: center;
  /* Ensure vertical alignment */
}

/* Search Bar Styles */
.search-container {
  /* display: none; Removed for animation */
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 1s ease;

  /* Flex item properties when hidden */
  flex: 0 0 0;
}

.search-container.overflow-visible {
  overflow: visible;

  max-width: 0;
  margin: 0;
  /* Remove margin when hidden to avoid spacing issues */
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  padding-right: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 1rem;
  white-space: nowrap;
  /* Prevent placeholder wrap during anim */
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-close {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

.search-close:hover {
  color: var(--color-primary);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-bg-light);
  cursor: pointer;
  transition: background-color 0.2s;
  display: block;
  width: 100%;
  text-align: left;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

.search-result-category {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
  display: block;
}

.search-result-title {
  font-weight: 500;
  display: block;
}

/* Search Trigger Button - Square Box */
/* Reuse btn-outline styles basically but force square */
.search-trigger {
  width: 42px;
  /* Match height of Join Now roughly */
  height: 42px;
  border: 2px solid var(--color-primary);
  /* Same as outline btn */
  border-radius: 4px;
  /* Same border radius */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: transparent;
  transition: all 0.2s;
  padding: 0;
  /* Override default padding */
}

.search-trigger:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Nav Animation */
nav {
  transition: all 1s ease;
  overflow: hidden;
  /* default to hidden for animation */
  max-width: 1000px;
  opacity: 1;
}

nav.nav-visible {
  overflow: visible;
  /* allow dropdowns to show when static */
}

.nav-links {
  min-width: max-content;
  /* Ensure content doesn't break during squish */
}


/* Active Search State */
.header.search-active nav {
  /* Hide nav */
  max-width: 0;
  opacity: 0;
  margin: 0;
}

.header.search-active .search-container {
  /* Show search */
  width: auto;
  /* Allow growth */
  flex: 1;
  /* Take available space */
  max-width: 600px;
  opacity: 1;
  margin: 0 var(--spacing-md);
}

.header.search-active .search-trigger {
  /* Hide trigger smoothly or just display none since it's removed from flow */
  display: none;
}

/* Hero Section */
.hero {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: var(--spacing-sm);
  font-size: 3rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: var(--spacing-md);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
}

/* Features Section */
.features {
  padding: var(--spacing-lg) 0;
}

.features-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  color: var(--color-text-main);
  margin-bottom: var(--spacing-sm);
}

.feature-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.link-arrow {
  color: var(--color-accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-arrow:hover {
  gap: 8px;
  /* subtle animation */
}

/* Footer */
/* Footer */
.footer {
  background: var(--color-white);
  padding: var(--spacing-lg) 0 var(--spacing-md);
  color: var(--color-text-main);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text-main);
  display: inline-block;
  margin-bottom: var(--spacing-xs);
}

.footer-logo span {
  color: var(--color-text-muted);
  /* or Accent if prefered */
}

.tagline {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}

.footer-col1 h4,
.footer-col2 h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-main);
}

.footer-col1 {
  translate: -100px;
}


.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* Subscribe Form */
.subscribe-area {
  margin-top: var(--spacing-md);
}

.subscribe-form {
  display: flex;
  gap: var(--spacing-xs);
  max-width: 400px;
}

.subscribe-form input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  /* match btn radius */
  font-family: inherit;
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  font-size: 1.25rem;
}

.social-links a {
  color: var(--color-text-muted);
}

.social-links a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* simple mobile hide for now, typically hamburger needed */
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  min-width: 200px;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs) 0;
  z-index: 200;
  flex-direction: column;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 0.8rem var(--spacing-sm);
  color: var(--color-text-main);
  font-size: 0.95rem;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

/* Nested Dropdown (Submenu) */
.dropdown-menu .dropdown-submenu {
  position: relative;
  width: max-content;
}

.submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  margin-top: -5px;
  background-color: var(--color-white);
  min-width: 200px;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs) 0;
  z-index: 200;
  flex-direction: column;
}

.submenu li {
  width: 100%;
}

.submenu a {
  display: block;
  padding: 0.8rem var(--spacing-sm);
  color: var(--color-text-main);
  font-size: 0.95rem;
  white-space: nowrap;
}

.submenu a:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

.dropdown-submenu:hover .submenu {
  display: flex;
}

/* Page Content */
.page-content {
  padding: var(--spacing-lg) 0;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h1 {
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.article-content h2 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-main);
  border-bottom: 2px solid var(--color-bg-light);
  padding-bottom: var(--spacing-xs);
}

.article-content h3 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
  color: var(--color-primary-dark);
}

.article-content p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-md);
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content hr {
  margin: var(--spacing-lg) 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

/* Download Section */
.download-section {
  background-color: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-lg);
  text-align: center;
}

.download-section h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.download-buttons .btn {
  min-width: 250px;
}

/* Industries Page Styles */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.stats-text {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* Filter Container */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  background-color: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--spacing-lg);
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
}

.filter-select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--color-white);
}

select.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='%23666666'%3E%3Cpath d='M12 16L6 10H18L12 16Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.filter-actions {
  display: flex;
  align-items: center;
}

/* Industries Table */
.table-responsive {
  overflow-x: auto;
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.industries-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  table-layout: fixed;
  /* Fix column widths */
}

/* Define fixed column widths */
.industries-table th:nth-child(1) {
  width: 60px;
}

/* No. */
.industries-table th:nth-child(2) {
  width: 30%;
}

/* Name */
.industries-table th:nth-child(3) {
  width: 15%;
}

/* City */
.industries-table th:nth-child(4) {
  width: 15%;
}

/* Province */
.industries-table th:nth-child(5) {
  width: 15%;
}

/* Affiliation */
.industries-table th:nth-child(6) {
  width: 120px;
}

/* Status - Fixed pixel width for pills */
/* Remaining space distributed or implicit, but explicit is better.
   Total so far: 60px + 30% + 15% + 15% + 15% + 120px. 
   Approximation: 180px + 75%. Ideally use all % or all px or mixed carefully.
   Let's use percentages for main content and px for small fixed cols.
*/
.industries-table th:nth-child(1) {
  width: 5%;
}

.industries-table th:nth-child(2) {
  width: 45%;
}

.industries-table th:nth-child(3) {
  width: 10%;
}

.industries-table th:nth-child(4) {
  width: 10%;
}

.industries-table th:nth-child(5) {
  width: 20%;
}

.industries-table th:nth-child(6) {
  width: 10%;
}

.industries-table th,
.industries-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.industries-table th {
  background-color: var(--color-bg-light);
  font-weight: 600;
  color: var(--color-text-main);
  white-space: nowrap;
}

.industries-table tr:hover {
  background-color: var(--color-bg-light);
}

.industries-table tr:last-child td {
  border-bottom: none;
}

.industries-table th:nth-child(1),
.industries-table td:nth-child(1) {
  text-align: center;
}

.firm-name {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.firm-address {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Industries Grid */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  min-height: 200px;
  /* Min height for loading state */
}

/* Industry Card */
.industry-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--spacing-md);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--color-border);
}

.industry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.industry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
  gap: var(--spacing-sm);
}

.industry-header h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin: 0;
  word-break: break-word;
  /* Prevent overflow of long names */
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  text-align: center;
}

.status-badge.active {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-badge.inactive {
  background-color: #ffebee;
  color: #c62828;
}

.status-badge.blue {
  background-color: #e3f2fd;
  color: #0d47a1;
}

.industry-details p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.industry-details i {
  color: var(--color-primary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

#page-info {
  font-weight: 600;
  color: var(--color-text-muted);
}

.loading-spinner,
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* Collapsible Filter Panel Transition */
.filter-panel {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: 0.5s;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
}

.filter-panel.active {
  max-height: 500px;
  opacity: 1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

#filter-toggle-btn i {
  transform: translateX(-10px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--spacing-lg);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-text-main);
  border-radius: 4px;
  /* Square with slight radius */
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  font-family: var(--font-family);
}

.page-btn:hover:not(:disabled):not(.dots) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-bg-light);
}

.page-btn.active {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--color-bg-light);
}

.page-btn.dots {
  border: none;
  background: transparent;
  cursor: default;
  color: var(--color-text-muted);
  min-width: auto;
  /* Allow it to shrink */
  padding: 0 0.1rem;
  /* Reduce padding significantly */
  margin: 0 -0.2rem;
  /* Optional: Pull neighbors closer if gap is still too big */
}

/* Books Page Styles */
.books-section {
  margin-top: var(--spacing-lg);
}

.book-category-group {
  margin-bottom: var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-white);
}

.category-header {
  padding: 1rem 1.5rem;
  background-color: var(--color-bg-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.category-header:hover {
  background-color: #e9ecef;
  /* Slightly darker than light */
}

.category-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.category-header .toggle-icon {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: var(--color-white);
}

.book-list {
  padding: 0;
}

.book-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.book-item:last-child {
  border-bottom: none;
}

.book-sr {
  width: 40px;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
}

.book-info {
  flex: 1;
  padding-right: 1rem;
}

.book-title {
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.2rem;
}

.book-author {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.book-action {
  flex-shrink: 0;
}

.btn-outline-sm {
  padding: 0.4rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  /* Square with slight radius */
  color: var(--color-primary);
  transition: all 0.2s;
}

.btn-outline-sm:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.empty-msg,
.error-msg {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted);
}

.subcategory-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  padding: 0.75rem 1.5rem;
  background-color: var(--color-white);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--color-bg-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.subcategory-header:hover {
  background-color: #f8f9fa;
}

.subcategory-header .toggle-icon {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.subcategory-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #fafafa;
  /* Slightly different bg for nested content */
  padding-left: 0.5rem;
  /* Indent content slightly */
}

/* Sortable Headers */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

th.sortable:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sort-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-left: 5px;
}