.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 20px;
}

/* Contenedor principal debajo del header fijo */
.container {
    width: 90%;
    max-width: 1500px;
    margin: 100px auto 20px auto;  /* 100px ≈ altura header */
    padding: 0;
}

/* Top bar layout */
.top-bar {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Title block */
.title-block h1 {
    margin: 0;
    font-size: 2.6rem;
    color: var(--accent-color);
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Horizontal menu */
.main-menu ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Estado base */
.main-menu .menu-item {
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
}

/* Texto base dentro del item */
.main-menu .menu-item span {
    font-weight: 400;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

/* Activo (solo el texto) */
.main-menu .menu-item.active span {
    font-weight: 700;
    color: var(--accent-color);
}

/* Hover: nunca negrita, aunque sea activo */
.main-menu .menu-item:hover span {
    font-weight: 400;
    color: var(--accent-color);
}

/* Theme toggle integrated into menu */
.theme-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: color 0.2s ease;
}

.theme-toggle button:hover {
  color: var(--accent-color);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    display: block;
    color: var(--text-color);
    fill: currentColor;
    stroke: currentColor;
}

/* Sections */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Utilities menu */
.utilities-menu {
    position: relative;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
}

.utilities-trigger {
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.utilities-trigger:hover {
    background-color: var(--table-hover-bg);
}

.utilities-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 32px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 2000;
}

.utilities-dropdown .utility-item {
    padding: 10px 14px;
    transition: background-color 0.2s ease;
}

.utilities-dropdown .utility-item:hover {
    background-color: var(--table-hover-bg);
}